diff options
author | Bernhard Reutner-Fischer <rep.dot.nop@gmail.com> | 2007-01-08 16:29:15 +0000 |
---|---|---|
committer | Bernhard Reutner-Fischer <rep.dot.nop@gmail.com> | 2007-01-08 16:29:15 +0000 |
commit | c1feac6e9ff0acfbafc0abc11c09b4c1449acce8 (patch) | |
tree | 63522a4172ac4036e6742f1d4a9a276b4da15fd2 | |
parent | 681f183b9408c877e78b2fe538fd6264c0a7493d (diff) | |
download | busybox-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-- | Makefile | 13 | ||||
-rw-r--r-- | Makefile.flags | 5 |
2 files changed, 6 insertions, 12 deletions
@@ -273,8 +273,8 @@ MAKEFLAGS += -rR | |||
273 | # Make variables (CC, etc...) | 273 | # Make variables (CC, etc...) |
274 | 274 | ||
275 | AS = $(CROSS_COMPILE)as | 275 | AS = $(CROSS_COMPILE)as |
276 | LD = $(CROSS_COMPILE)gcc -nostdlib | ||
277 | CC = $(CROSS_COMPILE)gcc | 276 | CC = $(CROSS_COMPILE)gcc |
277 | LD = $(CROSS_COMPILE)ld | ||
278 | CPP = $(CC) -E | 278 | CPP = $(CC) -E |
279 | AR = $(CROSS_COMPILE)ar | 279 | AR = $(CROSS_COMPILE)ar |
280 | NM = $(CROSS_COMPILE)nm | 280 | NM = $(CROSS_COMPILE)nm |
@@ -529,7 +529,6 @@ libs-y1 := $(patsubst %/, %/lib.a, $(libs-y)) | |||
529 | libs-y2 := $(patsubst %/, %/built-in.o, $(libs-y)) | 529 | libs-y2 := $(patsubst %/, %/built-in.o, $(libs-y)) |
530 | libs-y := $(libs-y1) $(libs-y2) | 530 | libs-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 |
564 | quiet_cmd_busybox__ ?= LINK $@ | 563 | quiet_cmd_busybox__ ?= LINK $@ |
565 | ifdef 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 | ||
571 | else | ||
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 |
576 | endif | ||
577 | 568 | ||
578 | # Generate System.map | 569 | # Generate System.map |
579 | quiet_cmd_sysmap = SYSMAP | 570 | quiet_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 | ||
24 | ifeq ($(CONFIG_DEBUG),y) | 24 | ifeq ($(CONFIG_DEBUG),y) |
25 | CFLAGS += -g | 25 | CFLAGS += -g |
26 | LDFLAGS += -g | ||
27 | endif | 26 | endif |
28 | 27 | ||
28 | ifeq ($(CONFIG_STATIC),y) | ||
29 | LDFLAGS += -static | ||
30 | endif | ||
31 | LDFLAGS += -nostdlib | ||