public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [PATCH] GNU/Hurd config profiling update
@ 2007-08-03 21:00 Samuel Thibault
  2007-08-03 20:26 ` [PATCH] GNU/Hurd config -pthread update Samuel Thibault
                   ` (2 more replies)
  0 siblings, 3 replies; 14+ messages in thread
From: Samuel Thibault @ 2007-08-03 21:00 UTC (permalink / raw)
  To: gcc-patches

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

Hi,

Here is a patch for fixing profiling support in GNU/Hurd, to be applied
on top of my previous pthread patch.

Samuel

[-- Attachment #2: patch-gcc-prof --]
[-- Type: text/plain, Size: 1855 bytes --]

2007-08-03  Samuel Thibault  <samuel.thibault@ens-lyon.org>

      * gcc/config/i386/gnu.h (STARTFILE_SPEC): Use gcrt0.o in profile mode, add
      -profile option, add pie support.
      (ENDFILE_SPEC): New spec.
      * gcc/config/gnu.h (LIB_SPEC): Add -profile option.

Index: gcc/config/i386/gnu.h
===================================================================
--- gcc/config/i386/gnu.h	(r�vision 127183)
+++ gcc/config/i386/gnu.h	(copie de travail)
@@ -26,13 +26,19 @@
     %{static:-static}}"
 
 #undef	STARTFILE_SPEC
+#if defined HAVE_LD_PIE
 #define STARTFILE_SPEC \
-  "%{!shared: \
-     %{!static: \
-       %{pg:gcrt1.o%s} %{!pg:%{p:gcrt1.o%s} %{!p:crt1.o%s}}} \
-     %{static:crt0.o%s}} \
-   crti.o%s %{static:crtbeginT.o%s}\
-   %{!static:%{!shared:crtbegin.o%s} %{shared:crtbeginS.o%s}}"
+  "%{!shared: %{pg|p|profile:gcrt0.o%s;pie:Scrt1.o%s;static:crt0.o%s;:crt1.o%s}} \
+   crti.o%s %{static:crtbeginT.o%s;shared|pie:crtbeginS.o%s;:crtbegin.o%s}"
+#else
+#define STARTFILE_SPEC \
+  "%{!shared: %{pg|p|profile:gcrt0.o%s;static:crt0.o%s;:crt1.o%s}} \
+   crti.o%s %{static:crtbeginT.o%s;shared|pie:crtbeginS.o%s;:crtbegin.o%s}"
+#endif
 
+#undef	ENDFILE_SPEC
+#define ENDFILE_SPEC \
+  "%{shared|pie:crtendS.o%s;:crtend.o%s} crtn.o%s"
+
 /* FIXME: Is a Hurd-specific fallback mechanism necessary?  */
 #undef MD_UNWIND_SUPPORT
Index: gcc/config/gnu.h
--- gcc/config/gnu.h	(r�vision 127183)
+++ gcc/config/gnu.h	(copie de travail)
@@ -6,7 +6,7 @@
 
 /* Default C library spec.  Use -lbsd-compat for gcc -bsd.  */
 #undef LIB_SPEC
-#define LIB_SPEC "%{pthread:-lpthread} %{bsd:-lbsd-compat} %{!p:%{!pg:-lc}}%{p:-lc_p}%{pg:-lc_p}"
+#define LIB_SPEC "%{pthread:-lpthread} %{bsd:-lbsd-compat} %{pg|p|profile:-lc_p;:-lc}"
 
 /* Standard include directory.  In GNU, "/usr" is a four-letter word.  */
 #undef STANDARD_INCLUDE_DIR

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

end of thread, other threads:[~2007-08-08  6:38 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-08-03 21:00 [PATCH] GNU/Hurd config profiling update Samuel Thibault
2007-08-03 20:26 ` [PATCH] GNU/Hurd config -pthread update Samuel Thibault
2007-08-04 21:19   ` [PATCH] GNU/Hurd config -pthread/profiling update Samuel Thibault
2007-08-05 23:41     ` Daniel Berlin
2007-08-06  0:52       ` Samuel Thibault
2007-08-06  1:40         ` Daniel Berlin
2007-08-08  0:32   ` [PATCH] GNU/Hurd config -pthread update Ian Lance Taylor
2007-08-08  6:38     ` Matthias Klose
2007-08-05 15:43 ` [PATCH] GNU/Hurd config profiling update Alfred M. Szmidt
2007-08-05 15:57   ` Samuel Thibault
2007-08-05 16:14     ` Alfred M. Szmidt
2007-08-05 16:32       ` Samuel Thibault
2007-08-08  0:33 ` Ian Lance Taylor
2007-08-08  6:38   ` Matthias Klose

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