also fix static selinux linking on branch
authorMike Frysinger <vapier@gentoo.org>
Sat, 31 Mar 2007 03:32:05 +0000 (03:32 -0000)
committerMike Frysinger <vapier@gentoo.org>
Sat, 31 Mar 2007 03:32:05 +0000 (03:32 -0000)
Makefile
Makefile.flags

index b42e1792d53a9bb27d8af894acb31e96e1e294f0..c9faf4a9eeadbcc27d8c26473e290b13b379d146 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 b7711f698e5f2feb13baab5e4cb38ce356870cdf..3c2cbbbfb91f9e6f3c3dbdfd06fbfc9dadf5886c 100644 (file)
@@ -52,10 +52,10 @@ CFLAGS += $(call cc-option,-g)
 endif
 
 ifeq ($(CONFIG_STATIC),y)
-LDFLAGS += -static
+LDLIBS += -static
 endif
 
 ifeq ($(CONFIG_SELINUX),y)
-LDFLAGS += -lselinux -lsepol
+LDLIBS += -lselinux -lsepol
 endif
 #LDFLAGS += -nostdlib