CFLAGS := $(CFLAGS)
CPPFLAGS := $(CPPFLAGS)
AFLAGS := $(AFLAGS)
+LDFLAGS := $(LDFLAGS)
+LDLIBS :=
# Read KERNELRELEASE from .kernelrelease (if it exists)
KERNELRELEASE = $(shell cat .kernelrelease 2> /dev/null)
cmd_busybox__ ?= $(srctree)/scripts/trylink $(CC) $(LDFLAGS) \
-o $@ -Wl,-M \
-Wl,--warn-common -Wl,--sort-common -Wl,--gc-sections \
- -Wl,--start-group $(busybox-all) -Wl,--end-group
+ -Wl,--start-group $(busybox-all) -Wl,--end-group \
+ $(LDLIBS)
# Generate System.map
quiet_cmd_sysmap = SYSMAP
endif
ifeq ($(CONFIG_SELINUX),y)
-LDFLAGS += -lselinux -lsepol
+LDLIBS += -lselinux -lsepol
endif
ifeq ($(CONFIG_EFENCE),y)
-LDFLAGS += -lefence
+LDLIBS += -lefence
endif
ifeq ($(CONFIG_DMALLOC),y)
-LDFLAGS += -ldmalloc
+LDLIBS += -ldmalloc
endif
#LDFLAGS += -nostdlib