From mboxrd@z Thu Jan 1 00:00:00 1970 From: Mark H Weaver Subject: Re: Problem with natively-built armhf bootstrap compiler Date: Wed, 07 Jan 2015 10:15:01 -0500 Message-ID: <87vbki1v2i.fsf@netris.org> References: <87lhln7mlk.fsf@netris.org> <87a9225o3z.fsf@netris.org> <8761cp6i17.fsf@netris.org> <871tnd6as5.fsf@netris.org> <87k314gael.fsf@gnu.org> <87mw5zyakn.fsf@netris.org> <87ppaq68af.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:37133) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Y8sJq-0002Hx-Mj for guix-devel@gnu.org; Wed, 07 Jan 2015 10:14:47 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Y8sJn-0000Ll-1t for guix-devel@gnu.org; Wed, 07 Jan 2015 10:14:46 -0500 In-Reply-To: <87ppaq68af.fsf@gnu.org> ("Ludovic \=\?utf-8\?Q\?Court\=C3\=A8s\=22'\?\= \=\?utf-8\?Q\?s\?\= message of "Wed, 07 Jan 2015 14:15:52 +0100") List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org Sender: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org To: Ludovic =?utf-8?Q?Court=C3=A8s?= Cc: guix-devel@gnu.org ludo@gnu.org (Ludovic Court=C3=A8s) writes: > Mark H Weaver skribis: > >>> diff --git a/gnu/packages/gcc.scm b/gnu/packages/gcc.scm >>> index a7156bf..dd33a26 100644 >>> --- a/gnu/packages/gcc.scm >>> +++ b/gnu/packages/gcc.scm >>> @@ -213,7 +213,7 @@ where the OS part is overloaded to denote a specifi= c ABI---into GCC >>> ;; below, make sure to update the relevant code in >>> ;; %gcc-static package as needed. >>> (format #f "#define GNU_USER_TARGET_LIB_SPEC \ >>> -\"-L~a/lib %{!static:-rpath=3D~a/lib %{!static-libgcc:-rpath=3D~a/lib6= 4 -rpath=3D~a/lib -lgcc_s}} \" ~a" >>> +\"-L~a/lib %{!static:-rpath=3D~a/lib %{!static-libgcc:-rpath=3D~a/lib6= 4 -rpath=3D~a/lib %{pthread: -lgcc_s}}} \" ~a" >>> libc libc libdir libdir suffix)) >>> (("#define GNU_USER_TARGET_STARTFILE_SPEC.*$" line) >>> (format #f "#define STANDARD_STARTFILE_PREFIX_1 \"~= a/lib\" >>> >>> I believe this is enough to address what the comment mentions (glibc >>> dlopening libgcc_s for pthread functions), but this will need testing. > > I see you applied this patch. However, after grepping through libc, I > found there are other cases where libgcc_s is dlopened, including to > walk the stack, which has nothing to do with pthread. > > So I think the status quo is safer. > > WDYT? Okay, sounds good to me. I also discovered that tcl doesn't pass -pthread on GNU/Linux by default, but only -lpthread. I've reverted the patch above and will soon post another patch which implements my original workaround and worked well in practice. Thanks, Mark