Re: Gcc build fails with test_real_width is negative

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, Nov 29, 2021 at 8:40 PM Mr Dini via Gcc-help
<gcc-help@xxxxxxxxxxx> wrote:
>
> I am sure this is not a common practice, but since I couldn't get gcc to compile and I am out of ideas as to why libgcc is not picking up the environment variables, I decided to share the chroot I am trying to build from.
>
> The file can be found here: https://mega.nz/file/qqBB2QKZ#mQVV3Vqyre6MYtdGJlx2rNq7el8Aiimr6uv4aTZR97g
>
> When I chroot I firstly run the command to populate the environment variables:
>
> . /opt/webos-sdk-x86_64/1.0.g/environment-setup-armv7a-neon-webos-linux-gnueabi
>
> Then execute the following commands to start the build process:
>
> cd /root/gcc-build
>
> CC="arm-webos-linux-gnueabi-gcc -march=armv7-a -mfpu=neon -mfloat-abi=softfp --sysroot=/opt/webos-sdk-x86_64/1.0.g/sysroots/armv7a-neon-webos-linux-gnueabi" CXX="arm-webos-linux-gnueabi-g++ -march=armv7-a -mfpu=neon -mfloat-abi=softfp --sysroot=/opt/webos-sdk-x86_64/1.0.g/sysroots/armv7a-neon-webos-linux-gnueabi" ../gcc-6.2.0/configure --prefix=/opt/webos-sdk-x86_64/1.0.g/sysroots/armv7a-neon-webos-linux-gnueabi --with-mpfr=/opt/webos-sdk-x86_64/1.0.g/sysroots/armv7a-neon-webos-linux-gnueabi --host=armv7a-linux-gnueabi --target=armv7a-linux-gnueabi --build=x86_64-linux-gnu
>
> make -j8
>
> Right now, the folder contains a state where it fails with stdio.h no such file or directory. If you skip the configure part and run make -j8 directly after setting the env vars, you can see what's going on.
>
> I appreciate any feedback!
>
> Thanks

I tried it and also arrived at the missing <stdio.h>. I built a few
cross-native compilers a few years ago; I will look up how I did it.
But I seem to remember that you need to use --with-sysroot somewhere
because the problem is that in the build process, when the newly built
compiler is used to build libgcc, it does not know where to look for
the platform includes. Or at least use a different environment
variable for injecting the --sysroot argument. When I did it, I looked
at how crosstool-ng did it by looking at its build logs and adapting
them for building a native compiler.

I am a bit puzzled why you are running an x86_64 toolchain inside an
i686 chroot. But that is not the source of your problem, at least for
now.




[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux