introduce the concept of LDLIBS for additional libraries so that when we do the final...
authorMike Frysinger <vapier@gentoo.org>
Fri, 30 Mar 2007 05:44:15 +0000 (05:44 -0000)
committerMike Frysinger <vapier@gentoo.org>
Fri, 30 Mar 2007 05:44:15 +0000 (05:44 -0000)
Makefile
Makefile.flags

index 6a50a28597b43553ad6b65dbcf4ddcd1da15940f..4f45ae8221990f6dca71a7608f2b535c7017e8da 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -302,6 +302,8 @@ AFLAGS_KERNEL       =
 CFLAGS         := $(CFLAGS)
 CPPFLAGS       := $(CPPFLAGS)
 AFLAGS         := $(AFLAGS)
+LDFLAGS                := $(LDFLAGS)
+LDLIBS         :=
 
 # Read KERNELRELEASE from .kernelrelease (if it exists)
 KERNELRELEASE = $(shell cat .kernelrelease 2> /dev/null)
@@ -565,7 +567,8 @@ quiet_cmd_busybox__ ?= LINK    $@
       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
index 487300de263857d1bfac0d2d75aab6263dfd722c..e4cdc459e43ecac4a683b7d18dba99c8266ed32d 100644 (file)
@@ -56,15 +56,15 @@ LDFLAGS += -static
 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