public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [patch] PR40134, use a linker script on arm-linux to link with -lgcc_s  -lgcc
@ 2009-07-07  9:10 Matthias Klose
  2009-07-07  9:56 ` Jakub Jelinek
  0 siblings, 1 reply; 41+ messages in thread
From: Matthias Klose @ 2009-07-07  9:10 UTC (permalink / raw)
  To: GCC Patches; +Cc: Paolo Carlini, GCJ-patches

[-- Attachment #1: Type: text/plain, Size: 576 bytes --]

Use a linker script to link with -lgcc_s -lgcc on arm-linux, which allows the
arm-linux target to run the testsuite without regressions with the patch for the
exception propagation support [1] enabled.

The approach taken is the same as used on the sh-linux configuration.

Tested on the 4.4 branch without regressions (c, c++, fortran, objc, obj-c++),
the trunk currently fails to build for unrelated reasons [2]

Ok for the branch (and for the trunk after it bootstraps again)?

  Matthias

[1] http://gcc.gnu.org/ml/gcc/2009-05/msg00035.html
[2] http://gcc.gnu.org/PR40651

[-- Attachment #2: libgcc.diff --]
[-- Type: text/plain, Size: 1972 bytes --]

2009-07-07  Matthias Klose  <doko@ubuntu.com>

	PR target/40134
	* config/arm/t-linux: New.
	* config.host (arm*-*-linux*): Add arm/t-linux to tmake_file.

 
Index: libgcc/config.host
===================================================================
--- libgcc/config.host	(revision 149314)
+++ libgcc/config.host	(working copy)
@@ -203,6 +203,7 @@
 arm*-*-netbsd*)
 	;;
 arm*-*-linux*)			# ARM GNU/Linux with ELF
+	tmake_file="arm/t-linux"
 	;;
 arm*-*-uclinux*)		# ARM ucLinux
 	;;
Index: libgcc/config/arm/t-linux
===================================================================
--- libgcc/config/arm/t-linux	(revision 0)
+++ libgcc/config/arm/t-linux	(revision 0)
@@ -0,0 +1,26 @@
+# Override SHLIB_LINK and SHLIB_INSTALL to use linker script
+# libgcc_s.so.
+SHLIB_LINK = $(CC) $(LIBGCC2_CFLAGS) -shared -nodefaultlibs \
+	-Wl,--soname=@shlib_base_name@.so.1 \
+	-Wl,--version-script=@shlib_map_file@ \
+	-o @multilib_dir@/@shlib_base_name@.so.1.tmp @multilib_flags@ \
+	@shlib_objs@ -lc && \
+	rm -f @multilib_dir@/@shlib_base_name@.so && \
+	if [ -f @multilib_dir@/@shlib_base_name@.so.1 ]; then \
+	  mv -f @multilib_dir@/@shlib_base_name@.so.1 \
+		@multilib_dir@/@shlib_base_name@.so.1.backup; \
+	else true; fi && \
+	mv @multilib_dir@/@shlib_base_name@.so.1.tmp \
+	   @multilib_dir@/@shlib_base_name@.so.1 && \
+	(echo "/* GNU ld script"; \
+	 echo "   Use the shared library, but some functions are only in"; \
+	 echo "   the static library.  */"; \
+	 echo "GROUP ( @shlib_base_name@.so.1 libgcc.a )" \
+	) > @multilib_dir@/@shlib_base_name@.so
+SHLIB_INSTALL = \
+	$(mkinstalldirs) $(DESTDIR)$(slibdir)@shlib_slibdir_qual@; \
+	$(INSTALL_DATA) @multilib_dir@/@shlib_base_name@.so.1 \
+	  $(DESTDIR)$(slibdir)@shlib_slibdir_qual@/@shlib_base_name@.so.1; \
+	rm -f $(DESTDIR)$(slibdir)@shlib_slibdir_qual@/@shlib_base_name@.so; \
+	$(INSTALL_DATA) @multilib_dir@/@shlib_base_name@.so \
+	  $(DESTDIR)$(slibdir)@shlib_slibdir_qual@/@shlib_base_name@.so

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

end of thread, other threads:[~2009-12-13 23:43 UTC | newest]

Thread overview: 41+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-07-07  9:10 [patch] PR40134, use a linker script on arm-linux to link with -lgcc_s -lgcc Matthias Klose
2009-07-07  9:56 ` Jakub Jelinek
2009-07-07 11:51   ` Dave Korn
2009-07-07 12:21     ` Jakub Jelinek
2009-07-07 13:45       ` Dave Korn
2009-07-07 13:52         ` H.J. Lu
2009-07-07 15:30           ` Dave Korn
2009-07-07 15:53             ` H.J. Lu
2009-07-07 13:22   ` Nathan Froyd
2009-07-10  7:01   ` Matthias Klose
2009-07-10  7:56     ` Jakub Jelinek
2009-07-13 13:43   ` Matthias Klose
2009-09-09 11:24     ` Jakub Jelinek
2009-09-09 12:27       ` Joseph S. Myers
2009-09-09 13:25         ` Jakub Jelinek
2009-09-09 19:50           ` Richard Henderson
2009-09-09 20:56             ` Joseph S. Myers
2009-09-11 17:13       ` Matthias Klose
2009-09-22 12:26         ` [ping] " Matthias Klose
2009-09-22 15:57           ` Andrew Haley
2009-09-24  8:26             ` Matthias Klose
2009-09-24  8:49               ` Andrew Haley
2009-09-24 10:07                 ` Matthias Klose
2009-09-24 10:45                   ` Andrew Haley
2009-10-14 15:15                     ` Richard Earnshaw
     [not found]                     ` <1255527525.4842.29.camel@e200601-lin.cambridge.arm.com>
2009-10-21 14:11                       ` Matthias Klose
2009-10-30  0:22                         ` [ping2] " Matthias Klose
2009-10-30  0:55                           ` Paolo Carlini
2009-11-02 16:02                             ` Matthias Klose
2009-11-02 16:33                               ` Paolo Carlini
2009-11-12 18:21                                 ` Matthias Klose
2009-11-12 18:47                                   ` Paolo Carlini
2009-12-09 10:47                                     ` Matthias Klose
2009-12-09 10:50                                       ` Paolo Carlini
2009-12-09 10:58                                       ` Paolo Carlini
2009-12-11  8:48                                         ` Matthias Klose
2009-12-11 10:00                                           ` Paolo Carlini
2009-12-14  1:34                                             ` Matthias Klose
2009-12-11 10:35                                           ` Joseph S. Myers
2009-11-16 22:47                                   ` Ralf Wildenhues
2009-11-16 22:48                                     ` Paolo Carlini

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).