GCC 8.3.0, libatomic and text relocations
Florian Weimer
fw@deneb.enyo.de
Tue Sep 24 09:20:00 GMT 2019
* Tom Kacvinsky:
>> * 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.
Hmm, I may have been confused. Sorry.
I can't find out the installation requirements for Red Hat Enterprise
Linux 5. I thought that the original i386 was not supported (and at
least a Pentium was required), but I could be wrong about that, too.
> Yea, I discovered this by using -march=i686 when building my code.
> Then libatomic was not necessary.
That's probably the right thing to do anyway.
>> 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...
Oh, that's actually a really good guess. I had not thought about
that.
More information about the Gcc-help
mailing list