public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [PATCH 1/2] [msp430] Remove source files from libmul archives
@ 2017-01-13 14:44 Joe Seymour
  2017-01-13 22:18 ` DJ Delorie
  0 siblings, 1 reply; 2+ messages in thread
From: Joe Seymour @ 2017-01-13 14:44 UTC (permalink / raw)
  To: gcc-patches

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

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH 1/2] [msp430] Remove source files from libmul archives
  2017-01-13 14:44 [PATCH 1/2] [msp430] Remove source files from libmul archives Joe Seymour
@ 2017-01-13 22:18 ` DJ Delorie
  0 siblings, 0 replies; 2+ messages in thread
From: DJ Delorie @ 2017-01-13 22:18 UTC (permalink / raw)
  To: Joe Seymour; +Cc: gcc-patches


Committed.  Thanks!

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2017-01-13 22:18 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-01-13 14:44 [PATCH 1/2] [msp430] Remove source files from libmul archives Joe Seymour
2017-01-13 22:18 ` DJ Delorie

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).