- honor CONFIG_DEBUG
authorBernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Wed, 13 Dec 2006 17:44:24 +0000 (17:44 -0000)
committerBernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Wed, 13 Dec 2006 17:44:24 +0000 (17:44 -0000)
Makefile
Makefile.flags

index f13c8b651cb19190beffa5459f3566dc7cf0dd3b..45d60f02433dff983be4babe56d67fb5b43cce0b 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -567,13 +567,13 @@ busybox-all  := $(core-y) $(libs-y)
 # May be overridden by arch/$(ARCH)/Makefile
 quiet_cmd_busybox__ ?= LINK    $@
 ifdef CONFIG_STATIC
-      cmd_busybox__ ?= $(srctree)/scripts/trylink $(CC) \
+      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) -o $@ \
+      cmd_busybox__ ?= $(srctree)/scripts/trylink $(CC) -o $@ $(LDFLAGS) \
       -Wl,--warn-common -Wl,--sort-common -Wl,--gc-sections \
       -Wl,--start-group $(busybox-all) -Wl,--end-group
 endif
index bb5cef0d9eeed0700c0922421d83b610bde1dc13..0261d34df500adbb1e51a4b041fd844fee5eff78 100644 (file)
@@ -20,3 +20,9 @@ CFLAGS += \
        -funsigned-char -fno-builtin-strlen -finline-limit=0 -static-libgcc \
        -Os -falign-functions=1 -falign-jumps=1 -falign-loops=1 \
        -fomit-frame-pointer -ffunction-sections -fdata-sections
+
+ifeq ($(CONFIG_DEBUG),y)
+CFLAGS += -g
+LDFLAGS += -g
+endif
+