summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorLeo Yan <leo.yan@arm.com>2026-06-02 17:47:13 +0300
committerAlexei Starovoitov <ast@kernel.org>2026-06-15 03:32:53 +0300
commitf3846b3800a2cfda9c900b2e94525a1027b04424 (patch)
treed08bdadf5d10e9892c5b48e567b4b0b76409f4eb /include
parent3f2fec5b02b6efa1aad3238943858234751ac0f3 (diff)
downloadlinux-f3846b3800a2cfda9c900b2e94525a1027b04424.tar.xz
libbpf: Initialize CFLAGS before including Makefile.include
tools/scripts/Makefile.include may expand EXTRA_CFLAGS in a future change. This could alter the initialization of CFLAGS, as the default options "-g -O2" would never be set once EXTRA_CFLAGS is expanded. Prepare for this by moving the CFLAGS initialization before including tools/scripts/Makefile.include, so it is not affected by the extended EXTRA_CFLAGS. Append EXTRA_CFLAGS to CFLAGS only after including Makefile.include and place it last so that the extra flags propagate properly and can override the default options. tools/scripts/Makefile.include already appends $(CLANG_CROSS_FLAGS) to CFLAGS, the Makefile appends $(CLANG_CROSS_FLAGS) again, remove the redundant append. Signed-off-by: Leo Yan <leo.yan@arm.com> Acked-by: Ihor Solodrai <ihor.solodrai@linux.dev> Link: https://lore.kernel.org/r/20260602-tools_build_fix_zero_init_bpf_only-v2-4-c76e5250ea1c@arm.com Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Diffstat (limited to 'include')
0 files changed, 0 insertions, 0 deletions