GCC 8.3.0, libatomic and text relocations

Kacvinsky, Tom Tom.Kacvinsky@vector.com
Mon Sep 23 12:57:00 GMT 2019


Hi Florian,

> -----Original Message-----
> From: gcc-help-owner@gcc.gnu.org <gcc-help-owner@gcc.gnu.org> On
> Behalf Of Florian Weimer
> Sent: Monday, September 23, 2019 7:58 AM
> To: Kacvinsky, Tom <Tom.Kacvinsky@vector.com>
> Cc: gcc-help@gcc.gnu.org
> Subject: Re: GCC 8.3.0, libatomic and text relocations
> 
> * Tom Kacvinsky:
> 
> > I have built GCC 8.3.0 on a RHEL 5 machine, using the build triplet
> > i386-redhat-linux.  Since I chose i386 as the architecture, the
> > resulting object code I have needs libatomic.
> 
> That seems an odd choice.  There is no supported Linux distribution which
> still runs on an i386.  Are you really sure you need this?

The gcc that is provided by RHEL5 uses the build triplet I used.  I could (should?)
have used a different build triplet.

> 
> You will be able to avoid this problem by moving to an i486 or later baseline.
> It also avoids most issues with the libatomic emulation in libgcc, which is
> incompatible with many usage scenarios.
> 

Yea, I discovered this by using -march=i686 when building my code.  Then libatomic
was not necessary.

> The lack of PIC compilation in your static libgcc appears to be a problem with
> the way you built the compiler.  I do not think regular builds suffer from this.

I did not change the build process.  Used the official source tarbal, did a configure
thusly:

../gcc-8.3.0/configure --prefix=/home/BUILD/bin/gcc-8.3.0-3 --enable-clocale=generic --enable-languages=c,c++,ada --with-mpfr=/home/BUILD/lib/mpfr-3.1.5/ --with-mpc=/home/BUILD/lib/mpc-1.0.3/ --with-gmp=/home/BUILD/lib/gmp-6.1.2/ --disable-multilib --build=i386-redhat-linux.

And form what I saw in the build logs for this is that everything was compiled with
-fPIC.  I wonder if the problem is really due to using the system's ancient binutils
instead of a newer version compiled from source...

Tom



More information about the Gcc-help mailing list