<?xml version="1.0"?>
<?xml-stylesheet type="text/xsl" href="/source/rss.xsl.xml"?>
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/">
<channel>
    <title>Changes in Makefile</title>
    <description></description>
    <language>en</language>
    <copyright>Copyright 2015</copyright>
    <generator>Java</generator><item>
        <title>c73a24436698ade1b6a0742e8bcfa04c9ef8fad9 - bpftool: Allow explicitly skip llvm, libbfd and libcrypto dependencies</title>
        <link>http://kernelsources.org:8080/source/history/linux/tools/bpf/bpftool/Makefile#c73a24436698ade1b6a0742e8bcfa04c9ef8fad9</link>
        <description>bpftool: Allow explicitly skip llvm, libbfd and libcrypto dependenciesIntroduce SKIP_LLVM, SKIP_LIBBFD, and SKIP_CRYPTO build flags that letusers build bpftool without these optional dependencies.SKIP_LLVM=1 skips LLVM even when detected. SKIP_LIBBFD=1 prevents thelibbfd JIT disassembly fallback when LLVM is absent. Together, theyproduce a bpftool with no disassembly support.SKIP_CRYPTO=1 excludes sign.c and removes the -lcrypto link dependency.Inline stubs in main.h return errors with a clear message if signingfunctions are called at runtime.Use BPFTOOL_WITHOUT_CRYPTO (not HAVE_LIBCRYPTO_SUPPORT) as the Cdefine, following the BPFTOOL_WITHOUT_SKELETONS naming convention forbpftool-internal build config, leaving HAVE_LIBCRYPTO_SUPPORT free forproper feature detection in the future.All three flags are propagated through the selftests Makefile to bpftoolsub-builds.Signed-off-by: Mykyta Yatsenko &lt;yatsenko@meta.com&gt;Signed-off-by: Andrii Nakryiko &lt;andrii@kernel.org&gt;Link: https://lore.kernel.org/bpf/20260312-b4-bpftool_build-v2-1-4c9d57133644@meta.com

            List of files:
            /linux/tools/bpf/bpftool/Makefile</description>
        <pubDate>Fri, 13 Mar 2026 01:03:27 +0100</pubDate>
        <dc:creator>Mykyta Yatsenko &lt;yatsenko@meta.com&gt;</dc:creator>
    </item>
<item>
        <title>08a7491843224f8b96518fbe70d9e48163046054 - bpftool: Fix dependencies for static build</title>
        <link>http://kernelsources.org:8080/source/history/linux/tools/bpf/bpftool/Makefile#08a7491843224f8b96518fbe70d9e48163046054</link>
        <description>bpftool: Fix dependencies for static buildWhen building selftests/bpf with EXTRA_LDFLAGS=-static the follwoingerror happens:  LINK    /ws/linux/tools/testing/selftests/bpf/tools/build/bpftool/bootstrap/bpftool/usr/bin/x86_64-linux-gnu-ld.bfd: /usr/lib/gcc/x86_64-linux-gnu/15/../../../x86_64-linux-gnu/libcrypto.a(libcrypto-lib-dso_dlfcn.o): in function `dlfcn_globallookup&apos;:   [...]/usr/bin/x86_64-linux-gnu-ld.bfd: /usr/lib/gcc/x86_64-linux-gnu/15/../../../x86_64-linux-gnu/libcrypto.a(libcrypto-lib-c_zlib.o): in function `zlib_oneshot_expand_block&apos;:(.text+0xc64): undefined reference to `uncompress&apos;/usr/bin/x86_64-linux-gnu-ld.bfd: /usr/lib/gcc/x86_64-linux-gnu/15/../../../x86_64-linux-gnu/libcrypto.a(libcrypto-lib-c_zlib.o): in function `zlib_oneshot_compress_block&apos;:(.text+0xce4): undefined reference to `compress&apos;collect2: error: ld returned 1 exit statusmake[1]: *** [Makefile:252: /ws/linux/tools/testing/selftests/bpf/tools/build/bpftool/bootstrap/bpftool] Error 1make: *** [Makefile:327: /ws/linux/tools/testing/selftests/bpf/tools/sbin/bpftool] Error 2make: *** Waiting for unfinished jobs....This is caused by wrong order of dependencies in the Makefile. Fix it.Signed-off-by: Ihor Solodrai &lt;ihor.solodrai@linux.dev&gt;Signed-off-by: Andrii Nakryiko &lt;andrii@kernel.org&gt;Link: https://lore.kernel.org/bpf/20260128211255.376933-1-ihor.solodrai@linux.dev

            List of files:
            /linux/tools/bpf/bpftool/Makefile</description>
        <pubDate>Wed, 28 Jan 2026 22:12:55 +0100</pubDate>
        <dc:creator>Ihor Solodrai &lt;ihor.solodrai@linux.dev&gt;</dc:creator>
    </item>
<item>
        <title>639f58a0f4808e78ff6c764747ee125c0e2f093c - bpftool: Fix build warnings due to MS extensions</title>
        <link>http://kernelsources.org:8080/source/history/linux/tools/bpf/bpftool/Makefile#639f58a0f4808e78ff6c764747ee125c0e2f093c</link>
        <description>bpftool: Fix build warnings due to MS extensionsThe kernel is now built with -fms-extensions. Anonymous structs orunions permitted by these extensions have been used in several places,and can end up in the generated vmlinux.h file, for example:    struct ns_tree {        [...]    };    [...]    struct ns_common {            [...]            union {                    struct ns_tree;                    struct callback_head ns_rcu;            };    };Trying to include this header for compiling a tool may result in buildwarnings, if the compiler does not expect these extensions. This is thecase, for example, with bpftool:    In file included from skeleton/pid_iter.bpf.c:3:    .../tools/testing/selftests/bpf/tools/build/bpftool/vmlinux.h:64057:3:    warning: declaration does not declare anything    [-Wmissing-declarations]     64057 |                 struct ns_tree;           |                 ^~~~~~~~~~~~~~Fix these build warnings in bpftool by turning on Microsoft extensionswhen compiling the two BPF programs that rely on vmlinux.h.Reported-by: Alexei Starovoitov &lt;ast@kernel.org&gt;Closes: https://lore.kernel.org/bpf/CAADnVQK9ZkPC7+R5VXKHVdtj8tumpMXm7BTp0u9CoiFLz_aPTg@mail.gmail.com/Signed-off-by: Quentin Monnet &lt;qmo@kernel.org&gt;Link: https://lore.kernel.org/r/20251208130748.68371-1-qmo@kernel.orgSigned-off-by: Alexei Starovoitov &lt;ast@kernel.org&gt;

            List of files:
            /linux/tools/bpf/bpftool/Makefile</description>
        <pubDate>Mon, 08 Dec 2025 14:07:48 +0100</pubDate>
        <dc:creator>Quentin Monnet &lt;qmo@kernel.org&gt;</dc:creator>
    </item>
<item>
        <title>40863f4d6ef2c34bb00dd1070dfaf9d5f27a497e - bpftool: Add support for signing BPF programs</title>
        <link>http://kernelsources.org:8080/source/history/linux/tools/bpf/bpftool/Makefile#40863f4d6ef2c34bb00dd1070dfaf9d5f27a497e</link>
        <description>bpftool: Add support for signing BPF programsTwo modes of operation being added:Add two modes of operation:* For prog load, allow signing a program immediately before loading. This  is essential for command-line testing and administration.      bpftool prog load -S -k &lt;private_key&gt; -i &lt;identity_cert&gt; fentry_test.bpf.o* For gen skeleton, embed a pre-generated signature into the C skeleton  file. This supports the use of signed programs in compiled applications.      bpftool gen skeleton -S -k &lt;private_key&gt; -i &lt;identity_cert&gt; fentry_test.bpf.oGeneration of the loader program and its metadata map is implemented inlibbpf (bpf_obj__gen_loader). bpftool generates a skeleton that loadsthe program and automates the required steps: freezing the map, creatingan exclusive map, loading, and running. Users can use standard libbpfAPIs directly or integrate loader program generation into their owntoolchains.Signed-off-by: KP Singh &lt;kpsingh@kernel.org&gt;Acked-by: Quentin Monnet &lt;qmo@kernel.org&gt;Link: https://lore.kernel.org/r/20250921160120.9711-5-kpsingh@kernel.orgSigned-off-by: Alexei Starovoitov &lt;ast@kernel.org&gt;

            List of files:
            /linux/tools/bpf/bpftool/Makefile</description>
        <pubDate>Sun, 21 Sep 2025 18:01:19 +0200</pubDate>
        <dc:creator>KP Singh &lt;kpsingh@kernel.org&gt;</dc:creator>
    </item>
<item>
        <title>fa593d0f969dcfa41d390822fdf1a0ab48cd882c - Merge tag &apos;bpf-next-6.15&apos; of git://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf-next</title>
        <link>http://kernelsources.org:8080/source/history/linux/tools/bpf/bpftool/Makefile#fa593d0f969dcfa41d390822fdf1a0ab48cd882c</link>
        <description>Merge tag &apos;bpf-next-6.15&apos; of git://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf-nextPull bpf updates from Alexei Starovoitov: &quot;For this merge window we&apos;re splitting BPF pull request into three for  higher visibility: main changes, res_spin_lock, try_alloc_pages.  These are the main BPF changes:   - Add DFA-based live registers analysis to improve verification of     programs with loops (Eduard Zingerman)   - Introduce load_acquire and store_release BPF instructions and add     x86, arm64 JIT support (Peilin Ye)   - Fix loop detection logic in the verifier (Eduard Zingerman)   - Drop unnecesary lock in bpf_map_inc_not_zero() (Eric Dumazet)   - Add kfunc for populating cpumask bits (Emil Tsalapatis)   - Convert various shell based tests to selftests/bpf/test_progs     format (Bastien Curutchet)   - Allow passing referenced kptrs into struct_ops callbacks (Amery     Hung)   - Add a flag to LSM bpf hook to facilitate bpf program signing     (Blaise Boscaccy)   - Track arena arguments in kfuncs (Ihor Solodrai)   - Add copy_remote_vm_str() helper for reading strings from remote VM     and bpf_copy_from_user_task_str() kfunc (Jordan Rome)   - Add support for timed may_goto instruction (Kumar Kartikeya     Dwivedi)   - Allow bpf_get_netns_cookie() int cgroup_skb programs (Mahe Tardy)   - Reduce bpf_cgrp_storage_busy false positives when accessing cgroup     local storage (Martin KaFai Lau)   - Introduce bpf_dynptr_copy() kfunc (Mykyta Yatsenko)   - Allow retrieving BTF data with BTF token (Mykyta Yatsenko)   - Add BPF kfuncs to set and get xattrs with &apos;security.bpf.&apos; prefix     (Song Liu)   - Reject attaching programs to noreturn functions (Yafang Shao)   - Introduce pre-order traversal of cgroup bpf programs (Yonghong     Song)&quot;* tag &apos;bpf-next-6.15&apos; of git://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf-next: (186 commits)  selftests/bpf: Add selftests for load-acquire/store-release when register number is invalid  bpf: Fix out-of-bounds read in check_atomic_load/store()  libbpf: Add namespace for errstr making it libbpf_errstr  bpf: Add struct_ops context information to struct bpf_prog_aux  selftests/bpf: Sanitize pointer prior fclose()  selftests/bpf: Migrate test_xdp_vlan.sh into test_progs  selftests/bpf: test_xdp_vlan: Rename BPF sections  bpf: clarify a misleading verifier error message  selftests/bpf: Add selftest for attaching fexit to __noreturn functions  bpf: Reject attaching fexit/fmod_ret to __noreturn functions  bpf: Only fails the busy counter check in bpf_cgrp_storage_get if it creates storage  bpf: Make perf_event_read_output accessible in all program types.  bpftool: Using the right format specifiers  bpftool: Add -Wformat-signedness flag to detect format errors  selftests/bpf: Test freplace from user namespace  libbpf: Pass BPF token from find_prog_btf_id to BPF_BTF_GET_FD_BY_ID  bpf: Return prog btf_id without capable check  bpf: BPF token support for BPF_BTF_GET_FD_BY_ID  bpf, x86: Fix objtool warning for timed may_goto  bpf: Check map-&gt;record at the beginning of check_and_free_fields()  ...

            List of files:
            /linux/tools/bpf/bpftool/Makefile</description>
        <pubDate>Sun, 30 Mar 2025 21:43:03 +0200</pubDate>
        <dc:creator>Linus Torvalds &lt;torvalds@linux-foundation.org&gt;</dc:creator>
    </item>
<item>
        <title>8d86767be9c9b94f196e663e0ca88e2eb604a20e - bpftool: Add -Wformat-signedness flag to detect format errors</title>
        <link>http://kernelsources.org:8080/source/history/linux/tools/bpf/bpftool/Makefile#8d86767be9c9b94f196e663e0ca88e2eb604a20e</link>
        <description>bpftool: Add -Wformat-signedness flag to detect format errorsThis commit adds the -Wformat-signedness compiler flag to detect andprevent printf format errors, where signed or unsigned types aremismatched with format specifiers. This helps to catch potential issues atcompile-time, ensuring that our code is more robust and reliable. Withthis flag, the compiler will now warn about incorrect format strings, suchas using %d with unsigned types or %u with signed types.Signed-off-by: Jiayuan Chen &lt;jiayuan.chen@linux.dev&gt;Signed-off-by: Andrii Nakryiko &lt;andrii@kernel.org&gt;Link: https://lore.kernel.org/bpf/20250311112809.81901-2-jiayuan.chen@linux.dev

            List of files:
            /linux/tools/bpf/bpftool/Makefile</description>
        <pubDate>Tue, 11 Mar 2025 12:28:08 +0100</pubDate>
        <dc:creator>Jiayuan Chen &lt;jiayuan.chen@linux.dev&gt;</dc:creator>
    </item>
<item>
        <title>42367eca7604e16e170bd6bd94ef61ffdd335f4a - tools: Remove redundant quiet setup</title>
        <link>http://kernelsources.org:8080/source/history/linux/tools/bpf/bpftool/Makefile#42367eca7604e16e170bd6bd94ef61ffdd335f4a</link>
        <description>tools: Remove redundant quiet setupQ is exported from Makefile.include so it is not necessary to manuallyset it.Reviewed-by: Jiri Olsa &lt;jolsa@kernel.org&gt;Signed-off-by: Charlie Jenkins &lt;charlie@rivosinc.com&gt;Acked-by: Andrii Nakryiko &lt;andrii@kernel.org&gt;Acked-by: Quentin Monnet &lt;qmo@kernel.org&gt;Cc: Adrian Hunter &lt;adrian.hunter@intel.com&gt;Cc: Alexander Shishkin &lt;alexander.shishkin@linux.intel.com&gt;Cc: Alexei Starovoitov &lt;ast@kernel.org&gt;Cc: Benjamin Tissoires &lt;bentiss@kernel.org&gt;Cc: Daniel Borkmann &lt;daniel@iogearbox.net&gt;Cc: Daniel Lezcano &lt;daniel.lezcano@linaro.org&gt;Cc: Eduard Zingerman &lt;eddyz87@gmail.com&gt;Cc: Hao Luo &lt;haoluo@google.com&gt;Cc: Ian Rogers &lt;irogers@google.com&gt;Cc: Ingo Molnar &lt;mingo@redhat.com&gt;Cc: Jiri Kosina &lt;jikos@kernel.org&gt;Cc: John Fastabend &lt;john.fastabend@gmail.com&gt;Cc: Josh Poimboeuf &lt;jpoimboe@kernel.org&gt;Cc: KP Singh &lt;kpsingh@kernel.org&gt;Cc: Lukasz Luba &lt;lukasz.luba@arm.com&gt;Cc: Mark Rutland &lt;mark.rutland@arm.com&gt;Cc: Martin KaFai Lau &lt;martin.lau@linux.dev&gt;Cc: Mykola Lysenko &lt;mykolal@fb.com&gt;Cc: Namhyung Kim &lt;namhyung@kernel.org&gt;Cc: Peter Zijlstra &lt;peterz@infradead.org&gt;Cc: Rafael J. Wysocki &lt;rafael@kernel.org&gt;Cc: Shuah Khan &lt;shuah@kernel.org&gt;Cc: Song Liu &lt;song@kernel.org&gt;Cc: Stanislav Fomichev &lt;sdf@google.com&gt;Cc: Steven Rostedt (VMware) &lt;rostedt@goodmis.org&gt;Cc: Yonghong Song &lt;yonghong.song@linux.dev&gt;Cc: Zhang Rui &lt;rui.zhang@intel.com&gt;Link: https://lore.kernel.org/r/20250213-quiet_tools-v3-2-07de4482a581@rivosinc.comSigned-off-by: Arnaldo Carvalho de Melo &lt;acme@redhat.com&gt;

            List of files:
            /linux/tools/bpf/bpftool/Makefile</description>
        <pubDate>Thu, 13 Feb 2025 22:06:22 +0100</pubDate>
        <dc:creator>Charlie Jenkins &lt;charlie@rivosinc.com&gt;</dc:creator>
    </item>
<item>
        <title>fee9c03b25829adcc5539da1081d6219fe7ccbcd - bpftool: Link zstd lib required by libelf</title>
        <link>http://kernelsources.org:8080/source/history/linux/tools/bpf/bpftool/Makefile#fee9c03b25829adcc5539da1081d6219fe7ccbcd</link>
        <description>bpftool: Link zstd lib required by libelfWhen the feature libelf-zstd is detected, the zstd lib is required bylibelf.  Link the zstd lib in this case.Reviewed-by: Quentin Monnet &lt;qmo@kernel.org&gt;Signed-off-by: Leo Yan &lt;leo.yan@arm.com&gt;Tested-by: Namhyung Kim &lt;namhyung@kernel.org&gt;Acked-by: Andrii Nakryiko &lt;andrii@kernel.org&gt;Cc: Adrian Hunter &lt;adrian.hunter@intel.com&gt;Cc: Alexei Starovoitov &lt;ast@kernel.org&gt;Cc: Daniel Borkmann &lt;daniel@iogearbox.net&gt;Cc: Eduard Zingerman &lt;eddyz87@gmail.com&gt;Cc: Guilherme Amadio &lt;amadio@gentoo.org&gt;Cc: Hao Luo &lt;haoluo@google.com&gt;Cc: Ian Rogers &lt;irogers@google.com&gt;Cc: James Clark &lt;james.clark@linaro.org&gt;Cc: Jiri Olsa &lt;jolsa@kernel.org&gt;Cc: John Fastabend &lt;john.fastabend@gmail.com&gt;Cc: KP Singh &lt;kpsingh@kernel.org&gt;Cc: Kan Liang &lt;kan.liang@linux.intel.com&gt;Cc: Martin KaFai Lau &lt;martin.lau@linux.dev&gt;Cc: Nick Terrell &lt;terrelln@fb.com&gt;Cc: Song Liu &lt;song@kernel.org&gt;Cc: Stanislav Fomichev &lt;sdf@google.com&gt;Cc: Yonghong Song &lt;yonghong.song@linux.dev&gt;Link: https://lore.kernel.org/r/20241215221223.293205-4-leo.yan@arm.comSigned-off-by: Arnaldo Carvalho de Melo &lt;acme@redhat.com&gt;

            List of files:
            /linux/tools/bpf/bpftool/Makefile</description>
        <pubDate>Sun, 15 Dec 2024 23:12:23 +0100</pubDate>
        <dc:creator>Leo Yan &lt;leo.yan@arm.com&gt;</dc:creator>
    </item>
<item>
        <title>0513eeee86d67930f3567e450357d8db1cfb4f16 - bpftool: Prevent setting duplicate _GNU_SOURCE in Makefile</title>
        <link>http://kernelsources.org:8080/source/history/linux/tools/bpf/bpftool/Makefile#0513eeee86d67930f3567e450357d8db1cfb4f16</link>
        <description>bpftool: Prevent setting duplicate _GNU_SOURCE in MakefileWhen building selftests with CFLAGS set via env variable, the value ofCFLAGS is propagated into bpftool Makefile (called from selftestsMakefile). This makes the compilation fail as _GNU_SOURCE is defined twotimes - once from selftests Makefile (by including lib.mk) and once frombpftool Makefile (by calling `llvm-config --cflags`):    $ CFLAGS=&quot;&quot; make -C tools/testing/selftests/bpf    [...]    CC      /bpf-next/tools/testing/selftests/bpf/tools/build/bpftool/btf.o    &lt;command-line&gt;: error: &quot;_GNU_SOURCE&quot; redefined [-Werror]    &lt;command-line&gt;: note: this is the location of the previous definition    cc1: all warnings being treated as errors    [...]Filter out -D_GNU_SOURCE from the result of `llvm-config --cflags` inbpftool Makefile to prevent this error.Signed-off-by: Viktor Malik &lt;vmalik@redhat.com&gt;Signed-off-by: Andrii Nakryiko &lt;andrii@kernel.org&gt;Acked-by: Quentin Monnet &lt;qmo@kernel.org&gt;Acked-by: Jiri Olsa &lt;jolsa@kernel.org&gt;Link: https://lore.kernel.org/bpf/acec3108b62d4df1436cda777e58e93e033ac7a7.1730449390.git.vmalik@redhat.com

            List of files:
            /linux/tools/bpf/bpftool/Makefile</description>
        <pubDate>Fri, 01 Nov 2024 09:27:12 +0100</pubDate>
        <dc:creator>Viktor Malik &lt;vmalik@redhat.com&gt;</dc:creator>
    </item>
<item>
        <title>e7b64f9d3f5b10186038201e0b91f734cbd7fc3d - bpftool: Fix make dependencies for vmlinux.h</title>
        <link>http://kernelsources.org:8080/source/history/linux/tools/bpf/bpftool/Makefile#e7b64f9d3f5b10186038201e0b91f734cbd7fc3d</link>
        <description>bpftool: Fix make dependencies for vmlinux.hWith pre-generated vmlinux.h there is no dependency on neither vmlinuxnor bootstrap bpftool. Define dependencies separately for both modes.This avoids needless rebuilds in some corner cases.Suggested-by: Jan Stancek &lt;jstancek@redhat.com&gt;Signed-off-by: Artem Savkov &lt;asavkov@redhat.com&gt;Signed-off-by: Andrii Nakryiko &lt;andrii@kernel.org&gt;Acked-by: Quentin Monnet &lt;qmo@kernel.org&gt;Link: https://lore.kernel.org/bpf/20240513112658.43691-1-asavkov@redhat.comSigned-off-by: Alexei Starovoitov &lt;ast@kernel.org&gt;

            List of files:
            /linux/tools/bpf/bpftool/Makefile</description>
        <pubDate>Mon, 13 May 2024 13:26:58 +0200</pubDate>
        <dc:creator>Artem Savkov &lt;asavkov@redhat.com&gt;</dc:creator>
    </item>
<item>
        <title>41b307ad756e1b7b618bf9d9c1cce3595705ede4 - bpftool, selftests/hid/bpf: Fix 29 clang warnings</title>
        <link>http://kernelsources.org:8080/source/history/linux/tools/bpf/bpftool/Makefile#41b307ad756e1b7b618bf9d9c1cce3595705ede4</link>
        <description>bpftool, selftests/hid/bpf: Fix 29 clang warningsWhen building either tools/bpf/bpftool, or tools/testing/selftests/hid,(the same Makefile is used for these), clang generates many instances ofthe following:    &quot;clang: warning: -lLLVM-17: &apos;linker&apos; input unused&quot;Quentin points out that the LLVM version is only required in $(LIBS),not in $(CFLAGS), so the fix is to remove it from CFLAGS.Suggested-by: Quentin Monnet &lt;qmo@kernel.org&gt;Signed-off-by: John Hubbard &lt;jhubbard@nvidia.com&gt;Signed-off-by: Andrii Nakryiko &lt;andrii@kernel.org&gt;Acked-by: Quentin Monnet &lt;qmo@kernel.org&gt;Link: https://lore.kernel.org/bpf/20240505230054.13813-1-jhubbard@nvidia.com

            List of files:
            /linux/tools/bpf/bpftool/Makefile</description>
        <pubDate>Mon, 06 May 2024 01:00:54 +0200</pubDate>
        <dc:creator>John Hubbard &lt;jhubbard@nvidia.com&gt;</dc:creator>
    </item>
<item>
        <title>cc9b22dfa735800980e7362f02aff6f1c2280996 - bpftool: Clean up HOST_CFLAGS, HOST_LDFLAGS for bootstrap bpftool</title>
        <link>http://kernelsources.org:8080/source/history/linux/tools/bpf/bpftool/Makefile#cc9b22dfa735800980e7362f02aff6f1c2280996</link>
        <description>bpftool: Clean up HOST_CFLAGS, HOST_LDFLAGS for bootstrap bpftoolBpftool&apos;s Makefile uses $(HOST_CFLAGS) to build the bootstrap version ofbpftool, in order to pick the flags for the host (where we run thebootstrap version) and not for the target system (where we plan to runthe full bpftool binary). But we pass too much information through thisvariable.In particular, we set HOST_CFLAGS by copying most of the $(CFLAGS); butwe do this after the feature detection for bpftool, which means that$(CFLAGS), hence $(HOST_CFLAGS), contain all macro definitions for usingthe different optional features. For example, -DHAVE_LLVM_SUPPORT may bepassed to the $(HOST_CFLAGS), even though the LLVM disassembler is notused in the bootstrap version, and the related library may even bemissing for the host architecture.A similar thing happens with the $(LDFLAGS), that we use unchanged forlinking the bootstrap version even though they may contains flags tolink against additional libraries.To address the $(HOST_CFLAGS) issue, we move the definition of$(HOST_CFLAGS) earlier in the Makefile, before the $(CFLAGS) updateresulting from the feature probing - none of which being relevant to thebootstrap version. To clean up the $(LDFLAGS) for the bootstrap version,we introduce a dedicated $(HOST_LDFLAGS) variable that we base on$(LDFLAGS), before the feature probing as well.On my setup, the following macro and libraries are removed from thecompiler invocation to build bpftool after this patch:  -DUSE_LIBCAP  -DHAVE_LLVM_SUPPORT  -I/usr/lib/llvm-17/include  -D_GNU_SOURCE  -D__STDC_CONSTANT_MACROS  -D__STDC_FORMAT_MACROS  -D__STDC_LIMIT_MACROS  -lLLVM-17  -L/usr/lib/llvm-17/libAnother advantage of cleaning up these flags is that displayingavailable features with &quot;bpftool version&quot; becomes more accurate for thebootstrap bpftool, and no longer reflects the features detected (andavailable only) for the final binary.Cc: Jean-Philippe Brucker &lt;jean-philippe@linaro.org&gt;Signed-off-by: Quentin Monnet &lt;qmo@kernel.org&gt;Acked-by: Jiri Olsa &lt;jolsa@kernel.org&gt;Message-ID: &lt;20240320014103.45641-1-qmo@kernel.org&gt;Signed-off-by: Alexei Starovoitov &lt;ast@kernel.org&gt;

            List of files:
            /linux/tools/bpf/bpftool/Makefile</description>
        <pubDate>Wed, 20 Mar 2024 02:41:03 +0100</pubDate>
        <dc:creator>Quentin Monnet &lt;qmo@kernel.org&gt;</dc:creator>
    </item>
<item>
        <title>e9a826dd145bf2c19888aee1b974214cefc74a2e - bpftool: Remove unnecessary source files from bootstrap version</title>
        <link>http://kernelsources.org:8080/source/history/linux/tools/bpf/bpftool/Makefile#e9a826dd145bf2c19888aee1b974214cefc74a2e</link>
        <description>bpftool: Remove unnecessary source files from bootstrap versionCommit d510296d331a (&quot;bpftool: Use syscall/loader program in &quot;prog load&quot;and &quot;gen skeleton&quot; command.&quot;) added new files to the list of objects tocompile in order to build the bootstrap version of bpftool. As far as Ican tell, these objects are unnecessary and were added by mistake; maybea draft version intended to add support for loading loader programs fromthe bootstrap version. Anyway, we can remove these object files from thelist to make the bootstrap bpftool binary a tad smaller and faster tobuild.Fixes: d510296d331a (&quot;bpftool: Use syscall/loader program in &quot;prog load&quot; and &quot;gen skeleton&quot; command.&quot;)Signed-off-by: Quentin Monnet &lt;qmo@kernel.org&gt;Message-ID: &lt;20240320013457.44808-1-qmo@kernel.org&gt;Signed-off-by: Alexei Starovoitov &lt;ast@kernel.org&gt;

            List of files:
            /linux/tools/bpf/bpftool/Makefile</description>
        <pubDate>Wed, 20 Mar 2024 02:34:57 +0100</pubDate>
        <dc:creator>Quentin Monnet &lt;qmo@kernel.org&gt;</dc:creator>
    </item>
<item>
        <title>bbaf1ff06af49e856501024abbe161d96c1f0d66 - bpf: Replace deprecated -target with --target= for Clang</title>
        <link>http://kernelsources.org:8080/source/history/linux/tools/bpf/bpftool/Makefile#bbaf1ff06af49e856501024abbe161d96c1f0d66</link>
        <description>bpf: Replace deprecated -target with --target= for ClangThe -target option has been deprecated since clang 3.4 in 2013. Therefore, usethe preferred --target=bpf form instead. This also matches how we use --target=in scripts/Makefile.clang.Signed-off-by: Fangrui Song &lt;maskray@google.com&gt;Signed-off-by: Daniel Borkmann &lt;daniel@iogearbox.net&gt;Acked-by: Yonghong Song &lt;yhs@fb.com&gt;Acked-by: Quentin Monnet &lt;quentin@isovalent.com&gt;Link: https://github.com/llvm/llvm-project/commit/274b6f0c87a6a1798de0a68135afc7f95def6277Link: https://lore.kernel.org/bpf/20230624001856.1903733-1-maskray@google.com

            List of files:
            /linux/tools/bpf/bpftool/Makefile</description>
        <pubDate>Sat, 24 Jun 2023 02:18:56 +0200</pubDate>
        <dc:creator>Fangrui Song &lt;maskray@google.com&gt;</dc:creator>
    </item>
<item>
        <title>878625e1c7a10dfbb1fdaaaae2c4d2a58fbce627 - bpftool: Always disable stack protection for BPF objects</title>
        <link>http://kernelsources.org:8080/source/history/linux/tools/bpf/bpftool/Makefile#878625e1c7a10dfbb1fdaaaae2c4d2a58fbce627</link>
        <description>bpftool: Always disable stack protection for BPF objectsWhen the clang toolchain has stack protection enabled in order to beconsistent with gcc - which just happens to be the case on Gentoo -the bpftool build fails:  [...]  clang \	-I. \	-I/tmp/portage/dev-util/bpftool-6.0.12/work/linux-6.0/tools/include/uapi/ \	-I/tmp/portage/dev-util/bpftool-6.0.12/work/linux-6.0/tools/bpf/bpftool/bootstrap/libbpf/include \	-g -O2 -Wall -target bpf -c skeleton/pid_iter.bpf.c -o pid_iter.bpf.o  clang \	-I. \	-I/tmp/portage/dev-util/bpftool-6.0.12/work/linux-6.0/tools/include/uapi/ \	-I/tmp/portage/dev-util/bpftool-6.0.12/work/linux-6.0/tools/bpf/bpftool/bootstrap/libbpf/include \	-g -O2 -Wall -target bpf -c skeleton/profiler.bpf.c -o profiler.bpf.o  skeleton/profiler.bpf.c:40:14: error: A call to built-in function &apos;__stack_chk_fail&apos; is not supported.  int BPF_PROG(fentry_XXX)                ^  skeleton/profiler.bpf.c:94:14: error: A call to built-in function &apos;__stack_chk_fail&apos; is not supported.  int BPF_PROG(fexit_XXX)                ^  2 errors generated.  [...]Since stack-protector makes no sense for the BPF bits just unconditionallydisable it.Bug: https://bugs.gentoo.org/890638Signed-off-by: Holger Hoffst&#228;tte &lt;holger@applied-asynchrony.com&gt;Signed-off-by: Daniel Borkmann &lt;daniel@iogearbox.net&gt;Acked-by: Quentin Monnet &lt;quentin@isovalent.com&gt;Link: https://lore.kernel.org/bpf/74cd9d2e-6052-312a-241e-2b514a75c92c@applied-asynchrony.com

            List of files:
            /linux/tools/bpf/bpftool/Makefile</description>
        <pubDate>Fri, 13 Jan 2023 16:40:23 +0100</pubDate>
        <dc:creator>Holger Hoffst&#228;tte &lt;holger@applied-asynchrony.com&gt;</dc:creator>
    </item>
<item>
        <title>af0e26beaa693cc0cb0472b80a33a5831103d22f - bpftool: Add missing quotes to libbpf bootstrap submake vars</title>
        <link>http://kernelsources.org:8080/source/history/linux/tools/bpf/bpftool/Makefile#af0e26beaa693cc0cb0472b80a33a5831103d22f</link>
        <description>bpftool: Add missing quotes to libbpf bootstrap submake varsWhen passing compiler variables like CC=$(HOSTCC) to a submakewe must ensure the variable is quoted in order to handle caseswhere $(HOSTCC) may be multiple binaries.For example when using ccache $HOSTCC may be:&quot;/usr/bin/ccache /usr/bin/gcc&quot;If we pass CC without quotes like CC=$(HOSTCC) only the first&quot;/usr/bin/ccache&quot; part will be assigned to the CC variable whichwill cause an error due to dropping the &quot;/usr/bin/gcc&quot; part ofthe variable in the submake invocation.This fixes errors such as:/usr/bin/ccache: invalid option -- &apos;d&apos;Signed-off-by: James Hilliard &lt;james.hilliard1@gmail.com&gt;Signed-off-by: Daniel Borkmann &lt;daniel@iogearbox.net&gt;Acked-by: Quentin Monnet &lt;quentin@isovalent.com&gt;Link: https://lore.kernel.org/bpf/20230110014504.3120711-1-james.hilliard1@gmail.com

            List of files:
            /linux/tools/bpf/bpftool/Makefile</description>
        <pubDate>Tue, 10 Jan 2023 02:45:04 +0100</pubDate>
        <dc:creator>James Hilliard &lt;james.hilliard1@gmail.com&gt;</dc:creator>
    </item>
<item>
        <title>4aea86b4033f92f01547e6d4388d4451ae9b0980 - Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net</title>
        <link>http://kernelsources.org:8080/source/history/linux/tools/bpf/bpftool/Makefile#4aea86b4033f92f01547e6d4388d4451ae9b0980</link>
        <description>Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/netNo conflicts.Signed-off-by: Jakub Kicinski &lt;kuba@kernel.org&gt;

            List of files:
            /linux/tools/bpf/bpftool/Makefile</description>
        <pubDate>Fri, 06 Jan 2023 00:34:11 +0100</pubDate>
        <dc:creator>Jakub Kicinski &lt;kuba@kernel.org&gt;</dc:creator>
    </item>
<item>
        <title>55171f2930be98c8a49991435cdf3a8b574353b6 - bpftool: Fix linkage with statically built libllvm</title>
        <link>http://kernelsources.org:8080/source/history/linux/tools/bpf/bpftool/Makefile#55171f2930be98c8a49991435cdf3a8b574353b6</link>
        <description>bpftool: Fix linkage with statically built libllvmSince the commit eb9d1acf634b (&quot;bpftool: Add LLVM as default library fordisassembling JIT-ed programs&quot;) we might link the bpftool program with thelibllvm library. This works fine when a shared libllvm library is available,but fails if we want to link bpftool with a statically built LLVM:  [...]  /usr/bin/ld: /usr/local/lib/libLLVMSupport.a(CrashRecoveryContext.cpp.o): in function `llvm::CrashRecoveryContextCleanup::~CrashRecoveryContextCleanup()&apos;:  CrashRecoveryContext.cpp:(.text._ZN4llvm27CrashRecoveryContextCleanupD0Ev+0x17): undefined reference to `operator delete(void*, unsigned long)&apos;  /usr/bin/ld: /usr/local/lib/libLLVMSupport.a(CrashRecoveryContext.cpp.o): in function `llvm::CrashRecoveryContext::~CrashRecoveryContext()&apos;:  CrashRecoveryContext.cpp:(.text._ZN4llvm20CrashRecoveryContextD2Ev+0xc8): undefined reference to `operator delete(void*, unsigned long)&apos;  [...]So in the case of static libllvm we need to explicitly link bpftool withrequired libraries, namely, libstdc++ and those provided by the `llvm-config--system-libs` command. We can distinguish between the shared and static casesby using the `llvm-config --shared-mode` command.Fixes: eb9d1acf634b (&quot;bpftool: Add LLVM as default library for disassembling JIT-ed programs&quot;)Signed-off-by: Anton Protopopov &lt;aspsk@isovalent.com&gt;Signed-off-by: Daniel Borkmann &lt;daniel@iogearbox.net&gt;Acked-by: Stanislav Fomichev &lt;sdf@google.com&gt;Link: https://lore.kernel.org/bpf/20221222102627.1643709-1-aspsk@isovalent.com

            List of files:
            /linux/tools/bpf/bpftool/Makefile</description>
        <pubDate>Thu, 22 Dec 2022 11:26:27 +0100</pubDate>
        <dc:creator>Anton Protopopov &lt;aspsk@isovalent.com&gt;</dc:creator>
    </item>
<item>
        <title>e7f0d5cdd023d8fa53d9ca541b9a55f0eb45618c - bpf: makefiles: Do not generate empty vmlinux.h</title>
        <link>http://kernelsources.org:8080/source/history/linux/tools/bpf/bpftool/Makefile#e7f0d5cdd023d8fa53d9ca541b9a55f0eb45618c</link>
        <description>bpf: makefiles: Do not generate empty vmlinux.hRemove the empty vmlinux.h if bpftool failed to dump btf info.The empty vmlinux.h can hide real error when reading outputof make.This is done by adding .DELETE_ON_ERROR special target in relatedmakefiles.Signed-off-by: Changbin Du &lt;changbin.du@gmail.com&gt;Signed-off-by: Andrii Nakryiko &lt;andrii@kernel.org&gt;Acked-by: Quentin Monnet &lt;quentin@isovalent.com&gt;Link: https://lore.kernel.org/bpf/20221217223509.88254-3-changbin.du@gmail.com

            List of files:
            /linux/tools/bpf/bpftool/Makefile</description>
        <pubDate>Sat, 17 Dec 2022 23:35:09 +0100</pubDate>
        <dc:creator>Changbin Du &lt;changbin.du@gmail.com&gt;</dc:creator>
    </item>
<item>
        <title>eb9d1acf634baf6401dfb4f67dc895290713a357 - bpftool: Add LLVM as default library for disassembling JIT-ed programs</title>
        <link>http://kernelsources.org:8080/source/history/linux/tools/bpf/bpftool/Makefile#eb9d1acf634baf6401dfb4f67dc895290713a357</link>
        <description>bpftool: Add LLVM as default library for disassembling JIT-ed programsTo disassemble instructions for JIT-ed programs, bpftool has relied onthe libbfd library. This has been problematic in the past: libbfd&apos;sinterface is not meant to be stable and has changed several times. Forbuilding bpftool, we have to detect how the libbfd version on the systembehaves, which is why we have to handle features disassembler-four-argsand disassembler-init-styled in the Makefile. When it comes to shippingbpftool, this has also caused issues with several distributionmaintainers unwilling to support the feature (see for example Debian&apos;spage for binutils-dev, which ships libbfd: &quot;Note that building Debianpackages which depend on the shared libbfd is Not Allowed.&quot; [0]).For these reasons, we add support for LLVM as an alternative to libbfdfor disassembling instructions of JIT-ed programs. Thanks to thepreparation work in the previous commits, it&apos;s easy to add the libraryby passing the relevant compilation options in the Makefile, and byadding the functions for setting up the LLVM disassembler in filejit_disasm.c.The LLVM disassembler requires the LLVM development package (usuallyllvm-dev or llvm-devel).The expectation is that the interface for this disassembler will be morestable. There is a note in LLVM&apos;s Developer Policy [1] stating that thestability for the C API is &quot;best effort&quot; and not guaranteed, but atleast there is some effort to keep compatibility when possible (whichhasn&apos;t really been the case for libbfd so far). Furthermore, the Debianpage for the related LLVM package does not caution against linking tothe lib, as binutils-dev page does.Naturally, the display of disassembled instructions comes with a fewminor differences. Here is a sample output with libbfd (alreadysupported before this patch):    # bpftool prog dump jited id 56    bpf_prog_6deef7357e7b4530:       0:   nopl   0x0(%rax,%rax,1)       5:   xchg   %ax,%ax       7:   push   %rbp       8:   mov    %rsp,%rbp       b:   push   %rbx       c:   push   %r13       e:   push   %r14      10:   mov    %rdi,%rbx      13:   movzwq 0xb4(%rbx),%r13      1b:   xor    %r14d,%r14d      1e:   or     $0x2,%r14d      22:   mov    $0x1,%eax      27:   cmp    $0x2,%r14      2b:   jne    0x000000000000002f      2d:   xor    %eax,%eax      2f:   pop    %r14      31:   pop    %r13      33:   pop    %rbx      34:   leave      35:   retLLVM supports several variants that we could set when initialising thedisassembler, for example with:    LLVMSetDisasmOptions(*ctx,                         LLVMDisassembler_Option_AsmPrinterVariant);but the default printer is used for now. Here is the output with LLVM:    # bpftool prog dump jited id 56    bpf_prog_6deef7357e7b4530:       0:   nopl    (%rax,%rax)       5:   nop       7:   pushq   %rbp       8:   movq    %rsp, %rbp       b:   pushq   %rbx       c:   pushq   %r13       e:   pushq   %r14      10:   movq    %rdi, %rbx      13:   movzwq  180(%rbx), %r13      1b:   xorl    %r14d, %r14d      1e:   orl     $2, %r14d      22:   movl    $1, %eax      27:   cmpq    $2, %r14      2b:   jne     0x2f      2d:   xorl    %eax, %eax      2f:   popq    %r14      31:   popq    %r13      33:   popq    %rbx      34:   leave      35:   retqThe LLVM disassembler comes as the default choice, with libbfd as afall-back.Of course, we could replace libbfd entirely and avoid supporting twodifferent libraries. One reason for keeping libbfd is that, right now,it works well, we have all we need in terms of features detection in theMakefile, so it provides a fallback for disassembling JIT-ed programs iflibbfd is installed but LLVM is not. The other motivation is that libbfdsupports nfp instruction for Netronome&apos;s SmartNICs and can be used todisassemble offloaded programs, something that LLVM cannot do. Iflibbfd&apos;s interface breaks again in the future, we might reconsiderkeeping support for it.[0] https://packages.debian.org/buster/binutils-dev[1] https://llvm.org/docs/DeveloperPolicy.html#c-api-changesSigned-off-by: Quentin Monnet &lt;quentin@isovalent.com&gt;Tested-by: Niklas S&#246;derlund &lt;niklas.soderlund@corigine.com&gt;Acked-by: Yonghong Song &lt;yhs@fb.com&gt;Link: https://lore.kernel.org/r/20221025150329.97371-7-quentin@isovalent.comSigned-off-by: Alexei Starovoitov &lt;ast@kernel.org&gt;

            List of files:
            /linux/tools/bpf/bpftool/Makefile</description>
        <pubDate>Tue, 25 Oct 2022 17:03:27 +0200</pubDate>
        <dc:creator>Quentin Monnet &lt;quentin@isovalent.com&gt;</dc:creator>
    </item>
</channel>
</rss>
