[openwrt/openwrt] xdp-tools: disable stack protector for BPF programs
LEDE Commits
lede-commits at lists.infradead.org
Thu Aug 3 07:40:45 PDT 2023
stintel pushed a commit to openwrt/openwrt.git, branch master:
https://git.openwrt.org/15acde674c76504e023a525506a2e248e9aecd24
commit 15acde674c76504e023a525506a2e248e9aecd24
Author: Stijn Tintel <stijn at linux-ipv6.be>
AuthorDate: Fri Jul 28 22:40:34 2023 +0300
xdp-tools: disable stack protector for BPF programs
When building xdp-tools with CONFIG_USE_LLVM_HOST=y, on a host that
enabled stack protector by default in Clang, compilation fails with the
following error:
CLANG xdp-dispatcher.o
clang-16: error: ignoring '-fstack-protector-strong' option as it is not currently supported for target 'bpfeb' [-Werror,-Woption-ignored]
Add -fno-stack-protector to BPF_CFLAGS to fix this.
Signed-off-by: Stijn Tintel <stijn at linux-ipv6.be>
---
package/network/utils/xdp-tools/Makefile | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/package/network/utils/xdp-tools/Makefile b/package/network/utils/xdp-tools/Makefile
index 3cc7980cf6..dba775e4ea 100644
--- a/package/network/utils/xdp-tools/Makefile
+++ b/package/network/utils/xdp-tools/Makefile
@@ -94,7 +94,7 @@ MAKE_VARS += \
define Build/Configure
$(call Build/Configure/Default)
- echo "BPF_CFLAGS += -I$(BPF_HEADERS_DIR)/tools/lib" >> $(PKG_BUILD_DIR)/config.mk
+ echo "BPF_CFLAGS += -I$(BPF_HEADERS_DIR)/tools/lib -fno-stack-protector" >> $(PKG_BUILD_DIR)/config.mk
endef
define Build/InstallDev
More information about the lede-commits
mailing list