summaryrefslogtreecommitdiffhomepage
path: root/Makefile
diff options
context:
space:
mode:
authorBernhard Reutner-Fischer <rep.dot.nop@gmail.com>2007-01-08 16:29:15 +0000
committerBernhard Reutner-Fischer <rep.dot.nop@gmail.com>2007-01-08 16:29:15 +0000
commitc1feac6e9ff0acfbafc0abc11c09b4c1449acce8 (patch)
tree63522a4172ac4036e6742f1d4a9a276b4da15fd2 /Makefile
parent681f183b9408c877e78b2fe538fd6264c0a7493d (diff)
- set LD to ld
- simplify the cmd_busybox__ a bit and pass the LDFLAGS via -Wl down to CC
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile13
1 files changed, 2 insertions, 11 deletions
diff --git a/Makefile b/Makefile
index 7b87cb7f9..cc1fd305b 100644
--- a/Makefile
+++ b/Makefile
@@ -273,8 +273,8 @@ MAKEFLAGS += -rR
# Make variables (CC, etc...)
AS = $(CROSS_COMPILE)as
-LD = $(CROSS_COMPILE)gcc -nostdlib
CC = $(CROSS_COMPILE)gcc
+LD = $(CROSS_COMPILE)ld
CPP = $(CC) -E
AR = $(CROSS_COMPILE)ar
NM = $(CROSS_COMPILE)nm
@@ -529,7 +529,6 @@ libs-y1 := $(patsubst %/, %/lib.a, $(libs-y))
libs-y2 := $(patsubst %/, %/built-in.o, $(libs-y))
libs-y := $(libs-y1) $(libs-y2)
-
# Build busybox
# ---------------------------------------------------------------------------
# busybox is build from the objects selected by $(busybox-init) and
@@ -562,18 +561,10 @@ busybox-all := $(core-y) $(libs-y)
# Rule to link busybox - also used during CONFIG_KALLSYMS
# May be overridden by arch/$(ARCH)/Makefile
quiet_cmd_busybox__ ?= LINK $@
-ifdef CONFIG_STATIC
- cmd_busybox__ ?= $(srctree)/scripts/trylink $(CC) $(LDFLAGS) \
- -static \
- -o $@ \
- -Wl,--warn-common -Wl,--sort-common -Wl,--gc-sections \
- -Wl,--start-group $(busybox-all) -Wl,--end-group
-else
- cmd_busybox__ ?= $(srctree)/scripts/trylink $(CC) $(LDFLAGS) \
+ cmd_busybox__ ?= $(srctree)/scripts/trylink $(CC) $(patsubst %,-Wl$(comma)%,$(LDFLAGS)) \
-o $@ \
-Wl,--warn-common -Wl,--sort-common -Wl,--gc-sections \
-Wl,--start-group $(busybox-all) -Wl,--end-group
-endif
# Generate System.map
quiet_cmd_sysmap = SYSMAP