diff options
-rw-r--r-- | Makefile | 4 | ||||
-rw-r--r-- | Makefile.flags | 6 |
2 files changed, 8 insertions, 2 deletions
@@ -567,13 +567,13 @@ busybox-all := $(core-y) $(libs-y) | |||
567 | # May be overridden by arch/$(ARCH)/Makefile | 567 | # May be overridden by arch/$(ARCH)/Makefile |
568 | quiet_cmd_busybox__ ?= LINK $@ | 568 | quiet_cmd_busybox__ ?= LINK $@ |
569 | ifdef CONFIG_STATIC | 569 | ifdef CONFIG_STATIC |
570 | cmd_busybox__ ?= $(srctree)/scripts/trylink $(CC) \ | 570 | cmd_busybox__ ?= $(srctree)/scripts/trylink $(CC) $(LDFLAGS) \ |
571 | -static \ | 571 | -static \ |
572 | -o $@ \ | 572 | -o $@ \ |
573 | -Wl,--warn-common -Wl,--sort-common -Wl,--gc-sections \ | 573 | -Wl,--warn-common -Wl,--sort-common -Wl,--gc-sections \ |
574 | -Wl,--start-group $(busybox-all) -Wl,--end-group | 574 | -Wl,--start-group $(busybox-all) -Wl,--end-group |
575 | else | 575 | else |
576 | cmd_busybox__ ?= $(srctree)/scripts/trylink $(CC) -o $@ \ | 576 | cmd_busybox__ ?= $(srctree)/scripts/trylink $(CC) -o $@ $(LDFLAGS) \ |
577 | -Wl,--warn-common -Wl,--sort-common -Wl,--gc-sections \ | 577 | -Wl,--warn-common -Wl,--sort-common -Wl,--gc-sections \ |
578 | -Wl,--start-group $(busybox-all) -Wl,--end-group | 578 | -Wl,--start-group $(busybox-all) -Wl,--end-group |
579 | endif | 579 | endif |
diff --git a/Makefile.flags b/Makefile.flags index bb5cef0d9..0261d34df 100644 --- a/Makefile.flags +++ b/Makefile.flags | |||
@@ -20,3 +20,9 @@ CFLAGS += \ | |||
20 | -funsigned-char -fno-builtin-strlen -finline-limit=0 -static-libgcc \ | 20 | -funsigned-char -fno-builtin-strlen -finline-limit=0 -static-libgcc \ |
21 | -Os -falign-functions=1 -falign-jumps=1 -falign-loops=1 \ | 21 | -Os -falign-functions=1 -falign-jumps=1 -falign-loops=1 \ |
22 | -fomit-frame-pointer -ffunction-sections -fdata-sections | 22 | -fomit-frame-pointer -ffunction-sections -fdata-sections |
23 | |||
24 | ifeq ($(CONFIG_DEBUG),y) | ||
25 | CFLAGS += -g | ||
26 | LDFLAGS += -g | ||
27 | endif | ||
28 | |||