[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.
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revision | Last revisionBoth sides next revision | ||
howtos: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 | howtos:hardware:arm:gcc-13.x_aarch64_cross-compiler [2024/02/08 07:55 (UTC)] – [AArch64 cross-compiler script code] revised/updated script code exaga | ||
---|---|---|---|
Line 38: | Line 38: | ||
############################################################################## | ############################################################################## | ||
- | # Slackware ARM gcc-13.2.0 | + | # |
+ | # Slackware ARM gcc-13.2.0 | ||
# | # | ||
# SARPi64.SlackBuild-gcc-13.2.0-aarch64-cc [v1.6] - 2023-10-14 | # SARPi64.SlackBuild-gcc-13.2.0-aarch64-cc [v1.6] - 2023-10-14 | ||
Line 58: | Line 59: | ||
# | # | ||
### Installation & Usage ### | ### Installation & Usage ### | ||
+ | # | ||
# You should create a ' | # You should create a ' | ||
# (e.g. / | # (e.g. / | ||
Line 86: | Line 88: | ||
# | # | ||
# ~# gcc --version | # ~# gcc --version | ||
+ | # | ||
+ | # Copy the Linux kernel-headers package to /tmp/usr and delete asm directory. | ||
+ | # Then symlink it to asm-armv8 directory: | ||
+ | # | ||
+ | # root@jook:/ | ||
+ | # root@jook:/ | ||
# | # | ||
# More recent gcc packages-versions may exist. You may wish to install them. | # More recent gcc packages-versions may exist. You may wish to install them. | ||
Line 113: | Line 121: | ||
# | # | ||
### Disclaimer ### | ### Disclaimer ### | ||
+ | # | ||
# This script was created on Slackware ARM and intended for development | # This script was created on Slackware ARM and intended for development | ||
# and testing on Slackware AArch64. This script may work on other Linux | # and testing on Slackware AArch64. This script may work on other Linux | ||
Line 120: | Line 129: | ||
# Slackware AArch64. | # Slackware AArch64. | ||
# | # | ||
- | # Copyright 2016-2022 Exaga, sarpi.penthux.net | + | # |
- | # All rights reserved. | + | |
# | # | ||
# | # | ||
# any purpose with or without fee is hereby granted, provided that | # any purpose with or without fee is hereby granted, provided that | ||
- | # the above copyright notice and this permission | + | # the above copyright notice and this disclaimer |
- | # | + | # all copies. All rights reserved. |
# | # | ||
# THIS SOFTWARE IS PROVIDED ``AS IS'' | # THIS SOFTWARE IS PROVIDED ``AS IS'' | ||
Line 168: | Line 176: | ||
# 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 | ||
- | DEV_BRANCH=rpi-6.1.y | + | DEV_BRANCH=rpi-6.6.y |
Line 184: | Line 192: | ||
# Build variables | # Build variables | ||
PRGNAM=SARPi64.SlackBuild-aarch64-cc | PRGNAM=SARPi64.SlackBuild-aarch64-cc | ||
- | ARCH_TARGET=aarch64-linux | + | ARCH_TARGET=aarch64-linux |
LINUX_ARCH=arm64 | LINUX_ARCH=arm64 | ||
QUADLET=aarch64-unknown-linux-gnu # aarch64-arm-none-eabi | QUADLET=aarch64-unknown-linux-gnu # aarch64-arm-none-eabi | ||
Line 190: | Line 198: | ||
RPI_GITURL_LINUX=https:// | RPI_GITURL_LINUX=https:// | ||
BUILD_LANGUAGES=" | BUILD_LANGUAGES=" | ||
- | ALT_CONFIG_OPTIONS=" | + | ALT_CONFIG_OPTIONS=" |
+ | BLD_CONFIG_OPTIONS=" | ||
TEST_CONFIG_OPTIONS=" | TEST_CONFIG_OPTIONS=" | ||
- | RPI4_CONFIG_OPTIONS=" | + | RPI_CONFIG_OPTIONS=" |
- | PARALLEL_JOBS=-j4 | + | # https:// |
+ | PARALLEL_JOBS=-j4 | ||
CWD=$(pwd) | CWD=$(pwd) | ||
# Define CONFIG_OPTIONS for build | # Define CONFIG_OPTIONS for build | ||
CONFIG_OPTIONS=$ALT_CONFIG_OPTIONS | CONFIG_OPTIONS=$ALT_CONFIG_OPTIONS | ||
+ | |||
+ | # Set bulletin | ||
+ | set -e | ||
+ | |||
+ | # INSTALL_PATH needs to be at the front of $PATH | ||
+ | # Command: export PATH=/ | ||
+ | echo " | ||
+ | if [[ ! " | ||
+ | export PATH=/" | ||
+ | else | ||
+ | echo "Found $INSTALL_PATH\/ | ||
+ | fi | ||
# Uncomment to log EVERYTHING during build process [** WARNING! HUGE log filesize! **] | # Uncomment to log EVERYTHING during build process [** WARNING! HUGE log filesize! **] | ||
Line 217: | Line 239: | ||
sarpiSP64 | sarpiSP64 | ||
echo " | echo " | ||
- | |||
- | # INSTALL_PATH needs to be at the front of $PATH | ||
- | # Command: export PATH=/ | ||
- | echo " | ||
- | if [[ ! " | ||
- | export PATH=/" | ||
- | # echo -e $INSTALL_PATH/ | ||
- | else | ||
- | echo "Found $INSTALL_PATH\/ | ||
- | fi | ||
# Prerequisite packages | # Prerequisite packages | ||
Line 238: | Line 250: | ||
echo " | echo " | ||
echo " | echo " | ||
- | exit 1 | + | exit 1; |
elif [ ! -e " | elif [ ! -e " | ||
echo " | echo " | ||
echo " | echo " | ||
- | exit 1 | + | exit 1; |
elif [ ! -e " | elif [ ! -e " | ||
echo " | echo " | ||
echo " | echo " | ||
- | exit 1 | + | exit 1; |
elif [ ! -e " | elif [ ! -e " | ||
echo " | echo " | ||
echo " | echo " | ||
- | exit 1 | + | exit 1; |
else | else | ||
echo " | echo " | ||
fi | fi | ||
+ | |||
+ | # Delete build-binutils directory [if it exists] | ||
+ | rm -rf build-binutils | ||
+ | mkdir build-binutils | ||
# Download RPi kernel source ** this may take a while ** | # Download RPi kernel source ** this may take a while ** | ||
Line 260: | Line 276: | ||
if [ ! -e $LINUX_FLAVOUR/ | if [ ! -e $LINUX_FLAVOUR/ | ||
echo " | echo " | ||
- | git clone --depth=1 $RPI_GITURL_LINUX/ | + | git clone --branch $DEV_BRANCH |
fi | fi | ||
cd $LINUX_FLAVOUR | cd $LINUX_FLAVOUR | ||
Line 302: | Line 318: | ||
fi | fi | ||
- | # Create symbolic links so gcc builds these dependencies | + | # Create symbolic links so gcc builds these dependencies. This can be done |
- | # This can be done automagically by using this command in gcc source dir: | + | # automagically by using the following |
# ./ | # ./ | ||
# | # | ||
Line 323: | Line 339: | ||
# Build binutils | # Build binutils | ||
echo " | echo " | ||
- | rm -rf build-binutils | ||
- | mkdir build-binutils | ||
cd build-binutils | cd build-binutils | ||
- | ../ | + | ../ |
make $PARALLEL_JOBS | make $PARALLEL_JOBS | ||
echo " | echo " | ||
Line 341: | Line 355: | ||
mkdir -p build-gcc | mkdir -p build-gcc | ||
cd build-gcc | cd build-gcc | ||
- | ../ | + | ../ |
make $PARALLEL_JOBS all-gcc | make $PARALLEL_JOBS all-gcc | ||
echo " | echo " | ||
Line 366: | Line 380: | ||
EOF | EOF | ||
- | # Patch gcc-13.2.x/ | + | # Patch gcc-13.2.x/ |
ASANLINUXCC=$CWD/ | ASANLINUXCC=$CWD/ | ||
if [ ! -f " | if [ ! -f " | ||
echo " | echo " | ||
- | patch -b " | + | patch -b " |
sarpiSP64 | sarpiSP64 | ||
echo " | echo " | ||
Line 381: | Line 395: | ||
mkdir -p build-glibc | mkdir -p build-glibc | ||
cd build-glibc | cd build-glibc | ||
- | ../ | + | ../ |
make $PARALLEL_JOBS install-bootstrap-headers=yes install-headers | make $PARALLEL_JOBS install-bootstrap-headers=yes install-headers | ||
make $PARALLEL_JOBS csu/ | make $PARALLEL_JOBS csu/ | ||
Line 420: | Line 434: | ||
sarpiSP64 | sarpiSP64 | ||
echo " | echo " | ||
- | exit 1 | + | exit 1; |
else | else | ||
# Done! | # Done! | ||
Line 430: | Line 444: | ||
fi | fi | ||
- | # Done | + | # |
exit 0; | exit 0; | ||