diff options
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 18 |
1 files changed, 11 insertions, 7 deletions
@@ -59,6 +59,17 @@ else | |||
59 | #Only staticly link when _not_ debugging | 59 | #Only staticly link when _not_ debugging |
60 | ifeq ($(DOSTATIC),true) | 60 | ifeq ($(DOSTATIC),true) |
61 | LDFLAGS += --static | 61 | LDFLAGS += --static |
62 | # | ||
63 | #use '-ffunction-sections -fdata-sections' and '--gc-sections' if they work | ||
64 | #to try and strip out any unused junk. Doesn't do much for me, but you may | ||
65 | #want to give it a shot... | ||
66 | # | ||
67 | #ifeq ($(shell $(CC) -ffunction-sections -fdata-sections -S \ | ||
68 | # -o /dev/null -xc /dev/null && $(LD) --gc-sections -v >/dev/null && echo 1),1) | ||
69 | # CFLAGS += -ffunction-sections -fdata-sections -DFUNCTION_SECTIONS | ||
70 | # LDFLAGS += --gc-sections | ||
71 | #endif | ||
72 | # | ||
62 | endif | 73 | endif |
63 | endif | 74 | endif |
64 | 75 | ||
@@ -74,13 +85,6 @@ ifdef BB_INIT_SCRIPT | |||
74 | CFLAGS += -DINIT_SCRIPT='"$(BB_INIT_SCRIPT)"' | 85 | CFLAGS += -DINIT_SCRIPT='"$(BB_INIT_SCRIPT)"' |
75 | endif | 86 | endif |
76 | 87 | ||
77 | # use '-ffunction-sections -fdata-sections' and '--gc-sections' if they work | ||
78 | ifeq ($(shell $(CC) -ffunction-sections -fdata-sections -S \ | ||
79 | -o /dev/null -xc /dev/null && $(LD) --gc-sections -v >/dev/null && echo 1),1) | ||
80 | CFLAGS += -ffunction-sections -fdata-sections -DFUNCTION_SECTIONS | ||
81 | LDFLAGS += --gc-sections | ||
82 | endif | ||
83 | |||
84 | all: busybox busybox.links doc | 88 | all: busybox busybox.links doc |
85 | 89 | ||
86 | doc: docs/BusyBox.txt docs/BusyBox.1 docs/BusyBox.html | 90 | doc: docs/BusyBox.txt docs/BusyBox.1 docs/BusyBox.html |