From 67dc833e46679c13f4b8d82cbb52d2393fef8fd8 Mon Sep 17 00:00:00 2001 From: Solomon Peachy Date: Sun, 9 Oct 2022 19:17:41 -0400 Subject: Toolchains: Update to GCC 8.5.0 All toolchain dependencies are circa the GCC 8.5.0 release: GCC 8.5.0, binutils 2.37, gmp 6.2.1, mpfr 4.1.0, mpc 1.2.1, isl 0.18 Native: * arm (smoke tested on ipodvideo+mini2g) * mips (seems to be stable on xDuoo X3) * m68k (binaries untested) Hosted: * arm (binaries untested) * mips (smoke tested on xDuoo X3ii) Unchanged: * Android NDK (unchanged at GCC 4.9.4) Change-Id: I1c2fca5d87d4a11e50aa495fad75f4f9c938c766 --- tools/rockboxdev.sh | 103 ++++++++++++++++++++++------------------------------ 1 file changed, 44 insertions(+), 59 deletions(-) (limited to 'tools/rockboxdev.sh') diff --git a/tools/rockboxdev.sh b/tools/rockboxdev.sh index 63b1a1f5a1..540ede75e2 100755 --- a/tools/rockboxdev.sh +++ b/tools/rockboxdev.sh @@ -458,30 +458,30 @@ build() { cd "$toolname-$version" if (echo $needs_libs | grep -q gmp && test ! -d gmp); then echo "ROCKBOXDEV: Getting GMP" - getfile "gmp-4.3.2.tar.bz2" "$GNU_MIRROR/gmp" - tar xjf $dlwhere/gmp-4.3.2.tar.bz2 - ln -s gmp-4.3.2 gmp + getfile "gmp-6.2.1.tar.bz2" "$GNU_MIRROR/gmp" + tar xjf $dlwhere/gmp-6.2.1.tar.bz2 + ln -s gmp-6.2.1 gmp fi if (echo $needs_libs | grep -q mpfr && test ! -d mpfr); then echo "ROCKBOXDEV: Getting MPFR" - getfile "mpfr-3.1.0.tar.bz2" "$GNU_MIRROR/mpfr" - tar xjf $dlwhere/mpfr-3.1.0.tar.bz2 - ln -s mpfr-3.1.0 mpfr + getfile "mpfr-4.1.0.tar.bz2" "$GNU_MIRROR/mpfr" + tar xjf $dlwhere/mpfr-4.1.0.tar.bz2 + ln -s mpfr-4.1.0 mpfr fi if (echo $needs_libs | grep -q mpc && test ! -d mpc); then echo "ROCKBOXDEV: Getting MPC" - getfile "mpc-1.0.1.tar.gz" "http://www.multiprecision.org/downloads" - tar xzf $dlwhere/mpc-1.0.1.tar.gz - ln -s mpc-1.0.1 mpc + getfile "mpc-1.2.1.tar.gz" "http://www.multiprecision.org/downloads" + tar xzf $dlwhere/mpc-1.2.1.tar.gz + ln -s mpc-1.2.1 mpc fi if (echo $needs_libs | grep -q isl && test ! -d isl); then echo "ROCKBOXDEV: Getting ISL" - getfile "isl-0.15.tar.bz2" "https://gcc.gnu.org/pub/gcc/infrastructure" - tar xjf $dlwhere/isl-0.15.tar.bz2 - ln -s isl-0.15 isl + getfile "isl-0.18.tar.bz2" "https://gcc.gnu.org/pub/gcc/infrastructure" + tar xjf $dlwhere/isl-0.18.tar.bz2 + ln -s isl-0.18 isl fi cd $builddir fi @@ -541,9 +541,9 @@ build_linux_toolchain () { # check libraries: # contrary to other toolchains that rely on a hack to avoid installing - # gmp, mpc and mpfr, we simply require that they are installed on the system - # this is not a huge requirement since virtually all systems these days - # provide dev packages for them + # gmp, mpc, and mpfr, we simply require that they are installed on + # the system this is not a huge requirement since virtually all systems + # these days provide dev packages for them # FIXME: maybe add an option to download and install them automatically checklib "mpc" "gmp" "mpfr" @@ -764,26 +764,26 @@ do echo "" case $arch in [Ii]) - build "binutils" "mipsel-elf" "2.26.1" "" "--disable-werror" "isl" - build "gcc" "mipsel-elf" "4.9.4" "" "" "gmp mpfr mpc isl" + build "binutils" "mipsel-elf" "2.37" "" "--disable-werror" "gmp isl" + build "gcc" "mipsel-elf" "8.5.0" "" "" "gmp mpfr mpc isl" ;; [Mm]) - build "binutils" "m68k-elf" "2.26.1" "" "--disable-werror" "isl" - build "gcc" "m68k-elf" "4.9.4" "" "--with-arch=cf MAKEINFO=missing" "gmp mpfr mpc isl" + build "binutils" "m68k-elf" "2.37" "" "--disable-werror" "gmp isl" + build "gcc" "m68k-elf" "8.5.0" "" "--with-arch=cf MAKEINFO=missing" "gmp mpfr mpc isl" ;; [Aa]) binopts="" - gccopts="" + gccopts="--with-multilib-list=rmprofile" case $system in Darwin) binopts="--disable-nls" gccopts="--disable-nls" ;; esac - build "binutils" "arm-elf-eabi" "2.26.1" "" "$binopts --disable-werror" "isl" - build "gcc" "arm-elf-eabi" "4.9.4" "rockbox-multilibs-noexceptions-arm-elf-eabi-gcc-4.9.4.diff" "$gccopts MAKEINFO=missing" "gmp mpfr mpc isl" + build "binutils" "arm-elf-eabi" "2.37" "" "$binopts --disable-werror" "gmp isl" + build "gcc" "arm-elf-eabi" "8.5.0" "rockbox-multilibs-noexceptions-arm-elf-eabi-gcc-8.5.0.diff" "$gccopts MAKEINFO=missing" "gmp mpfr mpc isl" ;; [Xx]) # IMPORTANT NOTE @@ -792,30 +792,19 @@ do # # Samsung YP-R0/R1: # ARM1176JZF-S, softfp EABI - # gcc: 4.9.4 is the latest 4.9.x stable branch, also the only one that - # compiles with GCC >6 - # kernel: 2.6.27.59 is the same 2.6.x stable kernel as used by the - # original ct-ng toolchain, the device runs kernel 2.6.24 - # glibc: 2.19 is the latest version that supports kernel 2.6.24 which - # is used on the device, but we need to support ABI 2.4 because - # the device uses glibc 2.4.2 - # + # kernel: device runs 2.6.24, but oem toolchain is built against 2.6.27.59 + # glibc: device runs 2.4.2 + # # Sony NWZ: - # gcc: 4.9.4 is the latest 4.9.x stable branch, also the only one that - # compiles with GCC >6 - # kernel: 2.6.32.68 is the latest 2.6.x stable kernel, the device - # runs kernel 2.6.23 or 2.6.35 or 3.x for the most recent - # glibc: 2.19 is the latest version that supports kernel 2.6.23 which - # is used on many Sony players, but we need to support ABI 2.7 - # because the device uses glibc 2.7 + # kernel: Varies from device to device; 2.6.23, 2.6.35, and 3.x seen. + # glibc: device runs 2.7 # - # Thus the lowest common denominator is to use the latest 2.6.x stable - # kernel but compile glibc to support kernel 2.6.23 and glibc 2.4. - # We use a recent 2.26.1 binutils to avoid any build problems and - # avoid patches/bugs. + # Thus the lowest common denominator is to target 2.6.23 and glibc 2.4 + # Use a recent 2.6.32 LTS kernel, but glibc 2.20 targeting 2.6.23 and API 2.4 + # glibcopts="--enable-kernel=2.6.23 --enable-oldest-abi=2.4" - build_linux_toolchain "arm-rockbox-linux-gnueabi" "2.26.1" "" "4.9.4" \ - "$gccopts" "2.6.32.68" "2.19" "$glibcopts" "glibc-220-make44.patch" + build_linux_toolchain "arm-rockbox-linux-gnueabi" "2.37" "" "8.5.0" \ + "$gccopts" "2.6.32.71" "2.20" "$glibcopts" "glibc-220-make44.patch" # build alsa-lib # we need to set the prefix to how it is on device (/usr) and then # tweak install dir at make install step @@ -830,28 +819,22 @@ do # This toolchain must support several targets and thus must support # the oldest possible configuration. # - # AGPTek Rocker: - # XBurst release 1 (something inbetween mips32r1 and mips32r2) - # gcc: 4.9.4 is the latest 4.9.x stable branch, also the only one that - # compiles with GCC >6 + # AGPTek Rocker (and other HibyOS players): # kernel: 3.10.14 # glibc: 2.16 # alsa: 1.0.29 # - # FiiO M3K Linux: + # FiiO M3K Linux (Based on Ingenic SDK): # kernel: 3.10.14 # glibc: 2.16 # alsa: 1.0.26 # - # To maximize compatibility, we use kernel 3.2.85 which is the lastest - # longterm 3.2 kernel and is supported by the latest glibc, and we - # require support for up to glibc 2.16 - # We use a recent 2.26.1 binutils to avoid any build problems and - # avoid patches/bugs. + # Use a recent 3.10 LTS kernel, but glibc 2.27 targeting 3.2.x and API 2.16 + # glibcopts="--enable-kernel=3.2 --enable-oldest-abi=2.16" - # FIXME: maybe add -mhard-float - build_linux_toolchain "mipsel-rockbox-linux-gnu" "2.26.1" "" "4.9.4" \ - "$gccopts" "3.2.85" "2.25" "$glibcopts" "glibc-225-make44.patch" + # FIXME: maybe add -mhard-float? + build_linux_toolchain "mipsel-rockbox-linux-gnu" "2.37" "" "8.5.0" \ + "$gccopts" "3.10.108" "2.27" "$glibcopts" "glibc-227-make44.patch" # build alsa-lib # we need to set the prefix to how it is on device (/usr) and then # tweak install dir at make install step @@ -859,7 +842,10 @@ do gettool "alsa-lib" "$alsalib_ver" extract "alsa-lib-$alsalib_ver" prefix="/usr" buildtool "alsa-lib" "$alsalib_ver" \ - "--host=$target --disable-python" "" "install DESTDIR=$prefix/$target/sysroot" + "--host=$target --disable-python" "" "install DESTDIR=$prefix/$target/sysroot" + + ### Everything below here is needed only for bluetooth support + # build libffi libffi_ver="3.2.1" gettool "libffi" "$libffi_ver" @@ -880,7 +866,7 @@ do gettool "glib" "$glib_ver" extract "glib-$glib_ver" prefix="/usr" buildtool "glib" "$glib_ver" \ - "--host=$target --with-sysroot=$prefix/$target/sysroot --disable-libelf glib_cv_stack_grows=no glib_cv_uscore=no ac_cv_func_posix_getpwuid_r=yes ac_cv_func_posix_getgrgid_r=yes" "" "install DESTDIR=$prefix/$target/sysroot" + "--host=$target --with-sysroot=$prefix/$target/sysroot --disable-libelf glib_cv_stack_grows=no glib_cv_uscore=no ac_cv_func_posix_getpwuid_r=yes ac_cv_func_posix_getgrgid_r=yes CFLAGS=-Wno-error=format-nonliteral" "" "install DESTDIR=$prefix/$target/sysroot" # build expat expat_ver="2.1.0" @@ -896,7 +882,6 @@ do prefix="/usr" buildtool "dbus" "$dbus_ver" \ "--host=$target --with-sysroot=$prefix/$target/sysroot --includedir=/usr/include --enable-abstract-sockets ac_cv_lib_expat_XML_ParserCreate_MM=yes --disable-systemd --disable-launchd --enable-x11-autolaunch=no --with-x=no -disable-selinux --disable-apparmor --disable-doxygen-docs " "" "install DESTDIR=$prefix/$target/sysroot " - ;; *) echo "ROCKBOXDEV: Unsupported architecture option: $arch" -- cgit v1.2.3