summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFelix Fietkau2024-12-28 21:46:19 +0000
committerFelix Fietkau2024-12-28 21:48:06 +0000
commite6ce868c3a6f843f2c14498d0174011c8713a8bd (patch)
tree02ce2e7dfa17662dfc0725be8bdcba893f3b3bbe
parent80189a0350698cebecefefff426b1d05ec628b71 (diff)
downloadopenwrt-e6ce868c3a6f843f2c14498d0174011c8713a8bd.tar.gz
busybox: fix LTO compiler flags
When doing LTO builds, the target related CFLAGS need to be passed to the linker, so that they are considered for target code generation. Pass TARGET_CFLAGS in EXTRA_LDFLAGS to ensure that this is handled properly. Fixes: #17200 Signed-off-by: Felix Fietkau <nbd@nbd.name>
-rw-r--r--package/utils/busybox/Makefile2
1 files changed, 1 insertions, 1 deletions
diff --git a/package/utils/busybox/Makefile b/package/utils/busybox/Makefile
index cda3be9f2f..7701428570 100644
--- a/package/utils/busybox/Makefile
+++ b/package/utils/busybox/Makefile
@@ -111,7 +111,7 @@ endif
MAKE_VARS :=
MAKE_FLAGS += \
EXTRA_CFLAGS="$(TARGET_CFLAGS) $(TARGET_CPPFLAGS)" \
- EXTRA_LDFLAGS="$(TARGET_LDFLAGS)" \
+ EXTRA_LDFLAGS="$(TARGET_LDFLAGS) $(TARGET_CFLAGS)" \
LDLIBS="$(LDLIBS)" \
LD="$(TARGET_CC)" \
SKIP_STRIP=y