This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: RFC: Extending --with-advance-toolchain to aarch64
- From: Steve Ellcey <sellcey at marvell dot com>
- To: "fweimer at redhat dot com" <fweimer at redhat dot com>
- Cc: "gcc at gcc dot gnu dot org" <gcc at gcc dot gnu dot org>, "tuliom at linux dot ibm dot com" <tuliom at linux dot ibm dot com>
- Date: Thu, 10 Oct 2019 17:55:23 +0000
- Subject: Re: RFC: Extending --with-advance-toolchain to aarch64
- Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=marvell.com; dmarc=pass action=none header.from=marvell.com; dkim=pass header.d=marvell.com; arc=none
- Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=3d/6ip8iWinC4KZlgv6QCM0diZv8wcMMpVglD9i8PfI=; b=fBcOSH+QKZqpKkXQ/RoeiggFGdYpO6INw8ELlPNnafHxg1hWokhOx/12jMtsAxgimd3dRJ+N4jYc0jxFRKQNJJpZ54xCE3z/UlHiFeeVFHaNVMQDslX4gdSRjaO8sjOqE6wIqZFXqoUV2+KOYf/0P9XehdJYBSD1Fxe3hJEHKiBDDbPcJUDkJouxZnDvHk4o33GSaNVHgoMQ6ltmL5FmiaDuQ3kl6HVPz5K2PBBjzTcFhH3Y2Fpg2MPdaGTU7cZnkF0rGgVM3z4RxBuHa4A+AdNktHgG9/KhjN8UefKslk8497jWJbPdgbGRr6++GtDsIjJpmEGMpXV6KFmLUQVwew==
- Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=BW63DEsjKhjh1Oxa0xedMm2HpNijwPe7Z84D+ejcWrD8EpZeUjRU1ak6O5zg7mLdkQWoZA6T70/zn0r9lbejxrJC4SkfJA2ZwHVZhUTMbS4S7Pcbva803yZlkZfMemus+C4pnQ3FNebX3pc7PXtuqrvVC/2zw8XirL/cBHV9ulnxOCc0Jkn2Oa0ch7p0l3pc0kdBDJ35sT0JftOUSNbKZHDnOWbdvi30ROfwM61/R+ab3A2YJzT2ceFWLFJKceQgE8eMSahIuJv4qEruHN6UAR2cagHyGsSLDgv41apeohBgIQ9vahSs6MFKiQtyNTCpqFtUp2wvCjCXTMlZKlRjEQ==
- References: <dd6757ea29019f93720d348db7b810ea3e8cbe07.camel@marvell.com> <87a7a8mu2k.fsf@oldenburg2.str.redhat.com>
On Thu, 2019-10-10 at 18:41 +0200, Florian Weimer wrote:
>
> * Steve Ellcey:
>
> > I would like these used by default so I took some ideas from
> > --with-advance-toolchain and used that to automatically add these options
> > to LINK_SPEC (see attached patch). I can compile and link a program with
> > this setup, but when I run the program I get:
> >
> > % ./x
> > Inconsistency detected by ld.so: get-dynamic-info.h: 147: elf_get_dynamic_info:
> > Assertion `info[DT_RPATH] == NULL' failed!
> >
> > I am not sure why this doesn't work. Can anyone help me understand
> > why this doesn't work or help me figure out how else I might be able to
> > get the functionality I want. That is: to use shared libraries and a dynamic
> > linker (at run time) that are in a non-standard location without needing
> > to compile or link with special flags.
>
> An argument could be made that if ld.so has DT_RPATH set,
> LD_LIBRARY_PATH would stop working, which would be a bug. Hence the
> assert. It's probably less an issue for DT_RUNPATH.
>
> The real fix would be to make sure that ld.so isn't built with those
> dynamic tags. If ld.so wants to use an alternative search path, that
> should be baked into the loader itself, explicitly.
>
> Do you know where those dynamic tags originate? Is there some wrapper
> script involved that sets them unconditionally?
I am not sure, but my guess is that it is because I am building
binutils (including ld) using --with-sysroot. I build both GCC and
binutils with the sysroot directory where I put the glibc that I am
building. Maybe I should try building GCC with --with-sysroot but
build binutils without it.
Steve Ellcey
sellcey@marvell.com