aboutsummaryrefslogtreecommitdiff
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
parent681f183b9408c877e78b2fe538fd6264c0a7493d (diff)
downloadbusybox-w32-c1feac6e9ff0acfbafc0abc11c09b4c1449acce8.tar.gz
busybox-w32-c1feac6e9ff0acfbafc0abc11c09b4c1449acce8.tar.bz2
busybox-w32-c1feac6e9ff0acfbafc0abc11c09b4c1449acce8.zip
- set LD to ld
- simplify the cmd_busybox__ a bit and pass the LDFLAGS via -Wl down to CC
-rw-r--r--Makefile13
-rw-r--r--Makefile.flags5
2 files changed, 6 insertions, 12 deletions
diff --git a/Makefile b/Makefile
index 7b87cb7f9..cc1fd305b 100644
--- a/Makefile
+++ b/Makefile
@@ -273,8 +273,8 @@ MAKEFLAGS += -rR
273# Make variables (CC, etc...) 273# Make variables (CC, etc...)
274 274
275AS = $(CROSS_COMPILE)as 275AS = $(CROSS_COMPILE)as
276LD = $(CROSS_COMPILE)gcc -nostdlib
277CC = $(CROSS_COMPILE)gcc 276CC = $(CROSS_COMPILE)gcc
277LD = $(CROSS_COMPILE)ld
278CPP = $(CC) -E 278CPP = $(CC) -E
279AR = $(CROSS_COMPILE)ar 279AR = $(CROSS_COMPILE)ar
280NM = $(CROSS_COMPILE)nm 280NM = $(CROSS_COMPILE)nm
@@ -529,7 +529,6 @@ libs-y1 := $(patsubst %/, %/lib.a, $(libs-y))
529libs-y2 := $(patsubst %/, %/built-in.o, $(libs-y)) 529libs-y2 := $(patsubst %/, %/built-in.o, $(libs-y))
530libs-y := $(libs-y1) $(libs-y2) 530libs-y := $(libs-y1) $(libs-y2)
531 531
532
533# Build busybox 532# Build busybox
534# --------------------------------------------------------------------------- 533# ---------------------------------------------------------------------------
535# busybox is build from the objects selected by $(busybox-init) and 534# busybox is build from the objects selected by $(busybox-init) and
@@ -562,18 +561,10 @@ busybox-all := $(core-y) $(libs-y)
562# Rule to link busybox - also used during CONFIG_KALLSYMS 561# Rule to link busybox - also used during CONFIG_KALLSYMS
563# May be overridden by arch/$(ARCH)/Makefile 562# May be overridden by arch/$(ARCH)/Makefile
564quiet_cmd_busybox__ ?= LINK $@ 563quiet_cmd_busybox__ ?= LINK $@
565ifdef CONFIG_STATIC 564 cmd_busybox__ ?= $(srctree)/scripts/trylink $(CC) $(patsubst %,-Wl$(comma)%,$(LDFLAGS)) \
566 cmd_busybox__ ?= $(srctree)/scripts/trylink $(CC) $(LDFLAGS) \
567 -static \
568 -o $@ \
569 -Wl,--warn-common -Wl,--sort-common -Wl,--gc-sections \
570 -Wl,--start-group $(busybox-all) -Wl,--end-group
571else
572 cmd_busybox__ ?= $(srctree)/scripts/trylink $(CC) $(LDFLAGS) \
573 -o $@ \ 565 -o $@ \
574 -Wl,--warn-common -Wl,--sort-common -Wl,--gc-sections \ 566 -Wl,--warn-common -Wl,--sort-common -Wl,--gc-sections \
575 -Wl,--start-group $(busybox-all) -Wl,--end-group 567 -Wl,--start-group $(busybox-all) -Wl,--end-group
576endif
577 568
578# Generate System.map 569# Generate System.map
579quiet_cmd_sysmap = SYSMAP 570quiet_cmd_sysmap = SYSMAP
diff --git a/Makefile.flags b/Makefile.flags
index 0261d34df..7dd9dc5dd 100644
--- a/Makefile.flags
+++ b/Makefile.flags
@@ -23,6 +23,9 @@ CFLAGS += \
23 23
24ifeq ($(CONFIG_DEBUG),y) 24ifeq ($(CONFIG_DEBUG),y)
25CFLAGS += -g 25CFLAGS += -g
26LDFLAGS += -g
27endif 26endif
28 27
28ifeq ($(CONFIG_STATIC),y)
29LDFLAGS += -static
30endif
31LDFLAGS += -nostdlib