aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDenis Vlasenko <vda.linux@googlemail.com>2008-04-12 13:46:39 +0000
committerDenis Vlasenko <vda.linux@googlemail.com>2008-04-12 13:46:39 +0000
commit55e06c1edf259283e1c7d02ad90be1a5c49c7404 (patch)
tree7329f3b0ac6d4864ff687ac3108e8d71a4ea3434
parenteecd588c53066fa5f95bc1ec2249028e0efcc8f3 (diff)
downloadbusybox-w32-55e06c1edf259283e1c7d02ad90be1a5c49c7404.tar.gz
busybox-w32-55e06c1edf259283e1c7d02ad90be1a5c49c7404.tar.bz2
busybox-w32-55e06c1edf259283e1c7d02ad90be1a5c49c7404.zip
Makefile.IMA: generate autoconf.h if needed
Makefile.IMA: use ld -gc-collect on gc -combine result (by using trylink script). Saves ~3k.
-rw-r--r--scripts/Makefile.IMA25
1 files changed, 20 insertions, 5 deletions
diff --git a/scripts/Makefile.IMA b/scripts/Makefile.IMA
index 27163ab36..29399178e 100644
--- a/scripts/Makefile.IMA
+++ b/scripts/Makefile.IMA
@@ -146,21 +146,36 @@ lib-all-y += $(patsubst %,libbb/%,$(sort $(lib-y)))
146lib-y:= 146lib-y:=
147 147
148comma:=, 148comma:=,
149busybox: $(usage_stuff) include/applet_tables.h 149busybox_unstripped.o: $(usage_stuff) include/applet_tables.h include/autoconf.h
150 $(CC) $(CPPFLAGS) $(CFLAGS) $(EXTRA_CFLAGS) \ 150 $(CC) $(CPPFLAGS) $(CFLAGS) $(EXTRA_CFLAGS) \
151 $(patsubst %,-Wl$(comma)%,$(LDFLAGS) $(EXTRA_LDFLAGS)) \ 151 $(patsubst %,-Wl$(comma)%,$(LDFLAGS) $(EXTRA_LDFLAGS)) \
152 -DGCC_COMBINE=1 \ 152 -DGCC_COMBINE=1 \
153 --combine $(WHOLE_PROGRAM) \ 153 --combine $(WHOLE_PROGRAM) \
154 -funit-at-a-time -Wno-error -std=gnu99 \ 154 -funit-at-a-time -Wno-error -std=gnu99 \
155 -o $(@)_unstripped $(lib-all-y:.o=.c) \ 155 -c -o busybox_unstripped.o \
156 -Wl,--start-group -lcrypt -lm -Wl,--end-group 156 $(lib-all-y:.o=.c)
157
158busybox: busybox_unstripped.o
159 $(srctree)/scripts/trylink \
160 busybox_unstripped \
161 "$(CC)" \
162 "$(CFLAGS)" \
163 "$(LDFLAGS)" \
164 "busybox_unstripped.o" \
165 "" \
166 "crypt m"
157 cp -f $(@)_unstripped $@ 167 cp -f $(@)_unstripped $@
158 -$(STRIP) -s -R .note -R .comment -R .version $@ 168 -$(STRIP) -s -R .note -R .comment -R .version $@
159 169
160applets/usage: 170# If .config is newer than include/autoconf.h, someone tinkered
171# with it and forgot to run make oldconfig.
172include/autoconf.h: .config
173 $(MAKE) -f $(srctree)/Makefile silentoldconfig
174
175applets/usage: include/autoconf.h
161 $(HOSTCC) -Wall -Wstrict-prototypes -O2 -fomit-frame-pointer -I$(srctree)/include -o applets/usage applets/usage.c 176 $(HOSTCC) -Wall -Wstrict-prototypes -O2 -fomit-frame-pointer -I$(srctree)/include -o applets/usage applets/usage.c
162 177
163applets/applet_tables: 178applets/applet_tables: include/autoconf.h
164 $(HOSTCC) -Wall -Wstrict-prototypes -O2 -fomit-frame-pointer -I$(srctree)/include -o applets/applet_tables applets/applet_tables.c 179 $(HOSTCC) -Wall -Wstrict-prototypes -O2 -fomit-frame-pointer -I$(srctree)/include -o applets/applet_tables applets/applet_tables.c
165 180
166include/usage_compressed.h: $(srctree)/include/usage.h applets/usage 181include/usage_compressed.h: $(srctree)/include/usage.h applets/usage