A modern Music Player Daemon based on Rockbox open source high quality audio player
libadwaita audio rust zig deno mpris rockbox mpd

Toolchains: Update to GCC 9.5.0

GCC 9.5.0, binutils 2.38, gmp 6.1.2, mpfr 4.1.1, mpc 1.2.1, isl 0.18

Native:

* arm - mini2g, nano2g, ipod6g works
* mips - xduoox3 works
* m68k - binaries untested

Hosted:

* arm - samsungypr0 works
* mips - xduoox3ii works
* Android NDK - unchanged at GCC 4.9.4

Change-Id: I80faed4c74f7238265bf7a19b794e8476c351411

+242 -188
+6 -6
tools/configure
··· 138 138 139 139 findarmgcc() { 140 140 prefixtools arm-elf-eabi- 141 - gccchoice="4.9.4" 141 + gccchoice="9.5.0" 142 142 } 143 143 144 144 # scan the $PATH for the given command ··· 548 548 GCCOPTS="$CCOPTS -mcpu=5249 -malign-int -mstrict-align" 549 549 GCCOPTIMIZE="-fomit-frame-pointer" 550 550 endian="big" 551 - gccchoice="4.9.4" 551 + gccchoice="9.5.0" 552 552 } 553 553 554 554 arm7tdmicc () { ··· 628 628 GCCOPTS="$GCCOPTS -ffunction-sections -msoft-float -G 0 -Wno-parentheses" 629 629 GCCOPTIMIZE="-fomit-frame-pointer" 630 630 endian="little" 631 - gccchoice="4.9.4" 631 + gccchoice="9.5.0" 632 632 } 633 633 634 634 mipsr2elcc () { ··· 638 638 GCCOPTS="$GCCOPTS -ffunction-sections -msoft-float -G 0 -Wno-parentheses" 639 639 GCCOPTIMIZE="-fomit-frame-pointer" 640 640 endian="little" 641 - gccchoice="4.9.4" 641 + gccchoice="9.5.0" 642 642 } 643 643 644 644 maemocc () { ··· 786 786 GCCOPTS="$GCCOPTS -D_GNU_SOURCE=1 -U_FORTIFY_SOURCE -D_REENTRANT" 787 787 788 788 # Set up compiler 789 - gccchoice="4.9.4" 789 + gccchoice="9.5.0" 790 790 prefixtools "arm-rockbox-linux-gnueabi-" 791 791 } 792 792 ··· 966 966 GCCOPTS="$GCCOPTS -D_GNU_SOURCE=1 -U_FORTIFY_SOURCE -D_REENTRANT" 967 967 968 968 # Set up compiler 969 - gccchoice="4.9.4" 969 + gccchoice="9.5.0" 970 970 prefixtools "mipsel-rockbox-linux-gnu-" 971 971 } 972 972
+50 -62
tools/rockboxdev.sh
··· 333 333 # $5=make install options (will be replaced by "install" if left empty) 334 334 # By default, the restary step is the toolname, but it can be changed by setting 335 335 # RESTART_STEP 336 - buildtool() { 336 + buildtool () { 337 337 tool="$1" 338 338 version="$2" 339 339 toolname="$tool-$version" ··· 389 389 elif [ "$config_opt" != "NO_CONFIGURE" ]; then 390 390 echo "ROCKBOXDEV: $toolname/configure" 391 391 cflags='-U_FORTIFY_SOURCE -fgnu89-inline -O2' 392 - if [ "$tool" == "glib" ]; then 392 + if [ "$tool" == "glibc" ]; then 393 + cflags="$cflags -fcommon" # glibc < 2.30 needs -fcommon for gcc10+ 394 + elif [ "$tool" == "glib" ]; then 393 395 run_cmd "$logfile" $SED -i -e 's/m4_copy/m4_copy_force/g' "$cfg_dir/m4macros/glib-gettext.m4" 394 396 run_cmd "$logfile" autoreconf -fiv "$cfg_dir" 395 397 cflags="$cflags -Wno-format-nonliteral -Wno-format-overflow" ··· 443 445 444 446 # For Apple targets only 445 447 if [ "$system" == "Darwin" ] ; then 446 - patch="$patch apple_silicon.patch apple_silicon-zlib.patch" 448 + # gcc-libcpp17: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111632 449 + patch="$patch apple_silicon.patch apple_silicon-zlib.patch gcc-libcpp17.patch" 447 450 EXTRA_CXXFLAGS="-fbracket-depth=512" 448 451 fi 449 452 fi ··· 489 492 cd "$toolname-$version" 490 493 if (echo $needs_libs | grep -q gmp && test ! -d gmp); then 491 494 echo "ROCKBOXDEV: Getting GMP" 492 - getfile "gmp-6.1.2.tar.xz" "$GNU_MIRROR/gmp" 493 - tar xJf $dlwhere/gmp-6.1.2.tar.xz 495 + getfile "gmp-6.1.2.tar.bz2" "$GNU_MIRROR/gmp" 496 + tar xjf $dlwhere/gmp-6.1.2.tar.bz2 494 497 ln -s gmp-6.1.2 gmp 495 498 fi 496 499 497 500 if (echo $needs_libs | grep -q mpfr && test ! -d mpfr); then 498 501 echo "ROCKBOXDEV: Getting MPFR" 499 - getfile "mpfr-3.1.6.tar.xz" "$GNU_MIRROR/mpfr" 500 - tar xJf $dlwhere/mpfr-3.1.6.tar.xz 501 - ln -s mpfr-3.1.6 mpfr 502 + getfile "mpfr-4.1.1.tar.xz" "$GNU_MIRROR/mpfr" 503 + tar xJf $dlwhere/mpfr-4.1.1.tar.xz 504 + ln -s mpfr-4.1.1 mpfr 502 505 fi 503 506 504 507 if (echo $needs_libs | grep -q mpc && test ! -d mpc); then 505 508 echo "ROCKBOXDEV: Getting MPC" 506 - getfile "mpc-1.0.1.tar.gz" "http://www.multiprecision.org/downloads" 507 - tar xzf $dlwhere/mpc-1.0.1.tar.gz 508 - ln -s mpc-1.0.1 mpc 509 + getfile "mpc-1.2.1.tar.gz" "http://www.multiprecision.org/downloads" 510 + tar xzf $dlwhere/mpc-1.2.1.tar.gz 511 + ln -s mpc-1.2.1 mpc 509 512 fi 510 513 511 514 if (echo $needs_libs | grep -q isl && test ! -d isl); then 512 515 echo "ROCKBOXDEV: Getting ISL" 513 - getfile "isl-0.15.tar.bz2" "https://gcc.gnu.org/pub/gcc/infrastructure" 514 - tar xjf $dlwhere/isl-0.15.tar.bz2 515 - ln -s isl-0.15 isl 516 + getfile "isl-0.18.tar.bz2" "https://gcc.gnu.org/pub/gcc/infrastructure" 517 + tar xjf $dlwhere/isl-0.18.tar.bz2 518 + ln -s isl-0.18 isl 516 519 fi 517 520 cd $builddir 518 521 fi ··· 561 564 562 565 # check libraries: 563 566 # contrary to other toolchains that rely on a hack to avoid installing 564 - # gmp, mpc and mpfr, we simply require that they are installed on the system 565 - # this is not a huge requirement since virtually all systems these days 566 - # provide dev packages for them 567 + # gmp, mpc, and mpfr, we simply require that they are installed on 568 + # the system this is not a huge requirement since virtually all systems 569 + # these days provide dev packages for them 567 570 # FIXME: maybe add an option to download and install them automatically 568 571 checklib "mpc" "gmp" "mpfr" 569 572 ··· 802 805 echo "" 803 806 case $arch in 804 807 [Ii]) 805 - build "binutils" "mipsel-elf" "2.26.1" "binutils-c23.patch" "--disable-werror" "gmp isl" 806 - build "gcc" "mipsel-elf" "4.9.4" "" "" "gmp mpfr mpc isl" 808 + build "binutils" "mipsel-elf" "2.38" "binutils-c23.patch" "--disable-werror" "gmp isl" 809 + build "gcc" "mipsel-elf" "9.5.0" "" "" "gmp mpfr mpc isl" 807 810 ;; 808 811 809 812 [Mm]) 810 - build "binutils" "m68k-elf" "2.26.1" "" "--disable-werror" "gmp isl" 811 - build "gcc" "m68k-elf" "4.9.4" "" "--with-arch=cf MAKEINFO=missing" "gmp mpfr mpc isl" 813 + build "binutils" "m68k-elf" "2.38" "" "--disable-werror" "gmp isl" 814 + build "gcc" "m68k-elf" "9.5.0" "" "--with-arch=cf MAKEINFO=missing" "gmp mpfr mpc isl" 812 815 ;; 813 816 814 817 [Aa]) 815 818 binopts="" 816 - gccopts="" 819 + gccopts="--with-multilib-list=rmprofile" 817 820 case $system in 818 821 Darwin) 819 822 binopts="--disable-nls" 820 823 gccopts="--disable-nls" 821 824 ;; 822 825 esac 823 - build "binutils" "arm-elf-eabi" "2.26.1" "" "$binopts --disable-werror" "gmp isl" 824 - 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" 826 + build "binutils" "arm-elf-eabi" "2.38" "" "$binopts --disable-werror" "gmp isl" 827 + build "gcc" "arm-elf-eabi" "9.5.0" "rockbox-multilibs-noexceptions-arm-elf-eabi-gcc-9.5.0.diff" "$gccopts MAKEINFO=missing" "gmp mpfr mpc isl" 825 828 ;; 826 829 [Xx]) 827 830 # IMPORTANT NOTE ··· 830 833 # 831 834 # Samsung YP-R0/R1: 832 835 # ARM1176JZF-S, softfp EABI 833 - # gcc: 4.9.4 is the latest 4.9.x stable branch, also the only one that 834 - # compiles with GCC >6 835 - # kernel: 2.6.27.59 is the same 2.6.x stable kernel as used by the 836 - # original ct-ng toolchain, the device runs kernel 2.6.24 837 - # glibc: 2.19 is the latest version that supports kernel 2.6.24 which 838 - # is used on the device, but we need to support ABI 2.4 because 839 - # the device uses glibc 2.4.2 840 - # 836 + # kernel: device runs 2.6.24, but oem toolchain is built against 2.6.27.59 837 + # glibc: device runs 2.4.2 838 + # 841 839 # Sony NWZ: 842 - # gcc: 4.9.4 is the latest 4.9.x stable branch, also the only one that 843 - # compiles with GCC >6 844 - # kernel: 2.6.32.71 is the latest 2.6.x stable kernel, the device 845 - # runs kernel 2.6.23 or 2.6.35 or 3.x for the most recent 846 - # glibc: 2.19 is the latest version that supports kernel 2.6.23 which 847 - # is used on many Sony players, but we need to support ABI 2.7 848 - # because the device uses glibc 2.7 840 + # kernel: Varies from device to device; 2.6.23, 2.6.35, and 3.x seen. 841 + # glibc: device runs 2.7 849 842 # 850 - # Thus the lowest common denominator is to use the latest 2.6.x stable 851 - # kernel but compile glibc to support kernel 2.6.23 and glibc 2.4. 852 - # We use a recent 2.26.1 binutils to avoid any build problems and 853 - # avoid patches/bugs. 843 + # Thus the lowest common denominator is to target 2.6.23 and glibc 2.4 844 + # Use a recent 2.6.32 LTS kernel, but glibc 2.20 targeting 2.6.23 and API 2.4 845 + # 854 846 glibcopts="--enable-kernel=2.6.23 --enable-oldest-abi=2.4" 855 - build_linux_toolchain "arm-rockbox-linux-gnueabi" "2.26.1" "" "" "4.9.4" \ 856 - "$gccopts" "2.6.32.71" "" "2.19" "$glibcopts" "glibc-220-make44.patch" 847 + build_linux_toolchain "arm-rockbox-linux-gnueabi" "2.38" "" "" "9.5.0" \ 848 + "$gccopts" "2.6.32.71" "" "2.20" "$glibcopts" "glibc-220-make44.patch glibc-2.20-gcc10.patch" 857 849 # build alsa-lib 858 850 # we need to set the prefix to how it is on device (/usr) and then 859 851 # tweak install dir at make install step ··· 868 860 # This toolchain must support several targets and thus must support 869 861 # the oldest possible configuration. 870 862 # 871 - # AGPTek Rocker: 872 - # XBurst release 1 (something inbetween mips32r1 and mips32r2) 873 - # gcc: 4.9.4 is the latest 4.9.x stable branch, also the only one that 874 - # compiles with GCC >6 863 + # AGPTek Rocker (and other HibyOS players): 875 864 # kernel: 3.10.14 876 865 # glibc: 2.16 877 866 # alsa: 1.0.29 878 867 # 879 - # FiiO M3K Linux: 868 + # FiiO M3K Linux (Based on Ingenic SDK): 880 869 # kernel: 3.10.14 881 870 # glibc: 2.16 882 871 # alsa: 1.0.26 883 872 # 884 - # To maximize compatibility, we use kernel 3.2.89 which is the latest 885 - # longterm 3.2 kernel and is supported by the latest glibc, and we 886 - # require support for up to glibc 2.16 887 - # We use a recent 2.26.1 binutils to avoid any build problems and 888 - # avoid patches/bugs. 889 - glibcopts="--enable-kernel=3.2 --enable-oldest-abi=2.16" 890 - # FIXME: maybe add -mhard-float 891 - build_linux_toolchain "mipsel-rockbox-linux-gnu" "2.26.1" "" "binutils-c23.patch" "4.9.4" \ 892 - "$gccopts" "3.2.89" "linux-c23.patch" "2.25" "$glibcopts" "glibc-225-make44.patch" 873 + # Use a recent 3.10 LTS kernel, but glibc 2.27 targeting 3.2.x and API 2.16 874 + # 875 + glibcopts="--enable-kernel=3.2 --enable-oldest-abi=2.16 --disable-werror" 876 + # FIXME: maybe add -mhard-float? 877 + build_linux_toolchain "mipsel-rockbox-linux-gnu" "2.38" "" "binutils-c23.patch" "9.5.0" \ 878 + "$gccopts" "3.10.108" "linux-c23.patch" "2.27" "$glibcopts" "glibc-227-make44.patch" 893 879 # build alsa-lib 894 880 # we need to set the prefix to how it is on device (/usr) and then 895 881 # tweak install dir at make install step ··· 897 883 gettool "alsa-lib" "$alsalib_ver" 898 884 extract "alsa-lib-$alsalib_ver" 899 885 prefix="/usr" buildtool "alsa-lib" "$alsalib_ver" \ 900 - "--host=$target --disable-python" "" "install DESTDIR=$prefix/$target/sysroot" 886 + "--host=$target --disable-python" "" "install DESTDIR=$prefix/$target/sysroot" 887 + 888 + ### Everything below here is needed only for bluetooth support 889 + 901 890 # build libffi 902 891 libffi_ver="3.2.1" 903 892 gettool "libffi" "$libffi_ver" ··· 918 907 gettool "glib" "$glib_ver" 919 908 extract "glib-$glib_ver" 920 909 prefix="/usr" buildtool "glib" "$glib_ver" \ 921 - "--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" 910 + "--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" 922 911 923 912 # build expat 924 913 expat_ver="2.1.0" ··· 933 922 extract "dbus-$dbus_ver" 934 923 prefix="/usr" buildtool "dbus" "$dbus_ver" \ 935 924 "--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 " 936 - 937 925 938 926 ;; 939 927 *)
+4 -4
tools/toolchain-patches/apple_silicon-zlib.patch
··· 1 1 diff --git a/zlib/zutil.h b/zlib/zutil.h 2 - index ed6b127e..3186e991 100644 2 + index 4b596adf..66d54cc3 100644 3 3 --- a/zlib/zutil.h 4 4 +++ b/zlib/zutil.h 5 - @@ -118,17 +118,8 @@ extern const char * const z_errmsg[10]; /* indexed by 2-zlib_error */ 5 + @@ -130,17 +130,8 @@ extern z_const char * const z_errmsg[10]; /* indexed by 2-zlib_error */ 6 6 # endif 7 7 #endif 8 8 9 9 -#if defined(MACOS) || defined(TARGET_OS_MAC) 10 10 +#if defined(MACOS) 11 - # define OS_CODE 0x07 11 + # define OS_CODE 7 12 12 -# ifndef Z_SOLO 13 13 -# if defined(__MWERKS__) && __dest_os != __be_os && __dest_os != __win32_os 14 14 -# include <unix.h> /* for fdopen */ ··· 20 20 -# endif 21 21 #endif 22 22 23 - #ifdef TOPS20 23 + #ifdef __acorn
+13
tools/toolchain-patches/apple_silicon.patch
··· 1 + diff --git a/gcc/gcc/config/aarch64/aarch64.h b/gcc/gcc/config/aarch64/aarch64.h 2 + index 976f9afae5..736b83ff0b 100644 3 + --- a/gcc/config/aarch64/aarch64.h 4 + +++ b/gcc/config/aarch64/aarch64.h 5 + @@ -1000,7 +1000,7 @@ extern const char *aarch64_rewrite_mcpu (int argc, const char **argv); 6 + #define MCPU_TO_MARCH_SPEC_FUNCTIONS \ 7 + { "rewrite_mcpu", aarch64_rewrite_mcpu }, 8 + 9 + -#if defined(__aarch64__) 10 + +#if defined(__aarch64__) && ! defined(__APPLE__) 11 + extern const char *host_detect_local_cpu (int argc, const char **argv); 12 + #define HAVE_LOCAL_CPU_DETECT 13 + # define EXTRA_SPEC_FUNCTIONS \ 1 14 diff --git a/gcc/gcc/config/host-darwin.c b/gcc/gcc/config/host-darwin.c 2 15 index 8f700eec85..b737abc006 100644 3 16 --- a/gcc/config/host-darwin.c
+3 -3
tools/toolchain-patches/binutils-c23.patch
··· 1 1 diff -ur binutils-2.26.X/opcodes/mips-formats.h binutils-2.26.1/opcodes/mips-formats.h 2 2 --- binutils-2.26.X/opcodes/mips-formats.h 2015-11-13 03:27:42.000000000 -0500 3 3 +++ binutils-2.26.1/opcodes/mips-formats.h 2025-04-28 14:04:50.949355647 -0400 4 - @@ -46,7 +46,7 @@ 4 + @@ -49,7 +49,7 @@ 5 5 #define MAPPED_INT(SIZE, LSB, MAP, PRINT_HEX) \ 6 6 { \ 7 7 typedef char ATTRIBUTE_UNUSED \ ··· 10 10 static const struct mips_mapped_int_operand op = { \ 11 11 { OP_MAPPED_INT, SIZE, LSB }, MAP, PRINT_HEX \ 12 12 }; \ 13 - @@ -80,7 +80,7 @@ 13 + @@ -83,7 +83,7 @@ 14 14 #define MAPPED_REG(SIZE, LSB, BANK, MAP) \ 15 15 { \ 16 16 typedef char ATTRIBUTE_UNUSED \ ··· 19 19 static const struct mips_reg_operand op = { \ 20 20 { OP_REG, SIZE, LSB }, OP_REG_##BANK, MAP \ 21 21 }; \ 22 - @@ -90,7 +90,7 @@ 22 + @@ -93,7 +93,7 @@ 23 23 #define OPTIONAL_MAPPED_REG(SIZE, LSB, BANK, MAP) \ 24 24 { \ 25 25 typedef char ATTRIBUTE_UNUSED \
+66
tools/toolchain-patches/gcc-libcpp17.patch
··· 1 + diff --git a/gcc/system.h b/gcc/system.h 2 + index d04f8fd33..636084682 100644 3 + --- a/gcc/system.h 4 + +++ b/gcc/system.h 5 + @@ -197,25 +197,6 @@ extern int fprintf_unlocked (FILE *, const char *, ...); 6 + /* Include <string> before "safe-ctype.h" to avoid GCC poisoning 7 + the ctype macros through safe-ctype.h */ 8 + 9 + -#ifdef __cplusplus 10 + -#ifdef INCLUDE_STRING 11 + -# include <string> 12 + -#endif 13 + -#endif 14 + - 15 + -/* There are an extraordinary number of issues with <ctype.h>. 16 + - The last straw is that it varies with the locale. Use libiberty's 17 + - replacement instead. */ 18 + -#include "safe-ctype.h" 19 + - 20 + -#include <sys/types.h> 21 + - 22 + -#include <errno.h> 23 + - 24 + -#if !defined (errno) && defined (HAVE_DECL_ERRNO) && !HAVE_DECL_ERRNO 25 + -extern int errno; 26 + -#endif 27 + - 28 + #ifdef __cplusplus 29 + #if defined (INCLUDE_ALGORITHM) || !defined (HAVE_SWAP_IN_UTILITY) 30 + # include <algorithm> 31 + @@ -229,6 +210,9 @@ extern int errno; 32 + #ifdef INCLUDE_SET 33 + # include <set> 34 + #endif 35 + +#ifdef INCLUDE_STRING 36 + +# include <string> 37 + +#endif 38 + #ifdef INCLUDE_VECTOR 39 + # include <vector> 40 + #endif 41 + @@ -237,6 +221,25 @@ extern int errno; 42 + # include <utility> 43 + #endif 44 + 45 + +#ifdef __cplusplus 46 + +#ifdef INCLUDE_STRING 47 + +# include <string> 48 + +#endif 49 + +#endif 50 + + 51 + +/* There are an extraordinary number of issues with <ctype.h>. 52 + + The last straw is that it varies with the locale. Use libiberty's 53 + + replacement instead. */ 54 + +#include "safe-ctype.h" 55 + + 56 + +#include <sys/types.h> 57 + + 58 + +#include <errno.h> 59 + + 60 + +#if !defined (errno) && defined (HAVE_DECL_ERRNO) && !HAVE_DECL_ERRNO 61 + +extern int errno; 62 + +#endif 63 + + 64 + /* Some of glibc's string inlines cause warnings. Plus we'd rather 65 + rely on (and therefore test) GCC's string builtins. */ 66 + #define __NO_STRING_INLINES
+12
tools/toolchain-patches/glibc-2.20-gcc10.patch
··· 1 + diff -Naur glibc-2.20/configure glibc-2.20-patched/configure 2 + --- glibc-2.20/configure 2014-09-07 04:09:09.000000000 -0400 3 + +++ glibc-2.20-patched/configure 2025-08-05 07:40:19.923528264 -0400 4 + @@ -4661,7 +4661,7 @@ 5 + ac_prog_version=`$CC -v 2>&1 | sed -n 's/^.*version \([egcygnustpi-]*[0-9.]*\).*$/\1/p'` 6 + case $ac_prog_version in 7 + '') ac_prog_version="v. ?.??, bad"; ac_verc_fail=yes;; 8 + - 4.[4-9].* | 4.[1-9][0-9].* | [5-9].* ) 9 + + 4.[4-9].* | 4.[1-9][0-9].* | [5-9].* | 1[0-9].* ) 10 + ac_prog_version="$ac_prog_version, ok"; ac_verc_fail=no;; 11 + *) ac_prog_version="$ac_prog_version, bad"; ac_verc_fail=yes;; 12 +
+45 -57
tools/toolchain-patches/glibc-225-make44.patch tools/toolchain-patches/glibc-227-make44.patch
··· 1 - diff -Naur glibc-2.25/libio/stdio.h glibc-2.25-patched/libio/stdio.h 2 - --- glibc-2.25/libio/stdio.h 2017-02-05 10:28:43.000000000 -0500 3 - +++ glibc-2.25-patched/libio/stdio.h 2023-05-23 15:22:27.482980335 -0400 4 - @@ -154,18 +154,23 @@ 1 + diff -Naur glibc-2.27/libio/stdio.h glibc-2.27-patched/libio/stdio.h 2 + --- glibc-2.27/libio/stdio.h 2018-02-01 11:17:18.000000000 -0500 3 + +++ glibc-2.27-patched/libio/stdio.h 2023-05-23 14:10:06.618633203 -0400 4 + @@ -118,18 +118,23 @@ 5 5 # define P_tmpdir "/tmp" 6 6 #endif 7 7 ··· 32 32 33 33 /* Standard streams. */ 34 34 extern struct _IO_FILE *stdin; /* Standard input stream. */ 35 - diff -Naur glibc-2.25/Makerules glibc-2.25-patched/Makerules 36 - --- glibc-2.25/Makerules 2017-02-05 10:28:43.000000000 -0500 37 - +++ glibc-2.25-patched/Makerules 2023-05-23 15:22:05.594967548 -0400 38 - @@ -1474,55 +1474,7 @@ 39 - endif 35 + diff -Naur glibc-2.27/Makerules glibc-2.27-patched/Makerules 36 + --- glibc-2.27/Makerules 2018-02-01 11:17:18.000000000 -0500 37 + +++ glibc-2.27-patched/Makerules 2023-05-23 14:10:06.617633203 -0400 38 + @@ -1522,46 +1522,6 @@ 40 39 41 40 endif 42 - - 41 + 43 42 -# These will have been set by sysdeps/posix/Makefile. 44 43 -L_tmpnam ?= 1 45 44 -TMP_MAX ?= 0 46 45 -L_ctermid ?= 1 47 46 -L_cuserid ?= 1 48 - 47 + - 49 48 -stdio_lim = $(common-objpfx)bits/stdio_lim.h 50 49 - 51 50 -$(stdio_lim:lim.h=%.h) $(stdio_lim:lim.h=%.d): $(stdio_lim:lim.h=%.st); @: ··· 53 52 - $(common-objpfx)config.make 54 53 - $(make-target-directory) 55 54 - { echo '#include "$(..)posix/bits/posix1_lim.h"'; \ 56 - - echo '#define _LIBC 1'; \ 57 - - echo '#include "$(..)misc/sys/uio.h"'; } | \ 55 + - } | \ 58 56 - $(CC) -E -dM -MD -MP -MF $(@:st=dT) -MT '$(@:st=h) $(@:st=d)' \ 59 57 - $(CPPUNDEFS) $(+includes) -xc - -o $(@:st=hT) 60 58 - sed $(sed-remove-objpfx) $(sed-remove-dotdot) \ ··· 62 60 - mv -f $(@:st=dt) $(@:st=d) 63 61 - fopen_max=`sed -n 's/^#define OPEN_MAX //1p' $(@:st=hT)`; \ 64 62 - filename_max=`sed -n 's/^#define PATH_MAX //1p' $(@:st=hT)`; \ 65 - - iov_max=`sed -n 's/^#define UIO_MAXIOV //p' $(@:st=hT)`; \ 66 63 - fopen_max=$${fopen_max:-16}; \ 67 64 - filename_max=$${filename_max:-1024}; \ 68 - - if [ -z "$$iov_max" ]; then \ 69 - - define_iov_max="# undef IOV_MAX"; \ 70 - - else \ 71 - - define_iov_max="# define IOV_MAX $$iov_max"; \ 72 - - fi; \ 73 65 - sed -e "s/@FOPEN_MAX@/$$fopen_max/" \ 74 66 - -e "s/@FILENAME_MAX@/$$filename_max/" \ 75 67 - -e "s/@L_tmpnam@/$(L_tmpnam)/" \ 76 68 - -e "s/@TMP_MAX@/$(TMP_MAX)/" \ 77 69 - -e "s/@L_ctermid@/$(L_ctermid)/" \ 78 70 - -e "s/@L_cuserid@/$(L_cuserid)/" \ 79 - - -e "s/@define_IOV_MAX@/$$define_iov_max/" \ 80 71 - $< > $(@:st=h.new) 81 72 - $(move-if-change) $(@:st=h.new) $(@:st=h) 82 73 -# Remove these last so that they can be examined if something went wrong. ··· 91 82 FORCE: 92 83 93 84 .PHONY: echo-headers 94 - diff -Naur glibc-2.25/Rules glibc-2.25-patched/Rules 95 - --- glibc-2.25/Rules 2017-02-05 10:28:43.000000000 -0500 96 - +++ glibc-2.25-patched/Rules 2023-05-23 15:22:27.482980335 -0400 85 + diff -Naur glibc-2.27/Rules glibc-2.27-patched/Rules 86 + --- glibc-2.27/Rules 2018-02-01 11:17:18.000000000 -0500 87 + +++ glibc-2.27-patched/Rules 2023-05-23 14:10:06.617633203 -0400 97 88 @@ -60,9 +60,6 @@ 98 89 common-generated := 99 90 endif ··· 104 95 include $(..)Makerules 105 96 106 97 .PHONY: subdir_lib 107 - diff -Naur glibc-2.25/stdio-common/stdio_lim.h.in glibc-2.25-patched/stdio-common/stdio_lim.h.in 108 - --- glibc-2.25/stdio-common/stdio_lim.h.in 2017-02-05 10:28:43.000000000 -0500 109 - +++ glibc-2.25-patched/stdio-common/stdio_lim.h.in 1969-12-31 19:00:00.000000000 -0500 110 - @@ -1,42 +0,0 @@ 111 - -/* Copyright (C) 1994-2017 Free Software Foundation, Inc. 98 + diff -Naur glibc-2.27/stdio-common/stdio_lim.h.in glibc-2.27-patched/stdio-common/stdio_lim.h.in 99 + --- glibc-2.27/stdio-common/stdio_lim.h.in 2018-02-01 11:17:18.000000000 -0500 100 + +++ glibc-2.27-patched/stdio-common/stdio_lim.h.in 1969-12-31 19:00:00.000000000 -0500 101 + @@ -1,39 +0,0 @@ 102 + -/* Copyright (C) 1994-2018 Free Software Foundation, Inc. 112 103 - This file is part of the GNU C Library. 113 104 - 114 105 - The GNU C Library is free software; you can redistribute it and/or ··· 125 116 - License along with the GNU C Library; if not, see 126 117 - <http://www.gnu.org/licenses/>. */ 127 118 - 128 - -#if !defined _STDIO_H && !defined __need_FOPEN_MAX && !defined __need_IOV_MAX 119 + -#ifndef _BITS_STDIO_LIM_H 120 + -#define _BITS_STDIO_LIM_H 1 121 + - 122 + -#ifndef _STDIO_H 129 123 -# error "Never include <bits/stdio_lim.h> directly; use <stdio.h> instead." 130 124 -#endif 131 125 - 132 - -#ifdef _STDIO_H 133 - -# define L_tmpnam @L_tmpnam@ 134 - -# define TMP_MAX @TMP_MAX@ 135 - -# define FILENAME_MAX @FILENAME_MAX@ 126 + -#define L_tmpnam @L_tmpnam@ 127 + -#define TMP_MAX @TMP_MAX@ 128 + -#define FILENAME_MAX @FILENAME_MAX@ 136 129 - 137 - -# ifdef __USE_POSIX 138 - -# define L_ctermid @L_ctermid@ 139 - -# if !defined __USE_XOPEN2K || defined __USE_GNU 140 - -# define L_cuserid @L_cuserid@ 141 - -# endif 130 + -#ifdef __USE_POSIX 131 + -# define L_ctermid @L_ctermid@ 132 + -# if !defined __USE_XOPEN2K || defined __USE_GNU 133 + -# define L_cuserid @L_cuserid@ 142 134 -# endif 143 135 -#endif 144 136 - 145 - -#if defined __need_FOPEN_MAX || defined _STDIO_H 146 - -# undef FOPEN_MAX 147 - -# define FOPEN_MAX @FOPEN_MAX@ 148 - -#endif 137 + -#undef FOPEN_MAX 138 + -#define FOPEN_MAX @FOPEN_MAX@ 149 139 - 150 - -#if defined __need_IOV_MAX && !defined IOV_MAX 151 - -@define_IOV_MAX@ 152 - -#endif 153 - diff -Naur glibc-2.25/sysdeps/mach/hurd/bits/stdio_lim.h glibc-2.25-patched/sysdeps/mach/hurd/bits/stdio_lim.h 154 - --- glibc-2.25/sysdeps/mach/hurd/bits/stdio_lim.h 1969-12-31 19:00:00.000000000 -0500 155 - +++ glibc-2.25-patched/sysdeps/mach/hurd/bits/stdio_lim.h 2023-05-23 15:22:27.483980336 -0400 140 + -#endif /* bits/stdio_lim.h */ 141 + diff -Naur glibc-2.27/sysdeps/mach/hurd/bits/stdio_lim.h glibc-2.27-patched/sysdeps/mach/hurd/bits/stdio_lim.h 142 + --- glibc-2.27/sysdeps/mach/hurd/bits/stdio_lim.h 1969-12-31 19:00:00.000000000 -0500 143 + +++ glibc-2.27-patched/sysdeps/mach/hurd/bits/stdio_lim.h 2023-05-23 14:10:06.618633203 -0400 156 144 @@ -0,0 +1,28 @@ 157 145 +/* System specific stdio.h definitions. Hurd version. 158 146 + Copyright (C) 2023 Free Software Foundation, Inc. ··· 182 170 +#define FILENAME_MAX 1024 183 171 + 184 172 +#endif /* bits/stdio_lim.h */ 185 - diff -Naur glibc-2.25/sysdeps/posix/Makefile glibc-2.25-patched/sysdeps/posix/Makefile 186 - --- glibc-2.25/sysdeps/posix/Makefile 2017-02-05 10:28:43.000000000 -0500 187 - +++ glibc-2.25-patched/sysdeps/posix/Makefile 2023-05-23 15:22:27.483980336 -0400 173 + diff -Naur glibc-2.27/sysdeps/posix/Makefile glibc-2.27-patched/sysdeps/posix/Makefile 174 + --- glibc-2.27/sysdeps/posix/Makefile 2018-02-01 11:17:18.000000000 -0500 175 + +++ glibc-2.27-patched/sysdeps/posix/Makefile 2023-05-23 14:10:06.618633203 -0400 188 176 @@ -1,8 +1,3 @@ 189 177 -# These affect the generated bits/stdio_lim.h file. 190 178 -L_tmpnam = 20 ··· 194 182 195 183 ifeq ($(subdir)|$(have-thread-library),rt|no) 196 184 # With NPTL, this lives in libpthread so it can be used for sem_open too. 197 - diff -Naur glibc-2.25/sysdeps/unix/sysv/linux/bits/stdio_lim.h glibc-2.25-patched/sysdeps/unix/sysv/linux/bits/stdio_lim.h 198 - --- glibc-2.25/sysdeps/unix/sysv/linux/bits/stdio_lim.h 1969-12-31 19:00:00.000000000 -0500 199 - +++ glibc-2.25-patched/sysdeps/unix/sysv/linux/bits/stdio_lim.h 2023-05-23 15:22:27.483980336 -0400 185 + diff -Naur glibc-2.27/sysdeps/unix/sysv/linux/bits/stdio_lim.h glibc-2.27-patched/sysdeps/unix/sysv/linux/bits/stdio_lim.h 186 + --- glibc-2.27/sysdeps/unix/sysv/linux/bits/stdio_lim.h 1969-12-31 19:00:00.000000000 -0500 187 + +++ glibc-2.27-patched/sysdeps/unix/sysv/linux/bits/stdio_lim.h 2023-05-23 14:10:06.618633203 -0400 200 188 @@ -0,0 +1,28 @@ 201 189 +/* System specific stdio.h definitions. Linux version. 202 190 + Copyright (C) 2023 Free Software Foundation, Inc. ··· 219 207 +#ifndef _BITS_STDIO_LIM_H 220 208 +#define _BITS_STDIO_LIM_H 1 221 209 + 222 - +//#ifndef _STDIO_H 223 - +//# error "Never include <bits/stdio_lim.h> directly; use <stdio.h> instead." 224 - +//#endif 210 + +#ifndef _STDIO_H 211 + +# error "Never include <bits/stdio_lim.h> directly; use <stdio.h> instead." 212 + +#endif 225 213 + 226 214 +#define FILENAME_MAX 4096 227 215 +
-56
tools/toolchain-patches/rockbox-multilibs-noexceptions-arm-elf-eabi-gcc-4.9.4.diff
··· 1 - diff -Naur gcc-4.9.4/gcc/config/arm/t-arm-elf gcc-4.9.4-fixed/gcc/config/arm/t-arm-elf 2 - --- gcc-4.9.4/gcc/config/arm/t-arm-elf 2014-01-02 17:23:26.000000000 -0500 3 - +++ gcc-4.9.4-fixed/gcc/config/arm/t-arm-elf 2020-07-01 22:11:01.198403110 -0400 4 - @@ -44,6 +44,11 @@ 5 - #MULTILIB_EXCEPTIONS += *mcpu=fa526/*mfloat-abi=hard* 6 - #MULTILIB_EXCEPTIONS += *mcpu=fa626/*mfloat-abi=hard* 7 - 8 - +# We build a lib for each specific CPU Rockbox targets. If anyone knows a better 9 - +# way to do this, please let us know. 10 - +MULTILIB_OPTIONS += mcpu=arm7tdmi/mcpu=arm9tdmi/mcpu=arm9e/mcpu=arm926ej-s/mcpu=arm1136jf-s 11 - +MULTILIB_DIRNAMES += arm7tdmi arm9tdmi arm9e arm926ej-s arm1136jf-s 12 - + 13 - # MULTILIB_OPTIONS += mcpu=ep9312 14 - # MULTILIB_DIRNAMES += ep9312 15 - # MULTILIB_EXCEPTIONS += *mthumb/*mcpu=ep9312* 16 - @@ -56,8 +61,8 @@ 17 - # MULTILIB_DIRNAMES += fpu soft 18 - # MULTILIB_EXCEPTIONS += *mthumb/*mfloat-abi=hard* 19 - # 20 - -# MULTILIB_OPTIONS += mno-thumb-interwork/mthumb-interwork 21 - -# MULTILIB_DIRNAMES += normal interwork 22 - +MULTILIB_OPTIONS += mno-thumb-interwork/mthumb-interwork 23 - +MULTILIB_DIRNAMES += normal interwork 24 - # 25 - # MULTILIB_OPTIONS += fno-leading-underscore/fleading-underscore 26 - # MULTILIB_DIRNAMES += elf under 27 - diff -Naur gcc-4.9.4/libgcc/config/arm/t-bpabi gcc-4.9.4-fixed/libgcc/config/arm/t-bpabi 28 - --- gcc-4.9.4/libgcc/config/arm/t-bpabi 2012-08-17 11:06:06.000000000 -0400 29 - +++ gcc-4.9.4-fixed/libgcc/config/arm/t-bpabi 2020-07-01 22:13:39.103762818 -0400 30 - @@ -17,4 +17,4 @@ 31 - # On ARM, specifying -fnon-call-exceptions will needlessly pull in 32 - # the unwinder in simple programs which use 64-bit division. Omitting 33 - # the option is safe. 34 - -LIB2_DIVMOD_EXCEPTION_FLAGS := -fexceptions 35 - +LIB2_DIVMOD_EXCEPTION_FLAGS := -fno-exceptions -fno-non-call-exceptions 36 - diff -Naur gcc-4.9.4/libgcc/Makefile.in gcc-4.9.4-fixed/libgcc/Makefile.in 37 - --- gcc-4.9.4/libgcc/Makefile.in 2014-01-08 11:37:08.000000000 -0500 38 - +++ gcc-4.9.4-fixed/libgcc/Makefile.in 2020-07-01 22:11:01.199403087 -0400 39 - @@ -495,7 +495,7 @@ 40 - ifeq ($(LIB2_DIVMOD_EXCEPTION_FLAGS),) 41 - # Provide default flags for compiling divmod functions, if they haven't been 42 - # set already by a target-specific Makefile fragment. 43 - -LIB2_DIVMOD_EXCEPTION_FLAGS := -fexceptions -fnon-call-exceptions 44 - +LIB2_DIVMOD_EXCEPTION_FLAGS := -fno-exceptions -fno-non-call-exceptions 45 - endif 46 - 47 - # Build LIB2_DIVMOD_FUNCS. 48 - @@ -816,7 +816,7 @@ 49 - # libgcc_eh.a, only LIB2ADDEH matters. If we do, only LIB2ADDEHSTATIC and 50 - # LIB2ADDEHSHARED matter. (Usually all three are identical.) 51 - 52 - -c_flags := -fexceptions 53 - +c_flags := -fno-exceptions 54 - 55 - ifeq ($(enable_shared),yes) 56 -
+43
tools/toolchain-patches/rockbox-multilibs-noexceptions-arm-elf-eabi-gcc-9.5.0.diff
··· 1 + diff -aur gcc-8.5.0/gcc/config/arm/t-arm-elf gcc-8.5.0-patched/gcc/config/arm/t-arm-elf 2 + --- gcc-8.5.0/gcc/config/arm/t-arm-elf 2021-05-14 04:42:08.000000000 -0400 3 + +++ gcc-8.5.0-patched/gcc/config/arm/t-arm-elf 2022-11-26 23:16:30.714433566 -0500 4 + @@ -81,6 +81,10 @@ 5 + MULTILIB_REQUIRED += marm/mfpu=auto/march=armv5te+fp/mfloat-abi=hard 6 + MULTILIB_REQUIRED += mthumb/mfpu=auto/march=armv7+fp/mfloat-abi=hard 7 + 8 + +# And we want to be able to disable interworking 9 + +MULTILIB_OPTIONS += mno-thumb-interwork/mthumb-interwork 10 + +MULTILIB_DIRNAMES += normal interwork 11 + + 12 + # PART 3 - Match rules 13 + 14 + # Map all supported FPUs onto mfpu=auto 15 + diff -aur gcc-8.5.0/libgcc/config/arm/t-bpabi gcc-8.5.0-patched/libgcc/config/arm/t-bpabi 16 + --- gcc-8.5.0/libgcc/config/arm/t-bpabi 2021-05-14 04:42:10.000000000 -0400 17 + +++ gcc-8.5.0-patched/libgcc/config/arm/t-bpabi 2022-11-26 23:14:40.938038440 -0500 18 + @@ -17,4 +17,4 @@ 19 + # On ARM, specifying -fnon-call-exceptions will needlessly pull in 20 + # the unwinder in simple programs which use 64-bit division. Omitting 21 + # the option is safe. 22 + -LIB2_DIVMOD_EXCEPTION_FLAGS := -fexceptions 23 + +LIB2_DIVMOD_EXCEPTION_FLAGS := -fno-exceptions -fno-non-call-exceptions 24 + diff -aur gcc-8.5.0/libgcc/Makefile.in gcc-8.5.0-patched/libgcc/Makefile.in 25 + --- gcc-8.5.0/libgcc/Makefile.in 2021-05-14 04:42:10.000000000 -0400 26 + +++ gcc-8.5.0-patched/libgcc/Makefile.in 2022-11-26 23:13:56.781304250 -0500 27 + @@ -530,7 +530,7 @@ 28 + ifeq ($(LIB2_DIVMOD_EXCEPTION_FLAGS),) 29 + # Provide default flags for compiling divmod functions, if they haven't been 30 + # set already by a target-specific Makefile fragment. 31 + -LIB2_DIVMOD_EXCEPTION_FLAGS := -fexceptions -fnon-call-exceptions 32 + +LIB2_DIVMOD_EXCEPTION_FLAGS := -fno-exceptions -fno-non-call-exceptions 33 + endif 34 + 35 + # Build LIB2_DIVMOD_FUNCS. 36 + @@ -851,7 +851,7 @@ 37 + # libgcc_eh.a, only LIB2ADDEH matters. If we do, only LIB2ADDEHSTATIC and 38 + # LIB2ADDEHSHARED matter. (Usually all three are identical.) 39 + 40 + -c_flags := -fexceptions 41 + +c_flags := -fno-exceptions 42 + 43 + ifeq ($(enable_shared),yes)