This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[PATCH 1/2] [msp430] Remove source files from libmul archives
- From: Joe Seymour <joe dot s at somniumtech dot com>
- To: gcc-patches at gcc dot gnu dot org
- Date: Fri, 13 Jan 2017 14:44:19 +0000
- Subject: [PATCH 1/2] [msp430] Remove source files from libmul archives
- Authentication-results: sourceware.org; auth=none
The msp430 libmul archives currently contain several source files. If
you run msp430-elf-nm on these archives it will produce output on
stderr:
> msp430-elf-nm: enable-execute-stack.c: File format not recognized
...
> msp430-elf-nm: libgcc_tm.h: File format not recognized
It looks like the source files are added as dependencies of libmul by
libgcc/Makefile:
> $(EXTRA_PARTS): $(LIBGCC_LINKS) libgcc_tm.h
This patch adds filters to t-msp430, to ensure that only object files
are added to the archives.
Built and tested (no regressions) as follows:
Configured with: --target=msp430-elf --enable-languages=c
Test variations:
msp430-sim/-mcpu=msp430
msp430-sim/-mcpu=msp430x
msp430-sim/-mcpu=msp430x/-mlarge/-mdata-region=either/-mcode-region=either
msp430-sim/-mhwmult=none
msp430-sim/-mhwmult=f5series
If this patch is acceptable, I would appreciate it if someone would
commit it on my behalf.
Thanks,
2017-01-XX Joe Seymour <joe.s@somniumtech.com>
libgcc/
* config/msp430/t-msp430 (libmul_none.a, libmul_16.a, libmul_32.a)
(libmul_f5.a): Filter archived prerequisites.
---
libgcc/config/msp430/t-msp430 | 8 ++++----
1 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/libgcc/config/msp430/t-msp430 b/libgcc/config/msp430/t-msp430
index 2428f54..107eb3d 100644
--- a/libgcc/config/msp430/t-msp430
+++ b/libgcc/config/msp430/t-msp430
@@ -59,16 +59,16 @@ lib2hw_mul_f5.o: $(srcdir)/config/msp430/lib2hw_mul.S
$(gcc_compile) $< -c -DMUL_F5
libmul_none.a: lib2_mul_none.o
- $(AR_CREATE_FOR_TARGET) $@ $^
+ $(AR_CREATE_FOR_TARGET) $@ $(filter %.o,$^)
libmul_16.a: lib2hw_mul_16.o lib2_mul_16bit.o
- $(AR_CREATE_FOR_TARGET) $@ $^
+ $(AR_CREATE_FOR_TARGET) $@ $(filter %.o,$^)
libmul_32.a: lib2hw_mul_32.o
- $(AR_CREATE_FOR_TARGET) $@ $^
+ $(AR_CREATE_FOR_TARGET) $@ $(filter %.o,$^)
libmul_f5.a: lib2hw_mul_f5.o
- $(AR_CREATE_FOR_TARGET) $@ $^
+ $(AR_CREATE_FOR_TARGET) $@ $(filter %.o,$^)
# Local Variables:
# mode: Makefile
--
1.7.1