From mboxrd@z Thu Jan 1 00:00:00 1970 From: ludo@gnu.org (Ludovic =?utf-8?Q?Court=C3=A8s?=) Subject: Re: problem with building gcc-cross-4.8.3 for i686-pc-gnu Date: Thu, 05 Feb 2015 13:44:03 +0100 Message-ID: <87386k4jfw.fsf@gnu.org> References: <54CCADF7.6090708@gmail.com> <54CD5372.5090103@gmail.com> <54CE76DB.2040606@gmail.com> 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]:58541) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YJLn3-000389-Pe for guix-devel@gnu.org; Thu, 05 Feb 2015 07:44:14 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YJLmv-0002xT-G9 for guix-devel@gnu.org; Thu, 05 Feb 2015 07:44:10 -0500 Received: from fencepost.gnu.org ([2001:4830:134:3::e]:45204) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YJLmv-0002xO-DI for guix-devel@gnu.org; Thu, 05 Feb 2015 07:44:05 -0500 In-Reply-To: <54CE76DB.2040606@gmail.com> (Marek Benc's message of "Sun, 01 Feb 2015 19:56:27 +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: Marek Benc Cc: guix-devel@gnu.org Marek Benc skribis: > On 01/31/2015 11:13 PM, Marek Benc wrote: > >> >> The current issue is that, when building cross-gcc, when it reaches >> libgomp, configure fails when trying to create a dummy binary. For some >> reason, the compiled cross-compiler needs --rpath to specify where >> shared libraries are, as without it, it can't find libmachuser.so and >> libhurduser.so, which causes it to fail. >> > > Well, I figured out a way to solve it, however, I don't know if the > change is acceptable, since it alters how cross-compilers work. > > In the attached patch, which builds upon the one from my previous > email, I made cross compilers not use binutils' ld directly, but > instead use the ld-wrapper script. > > This means that while the Hurd cross compiler now works, binaries made > by cross compilers have their library paths hard-coded into their > RPATH section, which means that they're less flexible, which might be > a problem. For some reason, the hurd cross-linker can't find libraries > without specifying a --rpath, which is strange imho. Using RUNPATH is not a problem: it=E2=80=99s what we always do. ;-) That said, in practice we haven=E2=80=99t done anything special about it in cross-compilation contexts and things have worked fine. I believe this is due to the fact that we=E2=80=99ve only built things that use Libtool, a= nd Libtool adds --rpath automatically. Another thing I don=E2=80=99t understand is that we use "--disable-libgomp"= in =E2=80=98cross-gcc-arguments=E2=80=99, which means that the first cross-gcc= (sans libc) does not build libgomp. What are things going wrong here? Thanks, Ludo=E2=80=99.