diff options
author | Solomon Peachy <pizza@shaftnet.org> | 2024-06-30 15:06:35 -0400 |
---|---|---|
committer | Solomon Peachy <pizza@shaftnet.org> | 2024-06-30 15:06:44 -0400 |
commit | 1c3f77eccd6bdb02aed68fab35ae94d4f6680303 (patch) | |
tree | ac8b3edf47b57449357b3ba40e3cc258b66f4637 /tools | |
parent | 67dc833e46679c13f4b8d82cbb52d2393fef8fd8 (diff) | |
download | rockbox-1c3f77eccd6bdb02aed68fab35ae94d4f6680303.tar.gz rockbox-1c3f77eccd6bdb02aed68fab35ae94d4f6680303.zip |
Revert "Toolchains: Update to GCC 8.5.0"
Accidental push instead of going to gerrit. #!$!#!
This reverts commit 67dc833e46679c13f4b8d82cbb52d2393fef8fd8.
Change-Id: I42a7c9dfd0f1a3dd676b1a5d3eee0a900f2561f7
Diffstat (limited to 'tools')
-rwxr-xr-x | tools/configure | 12 | ||||
-rwxr-xr-x | tools/rockboxdev.sh | 103 | ||||
-rw-r--r-- | tools/toolchain-patches/glibc-225-make44.patch (renamed from tools/toolchain-patches/glibc-227-make44.patch) | 102 | ||||
-rw-r--r-- | tools/toolchain-patches/rockbox-multilibs-noexceptions-arm-elf-eabi-gcc-4.9.4.diff | 56 | ||||
-rw-r--r-- | tools/toolchain-patches/rockbox-multilibs-noexceptions-arm-elf-eabi-gcc-8.5.0.diff | 77 |
5 files changed, 178 insertions, 172 deletions
diff --git a/tools/configure b/tools/configure index d632da75ca..35f4b6d107 100755 --- a/tools/configure +++ b/tools/configure | |||
@@ -137,7 +137,7 @@ app_set_lcd_size () { | |||
137 | 137 | ||
138 | findarmgcc() { | 138 | findarmgcc() { |
139 | prefixtools arm-elf-eabi- | 139 | prefixtools arm-elf-eabi- |
140 | gccchoice="8.5.0" | 140 | gccchoice="4.9.4" |
141 | } | 141 | } |
142 | 142 | ||
143 | # scan the $PATH for the given command | 143 | # scan the $PATH for the given command |
@@ -531,7 +531,7 @@ coldfirecc () { | |||
531 | GCCOPTS="$CCOPTS -mcpu=5249 -malign-int -mstrict-align" | 531 | GCCOPTS="$CCOPTS -mcpu=5249 -malign-int -mstrict-align" |
532 | GCCOPTIMIZE="-fomit-frame-pointer" | 532 | GCCOPTIMIZE="-fomit-frame-pointer" |
533 | endian="big" | 533 | endian="big" |
534 | gccchoice="8.5.0" | 534 | gccchoice="4.9.4" |
535 | } | 535 | } |
536 | 536 | ||
537 | arm7tdmicc () { | 537 | arm7tdmicc () { |
@@ -604,7 +604,7 @@ mipselcc () { | |||
604 | GCCOPTS="$GCCOPTS -ffunction-sections -msoft-float -G 0 -Wno-parentheses" | 604 | GCCOPTS="$GCCOPTS -ffunction-sections -msoft-float -G 0 -Wno-parentheses" |
605 | GCCOPTIMIZE="-fomit-frame-pointer" | 605 | GCCOPTIMIZE="-fomit-frame-pointer" |
606 | endian="little" | 606 | endian="little" |
607 | gccchoice="8.5.0" | 607 | gccchoice="4.9.4" |
608 | } | 608 | } |
609 | 609 | ||
610 | mipsr2elcc () { | 610 | mipsr2elcc () { |
@@ -614,7 +614,7 @@ mipsr2elcc () { | |||
614 | GCCOPTS="$GCCOPTS -ffunction-sections -msoft-float -G 0 -Wno-parentheses" | 614 | GCCOPTS="$GCCOPTS -ffunction-sections -msoft-float -G 0 -Wno-parentheses" |
615 | GCCOPTIMIZE="-fomit-frame-pointer" | 615 | GCCOPTIMIZE="-fomit-frame-pointer" |
616 | endian="little" | 616 | endian="little" |
617 | gccchoice="8.5.0" | 617 | gccchoice="4.9.4" |
618 | } | 618 | } |
619 | 619 | ||
620 | maemocc () { | 620 | maemocc () { |
@@ -761,7 +761,7 @@ arm1176jzlinuxcc () { | |||
761 | GCCOPTS="$GCCOPTS -D_GNU_SOURCE=1 -U_FORTIFY_SOURCE -D_REENTRANT" | 761 | GCCOPTS="$GCCOPTS -D_GNU_SOURCE=1 -U_FORTIFY_SOURCE -D_REENTRANT" |
762 | 762 | ||
763 | # Set up compiler | 763 | # Set up compiler |
764 | gccchoice="8.5.0" | 764 | gccchoice="4.9.4" |
765 | prefixtools "arm-rockbox-linux-gnueabi-" | 765 | prefixtools "arm-rockbox-linux-gnueabi-" |
766 | } | 766 | } |
767 | 767 | ||
@@ -935,7 +935,7 @@ mipsellinuxcc () { | |||
935 | GCCOPTS="$GCCOPTS -D_GNU_SOURCE=1 -U_FORTIFY_SOURCE -D_REENTRANT" | 935 | GCCOPTS="$GCCOPTS -D_GNU_SOURCE=1 -U_FORTIFY_SOURCE -D_REENTRANT" |
936 | 936 | ||
937 | # Set up compiler | 937 | # Set up compiler |
938 | gccchoice="8.5.0" | 938 | gccchoice="4.9.4" |
939 | prefixtools "mipsel-rockbox-linux-gnu-" | 939 | prefixtools "mipsel-rockbox-linux-gnu-" |
940 | } | 940 | } |
941 | 941 | ||
diff --git a/tools/rockboxdev.sh b/tools/rockboxdev.sh index 540ede75e2..63b1a1f5a1 100755 --- a/tools/rockboxdev.sh +++ b/tools/rockboxdev.sh | |||
@@ -458,30 +458,30 @@ build() { | |||
458 | cd "$toolname-$version" | 458 | cd "$toolname-$version" |
459 | if (echo $needs_libs | grep -q gmp && test ! -d gmp); then | 459 | if (echo $needs_libs | grep -q gmp && test ! -d gmp); then |
460 | echo "ROCKBOXDEV: Getting GMP" | 460 | echo "ROCKBOXDEV: Getting GMP" |
461 | getfile "gmp-6.2.1.tar.bz2" "$GNU_MIRROR/gmp" | 461 | getfile "gmp-4.3.2.tar.bz2" "$GNU_MIRROR/gmp" |
462 | tar xjf $dlwhere/gmp-6.2.1.tar.bz2 | 462 | tar xjf $dlwhere/gmp-4.3.2.tar.bz2 |
463 | ln -s gmp-6.2.1 gmp | 463 | ln -s gmp-4.3.2 gmp |
464 | fi | 464 | fi |
465 | 465 | ||
466 | if (echo $needs_libs | grep -q mpfr && test ! -d mpfr); then | 466 | if (echo $needs_libs | grep -q mpfr && test ! -d mpfr); then |
467 | echo "ROCKBOXDEV: Getting MPFR" | 467 | echo "ROCKBOXDEV: Getting MPFR" |
468 | getfile "mpfr-4.1.0.tar.bz2" "$GNU_MIRROR/mpfr" | 468 | getfile "mpfr-3.1.0.tar.bz2" "$GNU_MIRROR/mpfr" |
469 | tar xjf $dlwhere/mpfr-4.1.0.tar.bz2 | 469 | tar xjf $dlwhere/mpfr-3.1.0.tar.bz2 |
470 | ln -s mpfr-4.1.0 mpfr | 470 | ln -s mpfr-3.1.0 mpfr |
471 | fi | 471 | fi |
472 | 472 | ||
473 | if (echo $needs_libs | grep -q mpc && test ! -d mpc); then | 473 | if (echo $needs_libs | grep -q mpc && test ! -d mpc); then |
474 | echo "ROCKBOXDEV: Getting MPC" | 474 | echo "ROCKBOXDEV: Getting MPC" |
475 | getfile "mpc-1.2.1.tar.gz" "http://www.multiprecision.org/downloads" | 475 | getfile "mpc-1.0.1.tar.gz" "http://www.multiprecision.org/downloads" |
476 | tar xzf $dlwhere/mpc-1.2.1.tar.gz | 476 | tar xzf $dlwhere/mpc-1.0.1.tar.gz |
477 | ln -s mpc-1.2.1 mpc | 477 | ln -s mpc-1.0.1 mpc |
478 | fi | 478 | fi |
479 | 479 | ||
480 | if (echo $needs_libs | grep -q isl && test ! -d isl); then | 480 | if (echo $needs_libs | grep -q isl && test ! -d isl); then |
481 | echo "ROCKBOXDEV: Getting ISL" | 481 | echo "ROCKBOXDEV: Getting ISL" |
482 | getfile "isl-0.18.tar.bz2" "https://gcc.gnu.org/pub/gcc/infrastructure" | 482 | getfile "isl-0.15.tar.bz2" "https://gcc.gnu.org/pub/gcc/infrastructure" |
483 | tar xjf $dlwhere/isl-0.18.tar.bz2 | 483 | tar xjf $dlwhere/isl-0.15.tar.bz2 |
484 | ln -s isl-0.18 isl | 484 | ln -s isl-0.15 isl |
485 | fi | 485 | fi |
486 | cd $builddir | 486 | cd $builddir |
487 | fi | 487 | fi |
@@ -541,9 +541,9 @@ build_linux_toolchain () { | |||
541 | 541 | ||
542 | # check libraries: | 542 | # check libraries: |
543 | # contrary to other toolchains that rely on a hack to avoid installing | 543 | # contrary to other toolchains that rely on a hack to avoid installing |
544 | # gmp, mpc, and mpfr, we simply require that they are installed on | 544 | # gmp, mpc and mpfr, we simply require that they are installed on the system |
545 | # the system this is not a huge requirement since virtually all systems | 545 | # this is not a huge requirement since virtually all systems these days |
546 | # these days provide dev packages for them | 546 | # provide dev packages for them |
547 | # FIXME: maybe add an option to download and install them automatically | 547 | # FIXME: maybe add an option to download and install them automatically |
548 | checklib "mpc" "gmp" "mpfr" | 548 | checklib "mpc" "gmp" "mpfr" |
549 | 549 | ||
@@ -764,26 +764,26 @@ do | |||
764 | echo "" | 764 | echo "" |
765 | case $arch in | 765 | case $arch in |
766 | [Ii]) | 766 | [Ii]) |
767 | build "binutils" "mipsel-elf" "2.37" "" "--disable-werror" "gmp isl" | 767 | build "binutils" "mipsel-elf" "2.26.1" "" "--disable-werror" "isl" |
768 | build "gcc" "mipsel-elf" "8.5.0" "" "" "gmp mpfr mpc isl" | 768 | build "gcc" "mipsel-elf" "4.9.4" "" "" "gmp mpfr mpc isl" |
769 | ;; | 769 | ;; |
770 | 770 | ||
771 | [Mm]) | 771 | [Mm]) |
772 | build "binutils" "m68k-elf" "2.37" "" "--disable-werror" "gmp isl" | 772 | build "binutils" "m68k-elf" "2.26.1" "" "--disable-werror" "isl" |
773 | build "gcc" "m68k-elf" "8.5.0" "" "--with-arch=cf MAKEINFO=missing" "gmp mpfr mpc isl" | 773 | build "gcc" "m68k-elf" "4.9.4" "" "--with-arch=cf MAKEINFO=missing" "gmp mpfr mpc isl" |
774 | ;; | 774 | ;; |
775 | 775 | ||
776 | [Aa]) | 776 | [Aa]) |
777 | binopts="" | 777 | binopts="" |
778 | gccopts="--with-multilib-list=rmprofile" | 778 | gccopts="" |
779 | case $system in | 779 | case $system in |
780 | Darwin) | 780 | Darwin) |
781 | binopts="--disable-nls" | 781 | binopts="--disable-nls" |
782 | gccopts="--disable-nls" | 782 | gccopts="--disable-nls" |
783 | ;; | 783 | ;; |
784 | esac | 784 | esac |
785 | build "binutils" "arm-elf-eabi" "2.37" "" "$binopts --disable-werror" "gmp isl" | 785 | build "binutils" "arm-elf-eabi" "2.26.1" "" "$binopts --disable-werror" "isl" |
786 | 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" | 786 | 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" |
787 | ;; | 787 | ;; |
788 | [Xx]) | 788 | [Xx]) |
789 | # IMPORTANT NOTE | 789 | # IMPORTANT NOTE |
@@ -792,19 +792,30 @@ do | |||
792 | # | 792 | # |
793 | # Samsung YP-R0/R1: | 793 | # Samsung YP-R0/R1: |
794 | # ARM1176JZF-S, softfp EABI | 794 | # ARM1176JZF-S, softfp EABI |
795 | # kernel: device runs 2.6.24, but oem toolchain is built against 2.6.27.59 | 795 | # gcc: 4.9.4 is the latest 4.9.x stable branch, also the only one that |
796 | # glibc: device runs 2.4.2 | 796 | # compiles with GCC >6 |
797 | # | 797 | # kernel: 2.6.27.59 is the same 2.6.x stable kernel as used by the |
798 | # original ct-ng toolchain, the device runs kernel 2.6.24 | ||
799 | # glibc: 2.19 is the latest version that supports kernel 2.6.24 which | ||
800 | # is used on the device, but we need to support ABI 2.4 because | ||
801 | # the device uses glibc 2.4.2 | ||
802 | # | ||
798 | # Sony NWZ: | 803 | # Sony NWZ: |
799 | # kernel: Varies from device to device; 2.6.23, 2.6.35, and 3.x seen. | 804 | # gcc: 4.9.4 is the latest 4.9.x stable branch, also the only one that |
800 | # glibc: device runs 2.7 | 805 | # compiles with GCC >6 |
806 | # kernel: 2.6.32.68 is the latest 2.6.x stable kernel, the device | ||
807 | # runs kernel 2.6.23 or 2.6.35 or 3.x for the most recent | ||
808 | # glibc: 2.19 is the latest version that supports kernel 2.6.23 which | ||
809 | # is used on many Sony players, but we need to support ABI 2.7 | ||
810 | # because the device uses glibc 2.7 | ||
801 | # | 811 | # |
802 | # Thus the lowest common denominator is to target 2.6.23 and glibc 2.4 | 812 | # Thus the lowest common denominator is to use the latest 2.6.x stable |
803 | # Use a recent 2.6.32 LTS kernel, but glibc 2.20 targeting 2.6.23 and API 2.4 | 813 | # kernel but compile glibc to support kernel 2.6.23 and glibc 2.4. |
804 | # | 814 | # We use a recent 2.26.1 binutils to avoid any build problems and |
815 | # avoid patches/bugs. | ||
805 | glibcopts="--enable-kernel=2.6.23 --enable-oldest-abi=2.4" | 816 | glibcopts="--enable-kernel=2.6.23 --enable-oldest-abi=2.4" |
806 | build_linux_toolchain "arm-rockbox-linux-gnueabi" "2.37" "" "8.5.0" \ | 817 | build_linux_toolchain "arm-rockbox-linux-gnueabi" "2.26.1" "" "4.9.4" \ |
807 | "$gccopts" "2.6.32.71" "2.20" "$glibcopts" "glibc-220-make44.patch" | 818 | "$gccopts" "2.6.32.68" "2.19" "$glibcopts" "glibc-220-make44.patch" |
808 | # build alsa-lib | 819 | # build alsa-lib |
809 | # we need to set the prefix to how it is on device (/usr) and then | 820 | # we need to set the prefix to how it is on device (/usr) and then |
810 | # tweak install dir at make install step | 821 | # tweak install dir at make install step |
@@ -819,22 +830,28 @@ do | |||
819 | # This toolchain must support several targets and thus must support | 830 | # This toolchain must support several targets and thus must support |
820 | # the oldest possible configuration. | 831 | # the oldest possible configuration. |
821 | # | 832 | # |
822 | # AGPTek Rocker (and other HibyOS players): | 833 | # AGPTek Rocker: |
834 | # XBurst release 1 (something inbetween mips32r1 and mips32r2) | ||
835 | # gcc: 4.9.4 is the latest 4.9.x stable branch, also the only one that | ||
836 | # compiles with GCC >6 | ||
823 | # kernel: 3.10.14 | 837 | # kernel: 3.10.14 |
824 | # glibc: 2.16 | 838 | # glibc: 2.16 |
825 | # alsa: 1.0.29 | 839 | # alsa: 1.0.29 |
826 | # | 840 | # |
827 | # FiiO M3K Linux (Based on Ingenic SDK): | 841 | # FiiO M3K Linux: |
828 | # kernel: 3.10.14 | 842 | # kernel: 3.10.14 |
829 | # glibc: 2.16 | 843 | # glibc: 2.16 |
830 | # alsa: 1.0.26 | 844 | # alsa: 1.0.26 |
831 | # | 845 | # |
832 | # Use a recent 3.10 LTS kernel, but glibc 2.27 targeting 3.2.x and API 2.16 | 846 | # To maximize compatibility, we use kernel 3.2.85 which is the lastest |
833 | # | 847 | # longterm 3.2 kernel and is supported by the latest glibc, and we |
848 | # require support for up to glibc 2.16 | ||
849 | # We use a recent 2.26.1 binutils to avoid any build problems and | ||
850 | # avoid patches/bugs. | ||
834 | glibcopts="--enable-kernel=3.2 --enable-oldest-abi=2.16" | 851 | glibcopts="--enable-kernel=3.2 --enable-oldest-abi=2.16" |
835 | # FIXME: maybe add -mhard-float? | 852 | # FIXME: maybe add -mhard-float |
836 | build_linux_toolchain "mipsel-rockbox-linux-gnu" "2.37" "" "8.5.0" \ | 853 | build_linux_toolchain "mipsel-rockbox-linux-gnu" "2.26.1" "" "4.9.4" \ |
837 | "$gccopts" "3.10.108" "2.27" "$glibcopts" "glibc-227-make44.patch" | 854 | "$gccopts" "3.2.85" "2.25" "$glibcopts" "glibc-225-make44.patch" |
838 | # build alsa-lib | 855 | # build alsa-lib |
839 | # we need to set the prefix to how it is on device (/usr) and then | 856 | # we need to set the prefix to how it is on device (/usr) and then |
840 | # tweak install dir at make install step | 857 | # tweak install dir at make install step |
@@ -842,10 +859,7 @@ do | |||
842 | gettool "alsa-lib" "$alsalib_ver" | 859 | gettool "alsa-lib" "$alsalib_ver" |
843 | extract "alsa-lib-$alsalib_ver" | 860 | extract "alsa-lib-$alsalib_ver" |
844 | prefix="/usr" buildtool "alsa-lib" "$alsalib_ver" \ | 861 | prefix="/usr" buildtool "alsa-lib" "$alsalib_ver" \ |
845 | "--host=$target --disable-python" "" "install DESTDIR=$prefix/$target/sysroot" | 862 | "--host=$target --disable-python" "" "install DESTDIR=$prefix/$target/sysroot" |
846 | |||
847 | ### Everything below here is needed only for bluetooth support | ||
848 | |||
849 | # build libffi | 863 | # build libffi |
850 | libffi_ver="3.2.1" | 864 | libffi_ver="3.2.1" |
851 | gettool "libffi" "$libffi_ver" | 865 | gettool "libffi" "$libffi_ver" |
@@ -866,7 +880,7 @@ do | |||
866 | gettool "glib" "$glib_ver" | 880 | gettool "glib" "$glib_ver" |
867 | extract "glib-$glib_ver" | 881 | extract "glib-$glib_ver" |
868 | prefix="/usr" buildtool "glib" "$glib_ver" \ | 882 | prefix="/usr" buildtool "glib" "$glib_ver" \ |
869 | "--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" | 883 | "--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" |
870 | 884 | ||
871 | # build expat | 885 | # build expat |
872 | expat_ver="2.1.0" | 886 | expat_ver="2.1.0" |
@@ -882,6 +896,7 @@ do | |||
882 | prefix="/usr" buildtool "dbus" "$dbus_ver" \ | 896 | prefix="/usr" buildtool "dbus" "$dbus_ver" \ |
883 | "--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 " | 897 | "--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 " |
884 | 898 | ||
899 | |||
885 | ;; | 900 | ;; |
886 | *) | 901 | *) |
887 | echo "ROCKBOXDEV: Unsupported architecture option: $arch" | 902 | echo "ROCKBOXDEV: Unsupported architecture option: $arch" |
diff --git a/tools/toolchain-patches/glibc-227-make44.patch b/tools/toolchain-patches/glibc-225-make44.patch index 3de5cb0fdd..45d4e9c621 100644 --- a/tools/toolchain-patches/glibc-227-make44.patch +++ b/tools/toolchain-patches/glibc-225-make44.patch | |||
@@ -1,7 +1,7 @@ | |||
1 | diff -Naur glibc-2.27/libio/stdio.h glibc-2.27-patched/libio/stdio.h | 1 | diff -Naur glibc-2.25/libio/stdio.h glibc-2.25-patched/libio/stdio.h |
2 | --- glibc-2.27/libio/stdio.h 2018-02-01 11:17:18.000000000 -0500 | 2 | --- glibc-2.25/libio/stdio.h 2017-02-05 10:28:43.000000000 -0500 |
3 | +++ glibc-2.27-patched/libio/stdio.h 2023-05-23 14:10:06.618633203 -0400 | 3 | +++ glibc-2.25-patched/libio/stdio.h 2023-05-23 15:22:27.482980335 -0400 |
4 | @@ -118,18 +118,23 @@ | 4 | @@ -154,18 +154,23 @@ |
5 | # define P_tmpdir "/tmp" | 5 | # define P_tmpdir "/tmp" |
6 | #endif | 6 | #endif |
7 | 7 | ||
@@ -32,19 +32,20 @@ diff -Naur glibc-2.27/libio/stdio.h glibc-2.27-patched/libio/stdio.h | |||
32 | 32 | ||
33 | /* Standard streams. */ | 33 | /* Standard streams. */ |
34 | extern struct _IO_FILE *stdin; /* Standard input stream. */ | 34 | extern struct _IO_FILE *stdin; /* Standard input stream. */ |
35 | diff -Naur glibc-2.27/Makerules glibc-2.27-patched/Makerules | 35 | diff -Naur glibc-2.25/Makerules glibc-2.25-patched/Makerules |
36 | --- glibc-2.27/Makerules 2018-02-01 11:17:18.000000000 -0500 | 36 | --- glibc-2.25/Makerules 2017-02-05 10:28:43.000000000 -0500 |
37 | +++ glibc-2.27-patched/Makerules 2023-05-23 14:10:06.617633203 -0400 | 37 | +++ glibc-2.25-patched/Makerules 2023-05-23 15:22:05.594967548 -0400 |
38 | @@ -1522,46 +1522,6 @@ | 38 | @@ -1474,55 +1474,7 @@ |
39 | endif | ||
39 | 40 | ||
40 | endif | 41 | endif |
41 | 42 | - | |
42 | -# These will have been set by sysdeps/posix/Makefile. | 43 | -# These will have been set by sysdeps/posix/Makefile. |
43 | -L_tmpnam ?= 1 | 44 | -L_tmpnam ?= 1 |
44 | -TMP_MAX ?= 0 | 45 | -TMP_MAX ?= 0 |
45 | -L_ctermid ?= 1 | 46 | -L_ctermid ?= 1 |
46 | -L_cuserid ?= 1 | 47 | -L_cuserid ?= 1 |
47 | - | 48 | |
48 | -stdio_lim = $(common-objpfx)bits/stdio_lim.h | 49 | -stdio_lim = $(common-objpfx)bits/stdio_lim.h |
49 | - | 50 | - |
50 | -$(stdio_lim:lim.h=%.h) $(stdio_lim:lim.h=%.d): $(stdio_lim:lim.h=%.st); @: | 51 | -$(stdio_lim:lim.h=%.h) $(stdio_lim:lim.h=%.d): $(stdio_lim:lim.h=%.st); @: |
@@ -52,7 +53,8 @@ diff -Naur glibc-2.27/Makerules glibc-2.27-patched/Makerules | |||
52 | - $(common-objpfx)config.make | 53 | - $(common-objpfx)config.make |
53 | - $(make-target-directory) | 54 | - $(make-target-directory) |
54 | - { echo '#include "$(..)posix/bits/posix1_lim.h"'; \ | 55 | - { echo '#include "$(..)posix/bits/posix1_lim.h"'; \ |
55 | - } | \ | 56 | - echo '#define _LIBC 1'; \ |
57 | - echo '#include "$(..)misc/sys/uio.h"'; } | \ | ||
56 | - $(CC) -E -dM -MD -MP -MF $(@:st=dT) -MT '$(@:st=h) $(@:st=d)' \ | 58 | - $(CC) -E -dM -MD -MP -MF $(@:st=dT) -MT '$(@:st=h) $(@:st=d)' \ |
57 | - $(CPPUNDEFS) $(+includes) -xc - -o $(@:st=hT) | 59 | - $(CPPUNDEFS) $(+includes) -xc - -o $(@:st=hT) |
58 | - sed $(sed-remove-objpfx) $(sed-remove-dotdot) \ | 60 | - sed $(sed-remove-objpfx) $(sed-remove-dotdot) \ |
@@ -60,14 +62,21 @@ diff -Naur glibc-2.27/Makerules glibc-2.27-patched/Makerules | |||
60 | - mv -f $(@:st=dt) $(@:st=d) | 62 | - mv -f $(@:st=dt) $(@:st=d) |
61 | - fopen_max=`sed -n 's/^#define OPEN_MAX //1p' $(@:st=hT)`; \ | 63 | - fopen_max=`sed -n 's/^#define OPEN_MAX //1p' $(@:st=hT)`; \ |
62 | - filename_max=`sed -n 's/^#define PATH_MAX //1p' $(@:st=hT)`; \ | 64 | - filename_max=`sed -n 's/^#define PATH_MAX //1p' $(@:st=hT)`; \ |
65 | - iov_max=`sed -n 's/^#define UIO_MAXIOV //p' $(@:st=hT)`; \ | ||
63 | - fopen_max=$${fopen_max:-16}; \ | 66 | - fopen_max=$${fopen_max:-16}; \ |
64 | - filename_max=$${filename_max:-1024}; \ | 67 | - 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; \ | ||
65 | - sed -e "s/@FOPEN_MAX@/$$fopen_max/" \ | 73 | - sed -e "s/@FOPEN_MAX@/$$fopen_max/" \ |
66 | - -e "s/@FILENAME_MAX@/$$filename_max/" \ | 74 | - -e "s/@FILENAME_MAX@/$$filename_max/" \ |
67 | - -e "s/@L_tmpnam@/$(L_tmpnam)/" \ | 75 | - -e "s/@L_tmpnam@/$(L_tmpnam)/" \ |
68 | - -e "s/@TMP_MAX@/$(TMP_MAX)/" \ | 76 | - -e "s/@TMP_MAX@/$(TMP_MAX)/" \ |
69 | - -e "s/@L_ctermid@/$(L_ctermid)/" \ | 77 | - -e "s/@L_ctermid@/$(L_ctermid)/" \ |
70 | - -e "s/@L_cuserid@/$(L_cuserid)/" \ | 78 | - -e "s/@L_cuserid@/$(L_cuserid)/" \ |
79 | - -e "s/@define_IOV_MAX@/$$define_iov_max/" \ | ||
71 | - $< > $(@:st=h.new) | 80 | - $< > $(@:st=h.new) |
72 | - $(move-if-change) $(@:st=h.new) $(@:st=h) | 81 | - $(move-if-change) $(@:st=h.new) $(@:st=h) |
73 | -# Remove these last so that they can be examined if something went wrong. | 82 | -# Remove these last so that they can be examined if something went wrong. |
@@ -82,9 +91,9 @@ diff -Naur glibc-2.27/Makerules glibc-2.27-patched/Makerules | |||
82 | FORCE: | 91 | FORCE: |
83 | 92 | ||
84 | .PHONY: echo-headers | 93 | .PHONY: echo-headers |
85 | diff -Naur glibc-2.27/Rules glibc-2.27-patched/Rules | 94 | diff -Naur glibc-2.25/Rules glibc-2.25-patched/Rules |
86 | --- glibc-2.27/Rules 2018-02-01 11:17:18.000000000 -0500 | 95 | --- glibc-2.25/Rules 2017-02-05 10:28:43.000000000 -0500 |
87 | +++ glibc-2.27-patched/Rules 2023-05-23 14:10:06.617633203 -0400 | 96 | +++ glibc-2.25-patched/Rules 2023-05-23 15:22:27.482980335 -0400 |
88 | @@ -60,9 +60,6 @@ | 97 | @@ -60,9 +60,6 @@ |
89 | common-generated := | 98 | common-generated := |
90 | endif | 99 | endif |
@@ -95,11 +104,11 @@ diff -Naur glibc-2.27/Rules glibc-2.27-patched/Rules | |||
95 | include $(..)Makerules | 104 | include $(..)Makerules |
96 | 105 | ||
97 | .PHONY: subdir_lib | 106 | .PHONY: subdir_lib |
98 | diff -Naur glibc-2.27/stdio-common/stdio_lim.h.in glibc-2.27-patched/stdio-common/stdio_lim.h.in | 107 | diff -Naur glibc-2.25/stdio-common/stdio_lim.h.in glibc-2.25-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 | 108 | --- glibc-2.25/stdio-common/stdio_lim.h.in 2017-02-05 10:28:43.000000000 -0500 |
100 | +++ glibc-2.27-patched/stdio-common/stdio_lim.h.in 1969-12-31 19:00:00.000000000 -0500 | 109 | +++ glibc-2.25-patched/stdio-common/stdio_lim.h.in 1969-12-31 19:00:00.000000000 -0500 |
101 | @@ -1,39 +0,0 @@ | 110 | @@ -1,42 +0,0 @@ |
102 | -/* Copyright (C) 1994-2018 Free Software Foundation, Inc. | 111 | -/* Copyright (C) 1994-2017 Free Software Foundation, Inc. |
103 | - This file is part of the GNU C Library. | 112 | - This file is part of the GNU C Library. |
104 | - | 113 | - |
105 | - The GNU C Library is free software; you can redistribute it and/or | 114 | - The GNU C Library is free software; you can redistribute it and/or |
@@ -116,31 +125,34 @@ diff -Naur glibc-2.27/stdio-common/stdio_lim.h.in glibc-2.27-patched/stdio-commo | |||
116 | - License along with the GNU C Library; if not, see | 125 | - License along with the GNU C Library; if not, see |
117 | - <http://www.gnu.org/licenses/>. */ | 126 | - <http://www.gnu.org/licenses/>. */ |
118 | - | 127 | - |
119 | -#ifndef _BITS_STDIO_LIM_H | 128 | -#if !defined _STDIO_H && !defined __need_FOPEN_MAX && !defined __need_IOV_MAX |
120 | -#define _BITS_STDIO_LIM_H 1 | ||
121 | - | ||
122 | -#ifndef _STDIO_H | ||
123 | -# error "Never include <bits/stdio_lim.h> directly; use <stdio.h> instead." | 129 | -# error "Never include <bits/stdio_lim.h> directly; use <stdio.h> instead." |
124 | -#endif | 130 | -#endif |
125 | - | 131 | - |
126 | -#define L_tmpnam @L_tmpnam@ | 132 | -#ifdef _STDIO_H |
127 | -#define TMP_MAX @TMP_MAX@ | 133 | -# define L_tmpnam @L_tmpnam@ |
128 | -#define FILENAME_MAX @FILENAME_MAX@ | 134 | -# define TMP_MAX @TMP_MAX@ |
135 | -# define FILENAME_MAX @FILENAME_MAX@ | ||
129 | - | 136 | - |
130 | -#ifdef __USE_POSIX | 137 | -# ifdef __USE_POSIX |
131 | -# define L_ctermid @L_ctermid@ | 138 | -# define L_ctermid @L_ctermid@ |
132 | -# if !defined __USE_XOPEN2K || defined __USE_GNU | 139 | -# if !defined __USE_XOPEN2K || defined __USE_GNU |
133 | -# define L_cuserid @L_cuserid@ | 140 | -# define L_cuserid @L_cuserid@ |
141 | -# endif | ||
134 | -# endif | 142 | -# endif |
135 | -#endif | 143 | -#endif |
136 | - | 144 | - |
137 | -#undef FOPEN_MAX | 145 | -#if defined __need_FOPEN_MAX || defined _STDIO_H |
138 | -#define FOPEN_MAX @FOPEN_MAX@ | 146 | -# undef FOPEN_MAX |
147 | -# define FOPEN_MAX @FOPEN_MAX@ | ||
148 | -#endif | ||
139 | - | 149 | - |
140 | -#endif /* bits/stdio_lim.h */ | 150 | -#if defined __need_IOV_MAX && !defined IOV_MAX |
141 | diff -Naur glibc-2.27/sysdeps/mach/hurd/bits/stdio_lim.h glibc-2.27-patched/sysdeps/mach/hurd/bits/stdio_lim.h | 151 | -@define_IOV_MAX@ |
142 | --- glibc-2.27/sysdeps/mach/hurd/bits/stdio_lim.h 1969-12-31 19:00:00.000000000 -0500 | 152 | -#endif |
143 | +++ glibc-2.27-patched/sysdeps/mach/hurd/bits/stdio_lim.h 2023-05-23 14:10:06.618633203 -0400 | 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 | ||
144 | @@ -0,0 +1,28 @@ | 156 | @@ -0,0 +1,28 @@ |
145 | +/* System specific stdio.h definitions. Hurd version. | 157 | +/* System specific stdio.h definitions. Hurd version. |
146 | + Copyright (C) 2023 Free Software Foundation, Inc. | 158 | + Copyright (C) 2023 Free Software Foundation, Inc. |
@@ -170,9 +182,9 @@ diff -Naur glibc-2.27/sysdeps/mach/hurd/bits/stdio_lim.h glibc-2.27-patched/sysd | |||
170 | +#define FILENAME_MAX 1024 | 182 | +#define FILENAME_MAX 1024 |
171 | + | 183 | + |
172 | +#endif /* bits/stdio_lim.h */ | 184 | +#endif /* bits/stdio_lim.h */ |
173 | diff -Naur glibc-2.27/sysdeps/posix/Makefile glibc-2.27-patched/sysdeps/posix/Makefile | 185 | diff -Naur glibc-2.25/sysdeps/posix/Makefile glibc-2.25-patched/sysdeps/posix/Makefile |
174 | --- glibc-2.27/sysdeps/posix/Makefile 2018-02-01 11:17:18.000000000 -0500 | 186 | --- glibc-2.25/sysdeps/posix/Makefile 2017-02-05 10:28:43.000000000 -0500 |
175 | +++ glibc-2.27-patched/sysdeps/posix/Makefile 2023-05-23 14:10:06.618633203 -0400 | 187 | +++ glibc-2.25-patched/sysdeps/posix/Makefile 2023-05-23 15:22:27.483980336 -0400 |
176 | @@ -1,8 +1,3 @@ | 188 | @@ -1,8 +1,3 @@ |
177 | -# These affect the generated bits/stdio_lim.h file. | 189 | -# These affect the generated bits/stdio_lim.h file. |
178 | -L_tmpnam = 20 | 190 | -L_tmpnam = 20 |
@@ -182,9 +194,9 @@ diff -Naur glibc-2.27/sysdeps/posix/Makefile glibc-2.27-patched/sysdeps/posix/Ma | |||
182 | 194 | ||
183 | ifeq ($(subdir)|$(have-thread-library),rt|no) | 195 | ifeq ($(subdir)|$(have-thread-library),rt|no) |
184 | # With NPTL, this lives in libpthread so it can be used for sem_open too. | 196 | # With NPTL, this lives in libpthread so it can be used for sem_open too. |
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 | 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 |
186 | --- glibc-2.27/sysdeps/unix/sysv/linux/bits/stdio_lim.h 1969-12-31 19:00:00.000000000 -0500 | 198 | --- glibc-2.25/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 | 199 | +++ glibc-2.25-patched/sysdeps/unix/sysv/linux/bits/stdio_lim.h 2023-05-23 15:22:27.483980336 -0400 |
188 | @@ -0,0 +1,28 @@ | 200 | @@ -0,0 +1,28 @@ |
189 | +/* System specific stdio.h definitions. Linux version. | 201 | +/* System specific stdio.h definitions. Linux version. |
190 | + Copyright (C) 2023 Free Software Foundation, Inc. | 202 | + Copyright (C) 2023 Free Software Foundation, Inc. |
@@ -207,9 +219,9 @@ diff -Naur glibc-2.27/sysdeps/unix/sysv/linux/bits/stdio_lim.h glibc-2.27-patche | |||
207 | +#ifndef _BITS_STDIO_LIM_H | 219 | +#ifndef _BITS_STDIO_LIM_H |
208 | +#define _BITS_STDIO_LIM_H 1 | 220 | +#define _BITS_STDIO_LIM_H 1 |
209 | + | 221 | + |
210 | +#ifndef _STDIO_H | 222 | +//#ifndef _STDIO_H |
211 | +# error "Never include <bits/stdio_lim.h> directly; use <stdio.h> instead." | 223 | +//# error "Never include <bits/stdio_lim.h> directly; use <stdio.h> instead." |
212 | +#endif | 224 | +//#endif |
213 | + | 225 | + |
214 | +#define FILENAME_MAX 4096 | 226 | +#define FILENAME_MAX 4096 |
215 | + | 227 | + |
diff --git a/tools/toolchain-patches/rockbox-multilibs-noexceptions-arm-elf-eabi-gcc-4.9.4.diff b/tools/toolchain-patches/rockbox-multilibs-noexceptions-arm-elf-eabi-gcc-4.9.4.diff new file mode 100644 index 0000000000..cd98d3751c --- /dev/null +++ b/tools/toolchain-patches/rockbox-multilibs-noexceptions-arm-elf-eabi-gcc-4.9.4.diff | |||
@@ -0,0 +1,56 @@ | |||
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 | |||
diff --git a/tools/toolchain-patches/rockbox-multilibs-noexceptions-arm-elf-eabi-gcc-8.5.0.diff b/tools/toolchain-patches/rockbox-multilibs-noexceptions-arm-elf-eabi-gcc-8.5.0.diff deleted file mode 100644 index b320b969a5..0000000000 --- a/tools/toolchain-patches/rockbox-multilibs-noexceptions-arm-elf-eabi-gcc-8.5.0.diff +++ /dev/null | |||
@@ -1,77 +0,0 @@ | |||
1 | diff -Naur gcc-8.5.0/gcc/config/arm/arm_cmse.h gcc-8.5.0-patched/gcc/config/arm/ar | ||
2 | m_cmse.h | ||
3 | --- gcc-8.5.0/gcc/config/arm/arm_cmse.h 2021-05-14 04:42:08.000000000 -0400 | ||
4 | +++ gcc-8.5.0-patched/gcc/config/arm/arm_cmse.h 2023-04-17 14:32:56.547477547 -0400 | ||
5 | @@ -35,7 +35,7 @@ | ||
6 | #if __ARM_FEATURE_CMSE & 1 | ||
7 | |||
8 | #include <stddef.h> | ||
9 | -#include <stdint.h> | ||
10 | +//#include <stdint.h> | ||
11 | |||
12 | #ifdef __ARM_BIG_ENDIAN | ||
13 | |||
14 | diff -aur gcc-8.5.0/gcc/config/arm/t-arm-elf gcc-8.5.0-patched/gcc/config/arm/t-arm-elf | ||
15 | --- gcc-8.5.0/gcc/config/arm/t-arm-elf 2021-05-14 04:42:08.000000000 -0400 | ||
16 | +++ gcc-8.5.0-patched/gcc/config/arm/t-arm-elf 2022-11-26 23:16:30.714433566 -0500 | ||
17 | @@ -80,6 +80,10 @@ | ||
18 | MULTILIB_REQUIRED += marm/mfpu=auto/march=armv5te+fp/mfloat-abi=hard | ||
19 | MULTILIB_REQUIRED += mthumb/mfpu=auto/march=armv7+fp/mfloat-abi=hard | ||
20 | |||
21 | +# And we want to be able to disable interworking | ||
22 | +MULTILIB_OPTIONS += mno-thumb-interwork/mthumb-interwork | ||
23 | +MULTILIB_DIRNAMES += normal interwork | ||
24 | + | ||
25 | # PART 3 - Match rules | ||
26 | |||
27 | # Map all supported FPUs onto mfpu=auto | ||
28 | diff -aur gcc-8.5.0/libgcc/config/arm/t-bpabi gcc-8.5.0-patched/libgcc/config/arm/t-bpabi | ||
29 | --- gcc-8.5.0/libgcc/config/arm/t-bpabi 2021-05-14 04:42:10.000000000 -0400 | ||
30 | +++ gcc-8.5.0-patched/libgcc/config/arm/t-bpabi 2022-11-26 23:14:40.938038440 -0500 | ||
31 | @@ -17,4 +17,4 @@ | ||
32 | # On ARM, specifying -fnon-call-exceptions will needlessly pull in | ||
33 | # the unwinder in simple programs which use 64-bit division. Omitting | ||
34 | # the option is safe. | ||
35 | -LIB2_DIVMOD_EXCEPTION_FLAGS := -fexceptions | ||
36 | +LIB2_DIVMOD_EXCEPTION_FLAGS := -fno-exceptions -fno-non-call-exceptions | ||
37 | diff -aur gcc-8.5.0/libgcc/config/arm/cmse.c gcc-8.5.0-patch/libgcc/config/arm/cmse.c | ||
38 | --- gcc-8.5.0/libgcc/config/arm/cmse.c 2021-05-14 04:42:10.000000000 -0400 | ||
39 | +++ gcc-8.5.0-patched/libgcc/config/arm/cmse.c 2023-04-17 15:12:11.865456701 -0400 | ||
40 | @@ -36,7 +36,7 @@ | ||
41 | char *pb = (char *) p, *pe; | ||
42 | |||
43 | /* Check if the range wraps around. */ | ||
44 | - if (UINTPTR_MAX - (uintptr_t) p < size) | ||
45 | + if (__UINTPTR_MAX__ - (__UINTPTR_TYPE__) p < size) | ||
46 | return NULL; | ||
47 | |||
48 | /* Check if an unknown flag is present. */ | ||
49 | @@ -51,7 +51,7 @@ | ||
50 | |||
51 | /* Execute the right variant of the TT instructions. */ | ||
52 | pe = pb + size - 1; | ||
53 | - const int singleCheck = (((uintptr_t) pb ^ (uintptr_t) pe) < 32); | ||
54 | + const int singleCheck = (((__UINTPTR_TYPE__) pb ^ (__UINTPTR_TYPE__) pe) < 32); | ||
55 | switch (flags & known_secure_level) | ||
56 | { | ||
57 | case 0: | ||
58 | diff -aur gcc-8.5.0/libgcc/Makefile.in gcc-8.5.0-patched/libgcc/Makefile.in | ||
59 | --- gcc-8.5.0/libgcc/Makefile.in 2021-05-14 04:42:10.000000000 -0400 | ||
60 | +++ gcc-8.5.0-patched/libgcc/Makefile.in 2022-11-26 23:13:56.781304250 -0500 | ||
61 | @@ -526,7 +526,7 @@ | ||
62 | ifeq ($(LIB2_DIVMOD_EXCEPTION_FLAGS),) | ||
63 | # Provide default flags for compiling divmod functions, if they haven't been | ||
64 | # set already by a target-specific Makefile fragment. | ||
65 | -LIB2_DIVMOD_EXCEPTION_FLAGS := -fexceptions -fnon-call-exceptions | ||
66 | +LIB2_DIVMOD_EXCEPTION_FLAGS := -fno-exceptions -fno-non-call-exceptions | ||
67 | endif | ||
68 | |||
69 | # Build LIB2_DIVMOD_FUNCS. | ||
70 | @@ -847,7 +847,7 @@ | ||
71 | # libgcc_eh.a, only LIB2ADDEH matters. If we do, only LIB2ADDEHSTATIC and | ||
72 | # LIB2ADDEHSHARED matter. (Usually all three are identical.) | ||
73 | |||
74 | -c_flags := -fexceptions | ||
75 | +c_flags := -fno-exceptions | ||
76 | |||
77 | ifeq ($(enable_shared),yes) | ||