[2024-feb-29] Sad news: Eric Layton aka Nocturnal Slacker aka vtel57 passed away on Feb 26th, shortly after hospitalization. He was one of our Wiki's most prominent admins. He will be missed.

Welcome to the Slackware Documentation Project

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revisionBoth sides next revision
howtos:hardware:arm:gcc-13.x_aarch64_cross-compiler [2023/10/15 16:44 (UTC)] – [Notes] corrected RPi version exagahowtos:hardware:arm:gcc-13.x_aarch64_cross-compiler [2023/10/19 10:17 (UTC)] – [AArch64 cross-compiler script code] modify script code to build --with-sysroot exaga
Line 55: Line 55:
 # This script downloads RPi Linux kernel source and the required binaries,  # This script downloads RPi Linux kernel source and the required binaries, 
 # and configures, builds, patches, and installs a gcc 13.2.x aarch64-linux  # and configures, builds, patches, and installs a gcc 13.2.x aarch64-linux 
-# cross-compiler on Slackware ARM 15.0 running on a Raspberry Pi 3/4.+# cross-compiler on Slackware ARM running on a Raspberry Pi 3/4/5.
 # #
 ### Installation & Usage ### ### Installation & Usage ###
Line 61: Line 61:
 # (e.g. /tmp/build-dir) and run it from there as a 'root' user.  # (e.g. /tmp/build-dir) and run it from there as a 'root' user. 
 # #
-# ~# chmod +x SARPi64.SlackBuild-gcc-13.2.0-aarch64-cc.sh 
 # ~# ./SARPi64.SlackBuild-gcc-13.2.0-aarch64-cc.sh # ~# ./SARPi64.SlackBuild-gcc-13.2.0-aarch64-cc.sh
 # #
Line 84: Line 83:
 # #
 # NB: The gcc package you compile should match your currently installed gcc  # NB: The gcc package you compile should match your currently installed gcc 
-# version. Use this command to check your 15.0 gcc version:+# version. Use this command to check your current gcc version:
 # #
 # ~# gcc --version # ~# gcc --version
Line 94: Line 93:
 # #
 # binutils - https://ftp.gnu.org/gnu/binutils/ # binutils - https://ftp.gnu.org/gnu/binutils/
-# cloog -https://gcc.gnu.org/pub/gcc/infrastructure/+# cloog - ftp://gcc.gnu.org/pub/gcc/infrastructure/
 # gcc - https://ftp.gnu.org/gnu/gcc/ # gcc - https://ftp.gnu.org/gnu/gcc/
 # glibc - https://ftp.gnu.org/gnu/glibc/ # glibc - https://ftp.gnu.org/gnu/glibc/
 # gmp - https://ftp.gnu.org/gnu/gmp/ # gmp - https://ftp.gnu.org/gnu/gmp/
-# isl - https://gcc.gnu.org/pub/gcc/infrastructure/+# isl - ftp://gcc.gnu.org/pub/gcc/infrastructure/
 # mpfr - https://ftp.gnu.org/gnu/mpfr/ # mpfr - https://ftp.gnu.org/gnu/mpfr/
 # mpc - https://ftp.gnu.org/gnu/mpc/ # mpc - https://ftp.gnu.org/gnu/mpc/
Line 154: Line 153:
 ############################################################################## ##############################################################################
  
- 
-############################################################################# 
-##                         SETTINGS AND VERSIONS                           ## 
-############################################################################# 
  
 # Installation directory - edit INSTALL_PATH as required # Installation directory - edit INSTALL_PATH as required
 INSTALL_PATH=/tmp/.gcc-cross INSTALL_PATH=/tmp/.gcc-cross
  
-# Required build packages versions [* newer versions may exist]+# Required build packages-versions [* newer versions may exist]
 BINUTILS_VERSION=binutils-2.41 BINUTILS_VERSION=binutils-2.41
 CLOOG_VERSION=cloog-0.18.1 CLOOG_VERSION=cloog-0.18.1
 GCC_VERSION=gcc-13.2.0 GCC_VERSION=gcc-13.2.0
 GLIBC_VERSION=glibc-2.38 GLIBC_VERSION=glibc-2.38
-GMP_VERSION=gmp-6.3.0+GMP_VERSION=gmp-6.2.1
 ISL_VERSION=isl-0.24 ISL_VERSION=isl-0.24
-MPFR_VERSION=mpfr-4.2.1 +MPFR_VERSION=mpfr-4.1.0 
-MPC_VERSION=mpc-1.3.1+MPC_VERSION=mpc-1.2.1
  
 # RPi GitHub Linux source - working branch [e.g. rpi-5.15.y | rpi-5.19.y | rpi-6.1.y  # RPi GitHub Linux source - working branch [e.g. rpi-5.15.y | rpi-5.19.y | rpi-6.1.y 
Line 308: Line 303:
  
 # Create symbolic links so gcc builds these dependencies automatically # Create symbolic links so gcc builds these dependencies automatically
 +# This can be done automagically by using this command in gcc source dir: 
 +# ./contrib/download_prerequisites
 +#
 echo "Creating symbolic links in gcc ..." echo "Creating symbolic links in gcc ..."
 cd "$CWD"/$GCC_VERSION cd "$CWD"/$GCC_VERSION
-ln -sf ../$MPFR_VERSION mpfr 
 ln -sf ../$GMP_VERSION gmp ln -sf ../$GMP_VERSION gmp
 +ln -sf ../$MPFR_VERSION mpfr
 ln -sf ../$MPC_VERSION mpc ln -sf ../$MPC_VERSION mpc
 ln -sf ../$ISL_VERSION isl ln -sf ../$ISL_VERSION isl
Line 328: Line 326:
 mkdir build-binutils mkdir build-binutils
 cd build-binutils cd build-binutils
-../$BINUTILS_VERSION/configure --prefix=$INSTALL_PATH --target=$ARCH_TARGET $CONFIG_OPTIONS+../$BINUTILS_VERSION/configure --prefix=$INSTALL_PATH --target=$ARCH_TARGET $CONFIG_OPTIONS --with-sysroot --disable-nls --disable-werror
 make $PARALLEL_JOBS make $PARALLEL_JOBS
 echo "Installing binutils ..." echo "Installing binutils ..."
Line 343: Line 341:
 mkdir -p build-gcc mkdir -p build-gcc
 cd build-gcc cd build-gcc
-../$GCC_VERSION/configure --prefix=$INSTALL_PATH --target=$ARCH_TARGET $BUILD_LANGUAGES $CONFIG_OPTIONS+../$GCC_VERSION/configure --prefix=$INSTALL_PATH --target=$ARCH_TARGET $BUILD_LANGUAGES $CONFIG_OPTIONS --disable-nls --disable-bootstrap
 make $PARALLEL_JOBS all-gcc make $PARALLEL_JOBS all-gcc
 echo "Installing gcc $ARCH_TARGET cross-compiler to $INSTALL_PATH ..." echo "Installing gcc $ARCH_TARGET cross-compiler to $INSTALL_PATH ..."
Line 352: Line 350:
 touch asan_linux-cpp.patch touch asan_linux-cpp.patch
 cat << EOF > asan_linux-cpp.patch cat << EOF > asan_linux-cpp.patch
---- gcc-13.2.0/libsanitizer/asan/asan_linux.cpp 2023-07-27 09:13:08.000000000 +0100 +--- gcc-13.2.0/libsanitizer/asan/asan_linux.cpp 2023-10-15 19:29:43.000000000 +0100 
-+++ asan_linux-cpp.new 2023-10-15 14:36:04.000000000 +0100++++ asan_linux-cpp.new 2023-10-16 08:33:44.000000000 +0100
 @@ -77,6 +77,10 @@ @@ -77,6 +77,10 @@
  asan_rt_version_t  __asan_rt_version;  asan_rt_version_t  __asan_rt_version;
Line 401: Line 399:
 echo "Completing glibc C library ..." echo "Completing glibc C library ..."
 cd "$CWD"/build-glibc cd "$CWD"/build-glibc
-make $PARALLEL_JOBS+make $PARALLEL_JOBS 
 echo "Installing glibc C library ..." echo "Installing glibc C library ..."
 make install make install
Line 408: Line 406:
 echo "Completing glibc C++ library ..." echo "Completing glibc C++ library ..."
 cd "$CWD"/build-gcc cd "$CWD"/build-gcc
-make $PARALLEL_JOBS+make $PARALLEL_JOBS 
 echo "Installing glibc C++ library ..." echo "Installing glibc C++ library ..."
 make install make install
Line 433: Line 431:
  
 # Done # Done
-exit 0+exit 0;
  
 #EOF<*> #EOF<*>
 howtos:hardware:arm:gcc-13.x_aarch64_cross-compiler ()