svn commit: trunk/busybox

aldot at busybox.net aldot at busybox.net
Mon Jan 8 16:29:16 UTC 2007


Author: aldot
Date: 2007-01-08 08:29:15 -0800 (Mon, 08 Jan 2007)
New Revision: 17200

Log:
- set LD to ld
- simplify the cmd_busybox__ a bit and pass the LDFLAGS via -Wl down to CC


Modified:
   trunk/busybox/Makefile
   trunk/busybox/Makefile.flags


Changeset:
Modified: trunk/busybox/Makefile
===================================================================
--- trunk/busybox/Makefile	2007-01-07 22:23:38 UTC (rev 17199)
+++ trunk/busybox/Makefile	2007-01-08 16:29:15 UTC (rev 17200)
@@ -273,8 +273,8 @@
 # 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-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 @@
 # 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 \
+      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
-else
-      cmd_busybox__ ?= $(srctree)/scripts/trylink $(CC) $(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 

Modified: trunk/busybox/Makefile.flags
===================================================================
--- trunk/busybox/Makefile.flags	2007-01-07 22:23:38 UTC (rev 17199)
+++ trunk/busybox/Makefile.flags	2007-01-08 16:29:15 UTC (rev 17200)
@@ -23,6 +23,9 @@
 
 ifeq ($(CONFIG_DEBUG),y)
 CFLAGS += -g
-LDFLAGS += -g
 endif
 
+ifeq ($(CONFIG_STATIC),y)
+LDFLAGS += -static
+endif
+LDFLAGS += -nostdlib




More information about the busybox-cvs mailing list