diff --git a/src/stub/Makefile b/src/stub/Makefile index ca818077..57264eab 100644 --- a/src/stub/Makefile +++ b/src/stub/Makefile @@ -715,9 +715,5 @@ ifneq ($(STUBS),) endif -include tmp/*.d -# debug -hg-diff: - hg diff -r 5cca9ba74f3a $(STUBS) - # vi:ts=8:nowrap diff --git a/src/stub/src/arch/arm/v4a/Makefile.extra b/src/stub/src/arch/arm/v4a/Makefile.extra index 72616b10..e225451e 100644 --- a/src/stub/src/arch/arm/v4a/Makefile.extra +++ b/src/stub/src/arch/arm/v4a/Makefile.extra @@ -27,25 +27,21 @@ lzma_d_c%.S : tc_list = arm-lzma arm-linux.elf default lzma_d_c%.S : tc_bfdname = elf32-littlearm tc.arm-lzma.gcc = $(tc.arm-linux.elf.gcc) - # -fPIC not needed: no globals, no string constants, no &func. # Omitting -fPIC enables general use of r10. tc.arm-lzma.gcc += -march=armv4 - tc.arm-lzma.gcc += -Os tc.arm-lzma.gcc += -ffunction-sections tc.arm-lzma.gcc += -I$(UPX_LZMADIR) tc.arm-lzma.gcc += -I$(top_srcdir)/src -lzma_d_cf.S : lzma_d_c.c +lzma_d_c%.S : lzma_d_c.c $(call tc,gcc) $(PP_FLAGS) -S $< -o tmp/$T.s - sed -e '1,/LzmaDecode:/d' -e '/\.size/d' -e '/\.ident/d' -e 's/\.L/.Lf/g' $@ - -lzma_d_cs.S : lzma_d_c.c - $(call tc,gcc) $(PP_FLAGS) -S $< -o tmp/$T.s - sed -e '1,/LzmaDecode:/d' -e '/\.size/d' -e '/\.ident/d' -e 's/\.L/.Ls/g' $@ + sed -e '1,/LzmaDecode:/d' -e '/\.size/d' -e '/\.ident/d' -e 's/\.L/$(LABEL_PREFIX)/g' < tmp/$T.s > $@ lzma_d_cf.% : PP_FLAGS = -DFAST lzma_d_cs.% : PP_FLAGS = -DSMALL +lzma_d_cf.% : LABEL_PREFIX = .Lf +lzma_d_cs.% : LABEL_PREFIX = .Ls endif diff --git a/src/stub/src/arch/arm/v4t/Makefile.extra b/src/stub/src/arch/arm/v4t/Makefile.extra index 1d2c7c9c..0fbcb700 100644 --- a/src/stub/src/arch/arm/v4t/Makefile.extra +++ b/src/stub/src/arch/arm/v4t/Makefile.extra @@ -33,15 +33,13 @@ tc.arm-lzma.gcc += -ffunction-sections tc.arm-lzma.gcc += -I$(UPX_LZMADIR) tc.arm-lzma.gcc += -I$(top_srcdir)/src -lzma_d_cf.S : lzma_d_c.c +lzma_d_c%.S : lzma_d_c.c $(call tc,gcc) $(PP_FLAGS) -S $< -o tmp/$T.s - sed -e '1,/LzmaDecode:/d' -e '/\.size/d' -e '/\.ident/d' -e 's/\.L/.Lf/g' $@ - -lzma_d_cs.S : lzma_d_c.c - $(call tc,gcc) $(PP_FLAGS) -S $< -o tmp/$T.s - sed -e '1,/LzmaDecode:/d' -e '/\.size/d' -e '/\.ident/d' -e 's/\.L/.Ls/g' $@ + sed -e '1,/LzmaDecode:/d' -e '/\.size/d' -e '/\.ident/d' -e 's/\.L/$(LABEL_PREFIX)/g' < tmp/$T.s > $@ lzma_d_cf.% : PP_FLAGS = -DFAST lzma_d_cs.% : PP_FLAGS = -DSMALL +lzma_d_cf.% : LABEL_PREFIX = .Lf +lzma_d_cs.% : LABEL_PREFIX = .Ls endif