Re: Build Gcc 14.2 for arm-none-eabi: Gcc git or source from ARM developer?

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

 



Hi all,

my target MCU is STM32F103RBT6. A Cortex-M3 with 20KiB RAM and 128Kib
flash. So arm-none-eabi is right.

This is how i tried to compile it from git src. All make operations are
without -jxx. It took a pretty long time. 

The reason why i try to compile it from source is: It was easy to
compile the current gcc from src for x86_64-linux so i wanted to try
this too and learn something on the way.

Also figured out my fault in my previous attempts: I had to export the
new PATH that newlibs configure can pick up the new arm-none-eabi-gcc.

Thanks for all your hints! I just leave my log for future me ;)

Thanks a lot!

Georg

$ export PREFIX=/opt/arm-none-eabi/14.2
cd 
# Binutils seems to be ok
$ cd build-binutils
$ ../binutils-2.42/configure --prefix=${PREFIX} --host=x86_64-linux-gnu
--build=x86_64-linux-gnu --target=arm-none-eabi
$ make -j4
$ make install

# gcc
$ cd ../gcc-src
git describe --tags
releases/gcc-14.2.0
$  ./contrib/download_prerequisites 
gettext-0.22.tar.gz: OK
gmp-6.2.1.tar.bz2: OK
mpfr-4.1.0.tar.bz2: OK
mpc-1.2.1.tar.gz: OK
isl-0.24.tar.bz2: OK
All prerequisites downloaded successfully.
$ cd ../build-gcc
$ ../gcc-src/configure --prefix=${PREFIX} --host=x86_64-linux-gnu --
build=x86_64-linux-gnu --target=arm-none-eabi --enable-
languages=c,c++,lto --enable-multilib --with-newlib
checking build system type... x86_64-pc-linux-gnu
checking host system type... x86_64-pc-linux-gnu
checking target system type... arm-none-eabi
checking for a BSD-compatible install... /usr/bin/install -c
checking whether ln works... yes
checking whether ln -s works... yes
checking for a sed that does not truncate output... /usr/bin/sed
checking for gawk... gawk
checking for libatomic support... no
checking for libitm support... no
checking for libsanitizer support... no
checking for libvtv support... no
checking for libphobos support... no
checking for x86_64-linux-gnu-gcc... x86_64-linux-gnu-gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables... 
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether x86_64-linux-gnu-gcc accepts -g... yes
checking for x86_64-linux-gnu-gcc option to accept ISO C89... none
needed
checking for x86_64-linux-gnu-gcc option to accept ISO C99... none
needed
checking for x86_64-linux-gnu-g++... x86_64-linux-gnu-g++
checking whether we are using the GNU C++ compiler... yes
checking whether x86_64-linux-gnu-g++ accepts -g... yes
checking whether g++ accepts -static-libstdc++ -static-libgcc... yes
checking for x86_64-linux-gnu-gnatbind... no
checking for gnatbind... no
checking for x86_64-linux-gnu-gnatmake... no
checking for gnatmake... no
checking whether compiler driver understands Ada and is recent
enough... no
checking for x86_64-linux-gnu-gdc... no
checking for gdc... no
checking whether the D compiler works... no
checking for cargo... cargo
checking how to compare bootstrapped objects... cmp --ignore-initial=16
$$f1 $$f2
checking whether x86_64-linux-gnu-g++ supports C++11 features by
default... yes
checking for objdir... .libs
configure: WARNING: using in-tree isl, disabling version check
*** This configuration is not supported in the following
subdirectories:
     target-libgomp target-libatomic target-libitm target-libsanitizer
target-libvtv target-libphobos gnattools gotools libgrust target-libada
target-zlib target-libbacktrace target-libgfortran target-libgo target-
libffi target-libgm2 target-libobjc target-libgrust
    (Any other directories should still work fine.)
checking for default BUILD_CONFIG... 
checking for --enable-vtable-verify... no
checking for bison... bison -y
checking for bison... bison
checking for gm4... no
checking for gnum4... no
checking for m4... m4
checking for flex... flex
checking for flex... flex
checking for makeinfo... makeinfo
checking for expect... expect
checking for runtest... no
checking for x86_64-linux-gnu-ar... x86_64-linux-gnu-ar
checking for x86_64-linux-gnu-as... x86_64-linux-gnu-as
checking for x86_64-linux-gnu-dlltool... no
checking for dlltool... no
checking for x86_64-linux-gnu-dsymutil... no
checking for dsymutil... no
checking for x86_64-linux-gnu-ld... x86_64-linux-gnu-ld
checking for x86_64-linux-gnu-lipo... no
checking for lipo... no
checking for x86_64-linux-gnu-nm... x86_64-linux-gnu-nm
checking for x86_64-linux-gnu-ranlib... x86_64-linux-gnu-ranlib
checking for x86_64-linux-gnu-strip... x86_64-linux-gnu-strip
checking for x86_64-linux-gnu-windres... no
checking for windres... no
checking for x86_64-linux-gnu-windmc... no
checking for windmc... no
checking for x86_64-linux-gnu-objcopy... x86_64-linux-gnu-objcopy
checking for x86_64-linux-gnu-objdump... x86_64-linux-gnu-objdump
checking for x86_64-linux-gnu-otool... no
checking for otool... no
checking for x86_64-linux-gnu-readelf... x86_64-linux-gnu-readelf
checking for -plugin option... checking for x86_64-linux-gnu-ar...
(cached) x86_64-linux-gnu-ar
--plugin /usr/lib/gcc/x86_64-linux-gnu/12/liblto_plugin.so
checking for arm-none-eabi-cc... no
checking for arm-none-eabi-gcc... no
checking for arm-none-eabi-c++... no
checking for arm-none-eabi-g++... no
checking for arm-none-eabi-cxx... no
checking for arm-none-eabi-gxx... no
checking for arm-none-eabi-gcc... no
checking for arm-none-eabi-gfortran... no
checking for arm-none-eabi-gccgo... no
checking for arm-none-eabi-gdc... no
checking for arm-none-eabi-gm2... no
checking for ar... /opt/arm-none-eabi/14.2/arm-none-eabi/bin/ar
checking for as... /opt/arm-none-eabi/14.2/arm-none-eabi/bin/as
checking for dlltool... no
checking for arm-none-eabi-dlltool... no
checking for dsymutil... no
checking for arm-none-eabi-dsymutil... no
checking for ld... /opt/arm-none-eabi/14.2/arm-none-eabi/bin/ld
checking for lipo... no
checking for arm-none-eabi-lipo... no
checking for nm... /opt/arm-none-eabi/14.2/arm-none-eabi/bin/nm
checking for objcopy... /opt/arm-none-eabi/14.2/arm-none-
eabi/bin/objcopy
checking for objdump... /opt/arm-none-eabi/14.2/arm-none-
eabi/bin/objdump
checking for otool... no
checking for arm-none-eabi-otool... no
checking for ranlib... /opt/arm-none-eabi/14.2/arm-none-eabi/bin/ranlib
checking for readelf... /opt/arm-none-eabi/14.2/arm-none-
eabi/bin/readelf
checking for strip... /opt/arm-none-eabi/14.2/arm-none-eabi/bin/strip
checking for windres... no
checking for arm-none-eabi-windres... no
checking for windmc... no
checking for arm-none-eabi-windmc... no
checking where to find the target ar... pre-installed in /opt/arm-none-
eabi/14.2/arm-none-eabi/bin
checking where to find the target as... pre-installed in /opt/arm-none-
eabi/14.2/arm-none-eabi/bin
checking where to find the target cc... just compiled
checking where to find the target c++... just compiled
checking where to find the target c++ for libstdc++... just compiled
checking where to find the target dlltool... pre-installed
checking where to find the target dsymutil... pre-installed
checking where to find the target gcc... just compiled
checking where to find the target gfortran... pre-installed
checking where to find the target gccgo... pre-installed
checking where to find the target gdc... pre-installed
checking where to find the target gm2... pre-installed
checking where to find the target ld... pre-installed in /opt/arm-none-
eabi/14.2/arm-none-eabi/bin
checking where to find the target lipo... pre-installed
checking where to find the target nm... pre-installed in /opt/arm-none-
eabi/14.2/arm-none-eabi/bin
checking where to find the target objcopy... pre-installed in /opt/arm-
none-eabi/14.2/arm-none-eabi/bin
checking where to find the target objdump... pre-installed in /opt/arm-
none-eabi/14.2/arm-none-eabi/bin
checking where to find the target otool... pre-installed
checking where to find the target ranlib... pre-installed in /opt/arm-
none-eabi/14.2/arm-none-eabi/bin
checking where to find the target readelf... pre-installed in /opt/arm-
none-eabi/14.2/arm-none-eabi/bin
checking where to find the target strip... pre-installed in /opt/arm-
none-eabi/14.2/arm-none-eabi/bin
checking where to find the target windres... pre-installed
checking where to find the target windmc... pre-installed
checking whether to enable maintainer-specific portions of Makefiles...
no
configure: creating ./config.status
config.status: creating Makefile



# Now i build gcc only
$ make all-gcc
....
cc1: note: self-tests are not enabled in this build
echo timestamp > s-selftest-c
/home/georg/Dokumente/Entwicklung/04_FOSS/gcc/build-gcc/./gcc/xgcc -
B/home/georg/Dokumente/Entwicklung/04_FOSS/gcc/build-gcc/./gcc/  -xc++
-nostdinc /dev/null -S -o /dev/null -fself-test=../../gcc-
src/gcc/testsuite/selftests
cc1plus: note: self-tests are not enabled in this build
echo timestamp > s-selftest-c++
rm gfdl.pod gcc.pod gcov-dump.pod gcov-tool.pod fsf-funding.pod gpl.pod
cpp.pod gcov.pod lto-dump.pod
make[1]: Verzeichnis
„/home/georg/Dokumente/Entwicklung/04_FOSS/gcc/build-gcc/gcc“ wird
verlassen
$ make install-gcc
$ /opt/arm-none-eabi/14.2/bin/arm-none-eabi-gcc -v
Es werden eingebaute Spezifikationen verwendet.
COLLECT_GCC=/opt/arm-none-eabi/14.2/bin/arm-none-eabi-gcc
COLLECT_LTO_WRAPPER=/opt/arm-none-eabi/14.2/libexec/gcc/arm-none-
eabi/14.2.0/lto-wrapper
Ziel: arm-none-eabi
Konfiguriert mit: ../gcc-src/configure --prefix=/opt/arm-none-
eabi/14.2/ --host=x86_64-linux-gnu --build=x86_64-linux-gnu --
target=arm-none-eabi --enable-languages=c,c++,lto --enable-multilib --
with-newlib
Thread-Modell: single
Unterstützte LTO-Kompressionsalgorithmen: zlib zstd
gcc-Version 14.2.0 (GCC)

# Now to newlib
$ cd ../newlib-src
$ git describe --tags
newlib-4.4.0
$ cd ../build-newlib
$ export PATH=${PREFIX}/bin:$PATH
$ ../newlib-src/configure --prefix=${PREFIX} --host=x86_64-linux-gnu --
target=arm-none-eabi
checking build system type... x86_64-pc-linux-gnu
checking host system type... x86_64-pc-linux-gnu
checking target system type... arm-none-eabi
checking for a BSD-compatible install... /usr/bin/install -c
checking whether ln works... yes
checking whether ln -s works... yes
checking for a sed that does not truncate output... /usr/bin/sed
checking for gawk... gawk
checking for x86_64-linux-gnu-gcc... x86_64-linux-gnu-gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables... 
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether x86_64-linux-gnu-gcc accepts -g... yes
checking for x86_64-linux-gnu-gcc option to accept ISO C89... none
needed
checking for x86_64-linux-gnu-g++... x86_64-linux-gnu-g++
checking whether we are using the GNU C++ compiler... yes
checking whether x86_64-linux-gnu-g++ accepts -g... yes
checking whether g++ accepts -static-libstdc++ -static-libgcc... yes
checking for x86_64-linux-gnu-gnatbind... no
checking for gnatbind... no
checking for x86_64-linux-gnu-gnatmake... no
checking for gnatmake... no
checking whether compiler driver understands Ada... no
checking how to compare bootstrapped objects... cmp --ignore-initial=16
$$f1 $$f2
checking for objdir... .libs
checking for isl 0.16, 0.15, or deprecated 0.14... no
recommended isl version is 0.16 or 0.15, the minimum required isl
version 0.14 is deprecated
checking for isl 0.16 or 0.15... no
checking for default BUILD_CONFIG... 
checking for --enable-vtable-verify... no
checking for bison... bison -y
checking for bison... bison
checking for gm4... no
checking for gnum4... no
checking for m4... m4
checking for flex... flex
checking for flex... flex
checking for makeinfo... makeinfo
checking for expect... expect
checking for runtest... no
checking for x86_64-linux-gnu-ar... x86_64-linux-gnu-ar
checking for x86_64-linux-gnu-as... x86_64-linux-gnu-as
checking for x86_64-linux-gnu-dlltool... no
checking for dlltool... no
checking for x86_64-linux-gnu-ld... x86_64-linux-gnu-ld
checking for x86_64-linux-gnu-lipo... no
checking for lipo... no
checking for x86_64-linux-gnu-nm... x86_64-linux-gnu-nm
checking for x86_64-linux-gnu-ranlib... x86_64-linux-gnu-ranlib
checking for x86_64-linux-gnu-strip... x86_64-linux-gnu-strip
checking for x86_64-linux-gnu-windres... no
checking for windres... no
checking for x86_64-linux-gnu-windmc... no
checking for windmc... no
checking for x86_64-linux-gnu-objcopy... x86_64-linux-gnu-objcopy
checking for x86_64-linux-gnu-objdump... x86_64-linux-gnu-objdump
checking for x86_64-linux-gnu-readelf... x86_64-linux-gnu-readelf
checking for -plugin option... checking for x86_64-linux-gnu-ar...
(cached) x86_64-linux-gnu-ar
--plugin /usr/lib/gcc/x86_64-linux-gnu/12/liblto_plugin.so
checking for arm-none-eabi-cc... no
checking for arm-none-eabi-gcc... arm-none-eabi-gcc
checking for arm-none-eabi-c++... arm-none-eabi-c++
checking for arm-none-eabi-gcc... arm-none-eabi-gcc
checking for arm-none-eabi-gcj... no
checking for arm-none-eabi-gfortran... no
checking for arm-none-eabi-gccgo... no
checking for arm-none-eabi-ar... arm-none-eabi-ar
checking for arm-none-eabi-as... arm-none-eabi-as
checking for arm-none-eabi-dlltool... no
checking for arm-none-eabi-ld... arm-none-eabi-ld
checking for arm-none-eabi-lipo... no
checking for arm-none-eabi-nm... arm-none-eabi-nm
checking for arm-none-eabi-objcopy... arm-none-eabi-objcopy
checking for arm-none-eabi-objdump... arm-none-eabi-objdump
checking for arm-none-eabi-ranlib... arm-none-eabi-ranlib
checking for arm-none-eabi-readelf... arm-none-eabi-readelf
checking for arm-none-eabi-strip... arm-none-eabi-strip
checking for arm-none-eabi-windres... no
checking for arm-none-eabi-windmc... no
checking where to find the target ar... pre-installed
checking where to find the target as... pre-installed
checking where to find the target cc... pre-installed
checking where to find the target c++... pre-installed
checking where to find the target c++ for libstdc++... pre-installed
checking where to find the target dlltool... pre-installed
checking where to find the target gcc... pre-installed
checking where to find the target gcj... pre-installed
checking where to find the target gfortran... pre-installed
checking where to find the target gccgo... pre-installed
checking where to find the target ld... pre-installed
checking where to find the target lipo... pre-installed
checking where to find the target nm... pre-installed
checking where to find the target objcopy... pre-installed
checking where to find the target objdump... pre-installed
checking where to find the target ranlib... pre-installed
checking where to find the target readelf... pre-installed
checking where to find the target strip... pre-installed
checking where to find the target windres... pre-installed
checking where to find the target windmc... pre-installed
checking whether to enable maintainer-specific portions of Makefiles...
no
configure: creating ./config.status
config.status: creating Makefile


$ make 
.....
  GEN      arm/pid.specs
  GEN      arm/iq80310.specs
true  DO=all multi-do # make
make[8]: Verzeichnis
„/home/georg/Dokumente/Entwicklung/04_FOSS/gcc/build-newlib/arm-none-
eabi/thumb/autofp/v7/fpu/libgloss“ wird verlassen
make[7]: Verzeichnis
„/home/georg/Dokumente/Entwicklung/04_FOSS/gcc/build-newlib/arm-none-
eabi/thumb/autofp/v7/fpu/libgloss“ wird verlassen
make[6]: Verzeichnis
„/home/georg/Dokumente/Entwicklung/04_FOSS/gcc/build-newlib/arm-none-
eabi/thumb/autofp/v7/fpu/libgloss“ wird verlassen
make[5]: Verzeichnis
„/home/georg/Dokumente/Entwicklung/04_FOSS/gcc/build-newlib/arm-none-
eabi/libgloss“ wird verlassen
make[4]: Verzeichnis
„/home/georg/Dokumente/Entwicklung/04_FOSS/gcc/build-newlib/arm-none-
eabi/libgloss“ wird verlassen
make[3]: Verzeichnis
„/home/georg/Dokumente/Entwicklung/04_FOSS/gcc/build-newlib/arm-none-
eabi/libgloss“ wird verlassen
make[2]: Verzeichnis
„/home/georg/Dokumente/Entwicklung/04_FOSS/gcc/build-newlib/arm-none-
eabi/libgloss“ wird verlassen
make[1]: Verzeichnis
„/home/georg/Dokumente/Entwicklung/04_FOSS/gcc/build-newlib“ wird
verlassen
$ make install

# Now finish gcc (hopefully)
$ cd ../build-gcc
$ make
....
make[6]: Verzeichnis
„/home/georg/Dokumente/Entwicklung/04_FOSS/gcc/build-gcc/arm-none-
eabi/thumb/autofp/v7/fpu/libquadmath“ wird verlassen
make[5]: Verzeichnis
„/home/georg/Dokumente/Entwicklung/04_FOSS/gcc/build-gcc/arm-none-
eabi/thumb/autofp/v7/fpu/libquadmath“ wird verlassen
make[4]: Verzeichnis
„/home/georg/Dokumente/Entwicklung/04_FOSS/gcc/build-gcc/arm-none-
eabi/libquadmath“ wird verlassen
make[3]: Verzeichnis
„/home/georg/Dokumente/Entwicklung/04_FOSS/gcc/build-gcc/arm-none-
eabi/libquadmath“ wird verlassen
make[2]: Verzeichnis
„/home/georg/Dokumente/Entwicklung/04_FOSS/gcc/build-gcc/arm-none-
eabi/libquadmath“ wird verlassen
make[1]: Verzeichnis
„/home/georg/Dokumente/Entwicklung/04_FOSS/gcc/build-gcc“ wird
verlassen
$ make install





[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