<feed xmlns='http://www.w3.org/2005/Atom'>
<title>staging/xback/include/bpf.mk, branch master</title>
<subtitle>Staging tree of Koen Vandeputte</subtitle>
<id>https://git-03.infra.openwrt.org/openwrt/staging/xback/atom?h=master</id>
<link rel='self' href='https://git-03.infra.openwrt.org/openwrt/staging/xback/atom?h=master'/>
<link rel='alternate' type='text/html' href='https://git-03.infra.openwrt.org/openwrt/staging/xback/'/>
<updated>2025-04-09T07:52:21Z</updated>
<entry>
<title>build: bpf: fix LLVM tool paths with host toolchain</title>
<updated>2025-04-09T07:52:21Z</updated>
<author>
<name>Matthias Schiffer</name>
</author>
<published>2025-04-05T10:23:44Z</published>
<link rel='alternate' type='text/html' href='https://git-03.infra.openwrt.org/openwrt/staging/xback/commit/?id=89f1d56a7eab7d530be4bbb5cf21dfc80b3485b1'/>
<id>urn:sha1:89f1d56a7eab7d530be4bbb5cf21dfc80b3485b1</id>
<content type='text'>
Do not assume that the various tools like llc can be found under the
same path as clang; instead, look them up through BPF_PATH (while still
preferring ones found next to clang).

This fixes build in common setups with ccache, where clang resolves to a
path like /usr/lib/ccache/bin/clang, but no other tools can be found at
that location.

Signed-off-by: Matthias Schiffer &lt;mschiffer@universe-factory.net&gt;
Link: https://github.com/openwrt/openwrt/pull/18422
Signed-off-by: Robert Marko &lt;robimarko@gmail.com&gt;
</content>
</entry>
<entry>
<title>build: bpf: drop clang-11 lookup</title>
<updated>2025-04-09T07:52:21Z</updated>
<author>
<name>Matthias Schiffer</name>
</author>
<published>2025-04-05T11:30:12Z</published>
<link rel='alternate' type='text/html' href='https://git-03.infra.openwrt.org/openwrt/staging/xback/commit/?id=45f0eb106bed8868c02e0ccfb545b7e1c4279841'/>
<id>urn:sha1:45f0eb106bed8868c02e0ccfb545b7e1c4279841</id>
<content type='text'>
CLANG_MIN_VER is 12, so there is no point in looking for clang-11.

Signed-off-by: Matthias Schiffer &lt;mschiffer@universe-factory.net&gt;
Link: https://github.com/openwrt/openwrt/pull/18422
Signed-off-by: Robert Marko &lt;robimarko@gmail.com&gt;
</content>
</entry>
<entry>
<title>build: conditionally build llvm bpf toolchain by default</title>
<updated>2025-02-07T10:16:08Z</updated>
<author>
<name>Felix Fietkau</name>
</author>
<published>2025-02-07T10:11:42Z</published>
<link rel='alternate' type='text/html' href='https://git-03.infra.openwrt.org/openwrt/staging/xback/commit/?id=6605e45676815156f0c47d4117ee401e6616fcac'/>
<id>urn:sha1:6605e45676815156f0c47d4117ee401e6616fcac</id>
<content type='text'>
Unless another toolchain is present (or selected), build the bpf toolchain
whenever a package is selected that needs it.

Signed-off-by: Felix Fietkau &lt;nbd@nbd.name&gt;
</content>
</entry>
<entry>
<title>bpf: fix llvm version check</title>
<updated>2024-09-09T08:36:47Z</updated>
<author>
<name>Konstantin Demin</name>
</author>
<published>2024-06-13T17:56:31Z</published>
<link rel='alternate' type='text/html' href='https://git-03.infra.openwrt.org/openwrt/staging/xback/commit/?id=f61fb07675631c5615f816479cc638c7b1d7acd4'/>
<id>urn:sha1:f61fb07675631c5615f816479cc638c7b1d7acd4</id>
<content type='text'>
- specify CC target explicitly

Signed-off-by: Konstantin Demin &lt;rockdrilla@gmail.com&gt;
Link: https://github.com/openwrt/openwrt/pull/15703
Signed-off-by: Robert Marko &lt;robimarko@gmail.com&gt;
</content>
</entry>
<entry>
<title>bpf: also include toolchain standard header as system header</title>
<updated>2024-06-17T11:48:29Z</updated>
<author>
<name>Christian Marangi</name>
</author>
<published>2024-05-05T15:48:31Z</published>
<link rel='alternate' type='text/html' href='https://git-03.infra.openwrt.org/openwrt/staging/xback/commit/?id=5f9fb964c3afbcbc6ca860c817076221d0c1ce8c'/>
<id>urn:sha1:5f9fb964c3afbcbc6ca860c817076221d0c1ce8c</id>
<content type='text'>
Also include toolchain standard header as system header. These are
required by xdp-tools that try to include stddef.h and stdbool.h for
some tools. These header are usually in /lib/gcc/../include but musl
also have some special variant in /include.

To fix compilation of xdp-tools, also include these standard header.
These header should follow ISO C standard and should not introduce
regression in bpf tools making them specific to an arch.

Link: https://github.com/openwrt/openwrt/pull/15390
Signed-off-by: Christian Marangi &lt;ansuelsmth@gmail.com&gt;
</content>
</entry>
<entry>
<title>bpf: fix broken inclusion of system include</title>
<updated>2024-05-03T12:53:11Z</updated>
<author>
<name>Christian Marangi</name>
</author>
<published>2024-05-03T12:49:58Z</published>
<link rel='alternate' type='text/html' href='https://git-03.infra.openwrt.org/openwrt/staging/xback/commit/?id=fc221b065a94dbd9c11218a777a86c1bcdc69ee5'/>
<id>urn:sha1:fc221b065a94dbd9c11218a777a86c1bcdc69ee5</id>
<content type='text'>
Commit d82c5884c616 ("treewide: make use of new toolchain define")
changed $(TOOLCHAIN_DIR)/include to the new variable
$(TOOLCHAIN_INC_DIRS) that now can contain multiple entry.

Because of this only the first include in $(TOOLCHAIN_INC_DIRS) was
actually included with -isystem, making the other producing warning with
ignored inputs.

Fix this by parsing each entry in $(TOOLCHAIN_INC_DIRS) and adding the
-isystem prefix to correctly include them in the BPF_KERNEL_INCLUDE.

Fixes: d82c5884c616 ("treewide: make use of new toolchain define")
Signed-off-by: Christian Marangi &lt;ansuelsmth@gmail.com&gt;
</content>
</entry>
<entry>
<title>treewide: make use of new toolchain define</title>
<updated>2023-10-20T14:13:56Z</updated>
<author>
<name>Christian Marangi</name>
</author>
<published>2023-10-19T16:16:25Z</published>
<link rel='alternate' type='text/html' href='https://git-03.infra.openwrt.org/openwrt/staging/xback/commit/?id=d82c5884c6164856e830894d9bfacd218d430ba4'/>
<id>urn:sha1:d82c5884c6164856e830894d9bfacd218d430ba4</id>
<content type='text'>
Make use of new toolchain define. TOOLCHAIN_DIR should be used only for
toolchain related packages and for everything else TOOLCHAIN_ROOT_DIR
and other define should be used instead.

Switch to new entry where possible.

Signed-off-by: Christian Marangi &lt;ansuelsmth@gmail.com&gt;
</content>
</entry>
<entry>
<title>bpf: ignore missing LLVM bins on package for non compile steps</title>
<updated>2023-01-18T23:29:09Z</updated>
<author>
<name>Christian Marangi</name>
</author>
<published>2023-01-18T11:22:12Z</published>
<link rel='alternate' type='text/html' href='https://git-03.infra.openwrt.org/openwrt/staging/xback/commit/?id=116c73fd71c75e38c4d707dc5a74e6993874098f'/>
<id>urn:sha1:116c73fd71c75e38c4d707dc5a74e6993874098f</id>
<content type='text'>
To download a package the LLVM bins are not strictly needed.
Currently with an example run of make package/bridger/download V=s, the
build fail with

make[2]: Entering directory '/home/ansuel/openwrt-ansuel/openwrt/package/network/services/bridger'
bash: line 1: /home/ansuel/openwrt-ansuel/openwrt/staging_dir/host/llvm-bpf/bin/clang: No such file or directory
bash: line 1: [: : integer expression expected
/home/ansuel/openwrt-ansuel/openwrt/include/bpf.mk:71: *** ERROR: LLVM/clang version too old. Minimum required: 12, found: .  Stop.
make[2]: Leaving directory '/home/ansuel/openwrt-ansuel/openwrt/package/network/services/bridger'
time: package/network/services/bridger/download#0.04#0.00#0.06
    ERROR: package/network/services/bridger failed to build.

This is wrong since it may be needed to download the required packages
first and then compile them later.

Fix this by ignoring the LLVM bin check on non compile steps.

Tested-by: Robert Marko &lt;robimarko@gmail.com&gt;
Signed-off-by: Christian Marangi &lt;ansuelsmth@gmail.com&gt;
</content>
</entry>
<entry>
<title>bpf: check llvm version only when used</title>
<updated>2022-10-30T23:46:55Z</updated>
<author>
<name>Hauke Mehrtens</name>
</author>
<published>2022-10-26T21:05:31Z</published>
<link rel='alternate' type='text/html' href='https://git-03.infra.openwrt.org/openwrt/staging/xback/commit/?id=c58177b5dcb3461efef0adefe570dd8a8d966ec4'/>
<id>urn:sha1:c58177b5dcb3461efef0adefe570dd8a8d966ec4</id>
<content type='text'>
unetd always includes $(INCLUDE_DIR)/bpf.mk. This file always checks if
the LLVM version is supported in CLANG_VER_VALID. unetd only needs bpf
when UNETD_VXLAN_SUPPORT is set. It fails when UNETD_VXLAN_SUPPORT is
not set and llvm is not installed.

Fix it by only checking the LLVM version when a LLVM toolchain is
available.

Signed-off-by: Hauke Mehrtens &lt;hauke@hauke-m.de&gt;
</content>
</entry>
<entry>
<title>treewide: drop use of which</title>
<updated>2022-01-17T08:14:26Z</updated>
<author>
<name>Ansuel Smith</name>
</author>
<published>2021-11-25T01:12:58Z</published>
<link rel='alternate' type='text/html' href='https://git-03.infra.openwrt.org/openwrt/staging/xback/commit/?id=88204bfa82f982a986d2aa3e166a4c5946040308'/>
<id>urn:sha1:88204bfa82f982a986d2aa3e166a4c5946040308</id>
<content type='text'>
Ubuntu started to flag which as deprecated and it
seems which is not really standard and may vary
across Distro.
Drop the use of which and use the standard 'command -v'
for this simple task.
Which is still present in the prereq if some package/script
still use which.
A utility script called command_all.sh is implemented that
will just mimic the output of which -a.

Signed-off-by: Ansuel Smith &lt;ansuelsmth@gmail.com&gt;
</content>
</entry>
</feed>
