summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--package/busybox/busybox.mk9
1 files changed, 7 insertions, 2 deletions
diff --git a/package/busybox/busybox.mk b/package/busybox/busybox.mk
index 549e150be..9154c0892 100644
--- a/package/busybox/busybox.mk
+++ b/package/busybox/busybox.mk
@@ -27,12 +27,17 @@ BUSYBOX_LDFLAGS = \
ifeq ($(BR2_PACKAGE_LIBTIRPC),y)
BUSYBOX_DEPENDENCIES += libtirpc
BUSYBOX_CFLAGS += -I$(STAGING_DIR)/usr/include/tirpc/
-BUSYBOX_LDFLAGS += -ltirpc
+# Don't use LDFLAGS for -ltirpc, because LDFLAGS is used for
+# the non-final link of modules as well.
+BUSYBOX_CFLAGS_busybox += -ltirpc
endif
BUSYBOX_BUILD_CONFIG = $(BUSYBOX_DIR)/.config
# Allows the build system to tweak CFLAGS
-BUSYBOX_MAKE_ENV = $(TARGET_MAKE_ENV) CFLAGS="$(BUSYBOX_CFLAGS)"
+BUSYBOX_MAKE_ENV = \
+ $(TARGET_MAKE_ENV) \
+ CFLAGS="$(BUSYBOX_CFLAGS)" \
+ CFLAGS_busybox="$(BUSYBOX_CFLAGS_busybox)"
BUSYBOX_MAKE_OPTS = \
CC="$(TARGET_CC)" \
ARCH=$(KERNEL_ARCH) \