From: Samuel Thibault <samuel.thibault@ens-lyon.org>
To: gcc-patches@gcc.gnu.org
Subject: [PATCH] GNU/Hurd config profiling update
Date: Fri, 03 Aug 2007 21:00:00 -0000 [thread overview]
Message-ID: <20070803205954.GB4397@interface.famille.thibault.fr> (raw)
[-- 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
next reply other threads:[~2007-08-03 21:00 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-08-03 21:00 Samuel Thibault [this message]
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20070803205954.GB4397@interface.famille.thibault.fr \
--to=samuel.thibault@ens-lyon.org \
--cc=gcc-patches@gcc.gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).