guix-devel
[Top][All Lists]
Advanced

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

Re: A different way to build GCC to overcome issues, especially with C++


From: Stefan
Subject: Re: A different way to build GCC to overcome issues, especially with C++ for embedded systems
Date: Fri, 22 Dec 2023 10:33:50 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.15.0

Hi Attila!

i tried with your gcc … but it errors out with:

$ make
[  1%] Linking ASM executable bs2_default.elf
arm-none-eabi-gcc: error: nosys.specs: No such file or directory

That file is located here: 
/gnu/store/…-newlib-arm-none-eabi-4.3.0/arm-none-eabi/lib/nosys.specs

Hm, it might be necessary to add that path per default to COMPILER_PATH as well 
with a -B option. This path currently only appears under LIBRARY_PATH, which 
seems to not be searched for spec files.
$ arm-none-eabi-g++ -v -E -xc++ - < /dev/null
Using built-in specs.
COLLECT_GCC=/gnu/store/…-gcc12-cross-newlib-arm-none-eabi-toolchain-12.2.0/bin/arm-none-eabi-g++
Target: arm-none-eabi
Configured with:
Thread model: single
Supported LTO compression algorithms: zlib
gcc version 12.2.0 (GCC)
COLLECT_GCC_OPTIONS='-v' '-E' '-mcpu=arm7tdmi' '-mfloat-abi=soft' '-marm' 
'-mlibarch=armv4t' '-march=armv4t'
 
/gnu/store/…-gcc12-cross-newlib-arm-none-eabi-12.2.0/libexec/gcc/arm-none-eabi/12.2.0/cc1plus
 -E -quiet -v -D__USES_INITFINI__ - -mcpu=arm7tdmi -mfloat-abi=soft -marm 
-mlibarch=armv4t -march=armv4t -dumpbase -
ignoring nonexistent directory 
"/gnu/store/…-gcc12-cross-newlib-arm-none-eabi-12.2.0-lib/lib/gcc/arm-none-eabi/12.2.0/../../../../../../../arm-none-eabi/include"
#include "..." search starts here:
#include <...> search starts here:
 /gnu/store/…-gcc12-cross-newlib-arm-none-eabi-12.2.0/include-c++
 /gnu/store/…-gcc12-cross-newlib-arm-none-eabi-12.2.0/include-c++/arm-none-eabi
 /gnu/store/…-gcc12-cross-newlib-arm-none-eabi-12.2.0/include-c++/backward
 
/gnu/store/…-gcc12-cross-newlib-arm-none-eabi-12.2.0-lib/lib/gcc/arm-none-eabi/12.2.0/include
 /gnu/store/…-gcc12-cross-newlib-arm-none-eabi-12.2.0-lib/include
 
/gnu/store/…-gcc12-cross-newlib-arm-none-eabi-12.2.0-lib/lib/gcc/arm-none-eabi/12.2.0/include-fixed
 /gnu/store/…-newlib-arm-none-eabi-4.3.0/arm-none-eabi/include
End of search list.
# 0 "<stdin>"
# 0 "<built-in>"
# 0 "<command-line>"
# 1 "<stdin>"
COMPILER_PATH=/gnu/store/…-gcc12-cross-newlib-arm-none-eabi-12.2.0/libexec/gcc/arm-none-eabi/12.2.0/:/gnu/store/…-gcc12-cross-newlib-arm-none-eabi-12.2.0/libexec/gcc/arm-none-eabi/12.2.0/:/gnu/store/…-gcc12-cross-newlib-arm-none-eabi-12.2.0/libexec/gcc/arm-none-eabi/:/gnu/store/…-gcc12-cross-newlib-arm-none-eabi-12.2.0-lib/lib/gcc/arm-none-eabi/12.2.0/:/gnu/store/…-gcc12-cross-newlib-arm-none-eabi-12.2.0-lib/lib/gcc/arm-none-eabi/
LIBRARY_PATH=/gnu/store/…-gcc12-cross-newlib-arm-none-eabi-12.2.0-lib/lib/gcc/arm-none-eabi/12.2.0/:/gnu/store/…-newlib-arm-none-eabi-4.3.0/arm-none-eabi/lib/
COLLECT_GCC_OPTIONS='-v' '-E' '-mcpu=arm7tdmi' '-mfloat-abi=soft' '-marm' 
'-mlibarch=armv4t' '-march=armv4t'

You may want to try to add -B 
/gnu/store/…-newlib-arm-none-eabi-4.3.0/arm-none-eabi/lib to the linker options 
or to add 
COMPILER_PATH=/gnu/store/…-newlib-arm-none-eabi-4.3.0/arm-none-eabi/lib in 
front of your command. Tell me about your results.

I'm about to update to GCC 13. There is some issue to work around (which smells 
like a similar one in Gentoo¹), I’ll see if I can add the newlib path to the 
COMPILER_PATH as well.


Bye

Stefan


¹ https://bugs.gentoo.org/905118




reply via email to

[Prev in Thread] Current Thread [Next in Thread]