From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 20216 invoked by alias); 4 Aug 2007 21:19:29 -0000 Received: (qmail 19998 invoked by uid 22791); 4 Aug 2007 21:19:28 -0000 X-Spam-Check-By: sourceware.org Received: from iona.labri.fr (HELO iona.labri.fr) (147.210.8.143) by sourceware.org (qpsmtpd/0.31) with ESMTP; Sat, 04 Aug 2007 21:19:26 +0000 Received: from localhost (localhost.localdomain [127.0.0.1]) by iona.labri.fr (Postfix) with ESMTP id 79F9A90079 for ; Sat, 4 Aug 2007 23:18:32 +0200 (CEST) Received: from iona.labri.fr ([127.0.0.1]) by localhost (iona.labri.fr [127.0.0.1]) (amavisd-new, port 10024) with LMTP id NiRSCGRYRubN for ; Sat, 4 Aug 2007 23:18:30 +0200 (CEST) Received: from interface.famille.thibault.fr (d83-179-96-93.cust.tele2.fr [83.179.96.93]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) by iona.labri.fr (Postfix) with ESMTP id 2CAC590078 for ; Sat, 4 Aug 2007 23:18:30 +0200 (CEST) Received: from samy by interface.famille.thibault.fr with local (Exim 4.67) (envelope-from ) id 1IHR1s-0002JI-7v for gcc-patches@gcc.gnu.org; Sat, 04 Aug 2007 23:19:20 +0200 Date: Sat, 04 Aug 2007 21:19:00 -0000 From: Samuel Thibault To: gcc-patches@gcc.gnu.org Subject: Re: [PATCH] GNU/Hurd config -pthread/profiling update Message-ID: <20070804211920.GH3638@interface.famille.thibault.fr> References: <20070803205954.GB4397@interface.famille.thibault.fr> <20070803202629.GA4397@interface.famille.thibault.fr> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="7qSK/uQB79J36Y4o" Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20070803205954.GB4397@interface.famille.thibault.fr> <20070803202629.GA4397@interface.famille.thibault.fr> User-Agent: Mutt/1.5.12-2006-07-14 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org X-SW-Source: 2007-08/txt/msg00250.txt.bz2 --7qSK/uQB79J36Y4o Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit Content-length: 277 Samuel Thibault, le Fri 03 Aug 2007 22:26:29 +0200, a écrit : > Here is a config update for GNU/Hurd for the -pthread option. > > Here is a patch for fixing profiling support in GNU/Hurd, to be applied > on top of my previous pthread patch. Could someone apply them? Samuel --7qSK/uQB79J36Y4o Content-Type: text/plain; charset=utf-8 Content-Disposition: attachment; filename=patch-gcc-config Content-Transfer-Encoding: 8bit Content-length: 1171 2007-08-03 Samuel Thibault * gcc/config/i386/gnu.h (CPP_SPEC): Add -pthread option. * gcc/config/gnu.h (LIB_SPEC): Likewise. Index: gcc/config/i386/gnu.h =================================================================== --- gcc/config/i386/gnu.h (r�vision 127183) +++ gcc/config/i386/gnu.h (copie de travail) @@ -12,7 +12,7 @@ while (0) #undef CPP_SPEC -#define CPP_SPEC "%{posix:-D_POSIX_SOURCE} %{bsd:-D_BSD_SOURCE}" +#define CPP_SPEC "%{pthread:-D_REENTRANT} %{posix:-D_POSIX_SOURCE} %{bsd:-D_BSD_SOURCE}" #undef CC1_SPEC #define CC1_SPEC "%(cc1_cpu)" 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 "%{bsd:-lbsd-compat} %{!p:%{!pg:-lc}}%{p:-lc_p}%{pg:-lc_p}" +#define LIB_SPEC "%{pthread:-lpthread} %{bsd:-lbsd-compat} %{!p:%{!pg:-lc}}%{p:-lc_p}%{pg:-lc_p}" /* Standard include directory. In GNU, "/usr" is a four-letter word. */ #undef STANDARD_INCLUDE_DIR --7qSK/uQB79J36Y4o Content-Type: text/plain; charset=utf-8 Content-Disposition: attachment; filename=patch-gcc-prof Content-Transfer-Encoding: 8bit Content-length: 1849 2007-08-03 Samuel Thibault * 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 --7qSK/uQB79J36Y4o--