From 5cb32256f63387cfa19342125d2061bc46a51aae Mon Sep 17 00:00:00 2001 From: DHDAXCW Date: Fri, 21 Oct 2022 07:34:06 +0000 Subject: [PATCH] Update some needed things for the next 5.15 kernel upgrade --- config/Config-devel.in | 14 ++ include/download.mk | 4 + scripts/download.pl | 100 ++++++---- toolchain/binutils/Config.in | 18 +- toolchain/binutils/Config.version | 17 +- toolchain/binutils/Makefile | 16 -- .../2.32/300-001_ld_makefile_patch.patch | 22 --- .../2.32/300-012_check_ldrunpath_length.patch | 20 -- .../400-mips_no_dynamic_linking_sym.patch | 18 -- ...e-default-emulation-for-mips64-linux.patch | 37 ---- .../2.34/300-001_ld_makefile_patch.patch | 22 --- .../400-mips_no_dynamic_linking_sym.patch | 18 -- ...e-default-emulation-for-mips64-linux.patch | 38 ---- .../2.35.2/300-001_ld_makefile_patch.patch | 22 --- .../400-mips_no_dynamic_linking_sym.patch | 18 -- ...e-default-emulation-for-mips64-linux.patch | 38 ---- .../2.36.1/300-001_ld_makefile_patch.patch | 22 --- .../400-mips_no_dynamic_linking_sym.patch | 18 -- ...e-default-emulation-for-mips64-linux.patch | 38 ---- toolchain/gcc/Config.in | 7 - toolchain/gcc/Config.version | 15 -- toolchain/gcc/common.mk | 11 +- .../002-case_insensitive.patch | 0 .../010-documentation.patch | 0 .../110-Fix-MIPS-PR-84790.patch | 0 .../230-musl_libssp.patch | 0 .../300-mips_Os_cpu_rtx_cost_model.patch | 0 .../810-arm-softfloat-libgcc.patch | 0 .../820-libgcc_pic.patch | 0 .../840-armv4_pass_fix-v4bx_to_ld.patch | 0 .../850-use_shared_libgcc.patch | 0 .../851-libgcc_no_compat.patch | 0 .../870-ppc_no_crtsavres.patch | 0 .../881-no_tm_section.patch | 0 .../900-bad-mips16-crt.patch | 0 .../910-mbsd_multi.patch | 0 .../920-specs_nonfatal_getenv.patch | 0 .../930-fix-mips-noexecstack.patch | 0 ...ibffi-fix-MIPS-softfloat-build-issue.patch | 0 ...mpilation-when-making-cross-compiler.patch | 0 .../002-case_insensitive.patch | 0 .../010-documentation.patch | 0 ...-define-TARGET_LIBC_GNUSTACK-on-musl.patch | 0 .../110-Fix-MIPS-PR-84790.patch | 0 .../230-musl_libssp.patch | 0 .../300-mips_Os_cpu_rtx_cost_model.patch | 0 .../810-arm-softfloat-libgcc.patch | 0 .../820-libgcc_pic.patch | 0 .../840-armv4_pass_fix-v4bx_to_ld.patch | 0 .../850-use_shared_libgcc.patch | 0 .../851-libgcc_no_compat.patch | 0 .../870-ppc_no_crtsavres.patch | 0 .../881-no_tm_section.patch | 0 .../900-bad-mips16-crt.patch | 0 .../910-mbsd_multi.patch | 0 .../920-specs_nonfatal_getenv.patch | 0 ...ibffi-fix-MIPS-softfloat-build-issue.patch | 0 ...mpilation-when-making-cross-compiler.patch | 0 .../970-macos_arm64-building-fix.patch | 0 .../002-case_insensitive.patch | 0 .../010-documentation.patch | 0 .../110-Fix-MIPS-PR-84790.patch | 0 .../230-musl_libssp.patch | 0 .../300-mips_Os_cpu_rtx_cost_model.patch | 0 .../810-arm-softfloat-libgcc.patch | 0 .../820-libgcc_pic.patch | 0 .../840-armv4_pass_fix-v4bx_to_ld.patch | 0 .../850-use_shared_libgcc.patch | 0 .../851-libgcc_no_compat.patch | 0 .../870-ppc_no_crtsavres.patch | 0 .../881-no_tm_section.patch | 0 .../900-bad-mips16-crt.patch | 0 .../910-mbsd_multi.patch | 0 .../920-specs_nonfatal_getenv.patch | 0 ...mpilation-when-making-cross-compiler.patch | 0 .../970-macos_arm64-building-fix.patch | 0 .../002-case_insensitive.patch | 0 .../010-documentation.patch | 0 .../110-Fix-MIPS-PR-84790.patch | 0 .../230-musl_libssp.patch | 0 .../300-mips_Os_cpu_rtx_cost_model.patch | 0 .../800-arm_v5te_no_ldrd_strd.patch | 0 .../810-arm-softfloat-libgcc.patch | 0 .../820-libgcc_pic.patch | 0 .../840-armv4_pass_fix-v4bx_to_ld.patch | 0 .../850-use_shared_libgcc.patch | 0 .../851-libgcc_no_compat.patch | 0 .../870-ppc_no_crtsavres.patch | 0 .../881-no_tm_section.patch | 0 .../900-bad-mips16-crt.patch | 0 .../910-mbsd_multi.patch | 0 .../920-specs_nonfatal_getenv.patch | 0 .../930-fix-mips-noexecstack.patch | 0 ...ibffi-fix-MIPS-softfloat-build-issue.patch | 0 ...mpilation-when-making-cross-compiler.patch | 0 .../999-fix-apple-silicon-support.patch | 0 .../001-revert_register_mode_search.patch | 77 -------- .../gcc/patches/7.5.0/010-documentation.patch | 35 ---- .../patches/7.5.0/110-Fix-MIPS-PR-84790.patch | 20 -- .../gcc/patches/7.5.0/230-musl_libssp.patch | 28 --- .../300-mips_Os_cpu_rtx_cost_model.patch | 21 -- .../7.5.0/800-arm_v5te_no_ldrd_strd.patch | 32 ---- .../gcc/patches/7.5.0/820-libgcc_pic.patch | 44 ----- .../patches/7.5.0/850-use_shared_libgcc.patch | 54 ------ .../patches/7.5.0/870-ppc_no_crtsavres.patch | 18 -- .../gcc/patches/7.5.0/881-no_tm_section.patch | 22 --- .../patches/7.5.0/900-bad-mips16-crt.patch | 30 --- .../gcc/patches/7.5.0/910-mbsd_multi.patch | 146 -------------- .../7.5.0/920-specs_nonfatal_getenv.patch | 22 --- .../7.5.0/930-fix-mips-noexecstack.patch | 111 ----------- ...ibffi-fix-MIPS-softfloat-build-issue.patch | 175 ----------------- .../7.5.0/940-no-clobber-stamp-bits.patch | 33 ---- .../7.5.0/950-cpp_file_path_translation.patch | 181 ------------------ ...mpilation-when-making-cross-compiler.patch | 73 ------- .../patches/8.4.0/002-case_insensitive.patch | 24 --- .../8.4.0/810-arm-softfloat-libgcc.patch | 33 ---- .../8.4.0/840-armv4_pass_fix-v4bx_to_ld.patch | 28 --- .../patches/8.4.0/851-libgcc_no_compat.patch | 22 --- .../patches/9.3.0/002-case_insensitive.patch | 24 --- .../gcc/patches/9.3.0/010-documentation.patch | 35 ---- .../patches/9.3.0/110-Fix-MIPS-PR-84790.patch | 20 -- .../gcc/patches/9.3.0/230-musl_libssp.patch | 13 -- .../300-mips_Os_cpu_rtx_cost_model.patch | 21 -- .../9.3.0/810-arm-softfloat-libgcc.patch | 33 ---- .../gcc/patches/9.3.0/820-libgcc_pic.patch | 44 ----- .../9.3.0/840-armv4_pass_fix-v4bx_to_ld.patch | 28 --- .../patches/9.3.0/850-use_shared_libgcc.patch | 54 ------ .../patches/9.3.0/851-libgcc_no_compat.patch | 22 --- .../patches/9.3.0/870-ppc_no_crtsavres.patch | 11 -- .../gcc/patches/9.3.0/881-no_tm_section.patch | 11 -- .../patches/9.3.0/900-bad-mips16-crt.patch | 9 - .../gcc/patches/9.3.0/910-mbsd_multi.patch | 146 -------------- .../9.3.0/920-specs_nonfatal_getenv.patch | 22 --- .../9.3.0/930-fix-mips-noexecstack.patch | 111 ----------- ...ibffi-fix-MIPS-softfloat-build-issue.patch | 168 ---------------- ...mpilation-when-making-cross-compiler.patch | 67 ------- ...use-of-DES-encryption-functions-in-n.patch | 4 +- .../patches/200-add-dl-search-paths.patch | 2 +- toolchain/musl/Config.in | 7 +- 139 files changed, 90 insertions(+), 2524 deletions(-) delete mode 100644 toolchain/binutils/patches/2.32/300-001_ld_makefile_patch.patch delete mode 100644 toolchain/binutils/patches/2.32/300-012_check_ldrunpath_length.patch delete mode 100644 toolchain/binutils/patches/2.32/400-mips_no_dynamic_linking_sym.patch delete mode 100644 toolchain/binutils/patches/2.32/500-Change-default-emulation-for-mips64-linux.patch delete mode 100644 toolchain/binutils/patches/2.34/300-001_ld_makefile_patch.patch delete mode 100644 toolchain/binutils/patches/2.34/400-mips_no_dynamic_linking_sym.patch delete mode 100644 toolchain/binutils/patches/2.34/500-Change-default-emulation-for-mips64-linux.patch delete mode 100644 toolchain/binutils/patches/2.35.2/300-001_ld_makefile_patch.patch delete mode 100644 toolchain/binutils/patches/2.35.2/400-mips_no_dynamic_linking_sym.patch delete mode 100644 toolchain/binutils/patches/2.35.2/500-Change-default-emulation-for-mips64-linux.patch delete mode 100644 toolchain/binutils/patches/2.36.1/300-001_ld_makefile_patch.patch delete mode 100644 toolchain/binutils/patches/2.36.1/400-mips_no_dynamic_linking_sym.patch delete mode 100644 toolchain/binutils/patches/2.36.1/500-Change-default-emulation-for-mips64-linux.patch rename toolchain/gcc/{patches/10.3.0 => patches-10.x}/002-case_insensitive.patch (100%) rename toolchain/gcc/{patches/10.3.0 => patches-10.x}/010-documentation.patch (100%) rename toolchain/gcc/{patches/10.3.0 => patches-10.x}/110-Fix-MIPS-PR-84790.patch (100%) rename toolchain/gcc/{patches/10.3.0 => patches-10.x}/230-musl_libssp.patch (100%) rename toolchain/gcc/{patches/10.3.0 => patches-10.x}/300-mips_Os_cpu_rtx_cost_model.patch (100%) rename toolchain/gcc/{patches/10.3.0 => patches-10.x}/810-arm-softfloat-libgcc.patch (100%) rename toolchain/gcc/{patches/10.3.0 => patches-10.x}/820-libgcc_pic.patch (100%) rename toolchain/gcc/{patches/10.3.0 => patches-10.x}/840-armv4_pass_fix-v4bx_to_ld.patch (100%) rename toolchain/gcc/{patches/10.3.0 => patches-10.x}/850-use_shared_libgcc.patch (100%) rename toolchain/gcc/{patches/10.3.0 => patches-10.x}/851-libgcc_no_compat.patch (100%) rename toolchain/gcc/{patches/10.3.0 => patches-10.x}/870-ppc_no_crtsavres.patch (100%) rename toolchain/gcc/{patches/10.3.0 => patches-10.x}/881-no_tm_section.patch (100%) rename toolchain/gcc/{patches/10.3.0 => patches-10.x}/900-bad-mips16-crt.patch (100%) rename toolchain/gcc/{patches/10.3.0 => patches-10.x}/910-mbsd_multi.patch (100%) rename toolchain/gcc/{patches/10.3.0 => patches-10.x}/920-specs_nonfatal_getenv.patch (100%) rename toolchain/gcc/{patches/10.3.0 => patches-10.x}/930-fix-mips-noexecstack.patch (100%) rename toolchain/gcc/{patches/10.3.0 => patches-10.x}/931-libffi-fix-MIPS-softfloat-build-issue.patch (100%) rename toolchain/gcc/{patches/10.3.0 => patches-10.x}/960-gotools-fix-compilation-when-making-cross-compiler.patch (100%) rename toolchain/gcc/{patches/11.3.0 => patches-11.x}/002-case_insensitive.patch (100%) rename toolchain/gcc/{patches/11.3.0 => patches-11.x}/010-documentation.patch (100%) rename toolchain/gcc/{patches/11.3.0 => patches-11.x}/011-v12-configure-define-TARGET_LIBC_GNUSTACK-on-musl.patch (100%) rename toolchain/gcc/{patches/11.3.0 => patches-11.x}/110-Fix-MIPS-PR-84790.patch (100%) rename toolchain/gcc/{patches/11.3.0 => patches-11.x}/230-musl_libssp.patch (100%) rename toolchain/gcc/{patches/11.3.0 => patches-11.x}/300-mips_Os_cpu_rtx_cost_model.patch (100%) rename toolchain/gcc/{patches/11.3.0 => patches-11.x}/810-arm-softfloat-libgcc.patch (100%) rename toolchain/gcc/{patches/11.3.0 => patches-11.x}/820-libgcc_pic.patch (100%) rename toolchain/gcc/{patches/11.3.0 => patches-11.x}/840-armv4_pass_fix-v4bx_to_ld.patch (100%) rename toolchain/gcc/{patches/11.3.0 => patches-11.x}/850-use_shared_libgcc.patch (100%) rename toolchain/gcc/{patches/11.3.0 => patches-11.x}/851-libgcc_no_compat.patch (100%) rename toolchain/gcc/{patches/11.3.0 => patches-11.x}/870-ppc_no_crtsavres.patch (100%) rename toolchain/gcc/{patches/11.3.0 => patches-11.x}/881-no_tm_section.patch (100%) rename toolchain/gcc/{patches/11.3.0 => patches-11.x}/900-bad-mips16-crt.patch (100%) rename toolchain/gcc/{patches/11.3.0 => patches-11.x}/910-mbsd_multi.patch (100%) rename toolchain/gcc/{patches/11.3.0 => patches-11.x}/920-specs_nonfatal_getenv.patch (100%) rename toolchain/gcc/{patches/11.3.0 => patches-11.x}/931-libffi-fix-MIPS-softfloat-build-issue.patch (100%) rename toolchain/gcc/{patches/11.3.0 => patches-11.x}/960-gotools-fix-compilation-when-making-cross-compiler.patch (100%) rename toolchain/gcc/{patches/11.3.0 => patches-11.x}/970-macos_arm64-building-fix.patch (100%) rename toolchain/gcc/{patches/12.2.0 => patches-12.x}/002-case_insensitive.patch (100%) rename toolchain/gcc/{patches/12.2.0 => patches-12.x}/010-documentation.patch (100%) rename toolchain/gcc/{patches/12.2.0 => patches-12.x}/110-Fix-MIPS-PR-84790.patch (100%) rename toolchain/gcc/{patches/12.2.0 => patches-12.x}/230-musl_libssp.patch (100%) rename toolchain/gcc/{patches/12.2.0 => patches-12.x}/300-mips_Os_cpu_rtx_cost_model.patch (100%) rename toolchain/gcc/{patches/12.2.0 => patches-12.x}/810-arm-softfloat-libgcc.patch (100%) rename toolchain/gcc/{patches/12.2.0 => patches-12.x}/820-libgcc_pic.patch (100%) rename toolchain/gcc/{patches/12.2.0 => patches-12.x}/840-armv4_pass_fix-v4bx_to_ld.patch (100%) rename toolchain/gcc/{patches/12.2.0 => patches-12.x}/850-use_shared_libgcc.patch (100%) rename toolchain/gcc/{patches/12.2.0 => patches-12.x}/851-libgcc_no_compat.patch (100%) rename toolchain/gcc/{patches/12.2.0 => patches-12.x}/870-ppc_no_crtsavres.patch (100%) rename toolchain/gcc/{patches/12.2.0 => patches-12.x}/881-no_tm_section.patch (100%) rename toolchain/gcc/{patches/12.2.0 => patches-12.x}/900-bad-mips16-crt.patch (100%) rename toolchain/gcc/{patches/12.2.0 => patches-12.x}/910-mbsd_multi.patch (100%) rename toolchain/gcc/{patches/12.2.0 => patches-12.x}/920-specs_nonfatal_getenv.patch (100%) rename toolchain/gcc/{patches/12.2.0 => patches-12.x}/960-gotools-fix-compilation-when-making-cross-compiler.patch (100%) rename toolchain/gcc/{patches/12.2.0 => patches-12.x}/970-macos_arm64-building-fix.patch (100%) rename toolchain/gcc/{patches/7.5.0 => patches-8.x}/002-case_insensitive.patch (100%) rename toolchain/gcc/{patches/8.4.0 => patches-8.x}/010-documentation.patch (100%) rename toolchain/gcc/{patches/8.4.0 => patches-8.x}/110-Fix-MIPS-PR-84790.patch (100%) rename toolchain/gcc/{patches/8.4.0 => patches-8.x}/230-musl_libssp.patch (100%) rename toolchain/gcc/{patches/8.4.0 => patches-8.x}/300-mips_Os_cpu_rtx_cost_model.patch (100%) rename toolchain/gcc/{patches/8.4.0 => patches-8.x}/800-arm_v5te_no_ldrd_strd.patch (100%) rename toolchain/gcc/{patches/7.5.0 => patches-8.x}/810-arm-softfloat-libgcc.patch (100%) rename toolchain/gcc/{patches/8.4.0 => patches-8.x}/820-libgcc_pic.patch (100%) rename toolchain/gcc/{patches/7.5.0 => patches-8.x}/840-armv4_pass_fix-v4bx_to_ld.patch (100%) rename toolchain/gcc/{patches/8.4.0 => patches-8.x}/850-use_shared_libgcc.patch (100%) rename toolchain/gcc/{patches/7.5.0 => patches-8.x}/851-libgcc_no_compat.patch (100%) rename toolchain/gcc/{patches/8.4.0 => patches-8.x}/870-ppc_no_crtsavres.patch (100%) rename toolchain/gcc/{patches/8.4.0 => patches-8.x}/881-no_tm_section.patch (100%) rename toolchain/gcc/{patches/8.4.0 => patches-8.x}/900-bad-mips16-crt.patch (100%) rename toolchain/gcc/{patches/8.4.0 => patches-8.x}/910-mbsd_multi.patch (100%) rename toolchain/gcc/{patches/8.4.0 => patches-8.x}/920-specs_nonfatal_getenv.patch (100%) rename toolchain/gcc/{patches/8.4.0 => patches-8.x}/930-fix-mips-noexecstack.patch (100%) rename toolchain/gcc/{patches/8.4.0 => patches-8.x}/931-libffi-fix-MIPS-softfloat-build-issue.patch (100%) rename toolchain/gcc/{patches/8.4.0 => patches-8.x}/960-gotools-fix-compilation-when-making-cross-compiler.patch (100%) rename toolchain/gcc/{patches/8.4.0 => patches-8.x}/999-fix-apple-silicon-support.patch (100%) delete mode 100644 toolchain/gcc/patches/7.5.0/001-revert_register_mode_search.patch delete mode 100644 toolchain/gcc/patches/7.5.0/010-documentation.patch delete mode 100644 toolchain/gcc/patches/7.5.0/110-Fix-MIPS-PR-84790.patch delete mode 100644 toolchain/gcc/patches/7.5.0/230-musl_libssp.patch delete mode 100644 toolchain/gcc/patches/7.5.0/300-mips_Os_cpu_rtx_cost_model.patch delete mode 100644 toolchain/gcc/patches/7.5.0/800-arm_v5te_no_ldrd_strd.patch delete mode 100644 toolchain/gcc/patches/7.5.0/820-libgcc_pic.patch delete mode 100644 toolchain/gcc/patches/7.5.0/850-use_shared_libgcc.patch delete mode 100644 toolchain/gcc/patches/7.5.0/870-ppc_no_crtsavres.patch delete mode 100644 toolchain/gcc/patches/7.5.0/881-no_tm_section.patch delete mode 100644 toolchain/gcc/patches/7.5.0/900-bad-mips16-crt.patch delete mode 100644 toolchain/gcc/patches/7.5.0/910-mbsd_multi.patch delete mode 100644 toolchain/gcc/patches/7.5.0/920-specs_nonfatal_getenv.patch delete mode 100644 toolchain/gcc/patches/7.5.0/930-fix-mips-noexecstack.patch delete mode 100644 toolchain/gcc/patches/7.5.0/931-libffi-fix-MIPS-softfloat-build-issue.patch delete mode 100644 toolchain/gcc/patches/7.5.0/940-no-clobber-stamp-bits.patch delete mode 100644 toolchain/gcc/patches/7.5.0/950-cpp_file_path_translation.patch delete mode 100644 toolchain/gcc/patches/7.5.0/960-gotools-fix-compilation-when-making-cross-compiler.patch delete mode 100644 toolchain/gcc/patches/8.4.0/002-case_insensitive.patch delete mode 100644 toolchain/gcc/patches/8.4.0/810-arm-softfloat-libgcc.patch delete mode 100644 toolchain/gcc/patches/8.4.0/840-armv4_pass_fix-v4bx_to_ld.patch delete mode 100644 toolchain/gcc/patches/8.4.0/851-libgcc_no_compat.patch delete mode 100644 toolchain/gcc/patches/9.3.0/002-case_insensitive.patch delete mode 100644 toolchain/gcc/patches/9.3.0/010-documentation.patch delete mode 100644 toolchain/gcc/patches/9.3.0/110-Fix-MIPS-PR-84790.patch delete mode 100644 toolchain/gcc/patches/9.3.0/230-musl_libssp.patch delete mode 100644 toolchain/gcc/patches/9.3.0/300-mips_Os_cpu_rtx_cost_model.patch delete mode 100644 toolchain/gcc/patches/9.3.0/810-arm-softfloat-libgcc.patch delete mode 100644 toolchain/gcc/patches/9.3.0/820-libgcc_pic.patch delete mode 100644 toolchain/gcc/patches/9.3.0/840-armv4_pass_fix-v4bx_to_ld.patch delete mode 100644 toolchain/gcc/patches/9.3.0/850-use_shared_libgcc.patch delete mode 100644 toolchain/gcc/patches/9.3.0/851-libgcc_no_compat.patch delete mode 100644 toolchain/gcc/patches/9.3.0/870-ppc_no_crtsavres.patch delete mode 100644 toolchain/gcc/patches/9.3.0/881-no_tm_section.patch delete mode 100644 toolchain/gcc/patches/9.3.0/900-bad-mips16-crt.patch delete mode 100644 toolchain/gcc/patches/9.3.0/910-mbsd_multi.patch delete mode 100644 toolchain/gcc/patches/9.3.0/920-specs_nonfatal_getenv.patch delete mode 100644 toolchain/gcc/patches/9.3.0/930-fix-mips-noexecstack.patch delete mode 100644 toolchain/gcc/patches/9.3.0/931-libffi-fix-MIPS-softfloat-build-issue.patch delete mode 100644 toolchain/gcc/patches/9.3.0/960-gotools-fix-compilation-when-making-cross-compiler.patch diff --git a/config/Config-devel.in b/config/Config-devel.in index 126462bfc..528f221d1 100644 --- a/config/Config-devel.in +++ b/config/Config-devel.in @@ -17,6 +17,20 @@ menuconfig DEVEL Store built firmware images and filesystem images in this directory. If not set, uses './bin/$(BOARD)' + config DOWNLOAD_TOOL_CUSTOM + string "Use custom download tool" if DEVEL + default "" + help + Use and force custom download tool instead of relying on autoselection + between curl if available and wget as a fallback. + + download.pl supports 3 tools officially aria2c, curl and wget. + If one of the tool is used in this config, download.pl will use the + default args to make use of them. + + If the provided string is different than aria2c, curl or wget, the command + is used as is and the download url will be appended at the end of such command. + config DOWNLOAD_FOLDER string "Download folder" if DEVEL default "" diff --git a/include/download.mk b/include/download.mk index 609956b00..670711b30 100644 --- a/include/download.mk +++ b/include/download.mk @@ -18,6 +18,10 @@ endif DOWNLOAD_RDEP=$(STAMP_PREPARED) $(HOST_STAMP_PREPARED) +# Export options for download.pl +export DOWNLOAD_CHECK_CERTIFICATE:=$(CONFIG_DOWNLOAD_CHECK_CERTIFICATE) +export DOWNLOAD_TOOL_CUSTOM:=$(CONFIG_DOWNLOAD_TOOL_CUSTOM) + define dl_method_git $(if $(filter https://github.com/% git://github.com/%,$(1)),github_archive,git) endef diff --git a/scripts/download.pl b/scripts/download.pl index f6fdc1232..a73c9d1bc 100755 --- a/scripts/download.pl +++ b/scripts/download.pl @@ -25,6 +25,8 @@ my @mirrors; my $ok; my $check_certificate = $ENV{DOWNLOAD_CHECK_CERTIFICATE} eq "y"; +my $custom_tool = $ENV{DOWNLOAD_TOOL_CUSTOM}; +my $download_tool; $url_filename or $url_filename = $filename; @@ -56,10 +58,8 @@ sub localmirrors { sub which($) { my $prog = shift; - my $res = `which $prog`; + my $res = `command -v $prog`; $res or return undef; - $res =~ /^no / and return undef; - $res =~ /not found/ and return undef; return $res; } @@ -72,49 +72,69 @@ sub hash_cmd() { return undef; } +sub tool_present { + my $tool_name = shift; + my $compare_line = shift; + my $present = 0; + + if (open TOOL, "$tool_name --version 2>/dev/null |") { + if (defined(my $line = readline TOOL)) { + $present = 1 if $line =~ /^$compare_line /; + } + close TOOL; + } + + return $present +} + +sub select_tool { + $custom_tool =~ tr/"//d; + if ($custom_tool) { + return $custom_tool; + } + + # Try to use curl if available + if (tool_present("curl", "curl")) { + return "curl"; + } + + # No tool found, fallback to wget + return "wget"; +} + sub download_cmd { my $url = shift; - my $have_curl = 0; - my $have_aria2c = 0; my $filename = shift; - my $additional_mirrors = join(" ", map "$_/$filename", @_); - my @chArray = ('a'..'z', 'A'..'Z', 0..9); - my $rfn = join '', "${filename}_", map{ $chArray[int rand @chArray] } 0..9; - if (open CURL, '-|', 'curl', '--version') { - if (defined(my $line = readline CURL)) { - $have_curl = 1 if $line =~ /^curl /; - } - close CURL; - } - if (open ARIA2C, '-|', 'aria2c', '--version') { - if (defined(my $line = readline ARIA2C)) { - $have_aria2c = 1 if $line =~ /^aria2 /; - } - close ARIA2C; - } + if ($download_tool eq "curl") { + return (qw(curl -f --connect-timeout 20 --retry 5 --location), + $check_certificate ? () : '--insecure', + shellwords($ENV{CURL_OPTIONS} || ''), + $url); + } elsif ($download_tool eq "wget") { + return (qw(wget --tries=5 --timeout=20 --output-document=-), + $check_certificate ? () : '--no-check-certificate', + shellwords($ENV{WGET_OPTIONS} || ''), + $url); + } elsif ($download_tool eq "aria2c") { + my $additional_mirrors = join(" ", map "$_/$filename", @_); + my @chArray = ('a'..'z', 'A'..'Z', 0..9); + my $rfn = join '', "${filename}_", map{ $chArray[int rand @chArray] } 0..9; - if ($have_aria2c) { @mirrors=(); + return join(" ", "[ -d $ENV{'TMPDIR'}/aria2c ] || mkdir $ENV{'TMPDIR'}/aria2c;", "touch $ENV{'TMPDIR'}/aria2c/${rfn}_spp;", qw(aria2c --stderr -c -x2 -s10 -j10 -k1M), $url, $additional_mirrors, $check_certificate ? () : '--check-certificate=false', "--server-stat-of=$ENV{'TMPDIR'}/aria2c/${rfn}_spp", "--server-stat-if=$ENV{'TMPDIR'}/aria2c/${rfn}_spp", + "--daemon=false --no-conf", shellwords($ENV{ARIA2C_OPTIONS} || ''), "-d $ENV{'TMPDIR'}/aria2c -o $rfn;", "cat $ENV{'TMPDIR'}/aria2c/$rfn;", "rm $ENV{'TMPDIR'}/aria2c/$rfn $ENV{'TMPDIR'}/aria2c/${rfn}_spp"); - } elsif ($have_curl) { - return (qw(curl -f --connect-timeout 20 --retry 5 --location), - $check_certificate ? () : '--insecure', - shellwords($ENV{CURL_OPTIONS} || ''), - $url); } else { - return (qw(wget --tries=5 --timeout=20 --output-document=-), - $check_certificate ? () : '--no-check-certificate', - shellwords($ENV{WGET_OPTIONS} || ''), - $url); + return join(" ", $download_tool, $url); } } @@ -224,19 +244,21 @@ foreach my $mirror (@ARGV) { if ($mirror =~ /^\@SF\/(.+)$/) { # give sourceforge a few more tries, because it redirects to different mirrors for (1 .. 5) { - push @mirrors, "https://netix.dl.sourceforge.net/$1"; - push @mirrors, "https://freefr.dl.sourceforge.net/$1"; push @mirrors, "https://downloads.sourceforge.net/$1"; } } elsif ($mirror =~ /^\@OPENWRT$/) { # use OpenWrt source server directly } elsif ($mirror =~ /^\@DEBIAN\/(.+)$/) { push @mirrors, "https://mirrors.tencent.com/debian/$1"; + push @mirrors, "https://mirrors.tuna.tsinghua.edu.cn/debian/$1"; + push @mirrors, "https://mirrors.ustc.edu.cn/debian/$1"; push @mirrors, "https://ftp.debian.org/debian/$1"; push @mirrors, "https://mirror.leaseweb.com/debian/$1"; push @mirrors, "https://mirror.netcologne.de/debian/$1"; } elsif ($mirror =~ /^\@APACHE\/(.+)$/) { push @mirrors, "https://mirrors.cloud.tencent.com/apache/$1"; + push @mirrors, "https://mirrors.tuna.tsinghua.edu.cn/apache/$1"; + push @mirrors, "https://mirrors.ustc.edu.cn/apache/$1"; push @mirrors, "https://mirror.netcologne.de/apache.org/$1"; push @mirrors, "https://mirror.aarnet.edu.au/pub/apache/$1"; push @mirrors, "https://mirror.csclub.uwaterloo.ca/apache/$1"; @@ -247,16 +269,13 @@ foreach my $mirror (@ARGV) { push @mirrors, "ftp://apache.cs.utah.edu/apache.org/$1"; push @mirrors, "ftp://apache.mirrors.ovh.net/ftp.apache.org/dist/$1"; } elsif ($mirror =~ /^\@GITHUB\/(.+)$/) { - my $dir = $1; - my $i = 0; - # replace the 2nd '/' with '@' for jsDelivr mirror - push @mirrors, "https://cdn.jsdelivr.net/gh/". $dir =~ s{\/}{++$i == 2 ? '@' : $&}ger; # give github a few more tries (different mirrors) for (1 .. 5) { - push @mirrors, "https://raw.githubusercontent.com/$dir"; + push @mirrors, "https://raw.githubusercontent.com/$1"; } } elsif ($mirror =~ /^\@GNU\/(.+)$/) { - push @mirrors, "https://mirrors.cloud.tencent.com/gnu/$1"; + push @mirrors, "https://mirrors.tuna.tsinghua.edu.cn/gnu/$1"; + push @mirrors, "https://mirrors.ustc.edu.cn/gnu/$1"; push @mirrors, "https://mirror.csclub.uwaterloo.ca/gnu/$1"; push @mirrors, "https://mirror.netcologne.de/gnu/$1"; push @mirrors, "http://ftp.kddilabs.jp/GNU/gnu/$1"; @@ -282,6 +301,7 @@ foreach my $mirror (@ARGV) { push @extra, "$extra[0]/longterm/v$1"; } foreach my $dir (@extra) { + push @mirrors, "https://mirrors.tuna.tsinghua.edu.cn/kernel/$dir"; push @mirrors, "https://mirrors.ustc.edu.cn/kernel.org/$dir"; push @mirrors, "https://cdn.kernel.org/pub/$dir"; push @mirrors, "https://download.xs4all.nl/ftp.kernel.org/pub/$dir"; @@ -292,8 +312,8 @@ foreach my $mirror (@ARGV) { push @mirrors, "ftp://www.mirrorservice.org/sites/ftp.kernel.org/pub/$dir"; } } elsif ($mirror =~ /^\@GNOME\/(.+)$/) { - push @mirrors, "https://download.gnome.org/sources/$1"; push @mirrors, "https://mirrors.ustc.edu.cn/gnome/sources/$1"; + push @mirrors, "https://download.gnome.org/sources/$1"; push @mirrors, "https://mirror.csclub.uwaterloo.ca/gnome/sources/$1"; push @mirrors, "http://ftp.acc.umu.se/pub/GNOME/sources/$1"; push @mirrors, "http://ftp.kaist.ac.kr/gnome/sources/$1"; @@ -329,6 +349,8 @@ if (-f "$target/$filename") { }; } +$download_tool = select_tool(); + while (!-f "$target/$filename") { my $mirror = shift @mirrors; $mirror or die "No more mirrors to try - giving up.\n"; diff --git a/toolchain/binutils/Config.in b/toolchain/binutils/Config.in index dcc203807..50829ad36 100644 --- a/toolchain/binutils/Config.in +++ b/toolchain/binutils/Config.in @@ -2,26 +2,10 @@ choice prompt "Binutils Version" if TOOLCHAINOPTS - default BINUTILS_USE_VERSION_2_34 + default BINUTILS_USE_VERSION_2_37 help Select the version of binutils you wish to use. - config BINUTILS_USE_VERSION_2_32 - bool "Binutils 2.32" - select BINUTILS_VERSION_2_32 - - config BINUTILS_USE_VERSION_2_34 - bool "Binutils 2.34" - select BINUTILS_VERSION_2_34 - - config BINUTILS_USE_VERSION_2_35_2 - bool "Binutils 2.35.2" - select BINUTILS_VERSION_2_35_2 - - config BINUTILS_USE_VERSION_2_36_1 - bool "Binutils 2.36.1" - select BINUTILS_VERSION_2_36_1 - config BINUTILS_USE_VERSION_2_37 bool "Binutils 2.37" select BINUTILS_VERSION_2_37 diff --git a/toolchain/binutils/Config.version b/toolchain/binutils/Config.version index c20a682b3..aa1325969 100644 --- a/toolchain/binutils/Config.version +++ b/toolchain/binutils/Config.version @@ -1,17 +1,6 @@ -config BINUTILS_VERSION_2_32 - bool - -config BINUTILS_VERSION_2_34 - default y if !TOOLCHAINOPTS - bool - -config BINUTILS_VERSION_2_35_2 - bool - -config BINUTILS_VERSION_2_36_1 - bool config BINUTILS_VERSION_2_37 + default y if !TOOLCHAINOPTS bool config BINUTILS_VERSION_2_38 @@ -22,10 +11,6 @@ config BINUTILS_VERSION_2_39 config BINUTILS_VERSION string - default "2.32" if BINUTILS_VERSION_2_32 - default "2.34" if BINUTILS_VERSION_2_34 - default "2.35.2" if BINUTILS_VERSION_2_35_2 - default "2.36.1" if BINUTILS_VERSION_2_36_1 default "2.37" if BINUTILS_VERSION_2_37 default "2.38" if BINUTILS_VERSION_2_38 default "2.39" if BINUTILS_VERSION_2_39 diff --git a/toolchain/binutils/Makefile b/toolchain/binutils/Makefile index 2903f8a79..554388296 100644 --- a/toolchain/binutils/Makefile +++ b/toolchain/binutils/Makefile @@ -15,22 +15,6 @@ PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz TAR_OPTIONS += --exclude='*.rej' -ifeq ($(PKG_VERSION),2.32) - PKG_HASH:=0ab6c55dd86a92ed561972ba15b9b70a8b9f75557f896446c82e8b36e473ee04 -endif - -ifeq ($(PKG_VERSION),2.34) - PKG_HASH:=f00b0e8803dc9bab1e2165bd568528135be734df3fabf8d0161828cd56028952 -endif - -ifeq ($(PKG_VERSION),2.35.2) - PKG_HASH:=dcd5b0416e7b0a9b24bed76cd8c6c132526805761863150a26d016415b8bdc7b -endif - -ifeq ($(PKG_VERSION),2.36.1) - PKG_HASH:=e81d9edf373f193af428a0f256674aea62a9d74dfe93f65192d4eae030b0f3b0 -endif - ifeq ($(PKG_VERSION),2.37) PKG_HASH:=820d9724f020a3e69cb337893a0b63c2db161dadcb0e06fc11dc29eb1e84a32c endif diff --git a/toolchain/binutils/patches/2.32/300-001_ld_makefile_patch.patch b/toolchain/binutils/patches/2.32/300-001_ld_makefile_patch.patch deleted file mode 100644 index 7b8300efa..000000000 --- a/toolchain/binutils/patches/2.32/300-001_ld_makefile_patch.patch +++ /dev/null @@ -1,22 +0,0 @@ ---- a/ld/Makefile.am -+++ b/ld/Makefile.am -@@ -57,7 +57,7 @@ endif - # We put the scripts in the directory $(scriptdir)/ldscripts. - # We can't put the scripts in $(datadir) because the SEARCH_DIR - # directives need to be different for native and cross linkers. --scriptdir = $(tooldir)/lib -+scriptdir = $(libdir) - - EMUL = @EMUL@ - EMULATION_OFILES = @EMULATION_OFILES@ ---- a/ld/Makefile.in -+++ b/ld/Makefile.in -@@ -563,7 +563,7 @@ AM_CFLAGS = $(WARN_CFLAGS) $(ELF_CLFAGS) - # We put the scripts in the directory $(scriptdir)/ldscripts. - # We can't put the scripts in $(datadir) because the SEARCH_DIR - # directives need to be different for native and cross linkers. --scriptdir = $(tooldir)/lib -+scriptdir = $(libdir) - BASEDIR = $(srcdir)/.. - BFDDIR = $(BASEDIR)/bfd - INCDIR = $(BASEDIR)/include diff --git a/toolchain/binutils/patches/2.32/300-012_check_ldrunpath_length.patch b/toolchain/binutils/patches/2.32/300-012_check_ldrunpath_length.patch deleted file mode 100644 index 1e8695f2f..000000000 --- a/toolchain/binutils/patches/2.32/300-012_check_ldrunpath_length.patch +++ /dev/null @@ -1,20 +0,0 @@ ---- a/ld/emultempl/elf32.em -+++ b/ld/emultempl/elf32.em -@@ -1471,6 +1471,8 @@ fragment <link.next) - if (bfd_get_flavour (abfd) == bfd_target_elf_flavour) diff --git a/toolchain/binutils/patches/2.32/400-mips_no_dynamic_linking_sym.patch b/toolchain/binutils/patches/2.32/400-mips_no_dynamic_linking_sym.patch deleted file mode 100644 index fb3f7f59b..000000000 --- a/toolchain/binutils/patches/2.32/400-mips_no_dynamic_linking_sym.patch +++ /dev/null @@ -1,18 +0,0 @@ ---- a/bfd/elfxx-mips.c -+++ b/bfd/elfxx-mips.c -@@ -8001,6 +8001,7 @@ _bfd_mips_elf_create_dynamic_sections (b - - name = SGI_COMPAT (abfd) ? "_DYNAMIC_LINK" : "_DYNAMIC_LINKING"; - bh = NULL; -+ if (0) { - if (!(_bfd_generic_link_add_one_symbol - (info, abfd, name, BSF_GLOBAL, bfd_abs_section_ptr, 0, - NULL, FALSE, get_elf_backend_data (abfd)->collect, &bh))) -@@ -8013,6 +8014,7 @@ _bfd_mips_elf_create_dynamic_sections (b - - if (! bfd_elf_link_record_dynamic_symbol (info, h)) - return FALSE; -+ } - - if (! mips_elf_hash_table (info)->use_rld_obj_head) - { diff --git a/toolchain/binutils/patches/2.32/500-Change-default-emulation-for-mips64-linux.patch b/toolchain/binutils/patches/2.32/500-Change-default-emulation-for-mips64-linux.patch deleted file mode 100644 index bd7f7f29a..000000000 --- a/toolchain/binutils/patches/2.32/500-Change-default-emulation-for-mips64-linux.patch +++ /dev/null @@ -1,37 +0,0 @@ ---- a/bfd/config.bfd -+++ b/bfd/config.bfd -@@ -919,12 +919,12 @@ case "${targ}" in - targ_selvecs="mips_elf32_le_vec mips_elf64_be_vec mips_elf64_le_vec mips_ecoff_be_vec mips_ecoff_le_vec" - ;; - mips64*el-*-linux*) -- targ_defvec=mips_elf32_ntrad_le_vec -- targ_selvecs="mips_elf32_ntrad_be_vec mips_elf32_trad_le_vec mips_elf32_trad_be_vec mips_elf64_trad_le_vec mips_elf64_trad_be_vec" -+ targ_defvec=mips_elf64_trad_le_vec -+ targ_selvecs="mips_elf32_ntrad_le_vec mips_elf32_ntrad_be_vec mips_elf32_trad_le_vec mips_elf32_trad_be_vec mips_elf64_trad_be_vec" - ;; - mips64*-*-linux*) -- targ_defvec=mips_elf32_ntrad_be_vec -- targ_selvecs="mips_elf32_ntrad_le_vec mips_elf32_trad_be_vec mips_elf32_trad_le_vec mips_elf64_trad_be_vec mips_elf64_trad_le_vec" -+ targ_defvec=mips_elf64_trad_be_vec -+ targ_selvecs="mips_elf32_ntrad_be_vec mips_elf32_ntrad_le_vec mips_elf32_trad_be_vec mips_elf32_trad_le_vec mips_elf64_trad_le_vec" - ;; - mips*el-*-linux*) - targ_defvec=mips_elf32_trad_le_vec ---- a/ld/configure.tgt -+++ b/ld/configure.tgt -@@ -468,11 +468,11 @@ mips*el-*-vxworks*) targ_emul=elf32elmip - mips*-*-vxworks*) targ_emul=elf32ebmipvxworks - targ_extra_emuls="elf32elmipvxworks" ;; - mips*-*-windiss) targ_emul=elf32mipswindiss ;; --mips64*el-*-linux-*) targ_emul=elf32ltsmipn32 -- targ_extra_emuls="elf32btsmipn32 elf32ltsmip elf32btsmip elf64ltsmip elf64btsmip" -+mips64*el-*-linux-*) targ_emul=elf64ltsmip -+ targ_extra_emuls="elf32btsmipn32 elf32ltsmipn32 elf32ltsmip elf32btsmip elf64btsmip" - targ_extra_libpath=$targ_extra_emuls ;; --mips64*-*-linux-*) targ_emul=elf32btsmipn32 -- targ_extra_emuls="elf32ltsmipn32 elf32btsmip elf32ltsmip elf64btsmip elf64ltsmip" -+mips64*-*-linux-*) targ_emul=elf64btsmip -+ targ_extra_emuls="elf32btsmipn32 elf32ltsmipn32 elf32btsmip elf32ltsmip elf64ltsmip" - targ_extra_libpath=$targ_extra_emuls ;; - mips*el-*-linux-*) targ_emul=elf32ltsmip - targ_extra_emuls="elf32btsmip elf32ltsmipn32 elf64ltsmip elf32btsmipn32 elf64btsmip" diff --git a/toolchain/binutils/patches/2.34/300-001_ld_makefile_patch.patch b/toolchain/binutils/patches/2.34/300-001_ld_makefile_patch.patch deleted file mode 100644 index dcffe0094..000000000 --- a/toolchain/binutils/patches/2.34/300-001_ld_makefile_patch.patch +++ /dev/null @@ -1,22 +0,0 @@ ---- a/ld/Makefile.am -+++ b/ld/Makefile.am -@@ -63,7 +63,7 @@ endif - # We put the scripts in the directory $(scriptdir)/ldscripts. - # We can't put the scripts in $(datadir) because the SEARCH_DIR - # directives need to be different for native and cross linkers. --scriptdir = $(tooldir)/lib -+scriptdir = $(libdir) - - EMUL = @EMUL@ - EMULATION_OFILES = @EMULATION_OFILES@ ---- a/ld/Makefile.in -+++ b/ld/Makefile.in -@@ -572,7 +572,7 @@ AM_CFLAGS = $(WARN_CFLAGS) $(ELF_CLFAGS) - # We put the scripts in the directory $(scriptdir)/ldscripts. - # We can't put the scripts in $(datadir) because the SEARCH_DIR - # directives need to be different for native and cross linkers. --scriptdir = $(tooldir)/lib -+scriptdir = $(libdir) - BASEDIR = $(srcdir)/.. - BFDDIR = $(BASEDIR)/bfd - INCDIR = $(BASEDIR)/include diff --git a/toolchain/binutils/patches/2.34/400-mips_no_dynamic_linking_sym.patch b/toolchain/binutils/patches/2.34/400-mips_no_dynamic_linking_sym.patch deleted file mode 100644 index a973c56b1..000000000 --- a/toolchain/binutils/patches/2.34/400-mips_no_dynamic_linking_sym.patch +++ /dev/null @@ -1,18 +0,0 @@ ---- a/bfd/elfxx-mips.c -+++ b/bfd/elfxx-mips.c -@@ -8092,6 +8092,7 @@ _bfd_mips_elf_create_dynamic_sections (b - - name = SGI_COMPAT (abfd) ? "_DYNAMIC_LINK" : "_DYNAMIC_LINKING"; - bh = NULL; -+ if (0) { - if (!(_bfd_generic_link_add_one_symbol - (info, abfd, name, BSF_GLOBAL, bfd_abs_section_ptr, 0, - NULL, FALSE, get_elf_backend_data (abfd)->collect, &bh))) -@@ -8104,6 +8105,7 @@ _bfd_mips_elf_create_dynamic_sections (b - - if (! bfd_elf_link_record_dynamic_symbol (info, h)) - return FALSE; -+ } - - if (! mips_elf_hash_table (info)->use_rld_obj_head) - { diff --git a/toolchain/binutils/patches/2.34/500-Change-default-emulation-for-mips64-linux.patch b/toolchain/binutils/patches/2.34/500-Change-default-emulation-for-mips64-linux.patch deleted file mode 100644 index 455ac0001..000000000 --- a/toolchain/binutils/patches/2.34/500-Change-default-emulation-for-mips64-linux.patch +++ /dev/null @@ -1,38 +0,0 @@ ---- a/bfd/config.bfd -+++ b/bfd/config.bfd -@@ -911,12 +911,12 @@ case "${targ}" in - targ_selvecs="mips_elf32_le_vec mips_elf64_be_vec mips_elf64_le_vec mips_ecoff_be_vec mips_ecoff_le_vec" - ;; - mips64*el-*-linux*) -- targ_defvec=mips_elf32_ntrad_le_vec -- targ_selvecs="mips_elf32_ntrad_be_vec mips_elf32_trad_le_vec mips_elf32_trad_be_vec mips_elf64_trad_le_vec mips_elf64_trad_be_vec" -+ targ_defvec=mips_elf64_trad_le_vec -+ targ_selvecs="mips_elf32_ntrad_le_vec mips_elf32_ntrad_be_vec mips_elf32_trad_le_vec mips_elf32_trad_be_vec mips_elf64_trad_be_vec" - ;; - mips64*-*-linux*) -- targ_defvec=mips_elf32_ntrad_be_vec -- targ_selvecs="mips_elf32_ntrad_le_vec mips_elf32_trad_be_vec mips_elf32_trad_le_vec mips_elf64_trad_be_vec mips_elf64_trad_le_vec" -+ targ_defvec=mips_elf64_trad_be_vec -+ targ_selvecs="mips_elf32_ntrad_be_vec mips_elf32_ntrad_le_vec mips_elf32_trad_be_vec mips_elf32_trad_le_vec mips_elf64_trad_le_vec" - ;; - mips*el-*-linux*) - targ_defvec=mips_elf32_trad_le_vec ---- a/ld/configure.tgt -+++ b/ld/configure.tgt -@@ -541,12 +541,12 @@ mips*-*-vxworks*) targ_emul=elf32ebmipvx - ;; - mips*-*-windiss) targ_emul=elf32mipswindiss - ;; --mips64*el-*-linux-*) targ_emul=elf32ltsmipn32 -- targ_extra_emuls="elf32btsmipn32 elf32ltsmip elf32btsmip elf64ltsmip elf64btsmip" -+mips64*el-*-linux-*) targ_emul=elf64ltsmip -+ targ_extra_emuls="elf32btsmipn32 elf32ltsmipn32 elf32ltsmip elf32btsmip elf64btsmip" - targ_extra_libpath=$targ_extra_emuls - ;; --mips64*-*-linux-*) targ_emul=elf32btsmipn32 -- targ_extra_emuls="elf32ltsmipn32 elf32btsmip elf32ltsmip elf64btsmip elf64ltsmip" -+mips64*-*-linux-*) targ_emul=elf64btsmip -+ targ_extra_emuls="elf32btsmipn32 elf32ltsmipn32 elf32btsmip elf32ltsmip elf64ltsmip" - targ_extra_libpath=$targ_extra_emuls - ;; - mips*el-*-linux-*) targ_emul=elf32ltsmip diff --git a/toolchain/binutils/patches/2.35.2/300-001_ld_makefile_patch.patch b/toolchain/binutils/patches/2.35.2/300-001_ld_makefile_patch.patch deleted file mode 100644 index 21b2d1c28..000000000 --- a/toolchain/binutils/patches/2.35.2/300-001_ld_makefile_patch.patch +++ /dev/null @@ -1,22 +0,0 @@ ---- a/ld/Makefile.am -+++ b/ld/Makefile.am -@@ -50,7 +50,7 @@ AM_CFLAGS = $(WARN_CFLAGS) $(ELF_CLFAGS) - # We put the scripts in the directory $(scriptdir)/ldscripts. - # We can't put the scripts in $(datadir) because the SEARCH_DIR - # directives need to be different for native and cross linkers. --scriptdir = $(tooldir)/lib -+scriptdir = $(libdir) - - EMUL = @EMUL@ - EMULATION_OFILES = @EMULATION_OFILES@ ---- a/ld/Makefile.in -+++ b/ld/Makefile.in -@@ -555,7 +555,7 @@ AM_CFLAGS = $(WARN_CFLAGS) $(ELF_CLFAGS) - # We put the scripts in the directory $(scriptdir)/ldscripts. - # We can't put the scripts in $(datadir) because the SEARCH_DIR - # directives need to be different for native and cross linkers. --scriptdir = $(tooldir)/lib -+scriptdir = $(libdir) - BASEDIR = $(srcdir)/.. - BFDDIR = $(BASEDIR)/bfd - INCDIR = $(BASEDIR)/include diff --git a/toolchain/binutils/patches/2.35.2/400-mips_no_dynamic_linking_sym.patch b/toolchain/binutils/patches/2.35.2/400-mips_no_dynamic_linking_sym.patch deleted file mode 100644 index 9dfc01e53..000000000 --- a/toolchain/binutils/patches/2.35.2/400-mips_no_dynamic_linking_sym.patch +++ /dev/null @@ -1,18 +0,0 @@ ---- a/bfd/elfxx-mips.c -+++ b/bfd/elfxx-mips.c -@@ -8075,6 +8075,7 @@ _bfd_mips_elf_create_dynamic_sections (b - - name = SGI_COMPAT (abfd) ? "_DYNAMIC_LINK" : "_DYNAMIC_LINKING"; - bh = NULL; -+ if (0) { - if (!(_bfd_generic_link_add_one_symbol - (info, abfd, name, BSF_GLOBAL, bfd_abs_section_ptr, 0, - NULL, FALSE, get_elf_backend_data (abfd)->collect, &bh))) -@@ -8087,6 +8088,7 @@ _bfd_mips_elf_create_dynamic_sections (b - - if (! bfd_elf_link_record_dynamic_symbol (info, h)) - return FALSE; -+ } - - if (! mips_elf_hash_table (info)->use_rld_obj_head) - { diff --git a/toolchain/binutils/patches/2.35.2/500-Change-default-emulation-for-mips64-linux.patch b/toolchain/binutils/patches/2.35.2/500-Change-default-emulation-for-mips64-linux.patch deleted file mode 100644 index 5de5484fe..000000000 --- a/toolchain/binutils/patches/2.35.2/500-Change-default-emulation-for-mips64-linux.patch +++ /dev/null @@ -1,38 +0,0 @@ ---- a/bfd/config.bfd -+++ b/bfd/config.bfd -@@ -894,12 +894,12 @@ case "${targ}" in - targ_selvecs="mips_elf32_le_vec mips_elf64_be_vec mips_elf64_le_vec mips_ecoff_be_vec mips_ecoff_le_vec" - ;; - mips64*el-*-linux*) -- targ_defvec=mips_elf32_ntrad_le_vec -- targ_selvecs="mips_elf32_ntrad_be_vec mips_elf32_trad_le_vec mips_elf32_trad_be_vec mips_elf64_trad_le_vec mips_elf64_trad_be_vec" -+ targ_defvec=mips_elf64_trad_le_vec -+ targ_selvecs="mips_elf32_ntrad_le_vec mips_elf32_ntrad_be_vec mips_elf32_trad_le_vec mips_elf32_trad_be_vec mips_elf64_trad_be_vec" - ;; - mips64*-*-linux*) -- targ_defvec=mips_elf32_ntrad_be_vec -- targ_selvecs="mips_elf32_ntrad_le_vec mips_elf32_trad_be_vec mips_elf32_trad_le_vec mips_elf64_trad_be_vec mips_elf64_trad_le_vec" -+ targ_defvec=mips_elf64_trad_be_vec -+ targ_selvecs="mips_elf32_ntrad_be_vec mips_elf32_ntrad_le_vec mips_elf32_trad_be_vec mips_elf32_trad_le_vec mips_elf64_trad_le_vec" - ;; - mips*el-*-linux*) - targ_defvec=mips_elf32_trad_le_vec ---- a/ld/configure.tgt -+++ b/ld/configure.tgt -@@ -531,12 +531,12 @@ mips*-*-vxworks*) targ_emul=elf32ebmipvx - ;; - mips*-*-windiss) targ_emul=elf32mipswindiss - ;; --mips64*el-*-linux-*) targ_emul=elf32ltsmipn32 -- targ_extra_emuls="elf32btsmipn32 elf32ltsmip elf32btsmip elf64ltsmip elf64btsmip" -+mips64*el-*-linux-*) targ_emul=elf64ltsmip -+ targ_extra_emuls="elf32btsmipn32 elf32ltsmipn32 elf32ltsmip elf32btsmip elf64btsmip" - targ_extra_libpath=$targ_extra_emuls - ;; --mips64*-*-linux-*) targ_emul=elf32btsmipn32 -- targ_extra_emuls="elf32ltsmipn32 elf32btsmip elf32ltsmip elf64btsmip elf64ltsmip" -+mips64*-*-linux-*) targ_emul=elf64btsmip -+ targ_extra_emuls="elf32btsmipn32 elf32ltsmipn32 elf32btsmip elf32ltsmip elf64ltsmip" - targ_extra_libpath=$targ_extra_emuls - ;; - mips*el-*-linux-*) targ_emul=elf32ltsmip diff --git a/toolchain/binutils/patches/2.36.1/300-001_ld_makefile_patch.patch b/toolchain/binutils/patches/2.36.1/300-001_ld_makefile_patch.patch deleted file mode 100644 index f1cbb8198..000000000 --- a/toolchain/binutils/patches/2.36.1/300-001_ld_makefile_patch.patch +++ /dev/null @@ -1,22 +0,0 @@ ---- a/ld/Makefile.am -+++ b/ld/Makefile.am -@@ -50,7 +50,7 @@ AM_CFLAGS = $(WARN_CFLAGS) $(ELF_CLFAGS) - # We put the scripts in the directory $(scriptdir)/ldscripts. - # We can't put the scripts in $(datadir) because the SEARCH_DIR - # directives need to be different for native and cross linkers. --scriptdir = $(tooldir)/lib -+scriptdir = $(libdir) - - EMUL = @EMUL@ - EMULATION_OFILES = @EMULATION_OFILES@ ---- a/ld/Makefile.in -+++ b/ld/Makefile.in -@@ -561,7 +561,7 @@ AM_CFLAGS = $(WARN_CFLAGS) $(ELF_CLFAGS) - # We put the scripts in the directory $(scriptdir)/ldscripts. - # We can't put the scripts in $(datadir) because the SEARCH_DIR - # directives need to be different for native and cross linkers. --scriptdir = $(tooldir)/lib -+scriptdir = $(libdir) - BASEDIR = $(srcdir)/.. - BFDDIR = $(BASEDIR)/bfd - INCDIR = $(BASEDIR)/include diff --git a/toolchain/binutils/patches/2.36.1/400-mips_no_dynamic_linking_sym.patch b/toolchain/binutils/patches/2.36.1/400-mips_no_dynamic_linking_sym.patch deleted file mode 100644 index b426dabc9..000000000 --- a/toolchain/binutils/patches/2.36.1/400-mips_no_dynamic_linking_sym.patch +++ /dev/null @@ -1,18 +0,0 @@ ---- a/bfd/elfxx-mips.c -+++ b/bfd/elfxx-mips.c -@@ -8053,6 +8053,7 @@ _bfd_mips_elf_create_dynamic_sections (b - - name = SGI_COMPAT (abfd) ? "_DYNAMIC_LINK" : "_DYNAMIC_LINKING"; - bh = NULL; -+ if (0) { - if (!(_bfd_generic_link_add_one_symbol - (info, abfd, name, BSF_GLOBAL, bfd_abs_section_ptr, 0, - NULL, FALSE, get_elf_backend_data (abfd)->collect, &bh))) -@@ -8065,6 +8066,7 @@ _bfd_mips_elf_create_dynamic_sections (b - - if (! bfd_elf_link_record_dynamic_symbol (info, h)) - return FALSE; -+ } - - if (! mips_elf_hash_table (info)->use_rld_obj_head) - { diff --git a/toolchain/binutils/patches/2.36.1/500-Change-default-emulation-for-mips64-linux.patch b/toolchain/binutils/patches/2.36.1/500-Change-default-emulation-for-mips64-linux.patch deleted file mode 100644 index fb3f14262..000000000 --- a/toolchain/binutils/patches/2.36.1/500-Change-default-emulation-for-mips64-linux.patch +++ /dev/null @@ -1,38 +0,0 @@ ---- a/bfd/config.bfd -+++ b/bfd/config.bfd -@@ -896,12 +896,12 @@ case "${targ}" in - targ_selvecs="mips_elf32_le_vec mips_elf64_be_vec mips_elf64_le_vec mips_ecoff_be_vec mips_ecoff_le_vec" - ;; - mips64*el-*-linux*) -- targ_defvec=mips_elf32_ntrad_le_vec -- targ_selvecs="mips_elf32_ntrad_be_vec mips_elf32_trad_le_vec mips_elf32_trad_be_vec mips_elf64_trad_le_vec mips_elf64_trad_be_vec" -+ targ_defvec=mips_elf64_trad_le_vec -+ targ_selvecs="mips_elf32_ntrad_le_vec mips_elf32_ntrad_be_vec mips_elf32_trad_le_vec mips_elf32_trad_be_vec mips_elf64_trad_be_vec" - ;; - mips64*-*-linux*) -- targ_defvec=mips_elf32_ntrad_be_vec -- targ_selvecs="mips_elf32_ntrad_le_vec mips_elf32_trad_be_vec mips_elf32_trad_le_vec mips_elf64_trad_be_vec mips_elf64_trad_le_vec" -+ targ_defvec=mips_elf64_trad_be_vec -+ targ_selvecs="mips_elf32_ntrad_be_vec mips_elf32_ntrad_le_vec mips_elf32_trad_be_vec mips_elf32_trad_le_vec mips_elf64_trad_le_vec" - ;; - mips*el-*-linux*) - targ_defvec=mips_elf32_trad_le_vec ---- a/ld/configure.tgt -+++ b/ld/configure.tgt -@@ -531,12 +531,12 @@ mips*-*-vxworks*) targ_emul=elf32ebmipvx - ;; - mips*-*-windiss) targ_emul=elf32mipswindiss - ;; --mips64*el-*-linux-*) targ_emul=elf32ltsmipn32 -- targ_extra_emuls="elf32btsmipn32 elf32ltsmip elf32btsmip elf64ltsmip elf64btsmip" -+mips64*el-*-linux-*) targ_emul=elf64ltsmip -+ targ_extra_emuls="elf32btsmipn32 elf32ltsmipn32 elf32ltsmip elf32btsmip elf64btsmip" - targ_extra_libpath=$targ_extra_emuls - ;; --mips64*-*-linux-*) targ_emul=elf32btsmipn32 -- targ_extra_emuls="elf32ltsmipn32 elf32btsmip elf32ltsmip elf64btsmip elf64ltsmip" -+mips64*-*-linux-*) targ_emul=elf64btsmip -+ targ_extra_emuls="elf32btsmipn32 elf32ltsmipn32 elf32btsmip elf32ltsmip elf64ltsmip" - targ_extra_libpath=$targ_extra_emuls - ;; - mips*el-*-linux-*) targ_emul=elf32ltsmip diff --git a/toolchain/gcc/Config.in b/toolchain/gcc/Config.in index 83a3fe7d5..69eacaef9 100644 --- a/toolchain/gcc/Config.in +++ b/toolchain/gcc/Config.in @@ -7,16 +7,9 @@ choice help Select the version of gcc you wish to use. - config GCC_USE_VERSION_7 - bool "gcc 7.x" - depends on !arc - config GCC_USE_VERSION_8 bool "gcc 8.x" - config GCC_USE_VERSION_9 - bool "gcc 9.x" - config GCC_USE_VERSION_10 bool "gcc 10.x" diff --git a/toolchain/gcc/Config.version b/toolchain/gcc/Config.version index 516b9e14d..8bfb17d03 100644 --- a/toolchain/gcc/Config.version +++ b/toolchain/gcc/Config.version @@ -1,16 +1,8 @@ -config GCC_VERSION_7 - default y if GCC_USE_VERSION_7 - bool - config GCC_VERSION_8 default y if GCC_USE_VERSION_8 default y if mips || mipsel || mips64 || mips64el bool -config GCC_VERSION_9 - default y if GCC_USE_VERSION_9 - bool - config GCC_VERSION_10 default y if GCC_USE_VERSION_10 bool @@ -21,14 +13,7 @@ config GCC_VERSION_12 config GCC_VERSION string - default "7.5.0" if GCC_VERSION_7 default "8.4.0" if GCC_VERSION_8 - default "9.3.0" if GCC_VERSION_9 default "10.3.0" if GCC_VERSION_10 default "12.2.0" if GCC_VERSION_12 default "11.3.0" - -config GCC_USE_IREMAP - bool - default y if GCC_USE_VERSION_7 - default n diff --git a/toolchain/gcc/common.mk b/toolchain/gcc/common.mk index 58a5d80c0..e7d45bcb6 100644 --- a/toolchain/gcc/common.mk +++ b/toolchain/gcc/common.mk @@ -23,23 +23,16 @@ include $(TOPDIR)/rules.mk PKG_NAME:=gcc GCC_VERSION:=$(call qstrip,$(CONFIG_GCC_VERSION)) PKG_VERSION:=$(firstword $(subst +, ,$(GCC_VERSION))) +GCC_MAJOR_VERSION:=$(word 1,$(subst ., ,$(PKG_VERSION))) GCC_DIR:=$(PKG_NAME)-$(PKG_VERSION) PKG_SOURCE_URL:=@GNU/gcc/gcc-$(PKG_VERSION) PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz -ifeq ($(PKG_VERSION),7.5.0) - PKG_HASH:=b81946e7f01f90528a1f7352ab08cc602b9ccc05d4e44da4bd501c5a189ee661 -endif - ifeq ($(PKG_VERSION),8.4.0) PKG_HASH:=e30a6e52d10e1f27ed55104ad233c30bd1e99cfb5ff98ab022dc941edd1b2dd4 endif -ifeq ($(PKG_VERSION),9.3.0) - PKG_HASH:=71e197867611f6054aa1119b13a0c0abac12834765fe2d81f35ac57f84f742d1 -endif - ifeq ($(PKG_VERSION),10.3.0) PKG_HASH:=64f404c1a650f27fc33da242e1f2df54952e3963a49e06e73f6940f3223ac344 endif @@ -52,7 +45,7 @@ ifeq ($(PKG_VERSION),12.2.0) PKG_HASH:=e549cf9cf3594a00e27b6589d4322d70e0720cdd213f39beb4181e06926230ff endif -PATCH_DIR=../patches/$(GCC_VERSION) +PATCH_DIR=../patches-$(GCC_MAJOR_VERSION).x BUGURL=http://bugs.openwrt.org/ PKGVERSION=OpenWrt GCC $(PKG_VERSION) $(REVISION) diff --git a/toolchain/gcc/patches/10.3.0/002-case_insensitive.patch b/toolchain/gcc/patches-10.x/002-case_insensitive.patch similarity index 100% rename from toolchain/gcc/patches/10.3.0/002-case_insensitive.patch rename to toolchain/gcc/patches-10.x/002-case_insensitive.patch diff --git a/toolchain/gcc/patches/10.3.0/010-documentation.patch b/toolchain/gcc/patches-10.x/010-documentation.patch similarity index 100% rename from toolchain/gcc/patches/10.3.0/010-documentation.patch rename to toolchain/gcc/patches-10.x/010-documentation.patch diff --git a/toolchain/gcc/patches/10.3.0/110-Fix-MIPS-PR-84790.patch b/toolchain/gcc/patches-10.x/110-Fix-MIPS-PR-84790.patch similarity index 100% rename from toolchain/gcc/patches/10.3.0/110-Fix-MIPS-PR-84790.patch rename to toolchain/gcc/patches-10.x/110-Fix-MIPS-PR-84790.patch diff --git a/toolchain/gcc/patches/10.3.0/230-musl_libssp.patch b/toolchain/gcc/patches-10.x/230-musl_libssp.patch similarity index 100% rename from toolchain/gcc/patches/10.3.0/230-musl_libssp.patch rename to toolchain/gcc/patches-10.x/230-musl_libssp.patch diff --git a/toolchain/gcc/patches/10.3.0/300-mips_Os_cpu_rtx_cost_model.patch b/toolchain/gcc/patches-10.x/300-mips_Os_cpu_rtx_cost_model.patch similarity index 100% rename from toolchain/gcc/patches/10.3.0/300-mips_Os_cpu_rtx_cost_model.patch rename to toolchain/gcc/patches-10.x/300-mips_Os_cpu_rtx_cost_model.patch diff --git a/toolchain/gcc/patches/10.3.0/810-arm-softfloat-libgcc.patch b/toolchain/gcc/patches-10.x/810-arm-softfloat-libgcc.patch similarity index 100% rename from toolchain/gcc/patches/10.3.0/810-arm-softfloat-libgcc.patch rename to toolchain/gcc/patches-10.x/810-arm-softfloat-libgcc.patch diff --git a/toolchain/gcc/patches/10.3.0/820-libgcc_pic.patch b/toolchain/gcc/patches-10.x/820-libgcc_pic.patch similarity index 100% rename from toolchain/gcc/patches/10.3.0/820-libgcc_pic.patch rename to toolchain/gcc/patches-10.x/820-libgcc_pic.patch diff --git a/toolchain/gcc/patches/10.3.0/840-armv4_pass_fix-v4bx_to_ld.patch b/toolchain/gcc/patches-10.x/840-armv4_pass_fix-v4bx_to_ld.patch similarity index 100% rename from toolchain/gcc/patches/10.3.0/840-armv4_pass_fix-v4bx_to_ld.patch rename to toolchain/gcc/patches-10.x/840-armv4_pass_fix-v4bx_to_ld.patch diff --git a/toolchain/gcc/patches/10.3.0/850-use_shared_libgcc.patch b/toolchain/gcc/patches-10.x/850-use_shared_libgcc.patch similarity index 100% rename from toolchain/gcc/patches/10.3.0/850-use_shared_libgcc.patch rename to toolchain/gcc/patches-10.x/850-use_shared_libgcc.patch diff --git a/toolchain/gcc/patches/10.3.0/851-libgcc_no_compat.patch b/toolchain/gcc/patches-10.x/851-libgcc_no_compat.patch similarity index 100% rename from toolchain/gcc/patches/10.3.0/851-libgcc_no_compat.patch rename to toolchain/gcc/patches-10.x/851-libgcc_no_compat.patch diff --git a/toolchain/gcc/patches/10.3.0/870-ppc_no_crtsavres.patch b/toolchain/gcc/patches-10.x/870-ppc_no_crtsavres.patch similarity index 100% rename from toolchain/gcc/patches/10.3.0/870-ppc_no_crtsavres.patch rename to toolchain/gcc/patches-10.x/870-ppc_no_crtsavres.patch diff --git a/toolchain/gcc/patches/10.3.0/881-no_tm_section.patch b/toolchain/gcc/patches-10.x/881-no_tm_section.patch similarity index 100% rename from toolchain/gcc/patches/10.3.0/881-no_tm_section.patch rename to toolchain/gcc/patches-10.x/881-no_tm_section.patch diff --git a/toolchain/gcc/patches/10.3.0/900-bad-mips16-crt.patch b/toolchain/gcc/patches-10.x/900-bad-mips16-crt.patch similarity index 100% rename from toolchain/gcc/patches/10.3.0/900-bad-mips16-crt.patch rename to toolchain/gcc/patches-10.x/900-bad-mips16-crt.patch diff --git a/toolchain/gcc/patches/10.3.0/910-mbsd_multi.patch b/toolchain/gcc/patches-10.x/910-mbsd_multi.patch similarity index 100% rename from toolchain/gcc/patches/10.3.0/910-mbsd_multi.patch rename to toolchain/gcc/patches-10.x/910-mbsd_multi.patch diff --git a/toolchain/gcc/patches/10.3.0/920-specs_nonfatal_getenv.patch b/toolchain/gcc/patches-10.x/920-specs_nonfatal_getenv.patch similarity index 100% rename from toolchain/gcc/patches/10.3.0/920-specs_nonfatal_getenv.patch rename to toolchain/gcc/patches-10.x/920-specs_nonfatal_getenv.patch diff --git a/toolchain/gcc/patches/10.3.0/930-fix-mips-noexecstack.patch b/toolchain/gcc/patches-10.x/930-fix-mips-noexecstack.patch similarity index 100% rename from toolchain/gcc/patches/10.3.0/930-fix-mips-noexecstack.patch rename to toolchain/gcc/patches-10.x/930-fix-mips-noexecstack.patch diff --git a/toolchain/gcc/patches/10.3.0/931-libffi-fix-MIPS-softfloat-build-issue.patch b/toolchain/gcc/patches-10.x/931-libffi-fix-MIPS-softfloat-build-issue.patch similarity index 100% rename from toolchain/gcc/patches/10.3.0/931-libffi-fix-MIPS-softfloat-build-issue.patch rename to toolchain/gcc/patches-10.x/931-libffi-fix-MIPS-softfloat-build-issue.patch diff --git a/toolchain/gcc/patches/10.3.0/960-gotools-fix-compilation-when-making-cross-compiler.patch b/toolchain/gcc/patches-10.x/960-gotools-fix-compilation-when-making-cross-compiler.patch similarity index 100% rename from toolchain/gcc/patches/10.3.0/960-gotools-fix-compilation-when-making-cross-compiler.patch rename to toolchain/gcc/patches-10.x/960-gotools-fix-compilation-when-making-cross-compiler.patch diff --git a/toolchain/gcc/patches/11.3.0/002-case_insensitive.patch b/toolchain/gcc/patches-11.x/002-case_insensitive.patch similarity index 100% rename from toolchain/gcc/patches/11.3.0/002-case_insensitive.patch rename to toolchain/gcc/patches-11.x/002-case_insensitive.patch diff --git a/toolchain/gcc/patches/11.3.0/010-documentation.patch b/toolchain/gcc/patches-11.x/010-documentation.patch similarity index 100% rename from toolchain/gcc/patches/11.3.0/010-documentation.patch rename to toolchain/gcc/patches-11.x/010-documentation.patch diff --git a/toolchain/gcc/patches/11.3.0/011-v12-configure-define-TARGET_LIBC_GNUSTACK-on-musl.patch b/toolchain/gcc/patches-11.x/011-v12-configure-define-TARGET_LIBC_GNUSTACK-on-musl.patch similarity index 100% rename from toolchain/gcc/patches/11.3.0/011-v12-configure-define-TARGET_LIBC_GNUSTACK-on-musl.patch rename to toolchain/gcc/patches-11.x/011-v12-configure-define-TARGET_LIBC_GNUSTACK-on-musl.patch diff --git a/toolchain/gcc/patches/11.3.0/110-Fix-MIPS-PR-84790.patch b/toolchain/gcc/patches-11.x/110-Fix-MIPS-PR-84790.patch similarity index 100% rename from toolchain/gcc/patches/11.3.0/110-Fix-MIPS-PR-84790.patch rename to toolchain/gcc/patches-11.x/110-Fix-MIPS-PR-84790.patch diff --git a/toolchain/gcc/patches/11.3.0/230-musl_libssp.patch b/toolchain/gcc/patches-11.x/230-musl_libssp.patch similarity index 100% rename from toolchain/gcc/patches/11.3.0/230-musl_libssp.patch rename to toolchain/gcc/patches-11.x/230-musl_libssp.patch diff --git a/toolchain/gcc/patches/11.3.0/300-mips_Os_cpu_rtx_cost_model.patch b/toolchain/gcc/patches-11.x/300-mips_Os_cpu_rtx_cost_model.patch similarity index 100% rename from toolchain/gcc/patches/11.3.0/300-mips_Os_cpu_rtx_cost_model.patch rename to toolchain/gcc/patches-11.x/300-mips_Os_cpu_rtx_cost_model.patch diff --git a/toolchain/gcc/patches/11.3.0/810-arm-softfloat-libgcc.patch b/toolchain/gcc/patches-11.x/810-arm-softfloat-libgcc.patch similarity index 100% rename from toolchain/gcc/patches/11.3.0/810-arm-softfloat-libgcc.patch rename to toolchain/gcc/patches-11.x/810-arm-softfloat-libgcc.patch diff --git a/toolchain/gcc/patches/11.3.0/820-libgcc_pic.patch b/toolchain/gcc/patches-11.x/820-libgcc_pic.patch similarity index 100% rename from toolchain/gcc/patches/11.3.0/820-libgcc_pic.patch rename to toolchain/gcc/patches-11.x/820-libgcc_pic.patch diff --git a/toolchain/gcc/patches/11.3.0/840-armv4_pass_fix-v4bx_to_ld.patch b/toolchain/gcc/patches-11.x/840-armv4_pass_fix-v4bx_to_ld.patch similarity index 100% rename from toolchain/gcc/patches/11.3.0/840-armv4_pass_fix-v4bx_to_ld.patch rename to toolchain/gcc/patches-11.x/840-armv4_pass_fix-v4bx_to_ld.patch diff --git a/toolchain/gcc/patches/11.3.0/850-use_shared_libgcc.patch b/toolchain/gcc/patches-11.x/850-use_shared_libgcc.patch similarity index 100% rename from toolchain/gcc/patches/11.3.0/850-use_shared_libgcc.patch rename to toolchain/gcc/patches-11.x/850-use_shared_libgcc.patch diff --git a/toolchain/gcc/patches/11.3.0/851-libgcc_no_compat.patch b/toolchain/gcc/patches-11.x/851-libgcc_no_compat.patch similarity index 100% rename from toolchain/gcc/patches/11.3.0/851-libgcc_no_compat.patch rename to toolchain/gcc/patches-11.x/851-libgcc_no_compat.patch diff --git a/toolchain/gcc/patches/11.3.0/870-ppc_no_crtsavres.patch b/toolchain/gcc/patches-11.x/870-ppc_no_crtsavres.patch similarity index 100% rename from toolchain/gcc/patches/11.3.0/870-ppc_no_crtsavres.patch rename to toolchain/gcc/patches-11.x/870-ppc_no_crtsavres.patch diff --git a/toolchain/gcc/patches/11.3.0/881-no_tm_section.patch b/toolchain/gcc/patches-11.x/881-no_tm_section.patch similarity index 100% rename from toolchain/gcc/patches/11.3.0/881-no_tm_section.patch rename to toolchain/gcc/patches-11.x/881-no_tm_section.patch diff --git a/toolchain/gcc/patches/11.3.0/900-bad-mips16-crt.patch b/toolchain/gcc/patches-11.x/900-bad-mips16-crt.patch similarity index 100% rename from toolchain/gcc/patches/11.3.0/900-bad-mips16-crt.patch rename to toolchain/gcc/patches-11.x/900-bad-mips16-crt.patch diff --git a/toolchain/gcc/patches/11.3.0/910-mbsd_multi.patch b/toolchain/gcc/patches-11.x/910-mbsd_multi.patch similarity index 100% rename from toolchain/gcc/patches/11.3.0/910-mbsd_multi.patch rename to toolchain/gcc/patches-11.x/910-mbsd_multi.patch diff --git a/toolchain/gcc/patches/11.3.0/920-specs_nonfatal_getenv.patch b/toolchain/gcc/patches-11.x/920-specs_nonfatal_getenv.patch similarity index 100% rename from toolchain/gcc/patches/11.3.0/920-specs_nonfatal_getenv.patch rename to toolchain/gcc/patches-11.x/920-specs_nonfatal_getenv.patch diff --git a/toolchain/gcc/patches/11.3.0/931-libffi-fix-MIPS-softfloat-build-issue.patch b/toolchain/gcc/patches-11.x/931-libffi-fix-MIPS-softfloat-build-issue.patch similarity index 100% rename from toolchain/gcc/patches/11.3.0/931-libffi-fix-MIPS-softfloat-build-issue.patch rename to toolchain/gcc/patches-11.x/931-libffi-fix-MIPS-softfloat-build-issue.patch diff --git a/toolchain/gcc/patches/11.3.0/960-gotools-fix-compilation-when-making-cross-compiler.patch b/toolchain/gcc/patches-11.x/960-gotools-fix-compilation-when-making-cross-compiler.patch similarity index 100% rename from toolchain/gcc/patches/11.3.0/960-gotools-fix-compilation-when-making-cross-compiler.patch rename to toolchain/gcc/patches-11.x/960-gotools-fix-compilation-when-making-cross-compiler.patch diff --git a/toolchain/gcc/patches/11.3.0/970-macos_arm64-building-fix.patch b/toolchain/gcc/patches-11.x/970-macos_arm64-building-fix.patch similarity index 100% rename from toolchain/gcc/patches/11.3.0/970-macos_arm64-building-fix.patch rename to toolchain/gcc/patches-11.x/970-macos_arm64-building-fix.patch diff --git a/toolchain/gcc/patches/12.2.0/002-case_insensitive.patch b/toolchain/gcc/patches-12.x/002-case_insensitive.patch similarity index 100% rename from toolchain/gcc/patches/12.2.0/002-case_insensitive.patch rename to toolchain/gcc/patches-12.x/002-case_insensitive.patch diff --git a/toolchain/gcc/patches/12.2.0/010-documentation.patch b/toolchain/gcc/patches-12.x/010-documentation.patch similarity index 100% rename from toolchain/gcc/patches/12.2.0/010-documentation.patch rename to toolchain/gcc/patches-12.x/010-documentation.patch diff --git a/toolchain/gcc/patches/12.2.0/110-Fix-MIPS-PR-84790.patch b/toolchain/gcc/patches-12.x/110-Fix-MIPS-PR-84790.patch similarity index 100% rename from toolchain/gcc/patches/12.2.0/110-Fix-MIPS-PR-84790.patch rename to toolchain/gcc/patches-12.x/110-Fix-MIPS-PR-84790.patch diff --git a/toolchain/gcc/patches/12.2.0/230-musl_libssp.patch b/toolchain/gcc/patches-12.x/230-musl_libssp.patch similarity index 100% rename from toolchain/gcc/patches/12.2.0/230-musl_libssp.patch rename to toolchain/gcc/patches-12.x/230-musl_libssp.patch diff --git a/toolchain/gcc/patches/12.2.0/300-mips_Os_cpu_rtx_cost_model.patch b/toolchain/gcc/patches-12.x/300-mips_Os_cpu_rtx_cost_model.patch similarity index 100% rename from toolchain/gcc/patches/12.2.0/300-mips_Os_cpu_rtx_cost_model.patch rename to toolchain/gcc/patches-12.x/300-mips_Os_cpu_rtx_cost_model.patch diff --git a/toolchain/gcc/patches/12.2.0/810-arm-softfloat-libgcc.patch b/toolchain/gcc/patches-12.x/810-arm-softfloat-libgcc.patch similarity index 100% rename from toolchain/gcc/patches/12.2.0/810-arm-softfloat-libgcc.patch rename to toolchain/gcc/patches-12.x/810-arm-softfloat-libgcc.patch diff --git a/toolchain/gcc/patches/12.2.0/820-libgcc_pic.patch b/toolchain/gcc/patches-12.x/820-libgcc_pic.patch similarity index 100% rename from toolchain/gcc/patches/12.2.0/820-libgcc_pic.patch rename to toolchain/gcc/patches-12.x/820-libgcc_pic.patch diff --git a/toolchain/gcc/patches/12.2.0/840-armv4_pass_fix-v4bx_to_ld.patch b/toolchain/gcc/patches-12.x/840-armv4_pass_fix-v4bx_to_ld.patch similarity index 100% rename from toolchain/gcc/patches/12.2.0/840-armv4_pass_fix-v4bx_to_ld.patch rename to toolchain/gcc/patches-12.x/840-armv4_pass_fix-v4bx_to_ld.patch diff --git a/toolchain/gcc/patches/12.2.0/850-use_shared_libgcc.patch b/toolchain/gcc/patches-12.x/850-use_shared_libgcc.patch similarity index 100% rename from toolchain/gcc/patches/12.2.0/850-use_shared_libgcc.patch rename to toolchain/gcc/patches-12.x/850-use_shared_libgcc.patch diff --git a/toolchain/gcc/patches/12.2.0/851-libgcc_no_compat.patch b/toolchain/gcc/patches-12.x/851-libgcc_no_compat.patch similarity index 100% rename from toolchain/gcc/patches/12.2.0/851-libgcc_no_compat.patch rename to toolchain/gcc/patches-12.x/851-libgcc_no_compat.patch diff --git a/toolchain/gcc/patches/12.2.0/870-ppc_no_crtsavres.patch b/toolchain/gcc/patches-12.x/870-ppc_no_crtsavres.patch similarity index 100% rename from toolchain/gcc/patches/12.2.0/870-ppc_no_crtsavres.patch rename to toolchain/gcc/patches-12.x/870-ppc_no_crtsavres.patch diff --git a/toolchain/gcc/patches/12.2.0/881-no_tm_section.patch b/toolchain/gcc/patches-12.x/881-no_tm_section.patch similarity index 100% rename from toolchain/gcc/patches/12.2.0/881-no_tm_section.patch rename to toolchain/gcc/patches-12.x/881-no_tm_section.patch diff --git a/toolchain/gcc/patches/12.2.0/900-bad-mips16-crt.patch b/toolchain/gcc/patches-12.x/900-bad-mips16-crt.patch similarity index 100% rename from toolchain/gcc/patches/12.2.0/900-bad-mips16-crt.patch rename to toolchain/gcc/patches-12.x/900-bad-mips16-crt.patch diff --git a/toolchain/gcc/patches/12.2.0/910-mbsd_multi.patch b/toolchain/gcc/patches-12.x/910-mbsd_multi.patch similarity index 100% rename from toolchain/gcc/patches/12.2.0/910-mbsd_multi.patch rename to toolchain/gcc/patches-12.x/910-mbsd_multi.patch diff --git a/toolchain/gcc/patches/12.2.0/920-specs_nonfatal_getenv.patch b/toolchain/gcc/patches-12.x/920-specs_nonfatal_getenv.patch similarity index 100% rename from toolchain/gcc/patches/12.2.0/920-specs_nonfatal_getenv.patch rename to toolchain/gcc/patches-12.x/920-specs_nonfatal_getenv.patch diff --git a/toolchain/gcc/patches/12.2.0/960-gotools-fix-compilation-when-making-cross-compiler.patch b/toolchain/gcc/patches-12.x/960-gotools-fix-compilation-when-making-cross-compiler.patch similarity index 100% rename from toolchain/gcc/patches/12.2.0/960-gotools-fix-compilation-when-making-cross-compiler.patch rename to toolchain/gcc/patches-12.x/960-gotools-fix-compilation-when-making-cross-compiler.patch diff --git a/toolchain/gcc/patches/12.2.0/970-macos_arm64-building-fix.patch b/toolchain/gcc/patches-12.x/970-macos_arm64-building-fix.patch similarity index 100% rename from toolchain/gcc/patches/12.2.0/970-macos_arm64-building-fix.patch rename to toolchain/gcc/patches-12.x/970-macos_arm64-building-fix.patch diff --git a/toolchain/gcc/patches/7.5.0/002-case_insensitive.patch b/toolchain/gcc/patches-8.x/002-case_insensitive.patch similarity index 100% rename from toolchain/gcc/patches/7.5.0/002-case_insensitive.patch rename to toolchain/gcc/patches-8.x/002-case_insensitive.patch diff --git a/toolchain/gcc/patches/8.4.0/010-documentation.patch b/toolchain/gcc/patches-8.x/010-documentation.patch similarity index 100% rename from toolchain/gcc/patches/8.4.0/010-documentation.patch rename to toolchain/gcc/patches-8.x/010-documentation.patch diff --git a/toolchain/gcc/patches/8.4.0/110-Fix-MIPS-PR-84790.patch b/toolchain/gcc/patches-8.x/110-Fix-MIPS-PR-84790.patch similarity index 100% rename from toolchain/gcc/patches/8.4.0/110-Fix-MIPS-PR-84790.patch rename to toolchain/gcc/patches-8.x/110-Fix-MIPS-PR-84790.patch diff --git a/toolchain/gcc/patches/8.4.0/230-musl_libssp.patch b/toolchain/gcc/patches-8.x/230-musl_libssp.patch similarity index 100% rename from toolchain/gcc/patches/8.4.0/230-musl_libssp.patch rename to toolchain/gcc/patches-8.x/230-musl_libssp.patch diff --git a/toolchain/gcc/patches/8.4.0/300-mips_Os_cpu_rtx_cost_model.patch b/toolchain/gcc/patches-8.x/300-mips_Os_cpu_rtx_cost_model.patch similarity index 100% rename from toolchain/gcc/patches/8.4.0/300-mips_Os_cpu_rtx_cost_model.patch rename to toolchain/gcc/patches-8.x/300-mips_Os_cpu_rtx_cost_model.patch diff --git a/toolchain/gcc/patches/8.4.0/800-arm_v5te_no_ldrd_strd.patch b/toolchain/gcc/patches-8.x/800-arm_v5te_no_ldrd_strd.patch similarity index 100% rename from toolchain/gcc/patches/8.4.0/800-arm_v5te_no_ldrd_strd.patch rename to toolchain/gcc/patches-8.x/800-arm_v5te_no_ldrd_strd.patch diff --git a/toolchain/gcc/patches/7.5.0/810-arm-softfloat-libgcc.patch b/toolchain/gcc/patches-8.x/810-arm-softfloat-libgcc.patch similarity index 100% rename from toolchain/gcc/patches/7.5.0/810-arm-softfloat-libgcc.patch rename to toolchain/gcc/patches-8.x/810-arm-softfloat-libgcc.patch diff --git a/toolchain/gcc/patches/8.4.0/820-libgcc_pic.patch b/toolchain/gcc/patches-8.x/820-libgcc_pic.patch similarity index 100% rename from toolchain/gcc/patches/8.4.0/820-libgcc_pic.patch rename to toolchain/gcc/patches-8.x/820-libgcc_pic.patch diff --git a/toolchain/gcc/patches/7.5.0/840-armv4_pass_fix-v4bx_to_ld.patch b/toolchain/gcc/patches-8.x/840-armv4_pass_fix-v4bx_to_ld.patch similarity index 100% rename from toolchain/gcc/patches/7.5.0/840-armv4_pass_fix-v4bx_to_ld.patch rename to toolchain/gcc/patches-8.x/840-armv4_pass_fix-v4bx_to_ld.patch diff --git a/toolchain/gcc/patches/8.4.0/850-use_shared_libgcc.patch b/toolchain/gcc/patches-8.x/850-use_shared_libgcc.patch similarity index 100% rename from toolchain/gcc/patches/8.4.0/850-use_shared_libgcc.patch rename to toolchain/gcc/patches-8.x/850-use_shared_libgcc.patch diff --git a/toolchain/gcc/patches/7.5.0/851-libgcc_no_compat.patch b/toolchain/gcc/patches-8.x/851-libgcc_no_compat.patch similarity index 100% rename from toolchain/gcc/patches/7.5.0/851-libgcc_no_compat.patch rename to toolchain/gcc/patches-8.x/851-libgcc_no_compat.patch diff --git a/toolchain/gcc/patches/8.4.0/870-ppc_no_crtsavres.patch b/toolchain/gcc/patches-8.x/870-ppc_no_crtsavres.patch similarity index 100% rename from toolchain/gcc/patches/8.4.0/870-ppc_no_crtsavres.patch rename to toolchain/gcc/patches-8.x/870-ppc_no_crtsavres.patch diff --git a/toolchain/gcc/patches/8.4.0/881-no_tm_section.patch b/toolchain/gcc/patches-8.x/881-no_tm_section.patch similarity index 100% rename from toolchain/gcc/patches/8.4.0/881-no_tm_section.patch rename to toolchain/gcc/patches-8.x/881-no_tm_section.patch diff --git a/toolchain/gcc/patches/8.4.0/900-bad-mips16-crt.patch b/toolchain/gcc/patches-8.x/900-bad-mips16-crt.patch similarity index 100% rename from toolchain/gcc/patches/8.4.0/900-bad-mips16-crt.patch rename to toolchain/gcc/patches-8.x/900-bad-mips16-crt.patch diff --git a/toolchain/gcc/patches/8.4.0/910-mbsd_multi.patch b/toolchain/gcc/patches-8.x/910-mbsd_multi.patch similarity index 100% rename from toolchain/gcc/patches/8.4.0/910-mbsd_multi.patch rename to toolchain/gcc/patches-8.x/910-mbsd_multi.patch diff --git a/toolchain/gcc/patches/8.4.0/920-specs_nonfatal_getenv.patch b/toolchain/gcc/patches-8.x/920-specs_nonfatal_getenv.patch similarity index 100% rename from toolchain/gcc/patches/8.4.0/920-specs_nonfatal_getenv.patch rename to toolchain/gcc/patches-8.x/920-specs_nonfatal_getenv.patch diff --git a/toolchain/gcc/patches/8.4.0/930-fix-mips-noexecstack.patch b/toolchain/gcc/patches-8.x/930-fix-mips-noexecstack.patch similarity index 100% rename from toolchain/gcc/patches/8.4.0/930-fix-mips-noexecstack.patch rename to toolchain/gcc/patches-8.x/930-fix-mips-noexecstack.patch diff --git a/toolchain/gcc/patches/8.4.0/931-libffi-fix-MIPS-softfloat-build-issue.patch b/toolchain/gcc/patches-8.x/931-libffi-fix-MIPS-softfloat-build-issue.patch similarity index 100% rename from toolchain/gcc/patches/8.4.0/931-libffi-fix-MIPS-softfloat-build-issue.patch rename to toolchain/gcc/patches-8.x/931-libffi-fix-MIPS-softfloat-build-issue.patch diff --git a/toolchain/gcc/patches/8.4.0/960-gotools-fix-compilation-when-making-cross-compiler.patch b/toolchain/gcc/patches-8.x/960-gotools-fix-compilation-when-making-cross-compiler.patch similarity index 100% rename from toolchain/gcc/patches/8.4.0/960-gotools-fix-compilation-when-making-cross-compiler.patch rename to toolchain/gcc/patches-8.x/960-gotools-fix-compilation-when-making-cross-compiler.patch diff --git a/toolchain/gcc/patches/8.4.0/999-fix-apple-silicon-support.patch b/toolchain/gcc/patches-8.x/999-fix-apple-silicon-support.patch similarity index 100% rename from toolchain/gcc/patches/8.4.0/999-fix-apple-silicon-support.patch rename to toolchain/gcc/patches-8.x/999-fix-apple-silicon-support.patch diff --git a/toolchain/gcc/patches/7.5.0/001-revert_register_mode_search.patch b/toolchain/gcc/patches/7.5.0/001-revert_register_mode_search.patch deleted file mode 100644 index 63e3fee00..000000000 --- a/toolchain/gcc/patches/7.5.0/001-revert_register_mode_search.patch +++ /dev/null @@ -1,77 +0,0 @@ -commit 31285a20390a5e53a74a2a71d1b5c82f366ddd5a -Author: Felix Fietkau -Date: Tue May 6 11:49:05 2014 +0000 - - gcc: revert an upstream patch that is causing a regression on powerpc - - https://forum.openwrt.org/viewtopic.php?pid=232494#p232494 - - Signed-off-by: Felix Fietkau - - SVN-Revision: 40709 - -Revert of: - -commit 275035b56823b26d5fb7e90fad945b998648edf2 -Author: bergner -Date: Thu Sep 5 14:09:07 2013 +0000 - - PR target/58139 - * reginfo.c (choose_hard_reg_mode): Scan through all mode classes - looking for widest mode. - - - git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@202286 138bc75d-0d04-0410-961f-82ee72b054a4 - - ---- a/gcc/reginfo.c -+++ b/gcc/reginfo.c -@@ -637,35 +637,40 @@ choose_hard_reg_mode (unsigned int regno - mode = GET_MODE_WIDER_MODE (mode)) - if ((unsigned) hard_regno_nregs[regno][mode] == nregs - && HARD_REGNO_MODE_OK (regno, mode) -- && (! call_saved || ! HARD_REGNO_CALL_PART_CLOBBERED (regno, mode)) -- && GET_MODE_SIZE (mode) > GET_MODE_SIZE (found_mode)) -+ && (! call_saved || ! HARD_REGNO_CALL_PART_CLOBBERED (regno, mode))) - found_mode = mode; - -+ if (found_mode != VOIDmode) -+ return found_mode; -+ - for (mode = GET_CLASS_NARROWEST_MODE (MODE_FLOAT); - mode != VOIDmode; - mode = GET_MODE_WIDER_MODE (mode)) - if ((unsigned) hard_regno_nregs[regno][mode] == nregs - && HARD_REGNO_MODE_OK (regno, mode) -- && (! call_saved || ! HARD_REGNO_CALL_PART_CLOBBERED (regno, mode)) -- && GET_MODE_SIZE (mode) > GET_MODE_SIZE (found_mode)) -+ && (! call_saved || ! HARD_REGNO_CALL_PART_CLOBBERED (regno, mode))) - found_mode = mode; - -+ if (found_mode != VOIDmode) -+ return found_mode; -+ - for (mode = GET_CLASS_NARROWEST_MODE (MODE_VECTOR_FLOAT); - mode != VOIDmode; - mode = GET_MODE_WIDER_MODE (mode)) - if ((unsigned) hard_regno_nregs[regno][mode] == nregs - && HARD_REGNO_MODE_OK (regno, mode) -- && (! call_saved || ! HARD_REGNO_CALL_PART_CLOBBERED (regno, mode)) -- && GET_MODE_SIZE (mode) > GET_MODE_SIZE (found_mode)) -+ && (! call_saved || ! HARD_REGNO_CALL_PART_CLOBBERED (regno, mode))) - found_mode = mode; - -+ if (found_mode != VOIDmode) -+ return found_mode; -+ - for (mode = GET_CLASS_NARROWEST_MODE (MODE_VECTOR_INT); - mode != VOIDmode; - mode = GET_MODE_WIDER_MODE (mode)) - if ((unsigned) hard_regno_nregs[regno][mode] == nregs - && HARD_REGNO_MODE_OK (regno, mode) -- && (! call_saved || ! HARD_REGNO_CALL_PART_CLOBBERED (regno, mode)) -- && GET_MODE_SIZE (mode) > GET_MODE_SIZE (found_mode)) -+ && (! call_saved || ! HARD_REGNO_CALL_PART_CLOBBERED (regno, mode))) - found_mode = mode; - - if (found_mode != VOIDmode) diff --git a/toolchain/gcc/patches/7.5.0/010-documentation.patch b/toolchain/gcc/patches/7.5.0/010-documentation.patch deleted file mode 100644 index 0106814f4..000000000 --- a/toolchain/gcc/patches/7.5.0/010-documentation.patch +++ /dev/null @@ -1,35 +0,0 @@ -commit 098bd91f5eae625c7d2ee621e10930fc4434e5e2 -Author: Luka Perkov -Date: Tue Feb 26 16:16:33 2013 +0000 - - gcc: don't build documentation - - This closes #13039. - - Signed-off-by: Luka Perkov - - SVN-Revision: 35807 - ---- a/gcc/Makefile.in -+++ b/gcc/Makefile.in -@@ -3121,18 +3121,10 @@ doc/gcc.info: $(TEXI_GCC_FILES) - doc/gccint.info: $(TEXI_GCCINT_FILES) - doc/cppinternals.info: $(TEXI_CPPINT_FILES) - --doc/%.info: %.texi -- if [ x$(BUILD_INFO) = xinfo ]; then \ -- $(MAKEINFO) $(MAKEINFOFLAGS) -I . -I $(gcc_docdir) \ -- -I $(gcc_docdir)/include -o $@ $<; \ -- fi -+doc/%.info: - - # Duplicate entry to handle renaming of gccinstall.info --doc/gccinstall.info: $(TEXI_GCCINSTALL_FILES) -- if [ x$(BUILD_INFO) = xinfo ]; then \ -- $(MAKEINFO) $(MAKEINFOFLAGS) -I $(gcc_docdir) \ -- -I $(gcc_docdir)/include -o $@ $<; \ -- fi -+doc/gccinstall.info: - - doc/cpp.dvi: $(TEXI_CPP_FILES) - doc/gcc.dvi: $(TEXI_GCC_FILES) diff --git a/toolchain/gcc/patches/7.5.0/110-Fix-MIPS-PR-84790.patch b/toolchain/gcc/patches/7.5.0/110-Fix-MIPS-PR-84790.patch deleted file mode 100644 index 643c5e68a..000000000 --- a/toolchain/gcc/patches/7.5.0/110-Fix-MIPS-PR-84790.patch +++ /dev/null @@ -1,20 +0,0 @@ -Fix https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84790. -MIPS16 functions have a static assembler prologue which clobbers -registers v0 and v1. Add these register clobbers to function call -instructions. - ---- a/gcc/config/mips/mips.c -+++ b/gcc/config/mips/mips.c -@@ -3098,6 +3098,12 @@ mips_emit_call_insn (rtx pattern, rtx or - emit_insn (gen_update_got_version ()); - } - -+ if (TARGET_MIPS16 && TARGET_USE_GOT) -+ { -+ clobber_reg (&CALL_INSN_FUNCTION_USAGE (insn), MIPS16_PIC_TEMP); -+ clobber_reg (&CALL_INSN_FUNCTION_USAGE (insn), MIPS_PROLOGUE_TEMP (word_mode)); -+ } -+ - if (TARGET_MIPS16 - && TARGET_EXPLICIT_RELOCS - && TARGET_CALL_CLOBBERED_GP) diff --git a/toolchain/gcc/patches/7.5.0/230-musl_libssp.patch b/toolchain/gcc/patches/7.5.0/230-musl_libssp.patch deleted file mode 100644 index eebee9175..000000000 --- a/toolchain/gcc/patches/7.5.0/230-musl_libssp.patch +++ /dev/null @@ -1,28 +0,0 @@ -commit 1877bc9d8f2be143fbe530347a945850d0ecd234 -Author: Steven Barth -Date: Mon Jun 22 10:31:07 2015 +0000 - - gcc/musl: rework SSP-support - - Make musl provide libssp_nonshared.a and make GCC link it unconditionally - if musl is used. This should be a no-op if SSP is disabled and seems to be - the only reliable way of dealing with SSP over all packages due to the mess - that is linkerflags handling in packages. - - Signed-off-by: Steven Barth - - SVN-Revision: 46108 - ---- a/gcc/gcc.c -+++ b/gcc/gcc.c -@@ -861,7 +861,9 @@ proper position among the other output f - #endif - - #ifndef LINK_SSP_SPEC --#ifdef TARGET_LIBC_PROVIDES_SSP -+#if DEFAULT_LIBC == LIBC_MUSL -+#define LINK_SSP_SPEC "-lssp_nonshared" -+#elif defined(TARGET_LIBC_PROVIDES_SSP) - #define LINK_SSP_SPEC "%{fstack-protector|fstack-protector-all" \ - "|fstack-protector-strong|fstack-protector-explicit:}" - #else diff --git a/toolchain/gcc/patches/7.5.0/300-mips_Os_cpu_rtx_cost_model.patch b/toolchain/gcc/patches/7.5.0/300-mips_Os_cpu_rtx_cost_model.patch deleted file mode 100644 index 2d0ae4613..000000000 --- a/toolchain/gcc/patches/7.5.0/300-mips_Os_cpu_rtx_cost_model.patch +++ /dev/null @@ -1,21 +0,0 @@ -commit ecf7671b769fe96f7b5134be442089f8bdba55d2 -Author: Felix Fietkau -Date: Thu Aug 4 20:29:45 2016 +0200 - -gcc: add a patch to generate better code with Os on mips - -Also happens to reduce compressed code size a bit - -Signed-off-by: Felix Fietkau - ---- a/gcc/config/mips/mips.c -+++ b/gcc/config/mips/mips.c -@@ -19790,7 +19790,7 @@ mips_option_override (void) - flag_pcc_struct_return = 0; - - /* Decide which rtx_costs structure to use. */ -- if (optimize_size) -+ if (0 && optimize_size) - mips_cost = &mips_rtx_cost_optimize_size; - else - mips_cost = &mips_rtx_cost_data[mips_tune]; diff --git a/toolchain/gcc/patches/7.5.0/800-arm_v5te_no_ldrd_strd.patch b/toolchain/gcc/patches/7.5.0/800-arm_v5te_no_ldrd_strd.patch deleted file mode 100644 index 76200a166..000000000 --- a/toolchain/gcc/patches/7.5.0/800-arm_v5te_no_ldrd_strd.patch +++ /dev/null @@ -1,32 +0,0 @@ -commit b050f87d13b5dc7ed82feb9a90f4529de58bdf25 -Author: Felix Fietkau -Date: Wed Feb 19 19:20:10 2014 +0000 - - gcc: prevent the use of LDRD/STRD on ARMv5TE - - These instructions are for 64-bit load/store. On ARMv5TE, the CPU - requires addresses to be aligned to 64-bit. When misaligned, behavior is - undefined (effectively either loads the same word twice on LDRD, or - corrupts surrounding memory on STRD). - - On ARMv6 and newer, unaligned access is safe. - - Removing these instructions for ARMv5TE is necessary, because GCC - ignores alignment information in pointers and does unsafe optimizations - that have shown up as bugs in various places. - - Signed-off-by: Felix Fietkau - - SVN-Revision: 39638 - ---- a/gcc/config/arm/arm.h -+++ b/gcc/config/arm/arm.h -@@ -150,7 +150,7 @@ extern tree arm_fp16_type_node; - /* Thumb-1 only. */ - #define TARGET_THUMB1_ONLY (TARGET_THUMB1 && !arm_arch_notm) - --#define TARGET_LDRD (arm_arch5e && ARM_DOUBLEWORD_ALIGN \ -+#define TARGET_LDRD (arm_arch6 && ARM_DOUBLEWORD_ALIGN \ - && !TARGET_THUMB1) - - #define TARGET_CRC32 (arm_arch_crc) diff --git a/toolchain/gcc/patches/7.5.0/820-libgcc_pic.patch b/toolchain/gcc/patches/7.5.0/820-libgcc_pic.patch deleted file mode 100644 index 0cc1e07e2..000000000 --- a/toolchain/gcc/patches/7.5.0/820-libgcc_pic.patch +++ /dev/null @@ -1,44 +0,0 @@ -commit c96312958c0621e72c9b32da5bc224ffe2161384 -Author: Felix Fietkau -Date: Mon Oct 19 23:26:09 2009 +0000 - - gcc: create a proper libgcc_pic.a static library for relinking (4.3.3+ for now, backport will follow) - - SVN-Revision: 18086 - ---- a/libgcc/Makefile.in -+++ b/libgcc/Makefile.in -@@ -920,11 +920,12 @@ $(libgcov-driver-objects): %$(objext): $ - - # Static libraries. - libgcc.a: $(libgcc-objects) -+libgcc_pic.a: $(libgcc-s-objects) - libgcov.a: $(libgcov-objects) - libunwind.a: $(libunwind-objects) - libgcc_eh.a: $(libgcc-eh-objects) - --libgcc.a libgcov.a libunwind.a libgcc_eh.a: -+libgcc.a libgcov.a libunwind.a libgcc_eh.a libgcc_pic.a: - -rm -f $@ - - objects="$(objects)"; \ -@@ -945,7 +946,7 @@ all: libunwind.a - endif - - ifeq ($(enable_shared),yes) --all: libgcc_eh.a libgcc_s$(SHLIB_EXT) -+all: libgcc_eh.a libgcc_pic.a libgcc_s$(SHLIB_EXT) - ifneq ($(LIBUNWIND),) - all: libunwind$(SHLIB_EXT) - libgcc_s$(SHLIB_EXT): libunwind$(SHLIB_EXT) -@@ -1151,6 +1152,10 @@ install-shared: - chmod 644 $(DESTDIR)$(inst_libdir)/libgcc_eh.a - $(RANLIB) $(DESTDIR)$(inst_libdir)/libgcc_eh.a - -+ $(INSTALL_DATA) libgcc_pic.a $(mapfile) $(DESTDIR)$(inst_libdir)/ -+ chmod 644 $(DESTDIR)$(inst_libdir)/libgcc_pic.a -+ $(RANLIB) $(DESTDIR)$(inst_libdir)/libgcc_pic.a -+ - $(subst @multilib_dir@,$(MULTIDIR),$(subst \ - @shlib_base_name@,libgcc_s,$(subst \ - @shlib_slibdir_qual@,$(MULTIOSSUBDIR),$(SHLIB_INSTALL)))) diff --git a/toolchain/gcc/patches/7.5.0/850-use_shared_libgcc.patch b/toolchain/gcc/patches/7.5.0/850-use_shared_libgcc.patch deleted file mode 100644 index 1d07efed8..000000000 --- a/toolchain/gcc/patches/7.5.0/850-use_shared_libgcc.patch +++ /dev/null @@ -1,54 +0,0 @@ -commit dcfc40358b5a3cae7320c17f8d1cebd5ad5540cd -Author: Felix Fietkau -Date: Sun Feb 12 20:25:47 2012 +0000 - - gcc 4.6: port over the missing patch 850-use_shared_libgcc.patch to prevent libgcc crap from leaking into every single binary - - SVN-Revision: 30486 ---- a/gcc/config/arm/linux-eabi.h -+++ b/gcc/config/arm/linux-eabi.h -@@ -126,10 +126,6 @@ - "%{Ofast|ffast-math|funsafe-math-optimizations:crtfastmath.o%s} " \ - LINUX_OR_ANDROID_LD (GNU_USER_TARGET_ENDFILE_SPEC, ANDROID_ENDFILE_SPEC) - --/* Use the default LIBGCC_SPEC, not the version in linux-elf.h, as we -- do not use -lfloat. */ --#undef LIBGCC_SPEC -- - /* Clear the instruction cache from `beg' to `end'. This is - implemented in lib1funcs.S, so ensure an error if this definition - is used. */ ---- a/gcc/config/linux.h -+++ b/gcc/config/linux.h -@@ -53,6 +53,10 @@ see the files COPYING3 and COPYING.RUNTI - builtin_assert ("system=posix"); \ - } while (0) - -+#ifndef LIBGCC_SPEC -+#define LIBGCC_SPEC "%{static|static-libgcc:-lgcc}%{!static:%{!static-libgcc:-lgcc_s}}" -+#endif -+ - /* Determine which dynamic linker to use depending on whether GLIBC or - uClibc or Bionic or musl is the default C library and whether - -muclibc or -mglibc or -mbionic or -mmusl has been passed to change ---- a/libgcc/mkmap-symver.awk -+++ b/libgcc/mkmap-symver.awk -@@ -136,5 +136,5 @@ function output(lib) { - else if (inherit[lib]) - printf("} %s;\n", inherit[lib]); - else -- printf ("\n local:\n\t*;\n};\n"); -+ printf ("\n\t*;\n};\n"); - } ---- a/gcc/config/rs6000/linux.h -+++ b/gcc/config/rs6000/linux.h -@@ -60,6 +60,9 @@ - #undef CPP_OS_DEFAULT_SPEC - #define CPP_OS_DEFAULT_SPEC "%(cpp_os_linux)" - -+#undef LIBGCC_SPEC -+#define LIBGCC_SPEC "%{!static:%{!static-libgcc:-lgcc_s}} -lgcc" -+ - #undef LINK_SHLIB_SPEC - #define LINK_SHLIB_SPEC "%{shared:-shared} %{!shared: %{static:-static}}" - diff --git a/toolchain/gcc/patches/7.5.0/870-ppc_no_crtsavres.patch b/toolchain/gcc/patches/7.5.0/870-ppc_no_crtsavres.patch deleted file mode 100644 index 1b448eb5b..000000000 --- a/toolchain/gcc/patches/7.5.0/870-ppc_no_crtsavres.patch +++ /dev/null @@ -1,18 +0,0 @@ -commit d8c570a1531035c3e26bcd94741e5f5b9c36b5d9 -Author: Felix Fietkau -Date: Mon Mar 5 00:51:01 2012 +0000 - - gcc: do not emit references to _savegpr_* and _restgpr_* on powerpc, as they are tricky to deal with wrt. libgcc. they cannot be linked dynamically - - SVN-Revision: 30814 ---- a/gcc/config/rs6000/rs6000.c -+++ b/gcc/config/rs6000/rs6000.c -@@ -26981,7 +26981,7 @@ rs6000_savres_strategy (rs6000_stack_t * - /* Define cutoff for using out-of-line functions to save registers. */ - if (DEFAULT_ABI == ABI_V4 || TARGET_ELF) - { -- if (!optimize_size) -+ if (1) - { - strategy |= SAVE_INLINE_FPRS | REST_INLINE_FPRS; - strategy |= SAVE_INLINE_GPRS | REST_INLINE_GPRS; diff --git a/toolchain/gcc/patches/7.5.0/881-no_tm_section.patch b/toolchain/gcc/patches/7.5.0/881-no_tm_section.patch deleted file mode 100644 index a58dc27e6..000000000 --- a/toolchain/gcc/patches/7.5.0/881-no_tm_section.patch +++ /dev/null @@ -1,22 +0,0 @@ -commit 565988ab47bd9b96b50608564aee2104aeb4b7ae -Author: Felix Fietkau -Date: Tue Dec 13 14:20:49 2016 +0100 - - gcc: rip out transactional memory related bloat from crtbegin - - Slightly improves compression for each executable, saving about 4k from - the default ar71xx rootfs - - Signed-off-by: Felix Fietkau - ---- a/libgcc/crtstuff.c -+++ b/libgcc/crtstuff.c -@@ -152,7 +152,7 @@ call_ ## FUNC (void) \ - #endif - - #if !defined(USE_TM_CLONE_REGISTRY) && defined(OBJECT_FORMAT_ELF) --# define USE_TM_CLONE_REGISTRY 1 -+# define USE_TM_CLONE_REGISTRY 0 - #endif - - /* We do not want to add the weak attribute to the declarations of these diff --git a/toolchain/gcc/patches/7.5.0/900-bad-mips16-crt.patch b/toolchain/gcc/patches/7.5.0/900-bad-mips16-crt.patch deleted file mode 100644 index f5cc0a74e..000000000 --- a/toolchain/gcc/patches/7.5.0/900-bad-mips16-crt.patch +++ /dev/null @@ -1,30 +0,0 @@ -commit 9dc38e48f7a6f88b7ac7bfaced91f53660204e46 -Author: Florian Fainelli -Date: Fri Apr 5 12:36:06 2013 +0000 - - toolchain/gcc: .init and .fini need to pick one ISA - - The .init and .fini sections are built by concatenating code - fragments. Putting mips16 code in the middle of a mips32 code block - doesn't work. Make gcc built the magic crt stuff in no-mips16 mode. - - This is specific to 4.6-linaro but is probably portable to other gcc - flavors. Adding this to the t-libgcc-mips16 makefile fragment is a - hack not suitable for pushing upstream, but there is no mips/t-linux - or mips/t-uclibc and I am not going to touch gcc/configure for two - lines. - - Signed-off-by: Jay Carlson - Signed-off-by: Florian Fainelli - - SVN-Revision: 36200 - ---- a/libgcc/config/mips/t-mips16 -+++ b/libgcc/config/mips/t-mips16 -@@ -43,3 +43,6 @@ SYNC_CFLAGS = -mno-mips16 - - # Version these symbols if building libgcc.so. - SHLIB_MAPFILES += $(srcdir)/config/mips/libgcc-mips16.ver -+ -+CRTSTUFF_T_CFLAGS += -mno-mips16 -+CRTSTUFF_T_CFLAGS_S += -mno-mips16 diff --git a/toolchain/gcc/patches/7.5.0/910-mbsd_multi.patch b/toolchain/gcc/patches/7.5.0/910-mbsd_multi.patch deleted file mode 100644 index f19007ea3..000000000 --- a/toolchain/gcc/patches/7.5.0/910-mbsd_multi.patch +++ /dev/null @@ -1,146 +0,0 @@ -commit 99368862e44740ff4fd33760893f04e14f9dbdf1 -Author: Felix Fietkau -Date: Tue Jul 31 00:52:27 2007 +0000 - - Port the mbsd_multi patch from freewrt, which adds -fhonour-copts. This will emit warnings in packages that don't use our target cflags properly - - SVN-Revision: 8256 - - This patch brings over a feature from MirBSD: - * -fhonour-copts - If this option is not given, it's warned (depending - on environment variables). This is to catch errors - of misbuilt packages which override CFLAGS themselves. - - This patch was authored by Thorsten Glaser - with copyright assignment to the FSF in effect. - ---- a/gcc/c-family/c-opts.c -+++ b/gcc/c-family/c-opts.c -@@ -108,6 +108,9 @@ static int class_dump_flags; - /* Whether any standard preincluded header has been preincluded. */ - static bool done_preinclude; - -+/* Check if a port honours COPTS. */ -+static int honour_copts = 0; -+ - static void handle_OPT_d (const char *); - static void set_std_cxx98 (int); - static void set_std_cxx11 (int); -@@ -456,6 +459,12 @@ c_common_handle_option (size_t scode, co - flag_no_builtin = !value; - break; - -+ case OPT_fhonour_copts: -+ if (c_language == clk_c) { -+ honour_copts++; -+ } -+ break; -+ - case OPT_fconstant_string_class_: - constant_string_class_name = arg; - break; -@@ -1084,6 +1093,47 @@ c_common_init (void) - return false; - } - -+ if (c_language == clk_c) { -+ char *ev = getenv ("GCC_HONOUR_COPTS"); -+ int evv; -+ if (ev == NULL) -+ evv = -1; -+ else if ((*ev == '0') || (*ev == '\0')) -+ evv = 0; -+ else if (*ev == '1') -+ evv = 1; -+ else if (*ev == '2') -+ evv = 2; -+ else if (*ev == 's') -+ evv = -1; -+ else { -+ warning (0, "unknown GCC_HONOUR_COPTS value, assuming 1"); -+ evv = 1; /* maybe depend this on something like MIRBSD_NATIVE? */ -+ } -+ if (evv == 1) { -+ if (honour_copts == 0) { -+ error ("someone does not honour COPTS at all in lenient mode"); -+ return false; -+ } else if (honour_copts != 1) { -+ warning (0, "someone does not honour COPTS correctly, passed %d times", -+ honour_copts); -+ } -+ } else if (evv == 2) { -+ if (honour_copts == 0) { -+ error ("someone does not honour COPTS at all in strict mode"); -+ return false; -+ } else if (honour_copts != 1) { -+ error ("someone does not honour COPTS correctly, passed %d times", -+ honour_copts); -+ return false; -+ } -+ } else if (evv == 0) { -+ if (honour_copts != 1) -+ inform (0, "someone does not honour COPTS correctly, passed %d times", -+ honour_copts); -+ } -+ } -+ - return true; - } - ---- a/gcc/c-family/c.opt -+++ b/gcc/c-family/c.opt -@@ -1412,6 +1412,9 @@ C++ ObjC++ Optimization Alias(fexception - fhonor-std - C++ ObjC++ Ignore Warn(switch %qs is no longer supported) - -+fhonour-copts -+C ObjC C++ ObjC++ RejectNegative -+ - fhosted - C ObjC - Assume normal C execution environment. ---- a/gcc/common.opt -+++ b/gcc/common.opt -@@ -1510,6 +1510,9 @@ fguess-branch-probability - Common Report Var(flag_guess_branch_prob) Optimization - Enable guessing of branch probabilities. - -+fhonour-copts -+Common RejectNegative -+ - ; Nonzero means ignore `#ident' directives. 0 means handle them. - ; Generate position-independent code for executables if possible - ; On SVR4 targets, it also controls whether or not to emit a ---- a/gcc/opts.c -+++ b/gcc/opts.c -@@ -1954,6 +1954,9 @@ common_handle_option (struct gcc_options - opts, opts_set, loc, dc); - break; - -+ case OPT_fhonour_copts: -+ break; -+ - case OPT_Wlarger_than_: - opts->x_larger_than_size = value; - opts->x_warn_larger_than = value != -1; ---- a/gcc/doc/invoke.texi -+++ b/gcc/doc/invoke.texi -@@ -6572,6 +6572,17 @@ This option is only supported for C and - @option{-Wall} and by @option{-Wpedantic}, which can be disabled with - @option{-Wno-pointer-sign}. - -+@item -fhonour-copts -+@opindex fhonour-copts -+If @env{GCC_HONOUR_COPTS} is set to 1, abort if this option is not -+given at least once, and warn if it is given more than once. -+If @env{GCC_HONOUR_COPTS} is set to 2, abort if this option is not -+given exactly once. -+If @env{GCC_HONOUR_COPTS} is set to 0 or unset, warn if this option -+is not given exactly once. -+The warning is quelled if @env{GCC_HONOUR_COPTS} is set to @samp{s}. -+This flag and environment variable only affect the C language. -+ - @item -Wstack-protector - @opindex Wstack-protector - @opindex Wno-stack-protector diff --git a/toolchain/gcc/patches/7.5.0/920-specs_nonfatal_getenv.patch b/toolchain/gcc/patches/7.5.0/920-specs_nonfatal_getenv.patch deleted file mode 100644 index a0fdc5f16..000000000 --- a/toolchain/gcc/patches/7.5.0/920-specs_nonfatal_getenv.patch +++ /dev/null @@ -1,22 +0,0 @@ -Author: Jo-Philipp Wich -Date: Sat Apr 21 03:02:39 2012 +0000 - - gcc: add patch to make the getenv() spec function nonfatal if requested environment variable is unset - - SVN-Revision: 31390 - ---- a/gcc/gcc.c -+++ b/gcc/gcc.c -@@ -9281,8 +9281,10 @@ getenv_spec_function (int argc, const ch - value = varname; - - if (!value) -- fatal_error (input_location, -- "environment variable %qs not defined", varname); -+ { -+ warning (input_location, "environment variable %qs not defined", varname); -+ value = ""; -+ } - - /* We have to escape every character of the environment variable so - they are not interpreted as active spec characters. A diff --git a/toolchain/gcc/patches/7.5.0/930-fix-mips-noexecstack.patch b/toolchain/gcc/patches/7.5.0/930-fix-mips-noexecstack.patch deleted file mode 100644 index 5affd6f92..000000000 --- a/toolchain/gcc/patches/7.5.0/930-fix-mips-noexecstack.patch +++ /dev/null @@ -1,111 +0,0 @@ -From da45b3fde60095756f5f6030f6012c23a3d34429 Mon Sep 17 00:00:00 2001 -From: Andrew McDonnell -Date: Fri, 3 Oct 2014 19:09:00 +0930 -Subject: Add .note.GNU-stack section - -See http://lists.busybox.net/pipermail/uclibc/2014-October/048671.html -Below copied from https://gcc.gnu.org/ml/gcc-patches/2014-09/msg02430.html - -Re: [Patch, MIPS] Add .note.GNU-stack section - - From: Steve Ellcey - -On Wed, 2014-09-10 at 10:15 -0700, Eric Christopher wrote: -> -> -> On Wed, Sep 10, 2014 at 9:27 AM, wrote: - -> This works except you did not update the assembly files in -> libgcc or glibc. We (Cavium) have the same patch in our tree -> for a few released versions. - -> Mind just checking yours in then Andrew? - -> Thanks! -> -eric - -I talked to Andrew about what files he changed in GCC and created and -tested this new patch. Andrew also mentioned changing some assembly -files in glibc but I don't see any use of '.section .note.GNU-stack' in -any assembly files in glibc (for any platform) so I wasn't planning on -creating a glibc to add them to mips glibc assembly language files. - -OK to check in this patch? - -Steve Ellcey -sellcey@mips.com - - - -2014-09-26 Steve Ellcey ---- - gcc/config/mips/mips.c | 3 +++ - libgcc/config/mips/crti.S | 4 ++++ - libgcc/config/mips/crtn.S | 3 +++ - libgcc/config/mips/mips16.S | 4 ++++ - libgcc/config/mips/vr4120-div.S | 4 ++++ - 5 files changed, 18 insertions(+) - ---- a/gcc/config/mips/mips.c -+++ b/gcc/config/mips/mips.c -@@ -22567,6 +22567,9 @@ mips_promote_function_mode (const_tree t - #undef TARGET_CUSTOM_FUNCTION_DESCRIPTORS - #define TARGET_CUSTOM_FUNCTION_DESCRIPTORS 2 - -+#undef TARGET_ASM_FILE_END -+#define TARGET_ASM_FILE_END file_end_indicate_exec_stack -+ - struct gcc_target targetm = TARGET_INITIALIZER; - - #include "gt-mips.h" ---- a/libgcc/config/mips/crti.S -+++ b/libgcc/config/mips/crti.S -@@ -21,6 +21,10 @@ a copy of the GCC Runtime Library Except - see the files COPYING3 and COPYING.RUNTIME respectively. If not, see - . */ - -+ -+/* An executable stack is *not* required for these functions. */ -+ .section .note.GNU-stack,"",%progbits -+ - /* 4 slots for argument spill area. 1 for cpreturn, 1 for stack. - Return spill offset of 40 and 20. Aligned to 16 bytes for n32. */ - ---- a/libgcc/config/mips/crtn.S -+++ b/libgcc/config/mips/crtn.S -@@ -21,6 +21,9 @@ a copy of the GCC Runtime Library Except - see the files COPYING3 and COPYING.RUNTIME respectively. If not, see - . */ - -+/* An executable stack is *not* required for these functions. */ -+ .section .note.GNU-stack,"",%progbits -+ - /* 4 slots for argument spill area. 1 for cpreturn, 1 for stack. - Return spill offset of 40 and 20. Aligned to 16 bytes for n32. */ - ---- a/libgcc/config/mips/mips16.S -+++ b/libgcc/config/mips/mips16.S -@@ -48,6 +48,10 @@ see the files COPYING3 and COPYING.RUNTI - values using the soft-float calling convention, but do the actual - operation using the hard floating point instructions. */ - -+/* An executable stack is *not* required for these functions. */ -+ .section .note.GNU-stack,"",%progbits -+ .previous -+ - #if defined _MIPS_SIM && (_MIPS_SIM == _ABIO32 || _MIPS_SIM == _ABIO64) - - /* This file contains 32-bit assembly code. */ ---- a/libgcc/config/mips/vr4120-div.S -+++ b/libgcc/config/mips/vr4120-div.S -@@ -26,6 +26,10 @@ see the files COPYING3 and COPYING.RUNTI - -mfix-vr4120. div and ddiv do not give the correct result when one - of the operands is negative. */ - -+/* An executable stack is *not* required for these functions. */ -+ .section .note.GNU-stack,"",%progbits -+ .previous -+ - .set nomips16 - - #define DIV \ diff --git a/toolchain/gcc/patches/7.5.0/931-libffi-fix-MIPS-softfloat-build-issue.patch b/toolchain/gcc/patches/7.5.0/931-libffi-fix-MIPS-softfloat-build-issue.patch deleted file mode 100644 index 9d436efc1..000000000 --- a/toolchain/gcc/patches/7.5.0/931-libffi-fix-MIPS-softfloat-build-issue.patch +++ /dev/null @@ -1,175 +0,0 @@ -From c0c62fa4256f805389f16ebfc4a60cf789129b50 Mon Sep 17 00:00:00 2001 -From: BangLang Huang -Date: Wed, 9 Nov 2016 10:36:49 +0800 -Subject: [PATCH] libffi: fix MIPS softfloat build issue - -Backported from github.com/libffi/libffi#272 - -Signed-off-by: BangLang Huang -Signed-off-by: Yousong Zhou ---- - libffi/src/mips/n32.S | 17 +++++++++++++++++ - libffi/src/mips/o32.S | 17 +++++++++++++++++ - 2 files changed, 34 insertions(+) - -diff --git a/libffi/src/mips/n32.S b/libffi/src/mips/n32.S -index c6985d30a6f..8f25994773c 100644 ---- a/libffi/src/mips/n32.S -+++ b/libffi/src/mips/n32.S -@@ -107,6 +107,16 @@ loadregs: - - REG_L t6, 3*FFI_SIZEOF_ARG($fp) # load the flags word into t6. - -+#ifdef __mips_soft_float -+ REG_L a0, 0*FFI_SIZEOF_ARG(t9) -+ REG_L a1, 1*FFI_SIZEOF_ARG(t9) -+ REG_L a2, 2*FFI_SIZEOF_ARG(t9) -+ REG_L a3, 3*FFI_SIZEOF_ARG(t9) -+ REG_L a4, 4*FFI_SIZEOF_ARG(t9) -+ REG_L a5, 5*FFI_SIZEOF_ARG(t9) -+ REG_L a6, 6*FFI_SIZEOF_ARG(t9) -+ REG_L a7, 7*FFI_SIZEOF_ARG(t9) -+#else - and t4, t6, ((1< -Date: Fri Dec 12 17:01:57 2014 +0000 - - gcc: don't clobber stamp-bits with a symlink to itself - - Several versions of gcc have an issue in libstdc++v3 where the build may - clobber stamp-bits with a link to itself. This doesn't manifest itself - on all systems. On several Ubuntu systems, this doesn't appear to be a - problem, but it is an issue on Fedora 16 systems. - - To fix the issue, we'll simply filter out stamp-bits from the symlinks - to be generated. - - Note: gcc 4.4.7 is unaffected by this issue, so no fix is necessary - there. - - Signed-off-by: John Szakmeister - - SVN-Revision: 43669 - - ---- a/libstdc++-v3/include/Makefile.in -+++ b/libstdc++-v3/include/Makefile.in -@@ -1474,7 +1474,7 @@ stamp-bits: ${bits_headers} - @$(STAMP) stamp-bits - - stamp-bits-sup: stamp-bits ${bits_sup_headers} -- @-cd ${bits_builddir} && $(LN_S) $? . 2>/dev/null -+ @-cd ${bits_builddir} && $(LN_S) $(filter-out stamp-bits,$?) . 2>/dev/null - @$(STAMP) stamp-bits-sup - - stamp-c_base: ${c_base_headers} diff --git a/toolchain/gcc/patches/7.5.0/950-cpp_file_path_translation.patch b/toolchain/gcc/patches/7.5.0/950-cpp_file_path_translation.patch deleted file mode 100644 index cd30cb201..000000000 --- a/toolchain/gcc/patches/7.5.0/950-cpp_file_path_translation.patch +++ /dev/null @@ -1,181 +0,0 @@ -commit 331735a357a73c7b8adc205241ac3cc6543d985e -Author: Felix Fietkau -Date: Tue Nov 17 12:38:22 2015 +0000 - - gcc: add a patch to 5.x that supports translation of __FILE__ paths - - Signed-off-by: Felix Fietkau - - SVN-Revision: 47490 - -Forward ported from attachment to https://gcc.gnu.org/bugzilla/show_bug.cgi?id=47047 - ---- a/gcc/c-family/c-opts.c -+++ b/gcc/c-family/c-opts.c -@@ -588,6 +588,10 @@ c_common_handle_option (size_t scode, co - add_path (xstrdup (arg), SYSTEM, 0, true); - break; - -+ case OPT_iremap: -+ add_cpp_remap_path (arg); -+ break; -+ - case OPT_iwithprefix: - add_prefixed_path (arg, SYSTEM); - break; ---- a/gcc/c-family/c.opt -+++ b/gcc/c-family/c.opt -@@ -1825,6 +1825,10 @@ iquote - C ObjC C++ ObjC++ Joined Separate MissingArgError(missing path after %qs) - -iquote Add to the end of the quote include path. - -+iremap -+C ObjC C++ ObjC++ Joined Separate -+-iremap Convert to if it occurs as prefix in __FILE__. -+ - iwithprefix - C ObjC C++ ObjC++ Joined Separate - -iwithprefix Add to the end of the system include path. ---- a/gcc/doc/cpp.texi -+++ b/gcc/doc/cpp.texi -@@ -4272,6 +4272,7 @@ Refer to the GCC manual for full documen - @c man begin SYNOPSIS - cpp [@option{-D}@var{macro}[=@var{defn}]@dots{}] [@option{-U}@var{macro}] - [@option{-I}@var{dir}@dots{}] [@option{-iquote}@var{dir}@dots{}] -+ [@option{-iremap}@var{src}:@var{dst}] - [@option{-M}|@option{-MM}] [@option{-MG}] [@option{-MF} @var{filename}] - [@option{-MP}] [@option{-MQ} @var{target}@dots{}] - [@option{-MT} @var{target}@dots{}] ---- a/gcc/doc/cppopts.texi -+++ b/gcc/doc/cppopts.texi -@@ -220,6 +220,12 @@ extensions @samp{.i}, @samp{.ii} or @sam - extensions that GCC uses for preprocessed files created by - @option{-save-temps}. - -+@item -iremap @var{src}:@var{dst} -+@opindex iremap -+Replace the prefix @var{src} in __FILE__ with @var{dst} at expansion time. -+This option can be specified more than once. Processing stops at the first -+match. -+ - @item -fdirectives-only - @opindex fdirectives-only - When preprocessing, handle directives, but do not expand macros. ---- a/gcc/doc/invoke.texi -+++ b/gcc/doc/invoke.texi -@@ -11871,6 +11871,12 @@ by @option{-fplugin=@var{name}} instead - @option{-fplugin=@var{path}/@var{name}.so}. This option is not meant - to be used by the user, but only passed by the driver. - -+@item -iremap @var{src}:@var{dst} -+@opindex iremap -+Replace the prefix @var{src} in __FILE__ with @var{dst} at expansion time. -+This option can be specified more than once. Processing stops at the first -+match. -+ - @item -L@var{dir} - @opindex L - Add directory @var{dir} to the list of directories to be searched ---- a/libcpp/include/cpplib.h -+++ b/libcpp/include/cpplib.h -@@ -820,6 +820,9 @@ extern void cpp_set_lang (cpp_reader *, - /* Set the include paths. */ - extern void cpp_set_include_chains (cpp_reader *, cpp_dir *, cpp_dir *, int); - -+/* Provide src:dst pair for __FILE__ remapping. */ -+extern void add_cpp_remap_path (const char *); -+ - /* Call these to get pointers to the options, callback, and deps - structures for a given reader. These pointers are good until you - call cpp_finish on that reader. You can either edit the callbacks ---- a/libcpp/macro.c -+++ b/libcpp/macro.c -@@ -227,6 +227,64 @@ static const char * const monthnames[] = - "Jul", "Aug", "Sep", "Oct", "Nov", "Dec" - }; - -+static size_t remap_pairs; -+static char **remap_src; -+static char **remap_dst; -+ -+void -+add_cpp_remap_path (const char *arg) -+{ -+ const char *arg_dst; -+ size_t len; -+ -+ arg_dst = strchr(arg, ':'); -+ if (arg_dst == NULL) -+ { -+ fprintf(stderr, "Invalid argument for -iremap\n"); -+ exit(1); -+ } -+ -+ len = arg_dst - arg; -+ ++arg_dst; -+ -+ remap_src = (char **) xrealloc(remap_src, sizeof(char *) * (remap_pairs + 1)); -+ remap_dst = (char **) xrealloc(remap_dst, sizeof(char *) * (remap_pairs + 1)); -+ -+ remap_src[remap_pairs] = (char *) xmalloc(len + 1); -+ memcpy(remap_src[remap_pairs], arg, len); -+ remap_src[remap_pairs][len] = '\0'; -+ remap_dst[remap_pairs] = xstrdup(arg_dst); -+ ++remap_pairs; -+} -+ -+static const char * -+cpp_remap_file (const char *arg, char **tmp_name) -+{ -+ char *result; -+ size_t i, len; -+ -+ for (i = 0; i < remap_pairs; ++i) -+ { -+ len = strlen (remap_src[i]); -+ if (strncmp (remap_src[i], arg, len)) -+ continue; -+ if (arg[len] == '\0') -+ return xstrdup (remap_dst[i]); -+ if (arg[len] != '/') -+ continue; -+ arg += len; -+ len = strlen (remap_dst[i]); -+ result = (char *) xmalloc (len + strlen (arg) + 1); -+ memcpy(result, remap_dst[i], len); -+ strcpy(result + len, arg); -+ *tmp_name = result; -+ -+ return result; -+ } -+ -+ return arg; -+} -+ - /* Helper function for builtin_macro. Returns the text generated by - a builtin macro. */ - const uchar * -@@ -290,6 +348,7 @@ _cpp_builtin_macro_text (cpp_reader *pfi - { - unsigned int len; - const char *name; -+ char *tmp_name = NULL; - uchar *buf; - - if (node->value.builtin == BT_FILE) -@@ -301,6 +360,7 @@ _cpp_builtin_macro_text (cpp_reader *pfi - if (!name) - abort (); - } -+ name = cpp_remap_file (name, &tmp_name); - len = strlen (name); - buf = _cpp_unaligned_alloc (pfile, len * 2 + 3); - result = buf; -@@ -308,6 +368,7 @@ _cpp_builtin_macro_text (cpp_reader *pfi - buf = cpp_quote_string (buf + 1, (const unsigned char *) name, len); - *buf++ = '"'; - *buf = '\0'; -+ free (tmp_name); - } - break; - diff --git a/toolchain/gcc/patches/7.5.0/960-gotools-fix-compilation-when-making-cross-compiler.patch b/toolchain/gcc/patches/7.5.0/960-gotools-fix-compilation-when-making-cross-compiler.patch deleted file mode 100644 index 556fa1647..000000000 --- a/toolchain/gcc/patches/7.5.0/960-gotools-fix-compilation-when-making-cross-compiler.patch +++ /dev/null @@ -1,73 +0,0 @@ -From dda6b050cd74a352670787a294596a9c56c21327 Mon Sep 17 00:00:00 2001 -From: Yousong Zhou -Date: Fri, 4 May 2018 18:20:53 +0800 -Subject: [PATCH] gotools: fix compilation when making cross compiler - -libgo is "the runtime support library for the Go programming language. -This library is intended for use with the Go frontend." - -gccgo will link target files with libgo.so which depends on libgcc_s.so.1, but -the linker will complain that it cannot find it. That's because shared libgcc -is not present in the install directory yet. libgo.so was made without problem -because gcc will emit -lgcc_s when compiled with -shared option. When gotools -were being made, it was supplied with -static-libgcc thus no link option was -provided. Check LIBGO in gcc/go/gcc-spec.c for how gccgo make a builtin spec -for linking with libgo.so - -- GccgoCrossCompilation, https://github.com/golang/go/wiki/GccgoCrossCompilation -- Cross-building instructions, http://www.eglibc.org/archives/patches/msg00078.html - -When 3-pass GCC compilation is used, shared libgcc runtime libraries will be -available after gcc pass2 completed and will meet the gotools link requirement -at gcc pass3 ---- - gotools/Makefile.am | 4 +++- - gotools/Makefile.in | 4 +++- - 2 files changed, 6 insertions(+), 2 deletions(-) - -diff --git a/gotools/Makefile.am b/gotools/Makefile.am -index 5f3940a278b..9c22f5df103 100644 ---- a/gotools/Makefile.am -+++ b/gotools/Makefile.am -@@ -26,6 +26,7 @@ PWD_COMMAND = $${PWDCMD-pwd} - STAMP = echo timestamp > - - libgodir = ../$(target_noncanonical)/libgo -+libgccdir = ../$(target_noncanonical)/libgcc - LIBGODEP = $(libgodir)/libgo.la - - if NATIVE -@@ -38,7 +39,8 @@ endif - GOCFLAGS = $(CFLAGS_FOR_TARGET) - GOCOMPILE = $(GOCOMPILER) $(GOCFLAGS) - --AM_LDFLAGS = -L $(libgodir) -L $(libgodir)/.libs -+AM_LDFLAGS = -L $(libgodir) -L $(libgodir)/.libs \ -+ -L $(libgccdir) -L $(libgccdir)/.libs -lgcc_s - GOLINK = $(GOCOMPILER) $(GOCFLAGS) $(AM_GOCFLAGS) $(LDFLAGS) $(AM_LDFLAGS) -o $@ - - cmdsrcdir = $(srcdir)/../libgo/go/cmd -diff --git a/gotools/Makefile.in b/gotools/Makefile.in -index 4386576b011..0bdd9290e01 100644 ---- a/gotools/Makefile.in -+++ b/gotools/Makefile.in -@@ -252,13 +252,15 @@ mkinstalldirs = $(SHELL) $(toplevel_srcdir)/mkinstalldirs - PWD_COMMAND = $${PWDCMD-pwd} - STAMP = echo timestamp > - libgodir = ../$(target_noncanonical)/libgo -+libgccdir = ../$(target_noncanonical)/libgcc - LIBGODEP = $(libgodir)/libgo.la - @NATIVE_FALSE@GOCOMPILER = $(GOC) - - # Use the compiler we just built. - @NATIVE_TRUE@GOCOMPILER = $(GOC_FOR_TARGET) $(XGCC_FLAGS_FOR_TARGET) - GOCOMPILE = $(GOCOMPILER) $(GOCFLAGS) --AM_LDFLAGS = -L $(libgodir) -L $(libgodir)/.libs -+AM_LDFLAGS = -L $(libgodir) -L $(libgodir)/.libs \ -+ -L $(libgccdir) -L $(libgccdir)/.libs -lgcc_s - GOLINK = $(GOCOMPILER) $(GOCFLAGS) $(AM_GOCFLAGS) $(LDFLAGS) $(AM_LDFLAGS) -o $@ - cmdsrcdir = $(srcdir)/../libgo/go/cmd - go_cmd_go_files = \ --- -2.16.3 - diff --git a/toolchain/gcc/patches/8.4.0/002-case_insensitive.patch b/toolchain/gcc/patches/8.4.0/002-case_insensitive.patch deleted file mode 100644 index 3442076d7..000000000 --- a/toolchain/gcc/patches/8.4.0/002-case_insensitive.patch +++ /dev/null @@ -1,24 +0,0 @@ -commit 81cc26c706b2bc8c8c1eb1a322e5c5157900836e -Author: Felix Fietkau -Date: Sun Oct 19 21:45:51 2014 +0000 - - gcc: do not assume that the Mac OS X filesystem is case insensitive - - Signed-off-by: Felix Fietkau - - SVN-Revision: 42973 - ---- a/include/filenames.h -+++ b/include/filenames.h -@@ -43,11 +43,6 @@ extern "C" { - # define IS_DIR_SEPARATOR(c) IS_DOS_DIR_SEPARATOR (c) - # define IS_ABSOLUTE_PATH(f) IS_DOS_ABSOLUTE_PATH (f) - #else /* not DOSish */ --# if defined(__APPLE__) --# ifndef HAVE_CASE_INSENSITIVE_FILE_SYSTEM --# define HAVE_CASE_INSENSITIVE_FILE_SYSTEM 1 --# endif --# endif /* __APPLE__ */ - # define HAS_DRIVE_SPEC(f) (0) - # define IS_DIR_SEPARATOR(c) IS_UNIX_DIR_SEPARATOR (c) - # define IS_ABSOLUTE_PATH(f) IS_UNIX_ABSOLUTE_PATH (f) diff --git a/toolchain/gcc/patches/8.4.0/810-arm-softfloat-libgcc.patch b/toolchain/gcc/patches/8.4.0/810-arm-softfloat-libgcc.patch deleted file mode 100644 index 5c9d86aea..000000000 --- a/toolchain/gcc/patches/8.4.0/810-arm-softfloat-libgcc.patch +++ /dev/null @@ -1,33 +0,0 @@ -commit 8570c4be394cff7282f332f97da2ff569a927ddb -Author: Imre Kaloz -Date: Wed Feb 2 20:06:12 2011 +0000 - - fixup arm soft-float symbols - - SVN-Revision: 25325 - ---- a/libgcc/config/arm/t-linux -+++ b/libgcc/config/arm/t-linux -@@ -1,6 +1,10 @@ - LIB1ASMSRC = arm/lib1funcs.S - LIB1ASMFUNCS = _udivsi3 _divsi3 _umodsi3 _modsi3 _dvmd_lnx _clzsi2 _clzdi2 \ -- _ctzsi2 _arm_addsubdf3 _arm_addsubsf3 -+ _ctzsi2 _arm_addsubdf3 _arm_addsubsf3 \ -+ _arm_negdf2 _arm_muldivdf3 _arm_cmpdf2 _arm_unorddf2 \ -+ _arm_fixdfsi _arm_fixunsdfsi _arm_truncdfsf2 \ -+ _arm_negsf2 _arm_muldivsf3 _arm_cmpsf2 _arm_unordsf2 \ -+ _arm_fixsfsi _arm_fixunssfsi - - # Just for these, we omit the frame pointer since it makes such a big - # difference. ---- a/gcc/config/arm/linux-elf.h -+++ b/gcc/config/arm/linux-elf.h -@@ -58,8 +58,6 @@ - %{shared:-lc} \ - %{!shared:%{profile:-lc_p}%{!profile:-lc}}" - --#define LIBGCC_SPEC "%{mfloat-abi=soft*:-lfloat} -lgcc" -- - #define GLIBC_DYNAMIC_LINKER "/lib/ld-linux.so.2" - - #define LINUX_TARGET_LINK_SPEC "%{h*} \ diff --git a/toolchain/gcc/patches/8.4.0/840-armv4_pass_fix-v4bx_to_ld.patch b/toolchain/gcc/patches/8.4.0/840-armv4_pass_fix-v4bx_to_ld.patch deleted file mode 100644 index b9c9b161a..000000000 --- a/toolchain/gcc/patches/8.4.0/840-armv4_pass_fix-v4bx_to_ld.patch +++ /dev/null @@ -1,28 +0,0 @@ -commit 7edc8ca5456d9743dd0075eb3cc5b04f4f24c8cc -Author: Imre Kaloz -Date: Wed Feb 2 19:34:36 2011 +0000 - - add armv4 fixup patches - - SVN-Revision: 25322 - - ---- a/gcc/config/arm/linux-eabi.h -+++ b/gcc/config/arm/linux-eabi.h -@@ -88,10 +88,15 @@ - #define MUSL_DYNAMIC_LINKER \ - "/lib/ld-musl-arm" MUSL_DYNAMIC_LINKER_E "%{mfloat-abi=hard:hf}.so.1" - -+/* For armv4 we pass --fix-v4bx to linker to support EABI */ -+#undef TARGET_FIX_V4BX_SPEC -+#define TARGET_FIX_V4BX_SPEC " %{mcpu=arm8|mcpu=arm810|mcpu=strongarm*"\ -+ "|march=armv4|mcpu=fa526|mcpu=fa626:--fix-v4bx}" -+ - /* At this point, bpabi.h will have clobbered LINK_SPEC. We want to - use the GNU/Linux version, not the generic BPABI version. */ - #undef LINK_SPEC --#define LINK_SPEC EABI_LINK_SPEC \ -+#define LINK_SPEC EABI_LINK_SPEC TARGET_FIX_V4BX_SPEC \ - LINUX_OR_ANDROID_LD (LINUX_TARGET_LINK_SPEC, \ - LINUX_TARGET_LINK_SPEC " " ANDROID_LINK_SPEC) - diff --git a/toolchain/gcc/patches/8.4.0/851-libgcc_no_compat.patch b/toolchain/gcc/patches/8.4.0/851-libgcc_no_compat.patch deleted file mode 100644 index d710e4071..000000000 --- a/toolchain/gcc/patches/8.4.0/851-libgcc_no_compat.patch +++ /dev/null @@ -1,22 +0,0 @@ -commit 64661de100da1ec1061ef3e5e400285dce115e6b -Author: Felix Fietkau -Date: Sun May 10 13:16:35 2015 +0000 - - gcc: add some size optimization patches - - Signed-off-by: Felix Fietkau - - SVN-Revision: 45664 - ---- a/libgcc/config/t-libunwind -+++ b/libgcc/config/t-libunwind -@@ -2,8 +2,7 @@ - - HOST_LIBGCC2_CFLAGS += -DUSE_GAS_SYMVER - --LIB2ADDEH = $(srcdir)/unwind-sjlj.c $(srcdir)/unwind-c.c \ -- $(srcdir)/unwind-compat.c $(srcdir)/unwind-dw2-fde-compat.c -+LIB2ADDEH = $(srcdir)/unwind-sjlj.c $(srcdir)/unwind-c.c - LIB2ADDEHSTATIC = $(srcdir)/unwind-sjlj.c $(srcdir)/unwind-c.c - - # Override the default value from t-slibgcc-elf-ver and mention -lunwind diff --git a/toolchain/gcc/patches/9.3.0/002-case_insensitive.patch b/toolchain/gcc/patches/9.3.0/002-case_insensitive.patch deleted file mode 100644 index 3442076d7..000000000 --- a/toolchain/gcc/patches/9.3.0/002-case_insensitive.patch +++ /dev/null @@ -1,24 +0,0 @@ -commit 81cc26c706b2bc8c8c1eb1a322e5c5157900836e -Author: Felix Fietkau -Date: Sun Oct 19 21:45:51 2014 +0000 - - gcc: do not assume that the Mac OS X filesystem is case insensitive - - Signed-off-by: Felix Fietkau - - SVN-Revision: 42973 - ---- a/include/filenames.h -+++ b/include/filenames.h -@@ -43,11 +43,6 @@ extern "C" { - # define IS_DIR_SEPARATOR(c) IS_DOS_DIR_SEPARATOR (c) - # define IS_ABSOLUTE_PATH(f) IS_DOS_ABSOLUTE_PATH (f) - #else /* not DOSish */ --# if defined(__APPLE__) --# ifndef HAVE_CASE_INSENSITIVE_FILE_SYSTEM --# define HAVE_CASE_INSENSITIVE_FILE_SYSTEM 1 --# endif --# endif /* __APPLE__ */ - # define HAS_DRIVE_SPEC(f) (0) - # define IS_DIR_SEPARATOR(c) IS_UNIX_DIR_SEPARATOR (c) - # define IS_ABSOLUTE_PATH(f) IS_UNIX_ABSOLUTE_PATH (f) diff --git a/toolchain/gcc/patches/9.3.0/010-documentation.patch b/toolchain/gcc/patches/9.3.0/010-documentation.patch deleted file mode 100644 index c3a6a1590..000000000 --- a/toolchain/gcc/patches/9.3.0/010-documentation.patch +++ /dev/null @@ -1,35 +0,0 @@ -commit 098bd91f5eae625c7d2ee621e10930fc4434e5e2 -Author: Luka Perkov -Date: Tue Feb 26 16:16:33 2013 +0000 - - gcc: don't build documentation - - This closes #13039. - - Signed-off-by: Luka Perkov - - SVN-Revision: 35807 - ---- a/gcc/Makefile.in -+++ b/gcc/Makefile.in -@@ -3203,18 +3203,10 @@ doc/gcc.info: $(TEXI_GCC_FILES) - doc/gccint.info: $(TEXI_GCCINT_FILES) - doc/cppinternals.info: $(TEXI_CPPINT_FILES) - --doc/%.info: %.texi -- if [ x$(BUILD_INFO) = xinfo ]; then \ -- $(MAKEINFO) $(MAKEINFOFLAGS) -I . -I $(gcc_docdir) \ -- -I $(gcc_docdir)/include -o $@ $<; \ -- fi -+doc/%.info: - - # Duplicate entry to handle renaming of gccinstall.info --doc/gccinstall.info: $(TEXI_GCCINSTALL_FILES) -- if [ x$(BUILD_INFO) = xinfo ]; then \ -- $(MAKEINFO) $(MAKEINFOFLAGS) -I $(gcc_docdir) \ -- -I $(gcc_docdir)/include -o $@ $<; \ -- fi -+doc/gccinstall.info: - - doc/cpp.dvi: $(TEXI_CPP_FILES) - doc/gcc.dvi: $(TEXI_GCC_FILES) diff --git a/toolchain/gcc/patches/9.3.0/110-Fix-MIPS-PR-84790.patch b/toolchain/gcc/patches/9.3.0/110-Fix-MIPS-PR-84790.patch deleted file mode 100644 index c7e60e315..000000000 --- a/toolchain/gcc/patches/9.3.0/110-Fix-MIPS-PR-84790.patch +++ /dev/null @@ -1,20 +0,0 @@ -Fix https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84790. -MIPS16 functions have a static assembler prologue which clobbers -registers v0 and v1. Add these register clobbers to function call -instructions. - ---- a/gcc/config/mips/mips.c -+++ b/gcc/config/mips/mips.c -@@ -3131,6 +3131,12 @@ mips_emit_call_insn (rtx pattern, rtx or - emit_insn (gen_update_got_version ()); - } - -+ if (TARGET_MIPS16 && TARGET_USE_GOT) -+ { -+ clobber_reg (&CALL_INSN_FUNCTION_USAGE (insn), MIPS16_PIC_TEMP); -+ clobber_reg (&CALL_INSN_FUNCTION_USAGE (insn), MIPS_PROLOGUE_TEMP (word_mode)); -+ } -+ - if (TARGET_MIPS16 - && TARGET_EXPLICIT_RELOCS - && TARGET_CALL_CLOBBERED_GP) diff --git a/toolchain/gcc/patches/9.3.0/230-musl_libssp.patch b/toolchain/gcc/patches/9.3.0/230-musl_libssp.patch deleted file mode 100644 index 41d75b020..000000000 --- a/toolchain/gcc/patches/9.3.0/230-musl_libssp.patch +++ /dev/null @@ -1,13 +0,0 @@ ---- a/gcc/gcc.c -+++ b/gcc/gcc.c -@@ -876,7 +876,9 @@ proper position among the other output f - #endif - - #ifndef LINK_SSP_SPEC --#ifdef TARGET_LIBC_PROVIDES_SSP -+#if DEFAULT_LIBC == LIBC_MUSL -+#define LINK_SSP_SPEC "-lssp_nonshared" -+#elif defined(TARGET_LIBC_PROVIDES_SSP) - #define LINK_SSP_SPEC "%{fstack-protector|fstack-protector-all" \ - "|fstack-protector-strong|fstack-protector-explicit:}" - #else diff --git a/toolchain/gcc/patches/9.3.0/300-mips_Os_cpu_rtx_cost_model.patch b/toolchain/gcc/patches/9.3.0/300-mips_Os_cpu_rtx_cost_model.patch deleted file mode 100644 index 5caa852a1..000000000 --- a/toolchain/gcc/patches/9.3.0/300-mips_Os_cpu_rtx_cost_model.patch +++ /dev/null @@ -1,21 +0,0 @@ -commit ecf7671b769fe96f7b5134be442089f8bdba55d2 -Author: Felix Fietkau -Date: Thu Aug 4 20:29:45 2016 +0200 - -gcc: add a patch to generate better code with Os on mips - -Also happens to reduce compressed code size a bit - -Signed-off-by: Felix Fietkau - ---- a/gcc/config/mips/mips.c -+++ b/gcc/config/mips/mips.c -@@ -19994,7 +19994,7 @@ mips_option_override (void) - flag_pcc_struct_return = 0; - - /* Decide which rtx_costs structure to use. */ -- if (optimize_size) -+ if (0 && optimize_size) - mips_cost = &mips_rtx_cost_optimize_size; - else - mips_cost = &mips_rtx_cost_data[mips_tune]; diff --git a/toolchain/gcc/patches/9.3.0/810-arm-softfloat-libgcc.patch b/toolchain/gcc/patches/9.3.0/810-arm-softfloat-libgcc.patch deleted file mode 100644 index 5c9d86aea..000000000 --- a/toolchain/gcc/patches/9.3.0/810-arm-softfloat-libgcc.patch +++ /dev/null @@ -1,33 +0,0 @@ -commit 8570c4be394cff7282f332f97da2ff569a927ddb -Author: Imre Kaloz -Date: Wed Feb 2 20:06:12 2011 +0000 - - fixup arm soft-float symbols - - SVN-Revision: 25325 - ---- a/libgcc/config/arm/t-linux -+++ b/libgcc/config/arm/t-linux -@@ -1,6 +1,10 @@ - LIB1ASMSRC = arm/lib1funcs.S - LIB1ASMFUNCS = _udivsi3 _divsi3 _umodsi3 _modsi3 _dvmd_lnx _clzsi2 _clzdi2 \ -- _ctzsi2 _arm_addsubdf3 _arm_addsubsf3 -+ _ctzsi2 _arm_addsubdf3 _arm_addsubsf3 \ -+ _arm_negdf2 _arm_muldivdf3 _arm_cmpdf2 _arm_unorddf2 \ -+ _arm_fixdfsi _arm_fixunsdfsi _arm_truncdfsf2 \ -+ _arm_negsf2 _arm_muldivsf3 _arm_cmpsf2 _arm_unordsf2 \ -+ _arm_fixsfsi _arm_fixunssfsi - - # Just for these, we omit the frame pointer since it makes such a big - # difference. ---- a/gcc/config/arm/linux-elf.h -+++ b/gcc/config/arm/linux-elf.h -@@ -58,8 +58,6 @@ - %{shared:-lc} \ - %{!shared:%{profile:-lc_p}%{!profile:-lc}}" - --#define LIBGCC_SPEC "%{mfloat-abi=soft*:-lfloat} -lgcc" -- - #define GLIBC_DYNAMIC_LINKER "/lib/ld-linux.so.2" - - #define LINUX_TARGET_LINK_SPEC "%{h*} \ diff --git a/toolchain/gcc/patches/9.3.0/820-libgcc_pic.patch b/toolchain/gcc/patches/9.3.0/820-libgcc_pic.patch deleted file mode 100644 index 0a316d35b..000000000 --- a/toolchain/gcc/patches/9.3.0/820-libgcc_pic.patch +++ /dev/null @@ -1,44 +0,0 @@ -commit c96312958c0621e72c9b32da5bc224ffe2161384 -Author: Felix Fietkau -Date: Mon Oct 19 23:26:09 2009 +0000 - - gcc: create a proper libgcc_pic.a static library for relinking (4.3.3+ for now, backport will follow) - - SVN-Revision: 18086 - ---- a/libgcc/Makefile.in -+++ b/libgcc/Makefile.in -@@ -927,11 +927,12 @@ $(libgcov-driver-objects): %$(objext): $ - - # Static libraries. - libgcc.a: $(libgcc-objects) -+libgcc_pic.a: $(libgcc-s-objects) - libgcov.a: $(libgcov-objects) - libunwind.a: $(libunwind-objects) - libgcc_eh.a: $(libgcc-eh-objects) - --libgcc.a libgcov.a libunwind.a libgcc_eh.a: -+libgcc.a libgcov.a libunwind.a libgcc_eh.a libgcc_pic.a: - -rm -f $@ - - objects="$(objects)"; \ -@@ -955,7 +956,7 @@ all: libunwind.a - endif - - ifeq ($(enable_shared),yes) --all: libgcc_eh.a libgcc_s$(SHLIB_EXT) -+all: libgcc_eh.a libgcc_pic.a libgcc_s$(SHLIB_EXT) - ifneq ($(LIBUNWIND),) - all: libunwind$(SHLIB_EXT) - libgcc_s$(SHLIB_EXT): libunwind$(SHLIB_EXT) -@@ -1161,6 +1162,10 @@ install-shared: - chmod 644 $(DESTDIR)$(inst_libdir)/libgcc_eh.a - $(RANLIB) $(DESTDIR)$(inst_libdir)/libgcc_eh.a - -+ $(INSTALL_DATA) libgcc_pic.a $(mapfile) $(DESTDIR)$(inst_libdir)/ -+ chmod 644 $(DESTDIR)$(inst_libdir)/libgcc_pic.a -+ $(RANLIB) $(DESTDIR)$(inst_libdir)/libgcc_pic.a -+ - $(subst @multilib_dir@,$(MULTIDIR),$(subst \ - @shlib_base_name@,libgcc_s,$(subst \ - @shlib_slibdir_qual@,$(MULTIOSSUBDIR),$(SHLIB_INSTALL)))) diff --git a/toolchain/gcc/patches/9.3.0/840-armv4_pass_fix-v4bx_to_ld.patch b/toolchain/gcc/patches/9.3.0/840-armv4_pass_fix-v4bx_to_ld.patch deleted file mode 100644 index 18aa021b9..000000000 --- a/toolchain/gcc/patches/9.3.0/840-armv4_pass_fix-v4bx_to_ld.patch +++ /dev/null @@ -1,28 +0,0 @@ -commit 7edc8ca5456d9743dd0075eb3cc5b04f4f24c8cc -Author: Imre Kaloz -Date: Wed Feb 2 19:34:36 2011 +0000 - - add armv4 fixup patches - - SVN-Revision: 25322 - - ---- a/gcc/config/arm/linux-eabi.h -+++ b/gcc/config/arm/linux-eabi.h -@@ -91,10 +91,15 @@ - #define MUSL_DYNAMIC_LINKER \ - "/lib/ld-musl-arm" MUSL_DYNAMIC_LINKER_E "%{mfloat-abi=hard:hf}.so.1" - -+/* For armv4 we pass --fix-v4bx to linker to support EABI */ -+#undef TARGET_FIX_V4BX_SPEC -+#define TARGET_FIX_V4BX_SPEC " %{mcpu=arm8|mcpu=arm810|mcpu=strongarm*"\ -+ "|march=armv4|mcpu=fa526|mcpu=fa626:--fix-v4bx}" -+ - /* At this point, bpabi.h will have clobbered LINK_SPEC. We want to - use the GNU/Linux version, not the generic BPABI version. */ - #undef LINK_SPEC --#define LINK_SPEC EABI_LINK_SPEC \ -+#define LINK_SPEC EABI_LINK_SPEC TARGET_FIX_V4BX_SPEC \ - LINUX_OR_ANDROID_LD (LINUX_TARGET_LINK_SPEC, \ - LINUX_TARGET_LINK_SPEC " " ANDROID_LINK_SPEC) - diff --git a/toolchain/gcc/patches/9.3.0/850-use_shared_libgcc.patch b/toolchain/gcc/patches/9.3.0/850-use_shared_libgcc.patch deleted file mode 100644 index a765e55a4..000000000 --- a/toolchain/gcc/patches/9.3.0/850-use_shared_libgcc.patch +++ /dev/null @@ -1,54 +0,0 @@ -commit dcfc40358b5a3cae7320c17f8d1cebd5ad5540cd -Author: Felix Fietkau -Date: Sun Feb 12 20:25:47 2012 +0000 - - gcc 4.6: port over the missing patch 850-use_shared_libgcc.patch to prevent libgcc crap from leaking into every single binary - - SVN-Revision: 30486 ---- a/gcc/config/arm/linux-eabi.h -+++ b/gcc/config/arm/linux-eabi.h -@@ -129,10 +129,6 @@ - "%{Ofast|ffast-math|funsafe-math-optimizations:crtfastmath.o%s} " \ - LINUX_OR_ANDROID_LD (GNU_USER_TARGET_ENDFILE_SPEC, ANDROID_ENDFILE_SPEC) - --/* Use the default LIBGCC_SPEC, not the version in linux-elf.h, as we -- do not use -lfloat. */ --#undef LIBGCC_SPEC -- - /* Clear the instruction cache from `beg' to `end'. This is - implemented in lib1funcs.S, so ensure an error if this definition - is used. */ ---- a/gcc/config/linux.h -+++ b/gcc/config/linux.h -@@ -66,6 +66,10 @@ see the files COPYING3 and COPYING.RUNTI - builtin_version ("CRuntime_Musl"); \ - } while (0) - -+#ifndef LIBGCC_SPEC -+#define LIBGCC_SPEC "%{static|static-libgcc:-lgcc}%{!static:%{!static-libgcc:-lgcc_s}}" -+#endif -+ - /* Determine which dynamic linker to use depending on whether GLIBC or - uClibc or Bionic or musl is the default C library and whether - -muclibc or -mglibc or -mbionic or -mmusl has been passed to change ---- a/libgcc/mkmap-symver.awk -+++ b/libgcc/mkmap-symver.awk -@@ -136,5 +136,5 @@ function output(lib) { - else if (inherit[lib]) - printf("} %s;\n", inherit[lib]); - else -- printf ("\n local:\n\t*;\n};\n"); -+ printf ("\n\t*;\n};\n"); - } ---- a/gcc/config/rs6000/linux.h -+++ b/gcc/config/rs6000/linux.h -@@ -62,6 +62,9 @@ - #undef CPP_OS_DEFAULT_SPEC - #define CPP_OS_DEFAULT_SPEC "%(cpp_os_linux)" - -+#undef LIBGCC_SPEC -+#define LIBGCC_SPEC "%{!static:%{!static-libgcc:-lgcc_s}} -lgcc" -+ - #undef LINK_SHLIB_SPEC - #define LINK_SHLIB_SPEC "%{shared:-shared} %{!shared: %{static:-static}} \ - %{static-pie:-static -pie --no-dynamic-linker -z text}" diff --git a/toolchain/gcc/patches/9.3.0/851-libgcc_no_compat.patch b/toolchain/gcc/patches/9.3.0/851-libgcc_no_compat.patch deleted file mode 100644 index d710e4071..000000000 --- a/toolchain/gcc/patches/9.3.0/851-libgcc_no_compat.patch +++ /dev/null @@ -1,22 +0,0 @@ -commit 64661de100da1ec1061ef3e5e400285dce115e6b -Author: Felix Fietkau -Date: Sun May 10 13:16:35 2015 +0000 - - gcc: add some size optimization patches - - Signed-off-by: Felix Fietkau - - SVN-Revision: 45664 - ---- a/libgcc/config/t-libunwind -+++ b/libgcc/config/t-libunwind -@@ -2,8 +2,7 @@ - - HOST_LIBGCC2_CFLAGS += -DUSE_GAS_SYMVER - --LIB2ADDEH = $(srcdir)/unwind-sjlj.c $(srcdir)/unwind-c.c \ -- $(srcdir)/unwind-compat.c $(srcdir)/unwind-dw2-fde-compat.c -+LIB2ADDEH = $(srcdir)/unwind-sjlj.c $(srcdir)/unwind-c.c - LIB2ADDEHSTATIC = $(srcdir)/unwind-sjlj.c $(srcdir)/unwind-c.c - - # Override the default value from t-slibgcc-elf-ver and mention -lunwind diff --git a/toolchain/gcc/patches/9.3.0/870-ppc_no_crtsavres.patch b/toolchain/gcc/patches/9.3.0/870-ppc_no_crtsavres.patch deleted file mode 100644 index 6ec22dd20..000000000 --- a/toolchain/gcc/patches/9.3.0/870-ppc_no_crtsavres.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- a/gcc/config/rs6000/rs6000.c -+++ b/gcc/config/rs6000/rs6000.c -@@ -24474,7 +24474,7 @@ rs6000_savres_strategy (rs6000_stack_t * - /* Define cutoff for using out-of-line functions to save registers. */ - if (DEFAULT_ABI == ABI_V4 || TARGET_ELF) - { -- if (!optimize_size) -+ if (1) - { - strategy |= SAVE_INLINE_FPRS | REST_INLINE_FPRS; - strategy |= SAVE_INLINE_GPRS | REST_INLINE_GPRS; diff --git a/toolchain/gcc/patches/9.3.0/881-no_tm_section.patch b/toolchain/gcc/patches/9.3.0/881-no_tm_section.patch deleted file mode 100644 index fab5db3be..000000000 --- a/toolchain/gcc/patches/9.3.0/881-no_tm_section.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- a/libgcc/crtstuff.c -+++ b/libgcc/crtstuff.c -@@ -152,7 +152,7 @@ call_ ## FUNC (void) \ - #endif - - #if !defined(USE_TM_CLONE_REGISTRY) && defined(OBJECT_FORMAT_ELF) --# define USE_TM_CLONE_REGISTRY 1 -+# define USE_TM_CLONE_REGISTRY 0 - #endif - - /* We do not want to add the weak attribute to the declarations of these diff --git a/toolchain/gcc/patches/9.3.0/900-bad-mips16-crt.patch b/toolchain/gcc/patches/9.3.0/900-bad-mips16-crt.patch deleted file mode 100644 index dd6e9dc88..000000000 --- a/toolchain/gcc/patches/9.3.0/900-bad-mips16-crt.patch +++ /dev/null @@ -1,9 +0,0 @@ ---- a/libgcc/config/mips/t-mips16 -+++ b/libgcc/config/mips/t-mips16 -@@ -43,3 +43,6 @@ SYNC_CFLAGS = -mno-mips16 - - # Version these symbols if building libgcc.so. - SHLIB_MAPFILES += $(srcdir)/config/mips/libgcc-mips16.ver -+ -+CRTSTUFF_T_CFLAGS += -mno-mips16 -+CRTSTUFF_T_CFLAGS_S += -mno-mips16 diff --git a/toolchain/gcc/patches/9.3.0/910-mbsd_multi.patch b/toolchain/gcc/patches/9.3.0/910-mbsd_multi.patch deleted file mode 100644 index 8908e7bfc..000000000 --- a/toolchain/gcc/patches/9.3.0/910-mbsd_multi.patch +++ /dev/null @@ -1,146 +0,0 @@ -commit 99368862e44740ff4fd33760893f04e14f9dbdf1 -Author: Felix Fietkau -Date: Tue Jul 31 00:52:27 2007 +0000 - - Port the mbsd_multi patch from freewrt, which adds -fhonour-copts. This will emit warnings in packages that don't use our target cflags properly - - SVN-Revision: 8256 - - This patch brings over a feature from MirBSD: - * -fhonour-copts - If this option is not given, it's warned (depending - on environment variables). This is to catch errors - of misbuilt packages which override CFLAGS themselves. - - This patch was authored by Thorsten Glaser - with copyright assignment to the FSF in effect. - ---- a/gcc/c-family/c-opts.c -+++ b/gcc/c-family/c-opts.c -@@ -107,6 +107,9 @@ static dump_flags_t original_dump_flags; - /* Whether any standard preincluded header has been preincluded. */ - static bool done_preinclude; - -+/* Check if a port honours COPTS. */ -+static int honour_copts = 0; -+ - static void handle_OPT_d (const char *); - static void set_std_cxx98 (int); - static void set_std_cxx11 (int); -@@ -452,6 +455,12 @@ c_common_handle_option (size_t scode, co - flag_no_builtin = !value; - break; - -+ case OPT_fhonour_copts: -+ if (c_language == clk_c) { -+ honour_copts++; -+ } -+ break; -+ - case OPT_fconstant_string_class_: - constant_string_class_name = arg; - break; -@@ -1138,6 +1147,47 @@ c_common_init (void) - return false; - } - -+ if (c_language == clk_c) { -+ char *ev = getenv ("GCC_HONOUR_COPTS"); -+ int evv; -+ if (ev == NULL) -+ evv = -1; -+ else if ((*ev == '0') || (*ev == '\0')) -+ evv = 0; -+ else if (*ev == '1') -+ evv = 1; -+ else if (*ev == '2') -+ evv = 2; -+ else if (*ev == 's') -+ evv = -1; -+ else { -+ warning (0, "unknown GCC_HONOUR_COPTS value, assuming 1"); -+ evv = 1; /* maybe depend this on something like MIRBSD_NATIVE? */ -+ } -+ if (evv == 1) { -+ if (honour_copts == 0) { -+ error ("someone does not honour COPTS at all in lenient mode"); -+ return false; -+ } else if (honour_copts != 1) { -+ warning (0, "someone does not honour COPTS correctly, passed %d times", -+ honour_copts); -+ } -+ } else if (evv == 2) { -+ if (honour_copts == 0) { -+ error ("someone does not honour COPTS at all in strict mode"); -+ return false; -+ } else if (honour_copts != 1) { -+ error ("someone does not honour COPTS correctly, passed %d times", -+ honour_copts); -+ return false; -+ } -+ } else if (evv == 0) { -+ if (honour_copts != 1) -+ inform (UNKNOWN_LOCATION, "someone does not honour COPTS correctly, passed %d times", -+ honour_copts); -+ } -+ } -+ - return true; - } - ---- a/gcc/c-family/c.opt -+++ b/gcc/c-family/c.opt -@@ -1521,6 +1521,9 @@ C++ ObjC++ Optimization Alias(fexception - fhonor-std - C++ ObjC++ Deprecated - -+fhonour-copts -+C ObjC C++ ObjC++ RejectNegative -+ - fhosted - C ObjC - Assume normal C execution environment. ---- a/gcc/common.opt -+++ b/gcc/common.opt -@@ -1589,6 +1589,9 @@ fguess-branch-probability - Common Report Var(flag_guess_branch_prob) Optimization - Enable guessing of branch probabilities. - -+fhonour-copts -+Common RejectNegative -+ - ; Nonzero means ignore `#ident' directives. 0 means handle them. - ; Generate position-independent code for executables if possible - ; On SVR4 targets, it also controls whether or not to emit a ---- a/gcc/doc/invoke.texi -+++ b/gcc/doc/invoke.texi -@@ -7666,6 +7666,17 @@ This option is only supported for C and - @option{-Wall} and by @option{-Wpedantic}, which can be disabled with - @option{-Wno-pointer-sign}. - -+@item -fhonour-copts -+@opindex fhonour-copts -+If @env{GCC_HONOUR_COPTS} is set to 1, abort if this option is not -+given at least once, and warn if it is given more than once. -+If @env{GCC_HONOUR_COPTS} is set to 2, abort if this option is not -+given exactly once. -+If @env{GCC_HONOUR_COPTS} is set to 0 or unset, warn if this option -+is not given exactly once. -+The warning is quelled if @env{GCC_HONOUR_COPTS} is set to @samp{s}. -+This flag and environment variable only affect the C language. -+ - @item -Wstack-protector - @opindex Wstack-protector - @opindex Wno-stack-protector ---- a/gcc/opts.c -+++ b/gcc/opts.c -@@ -2314,6 +2314,9 @@ common_handle_option (struct gcc_options - /* Currently handled in a prescan. */ - break; - -+ case OPT_fhonour_copts: -+ break; -+ - case OPT_Werror: - dc->warning_as_error_requested = value; - break; diff --git a/toolchain/gcc/patches/9.3.0/920-specs_nonfatal_getenv.patch b/toolchain/gcc/patches/9.3.0/920-specs_nonfatal_getenv.patch deleted file mode 100644 index db27950de..000000000 --- a/toolchain/gcc/patches/9.3.0/920-specs_nonfatal_getenv.patch +++ /dev/null @@ -1,22 +0,0 @@ -Author: Jo-Philipp Wich -Date: Sat Apr 21 03:02:39 2012 +0000 - - gcc: add patch to make the getenv() spec function nonfatal if requested environment variable is unset - - SVN-Revision: 31390 - ---- a/gcc/gcc.c -+++ b/gcc/gcc.c -@@ -9318,8 +9318,10 @@ getenv_spec_function (int argc, const ch - } - - if (!value) -- fatal_error (input_location, -- "environment variable %qs not defined", varname); -+ { -+ warning (input_location, "environment variable %qs not defined", varname); -+ value = ""; -+ } - - /* We have to escape every character of the environment variable so - they are not interpreted as active spec characters. A diff --git a/toolchain/gcc/patches/9.3.0/930-fix-mips-noexecstack.patch b/toolchain/gcc/patches/9.3.0/930-fix-mips-noexecstack.patch deleted file mode 100644 index 95d13abad..000000000 --- a/toolchain/gcc/patches/9.3.0/930-fix-mips-noexecstack.patch +++ /dev/null @@ -1,111 +0,0 @@ -From da45b3fde60095756f5f6030f6012c23a3d34429 Mon Sep 17 00:00:00 2001 -From: Andrew McDonnell -Date: Fri, 3 Oct 2014 19:09:00 +0930 -Subject: Add .note.GNU-stack section - -See http://lists.busybox.net/pipermail/uclibc/2014-October/048671.html -Below copied from https://gcc.gnu.org/ml/gcc-patches/2014-09/msg02430.html - -Re: [Patch, MIPS] Add .note.GNU-stack section - - From: Steve Ellcey - -On Wed, 2014-09-10 at 10:15 -0700, Eric Christopher wrote: -> -> -> On Wed, Sep 10, 2014 at 9:27 AM, wrote: - -> This works except you did not update the assembly files in -> libgcc or glibc. We (Cavium) have the same patch in our tree -> for a few released versions. - -> Mind just checking yours in then Andrew? - -> Thanks! -> -eric - -I talked to Andrew about what files he changed in GCC and created and -tested this new patch. Andrew also mentioned changing some assembly -files in glibc but I don't see any use of '.section .note.GNU-stack' in -any assembly files in glibc (for any platform) so I wasn't planning on -creating a glibc to add them to mips glibc assembly language files. - -OK to check in this patch? - -Steve Ellcey -sellcey@mips.com - - - -2014-09-26 Steve Ellcey ---- - gcc/config/mips/mips.c | 3 +++ - libgcc/config/mips/crti.S | 4 ++++ - libgcc/config/mips/crtn.S | 3 +++ - libgcc/config/mips/mips16.S | 4 ++++ - libgcc/config/mips/vr4120-div.S | 4 ++++ - 5 files changed, 18 insertions(+) - ---- a/gcc/config/mips/mips.c -+++ b/gcc/config/mips/mips.c -@@ -22822,6 +22822,9 @@ mips_starting_frame_offset (void) - #undef TARGET_STARTING_FRAME_OFFSET - #define TARGET_STARTING_FRAME_OFFSET mips_starting_frame_offset - -+#undef TARGET_ASM_FILE_END -+#define TARGET_ASM_FILE_END file_end_indicate_exec_stack -+ - struct gcc_target targetm = TARGET_INITIALIZER; - - #include "gt-mips.h" ---- a/libgcc/config/mips/crti.S -+++ b/libgcc/config/mips/crti.S -@@ -21,6 +21,10 @@ a copy of the GCC Runtime Library Except - see the files COPYING3 and COPYING.RUNTIME respectively. If not, see - . */ - -+ -+/* An executable stack is *not* required for these functions. */ -+ .section .note.GNU-stack,"",%progbits -+ - /* 4 slots for argument spill area. 1 for cpreturn, 1 for stack. - Return spill offset of 40 and 20. Aligned to 16 bytes for n32. */ - ---- a/libgcc/config/mips/crtn.S -+++ b/libgcc/config/mips/crtn.S -@@ -21,6 +21,9 @@ a copy of the GCC Runtime Library Except - see the files COPYING3 and COPYING.RUNTIME respectively. If not, see - . */ - -+/* An executable stack is *not* required for these functions. */ -+ .section .note.GNU-stack,"",%progbits -+ - /* 4 slots for argument spill area. 1 for cpreturn, 1 for stack. - Return spill offset of 40 and 20. Aligned to 16 bytes for n32. */ - ---- a/libgcc/config/mips/mips16.S -+++ b/libgcc/config/mips/mips16.S -@@ -48,6 +48,10 @@ see the files COPYING3 and COPYING.RUNTI - values using the soft-float calling convention, but do the actual - operation using the hard floating point instructions. */ - -+/* An executable stack is *not* required for these functions. */ -+ .section .note.GNU-stack,"",%progbits -+ .previous -+ - #if defined _MIPS_SIM && (_MIPS_SIM == _ABIO32 || _MIPS_SIM == _ABIO64) - - /* This file contains 32-bit assembly code. */ ---- a/libgcc/config/mips/vr4120-div.S -+++ b/libgcc/config/mips/vr4120-div.S -@@ -26,6 +26,10 @@ see the files COPYING3 and COPYING.RUNTI - -mfix-vr4120. div and ddiv do not give the correct result when one - of the operands is negative. */ - -+/* An executable stack is *not* required for these functions. */ -+ .section .note.GNU-stack,"",%progbits -+ .previous -+ - .set nomips16 - - #define DIV \ diff --git a/toolchain/gcc/patches/9.3.0/931-libffi-fix-MIPS-softfloat-build-issue.patch b/toolchain/gcc/patches/9.3.0/931-libffi-fix-MIPS-softfloat-build-issue.patch deleted file mode 100644 index fb4cb1533..000000000 --- a/toolchain/gcc/patches/9.3.0/931-libffi-fix-MIPS-softfloat-build-issue.patch +++ /dev/null @@ -1,168 +0,0 @@ -From c0c62fa4256f805389f16ebfc4a60cf789129b50 Mon Sep 17 00:00:00 2001 -From: BangLang Huang -Date: Wed, 9 Nov 2016 10:36:49 +0800 -Subject: [PATCH] libffi: fix MIPS softfloat build issue - -Backported from github.com/libffi/libffi#272 - -Signed-off-by: BangLang Huang -Signed-off-by: Yousong Zhou ---- - libffi/src/mips/n32.S | 17 +++++++++++++++++ - libffi/src/mips/o32.S | 17 +++++++++++++++++ - 2 files changed, 34 insertions(+) - ---- a/libffi/src/mips/n32.S -+++ b/libffi/src/mips/n32.S -@@ -107,6 +107,16 @@ loadregs: - - REG_L t6, 3*FFI_SIZEOF_ARG($fp) # load the flags word into t6. - -+#ifdef __mips_soft_float -+ REG_L a0, 0*FFI_SIZEOF_ARG(t9) -+ REG_L a1, 1*FFI_SIZEOF_ARG(t9) -+ REG_L a2, 2*FFI_SIZEOF_ARG(t9) -+ REG_L a3, 3*FFI_SIZEOF_ARG(t9) -+ REG_L a4, 4*FFI_SIZEOF_ARG(t9) -+ REG_L a5, 5*FFI_SIZEOF_ARG(t9) -+ REG_L a6, 6*FFI_SIZEOF_ARG(t9) -+ REG_L a7, 7*FFI_SIZEOF_ARG(t9) -+#else - and t4, t6, ((1< -Date: Fri, 4 May 2018 18:20:53 +0800 -Subject: [PATCH] gotools: fix compilation when making cross compiler - -libgo is "the runtime support library for the Go programming language. -This library is intended for use with the Go frontend." - -gccgo will link target files with libgo.so which depends on libgcc_s.so.1, but -the linker will complain that it cannot find it. That's because shared libgcc -is not present in the install directory yet. libgo.so was made without problem -because gcc will emit -lgcc_s when compiled with -shared option. When gotools -were being made, it was supplied with -static-libgcc thus no link option was -provided. Check LIBGO in gcc/go/gcc-spec.c for how gccgo make a builtin spec -for linking with libgo.so - -- GccgoCrossCompilation, https://github.com/golang/go/wiki/GccgoCrossCompilation -- Cross-building instructions, http://www.eglibc.org/archives/patches/msg00078.html - -When 3-pass GCC compilation is used, shared libgcc runtime libraries will be -available after gcc pass2 completed and will meet the gotools link requirement -at gcc pass3 ---- - gotools/Makefile.am | 4 +++- - gotools/Makefile.in | 4 +++- - 2 files changed, 6 insertions(+), 2 deletions(-) - ---- a/gotools/Makefile.am -+++ b/gotools/Makefile.am -@@ -26,6 +26,7 @@ PWD_COMMAND = $${PWDCMD-pwd} - STAMP = echo timestamp > - - libgodir = ../$(target_noncanonical)/libgo -+libgccdir = ../$(target_noncanonical)/libgcc - LIBGODEP = $(libgodir)/libgo.la - - LIBGOTOOL = $(libgodir)/libgotool.a -@@ -41,7 +42,8 @@ GOCFLAGS = $(CFLAGS_FOR_TARGET) - GOCOMPILE = $(GOCOMPILER) $(GOCFLAGS) - - AM_GOCFLAGS = -I $(libgodir) --AM_LDFLAGS = -L $(libgodir) -L $(libgodir)/.libs -+AM_LDFLAGS = -L $(libgodir) -L $(libgodir)/.libs \ -+ -L $(libgccdir) -L $(libgccdir)/.libs -lgcc_s - GOLINK = $(GOCOMPILER) $(GOCFLAGS) $(AM_GOCFLAGS) $(LDFLAGS) $(AM_LDFLAGS) -o $@ - - libgosrcdir = $(srcdir)/../libgo/go ---- a/gotools/Makefile.in -+++ b/gotools/Makefile.in -@@ -337,6 +337,7 @@ mkinstalldirs = $(SHELL) $(toplevel_srcd - PWD_COMMAND = $${PWDCMD-pwd} - STAMP = echo timestamp > - libgodir = ../$(target_noncanonical)/libgo -+libgccdir = ../$(target_noncanonical)/libgcc - LIBGODEP = $(libgodir)/libgo.la - LIBGOTOOL = $(libgodir)/libgotool.a - @NATIVE_FALSE@GOCOMPILER = $(GOC) -@@ -346,7 +347,8 @@ LIBGOTOOL = $(libgodir)/libgotool.a - GOCFLAGS = $(CFLAGS_FOR_TARGET) - GOCOMPILE = $(GOCOMPILER) $(GOCFLAGS) - AM_GOCFLAGS = -I $(libgodir) --AM_LDFLAGS = -L $(libgodir) -L $(libgodir)/.libs -+AM_LDFLAGS = -L $(libgodir) -L $(libgodir)/.libs \ -+ -L $(libgccdir) -L $(libgccdir)/.libs -lgcc_s - GOLINK = $(GOCOMPILER) $(GOCFLAGS) $(AM_GOCFLAGS) $(LDFLAGS) $(AM_LDFLAGS) -o $@ - libgosrcdir = $(srcdir)/../libgo/go - cmdsrcdir = $(libgosrcdir)/cmd diff --git a/toolchain/glibc/patches/050-Revert-Disallow-use-of-DES-encryption-functions-in-n.patch b/toolchain/glibc/patches/050-Revert-Disallow-use-of-DES-encryption-functions-in-n.patch index cb2ae0550..7dfc8a558 100644 --- a/toolchain/glibc/patches/050-Revert-Disallow-use-of-DES-encryption-functions-in-n.patch +++ b/toolchain/glibc/patches/050-Revert-Disallow-use-of-DES-encryption-functions-in-n.patch @@ -596,7 +596,7 @@ provides them. /* The enhanced internationalization capabilities according to XPG4.2 are present. */ #define _XOPEN_ENH_I18N 1 -@@ -1146,17 +1149,25 @@ ssize_t copy_file_range (int __infd, __o +@@ -1150,17 +1153,25 @@ ssize_t copy_file_range (int __infd, __o extern int fdatasync (int __fildes); #endif /* Use POSIX199309 */ @@ -627,7 +627,7 @@ provides them. range [FROM - N + 1, FROM - 1]. If N is odd the first byte in FROM --- a/stdlib/stdlib.h +++ b/stdlib/stdlib.h -@@ -968,6 +968,12 @@ extern int getsubopt (char **__restrict +@@ -971,6 +971,12 @@ extern int getsubopt (char **__restrict #endif diff --git a/toolchain/glibc/patches/200-add-dl-search-paths.patch b/toolchain/glibc/patches/200-add-dl-search-paths.patch index 08e901d2e..fd4af3694 100644 --- a/toolchain/glibc/patches/200-add-dl-search-paths.patch +++ b/toolchain/glibc/patches/200-add-dl-search-paths.patch @@ -2,7 +2,7 @@ add /usr/lib to default search path for the dynamic linker --- a/Makeconfig +++ b/Makeconfig -@@ -610,6 +610,9 @@ else +@@ -618,6 +618,9 @@ else default-rpath = $(libdir) endif diff --git a/toolchain/musl/Config.in b/toolchain/musl/Config.in index 7e83b6fa5..67ede4d1e 100644 --- a/toolchain/musl/Config.in +++ b/toolchain/musl/Config.in @@ -1,9 +1,10 @@ # Password crypt stubbing config MUSL_DISABLE_CRYPT_SIZE_HACK - bool "Include crypt() support for SHA256, SHA512 and Blowfish ciphers" - depends on TOOLCHAINOPTS && USE_MUSL && !EXTERNAL_TOOLCHAIN - default n + bool + prompt "Include crypt() support for SHA256, SHA512 and Blowfish ciphers" if TOOLCHAINOPTS + depends on USE_MUSL && !EXTERNAL_TOOLCHAIN + default y help Enable this option to re-include crypt() support for the SHA256, SHA512 and Blowfish ciphers. Without this option, attempting to hash a string with a salt