public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [PATCH] hurd: align -p and -pg behavior on Linux
@ 2015-09-19 12:33 Samuel Thibault
  2015-09-28 21:51 ` Samuel Thibault
                   ` (3 more replies)
  0 siblings, 4 replies; 10+ messages in thread
From: Samuel Thibault @ 2015-09-19 12:33 UTC (permalink / raw)
  To: gcc-patches, roland; +Cc: bug-hurd

On Linux, -p and -pg do not make gcc link against libc_p.a, only
-profile does (as documented in r11246), and thus people expect -p
and -pg to work without libc_p.a installed (it is actually even not
available any more in Debian).  We should thus rather make the Hurd port
do the same to avoid build failures.

Samuel

	* gcc/config/gnu.h (LIB_SPEC) [-p|-pg]: Link with -lc instead of -lc_p.
        * gcc/config/i386/gnu.h (STARTFILE_SPEC) [-p|-pg]: Use gcrt1.o
        instead of gcrt0.o.

--- gcc/config/gnu.h.orig	2015-09-16 00:43:09.785570853 +0200
+++ gcc/config/gnu.h	2015-09-16 00:43:12.513550418 +0200
@@ -25,7 +25,7 @@
 
 /* Default C library spec.  */
 #undef LIB_SPEC
-#define LIB_SPEC "%{pthread:-lpthread} %{pg|p|profile:-lc_p;:-lc}"
+#define LIB_SPEC "%{pthread:-lpthread} %{profile:-lc_p;:-lc}"
 
 #undef GNU_USER_TARGET_OS_CPP_BUILTINS
 #define GNU_USER_TARGET_OS_CPP_BUILTINS()		\
--- gcc/config/i386/gnu.h.orig	2015-09-17 21:41:13.000000000 +0000
+++ gcc/config/i386/gnu.h	2015-09-17 23:03:57.000000000 +0000
@@ -27,11 +27,11 @@
 #undef	STARTFILE_SPEC
 #if defined HAVE_LD_PIE
 #define STARTFILE_SPEC \
-  "%{!shared: %{pg|p|profile:gcrt0.o%s;pie:Scrt1.o%s;static:crt0.o%s;:crt1.o%s}} \
+  "%{!shared: %{pg|p:gcrt1.o%s;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}} \
+  "%{!shared: %{pg|p:gcrt1.o%s;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
 

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

end of thread, other threads:[~2016-03-29 21:21 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-09-19 12:33 [PATCH] hurd: align -p and -pg behavior on Linux Samuel Thibault
2015-09-28 21:51 ` Samuel Thibault
2015-10-11 18:29 ` Samuel Thibault
2016-01-14  0:10   ` Samuel Thibault
2015-10-12  8:37 ` Thomas Schwinge
2016-02-24 22:47 ` Thomas Schwinge
2016-02-24 23:18   ` Samuel Thibault
2016-02-26  0:56     ` Samuel Thibault
2016-03-29 22:00   ` Thomas Schwinge
2016-03-29 22:04     ` Samuel Thibault

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