Skip to content

Commit

Permalink
busybox: fix LTO compiler flags
Browse files Browse the repository at this point in the history
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 <[email protected]>
  • Loading branch information
nbd168 committed Dec 28, 2024
1 parent 80189a0 commit e6ce868
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion package/utils/busybox/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit e6ce868

Please sign in to comment.