From d1c7890c220138553f0e4ba8a5d51096a5ed133a Mon Sep 17 00:00:00 2001 From: coolsnowwolf Date: Tue, 19 Dec 2017 15:25:36 +0800 Subject: [PATCH] x86:Add support for kernel 4.14 and new toolchain --- 0027-x86-Add-support-for-kernel-4.14.patch | 1233 ----------------- include/kernel-version.mk | 2 +- include/target.mk | 2 +- package/kernel/kmod-sched-cake/Makefile | 6 +- package/kernel/linux/modules/block.mk | 13 +- package/kernel/linux/modules/crypto.mk | 61 +- package/kernel/linux/modules/fs.mk | 5 +- package/kernel/linux/modules/i2c.mk | 26 + package/kernel/linux/modules/iio.mk | 120 ++ package/kernel/linux/modules/lib.mk | 32 +- package/kernel/linux/modules/netdevices.mk | 40 +- package/kernel/linux/modules/netfilter.mk | 17 + package/kernel/linux/modules/netsupport.mk | 28 +- package/kernel/linux/modules/other.mk | 143 +- package/kernel/linux/modules/sound.mk | 3 +- package/kernel/linux/modules/usb.mk | 28 +- package/kernel/linux/modules/video.mk | 2 +- package/lean/automount/Makefile | 2 +- target/linux/x86/Makefile | 2 +- toolchain-old/Config.in | 318 +++++ toolchain-old/Makefile | 97 ++ toolchain-old/binutils/Config.in | 32 + toolchain-old/binutils/Config.version | 16 + toolchain-old/binutils/Makefile | 112 ++ .../001-MIPS_BFD_Remove_EI_ABIVERSION_5.patch | 36 + .../2.27/300-001_ld_makefile_patch.patch | 22 + .../2.27/300-012_check_ldrunpath_length.patch | 20 + .../400-mips_no_dynamic_linking_sym.patch | 18 + ...e-default-emulation-for-mips64-linux.patch | 37 + .../2.28/300-001_ld_makefile_patch.patch | 22 + .../2.28/300-012_check_ldrunpath_length.patch | 20 + .../400-mips_no_dynamic_linking_sym.patch | 18 + ...e-default-emulation-for-mips64-linux.patch | 37 + .../300-001_ld_makefile_patch.patch | 22 + .../300-012_check_ldrunpath_length.patch | 20 + toolchain-old/fortify-headers/Makefile | 28 + toolchain-old/gcc/Config.in | 78 ++ toolchain-old/gcc/Config.version | 14 + toolchain-old/gcc/common.mk | 228 +++ toolchain-old/gcc/exclude-testsuite | 9 + toolchain-old/gcc/files/alternate-arch-cc.in | 3 + toolchain-old/gcc/final/Makefile | 87 ++ toolchain-old/gcc/initial/Makefile | 36 + toolchain-old/gcc/minimal/Makefile | 29 + .../001-revert_register_mode_search.patch | 0 .../patches/5.4.0/002-case_insensitive.patch | 0 .../gcc/patches/5.4.0/010-documentation.patch | 0 .../patches/5.4.0/020-no-plt-backport.patch | 0 .../5.4.0/040-fix-mips-ICE-PR-68400.patch | 0 .../gcc/patches/5.4.0/200-musl_config.patch | 0 .../gcc/patches/5.4.0/201-musl_arm.patch | 0 .../gcc/patches/5.4.0/202-musl_mips.patch | 0 .../gcc/patches/5.4.0/203-musl_powerpc.patch | 0 .../gcc/patches/5.4.0/204-musl_sh.patch | 0 .../gcc/patches/5.4.0/205-musl_x86.patch | 0 .../gcc/patches/5.4.0/206-musl_aarch64.patch | 0 .../patches/5.4.0/207-musl_fixincludes.patch | 0 .../patches/5.4.0/209-musl_libstdc++.patch | 0 .../gcc/patches/5.4.0/230-musl_libssp.patch | 0 .../patches/5.4.0/240-musl-libitm-fixes.patch | 0 .../gcc/patches/5.4.0/250-add-musl.patch | 0 .../5.4.0/260-musl-add-unwind-fix.patch | 0 .../270-musl-add-powerpc-softfloat-fix.patch | 0 .../280-musl-disable-ifunc-by-default.patch | 0 .../300-mips_Os_cpu_rtx_cost_model.patch | 0 .../5.4.0/800-arm_v5te_no_ldrd_strd.patch | 0 .../5.4.0/810-arm-softfloat-libgcc.patch | 0 .../gcc/patches/5.4.0/820-libgcc_pic.patch | 0 .../5.4.0/830-arm_unbreak_armv4t.patch | 0 .../5.4.0/840-armv4_pass_fix-v4bx_to_ld.patch | 0 .../patches/5.4.0/850-use_shared_libgcc.patch | 0 .../patches/5.4.0/851-libgcc_no_compat.patch | 0 .../patches/5.4.0/870-ppc_no_crtsavres.patch | 0 .../patches/5.4.0/880-no_java_section.patch | 0 .../gcc/patches/5.4.0/881-no_tm_section.patch | 0 .../patches/5.4.0/900-bad-mips16-crt.patch | 0 .../gcc/patches/5.4.0/910-mbsd_multi.patch | 0 .../5.4.0/920-specs_nonfatal_getenv.patch | 0 .../5.4.0/930-fix-mips-noexecstack.patch | 0 .../931-fix-MIPS-softfloat-build-issue.patch | 0 .../5.4.0/940-no-clobber-stamp-bits.patch | 0 .../5.4.0/950-cpp_file_path_translation.patch | 0 .../gcc/patches/5.4.0/960-go_libm.patch | 0 .../gcc/patches/5.4.0/970-warn_bug.patch | 0 .../001-revert_register_mode_search.patch | 65 + .../patches/6.3.0}/002-case_insensitive.patch | 0 .../gcc/patches/6.3.0/010-documentation.patch | 23 + .../gcc/patches/6.3.0/230-musl_libssp.patch | 13 + .../280-musl-disable-ifunc-by-default.patch | 36 + .../300-mips_Os_cpu_rtx_cost_model.patch | 11 + .../6.3.0/800-arm_v5te_no_ldrd_strd.patch | 11 + .../6.3.0/810-arm-softfloat-libgcc.patch | 25 + .../gcc/patches/6.3.0/820-libgcc_pic.patch | 36 + .../6.3.0/830-arm_unbreak_armv4t.patch | 13 + .../6.3.0/840-armv4_pass_fix-v4bx_to_ld.patch | 19 + .../patches/6.3.0/850-use_shared_libgcc.patch | 47 + .../patches/6.3.0}/851-libgcc_no_compat.patch | 0 .../patches/6.3.0/870-ppc_no_crtsavres.patch | 11 + .../patches/6.3.0/880-no_java_section.patch | 11 + .../patches/6.3.0}/881-no_tm_section.patch | 0 .../patches/6.3.0}/900-bad-mips16-crt.patch | 0 .../gcc/patches/6.3.0/910-mbsd_multi.patch | 222 +++ .../6.3.0/920-specs_nonfatal_getenv.patch | 15 + .../6.3.0/930-fix-mips-noexecstack.patch | 111 ++ .../6.3.0/940-no-clobber-stamp-bits.patch | 11 + .../6.3.0/950-cpp_file_path_translation.patch | 182 +++ .../patches/6.3.0/960-fix-ubsan-defref.patch | 11 + .../001-revert_register_mode_search.patch | 0 .../patches/7.1.0/002-case_insensitive.patch | 14 + .../gcc/patches/7.1.0/010-documentation.patch | 0 .../gcc/patches/7.1.0/230-musl_libssp.patch | 0 .../300-mips_Os_cpu_rtx_cost_model.patch | 0 .../7.1.0/800-arm_v5te_no_ldrd_strd.patch | 0 .../7.1.0/810-arm-softfloat-libgcc.patch | 0 .../gcc/patches/7.1.0/820-libgcc_pic.patch | 0 .../7.1.0/840-armv4_pass_fix-v4bx_to_ld.patch | 0 .../patches/7.1.0/850-use_shared_libgcc.patch | 0 .../patches/7.1.0/851-libgcc_no_compat.patch | 12 + .../patches/7.1.0/870-ppc_no_crtsavres.patch | 0 .../gcc/patches/7.1.0/881-no_tm_section.patch | 11 + .../patches/7.1.0/900-bad-mips16-crt.patch | 9 + .../gcc/patches/7.1.0/910-mbsd_multi.patch | 0 .../7.1.0/920-specs_nonfatal_getenv.patch | 0 .../7.1.0/930-fix-mips-noexecstack.patch | 0 .../7.1.0/940-no-clobber-stamp-bits.patch | 0 .../7.1.0/950-cpp_file_path_translation.patch | 0 .../001-revert_register_mode_search.patch | 65 + .../002-case_insensitive.patch | 14 + .../010-documentation.patch | 23 + .../arc-2017.03-release/230-musl_libssp.patch | 13 + .../280-musl-disable-ifunc-by-default.patch | 36 + .../300-mips_Os_cpu_rtx_cost_model.patch | 11 + .../800-arm_v5te_no_ldrd_strd.patch | 11 + .../810-arm-softfloat-libgcc.patch | 25 + .../arc-2017.03-release/820-libgcc_pic.patch | 36 + .../830-arm_unbreak_armv4t.patch | 13 + .../840-armv4_pass_fix-v4bx_to_ld.patch | 19 + .../850-use_shared_libgcc.patch | 47 + .../851-libgcc_no_compat.patch | 12 + .../870-ppc_no_crtsavres.patch | 11 + .../880-no_java_section.patch | 11 + .../881-no_tm_section.patch | 11 + .../900-bad-mips16-crt.patch | 9 + .../arc-2017.03-release/910-mbsd_multi.patch | 222 +++ .../920-specs_nonfatal_getenv.patch | 15 + .../930-fix-mips-noexecstack.patch | 111 ++ .../940-no-clobber-stamp-bits.patch | 11 + .../950-cpp_file_path_translation.patch | 182 +++ toolchain-old/gdb/Makefile | 68 + .../patches-arc/100-no_extern_inline.patch | 32 + .../gdb/patches-arc/110-no_testsuite.patch | 21 + .../120-fix-compile-flag-mismatch.patch | 11 + .../gdb/patches/100-no_extern_inline.patch | 32 + .../gdb/patches/110-no_testsuite.patch | 21 + .../120-fix-compile-flag-mismatch.patch | 11 + toolchain-old/glibc/Makefile | 32 + toolchain-old/glibc/common.mk | 94 ++ toolchain-old/glibc/headers/Makefile | 28 + toolchain-old/glibc/include/libintl.h | 6 + .../glibc/patches/100-fix_cross_rpcgen.patch | 52 + .../patches/200-add-dl-search-paths.patch | 14 + toolchain-old/info.mk | 6 + toolchain-old/kernel-headers/Makefile | 102 ++ toolchain-old/musl/Makefile | 31 + toolchain-old/musl/common.mk | 62 + toolchain-old/musl/include/bits/wordsize.h | 1 + toolchain-old/musl/include/features.h | 48 + toolchain-old/musl/include/sgidefs.h | 73 + toolchain-old/musl/include/sys/cdefs.h | 378 +++++ toolchain-old/musl/include/sys/glibc-types.h | 35 + toolchain-old/musl/include/sys/queue.h | 574 ++++++++ .../musl/patches/100-add_glob_onlydir.patch | 11 + .../patches/110-read_timezone_from_fs.patch | 28 + .../patches/200-add_libssp_nonshared.patch | 50 + toolchain-old/musl/patches/300-relative.patch | 11 + ...ribute-to-some-function-declarations.patch | 197 +++ .../musl/patches/900-iconv_size_hack.patch | 68 + .../musl/patches/901-crypt_size_hack.patch | 60 + toolchain-old/uClibc/Config.in | 6 + toolchain-old/uClibc/Makefile | 37 + toolchain-old/uClibc/common.mk | 97 ++ toolchain-old/uClibc/config/arc | 10 + toolchain-old/uClibc/config/archs | 10 + toolchain-old/uClibc/config/arm | 9 + toolchain-old/uClibc/config/armeb | 9 + toolchain-old/uClibc/config/common | 226 +++ toolchain-old/uClibc/config/debug | 6 + toolchain-old/uClibc/config/i386 | 21 + toolchain-old/uClibc/config/i686 | 21 + toolchain-old/uClibc/config/m68k | 6 + toolchain-old/uClibc/config/mips | 18 + toolchain-old/uClibc/config/mips64 | 18 + toolchain-old/uClibc/config/mips64.32 | 19 + toolchain-old/uClibc/config/mips64.64 | 19 + toolchain-old/uClibc/config/mips64.n32 | 19 + toolchain-old/uClibc/config/mips64el | 18 + toolchain-old/uClibc/config/mips64el.32 | 19 + toolchain-old/uClibc/config/mips64el.64 | 19 + toolchain-old/uClibc/config/mips64el.n32 | 19 + toolchain-old/uClibc/config/mipsel | 18 + toolchain-old/uClibc/config/mipsel.cobalt | 18 + toolchain-old/uClibc/config/powerpc | 6 + toolchain-old/uClibc/config/powerpc.e500 | 6 + toolchain-old/uClibc/config/sparc | 8 + toolchain-old/uClibc/config/sparc.leon | 8 + toolchain-old/uClibc/config/x86_64 | 6 + toolchain-old/uClibc/headers/Makefile | 27 + toolchain-old/uClibc/utils/Makefile | 24 + toolchain-old/wrapper/Makefile | 62 + toolchain-old/yasm/Makefile | 63 + toolchain/Config.in | 11 +- toolchain/binutils/Config.in | 5 + toolchain/binutils/Config.version | 4 + toolchain/binutils/Makefile | 4 + .../2.29.1/300-001_ld_makefile_patch.patch | 22 + .../300-012_check_ldrunpath_length.patch | 20 + .../400-mips_no_dynamic_linking_sym.patch | 18 + ...e-default-emulation-for-mips64-linux.patch | 37 + toolchain/fortify-headers/Makefile | 4 +- toolchain/gcc/Config.in | 8 - toolchain/gcc/Config.version | 4 +- toolchain/gcc/common.mk | 18 +- .../001-revert_register_mode_search.patch | 65 + .../patches/5.5.0/002-case_insensitive.patch | 14 + .../gcc/patches/5.5.0/010-documentation.patch | 23 + .../patches/5.5.0/020-no-plt-backport.patch | 28 + .../5.5.0/040-fix-mips-ICE-PR-68400.patch | 23 + .../gcc/patches/5.5.0/200-musl_config.patch | 309 +++++ .../gcc/patches/5.5.0/201-musl_arm.patch | 43 + .../gcc/patches/5.5.0/202-musl_mips.patch | 35 + .../gcc/patches/5.5.0/203-musl_powerpc.patch | 209 +++ toolchain/gcc/patches/5.5.0/204-musl_sh.patch | 39 + .../gcc/patches/5.5.0/205-musl_x86.patch | 41 + .../gcc/patches/5.5.0/206-musl_aarch64.patch | 31 + .../patches/5.5.0/207-musl_fixincludes.patch | 30 + .../patches/5.5.0/209-musl_libstdc++.patch | 72 + .../gcc/patches/5.5.0/230-musl_libssp.patch | 13 + .../patches/5.5.0/240-musl-libitm-fixes.patch | 61 + .../gcc/patches/5.5.0/250-add-musl.patch | 120 ++ .../5.5.0/260-musl-add-unwind-fix.patch | 34 + .../270-musl-add-powerpc-softfloat-fix.patch | 24 + .../280-musl-disable-ifunc-by-default.patch | 36 + .../300-mips_Os_cpu_rtx_cost_model.patch | 14 + .../5.5.0/800-arm_v5te_no_ldrd_strd.patch | 11 + .../5.5.0/810-arm-softfloat-libgcc.patch | 25 + .../gcc/patches/5.5.0/820-libgcc_pic.patch | 36 + .../5.5.0/830-arm_unbreak_armv4t.patch | 13 + .../5.5.0/840-armv4_pass_fix-v4bx_to_ld.patch | 19 + .../patches/5.5.0/850-use_shared_libgcc.patch | 47 + .../patches/5.5.0/851-libgcc_no_compat.patch | 12 + .../patches/5.5.0/870-ppc_no_crtsavres.patch | 11 + .../patches/5.5.0/880-no_java_section.patch | 11 + .../gcc/patches/5.5.0/881-no_tm_section.patch | 11 + .../patches/5.5.0/900-bad-mips16-crt.patch | 9 + .../gcc/patches/5.5.0/910-mbsd_multi.patch | 222 +++ .../5.5.0/920-specs_nonfatal_getenv.patch | 15 + .../5.5.0/930-fix-mips-noexecstack.patch | 111 ++ .../931-fix-MIPS-softfloat-build-issue.patch | 167 +++ .../5.5.0/940-no-clobber-stamp-bits.patch | 11 + .../5.5.0/950-cpp_file_path_translation.patch | 182 +++ toolchain/gcc/patches/5.5.0/960-go_libm.patch | 11 + .../gcc/patches/5.5.0/970-warn_bug.patch | 11 + .../001-revert_register_mode_search.patch | 77 + .../patches/7.2.0/002-case_insensitive.patch | 24 + .../gcc/patches/7.2.0/010-documentation.patch | 35 + .../gcc/patches/7.2.0/230-musl_libssp.patch | 28 + .../300-mips_Os_cpu_rtx_cost_model.patch | 21 + .../7.2.0/800-arm_v5te_no_ldrd_strd.patch | 32 + .../7.2.0/810-arm-softfloat-libgcc.patch | 33 + .../gcc/patches/7.2.0/820-libgcc_pic.patch | 44 + .../7.2.0/840-armv4_pass_fix-v4bx_to_ld.patch | 28 + .../patches/7.2.0/850-use_shared_libgcc.patch | 54 + .../patches/7.2.0/851-libgcc_no_compat.patch | 22 + .../patches/7.2.0/870-ppc_no_crtsavres.patch | 18 + .../gcc/patches/7.2.0/881-no_tm_section.patch | 22 + .../patches/7.2.0/900-bad-mips16-crt.patch | 30 + .../gcc/patches/7.2.0/910-mbsd_multi.patch | 146 ++ .../7.2.0/920-specs_nonfatal_getenv.patch | 22 + .../7.2.0/930-fix-mips-noexecstack.patch | 111 ++ .../7.2.0/940-no-clobber-stamp-bits.patch | 33 + .../7.2.0/950-cpp_file_path_translation.patch | 181 +++ toolchain/gdb/Makefile | 4 +- toolchain/gdb/patches/110-no_testsuite.patch | 4 +- .../120-fix-compile-flag-mismatch.patch | 2 +- toolchain/glibc/common.mk | 4 +- toolchain/kernel-headers/Makefile | 8 +- toolchain/musl/common.mk | 6 +- .../musl/patches/900-iconv_size_hack.patch | 72 +- 288 files changed, 9999 insertions(+), 1396 deletions(-) delete mode 100644 0027-x86-Add-support-for-kernel-4.14.patch create mode 100644 package/kernel/linux/modules/iio.mk create mode 100644 toolchain-old/Config.in create mode 100644 toolchain-old/Makefile create mode 100644 toolchain-old/binutils/Config.in create mode 100644 toolchain-old/binutils/Config.version create mode 100644 toolchain-old/binutils/Makefile create mode 100644 toolchain-old/binutils/patches/2.27/001-MIPS_BFD_Remove_EI_ABIVERSION_5.patch create mode 100644 toolchain-old/binutils/patches/2.27/300-001_ld_makefile_patch.patch create mode 100644 toolchain-old/binutils/patches/2.27/300-012_check_ldrunpath_length.patch create mode 100644 toolchain-old/binutils/patches/2.27/400-mips_no_dynamic_linking_sym.patch create mode 100644 toolchain-old/binutils/patches/2.27/500-Change-default-emulation-for-mips64-linux.patch create mode 100644 toolchain-old/binutils/patches/2.28/300-001_ld_makefile_patch.patch create mode 100644 toolchain-old/binutils/patches/2.28/300-012_check_ldrunpath_length.patch create mode 100644 toolchain-old/binutils/patches/2.28/400-mips_no_dynamic_linking_sym.patch create mode 100644 toolchain-old/binutils/patches/2.28/500-Change-default-emulation-for-mips64-linux.patch create mode 100644 toolchain-old/binutils/patches/arc-2016.09-release/300-001_ld_makefile_patch.patch create mode 100644 toolchain-old/binutils/patches/arc-2016.09-release/300-012_check_ldrunpath_length.patch create mode 100644 toolchain-old/fortify-headers/Makefile create mode 100644 toolchain-old/gcc/Config.in create mode 100644 toolchain-old/gcc/Config.version create mode 100644 toolchain-old/gcc/common.mk create mode 100644 toolchain-old/gcc/exclude-testsuite create mode 100644 toolchain-old/gcc/files/alternate-arch-cc.in create mode 100644 toolchain-old/gcc/final/Makefile create mode 100644 toolchain-old/gcc/initial/Makefile create mode 100644 toolchain-old/gcc/minimal/Makefile rename {toolchain => toolchain-old}/gcc/patches/5.4.0/001-revert_register_mode_search.patch (100%) rename {toolchain => toolchain-old}/gcc/patches/5.4.0/002-case_insensitive.patch (100%) rename {toolchain => toolchain-old}/gcc/patches/5.4.0/010-documentation.patch (100%) rename {toolchain => toolchain-old}/gcc/patches/5.4.0/020-no-plt-backport.patch (100%) rename {toolchain => toolchain-old}/gcc/patches/5.4.0/040-fix-mips-ICE-PR-68400.patch (100%) rename {toolchain => toolchain-old}/gcc/patches/5.4.0/200-musl_config.patch (100%) rename {toolchain => toolchain-old}/gcc/patches/5.4.0/201-musl_arm.patch (100%) rename {toolchain => toolchain-old}/gcc/patches/5.4.0/202-musl_mips.patch (100%) rename {toolchain => toolchain-old}/gcc/patches/5.4.0/203-musl_powerpc.patch (100%) rename {toolchain => toolchain-old}/gcc/patches/5.4.0/204-musl_sh.patch (100%) rename {toolchain => toolchain-old}/gcc/patches/5.4.0/205-musl_x86.patch (100%) rename {toolchain => toolchain-old}/gcc/patches/5.4.0/206-musl_aarch64.patch (100%) rename {toolchain => toolchain-old}/gcc/patches/5.4.0/207-musl_fixincludes.patch (100%) rename {toolchain => toolchain-old}/gcc/patches/5.4.0/209-musl_libstdc++.patch (100%) rename {toolchain => toolchain-old}/gcc/patches/5.4.0/230-musl_libssp.patch (100%) rename {toolchain => toolchain-old}/gcc/patches/5.4.0/240-musl-libitm-fixes.patch (100%) rename {toolchain => toolchain-old}/gcc/patches/5.4.0/250-add-musl.patch (100%) rename {toolchain => toolchain-old}/gcc/patches/5.4.0/260-musl-add-unwind-fix.patch (100%) rename {toolchain => toolchain-old}/gcc/patches/5.4.0/270-musl-add-powerpc-softfloat-fix.patch (100%) rename {toolchain => toolchain-old}/gcc/patches/5.4.0/280-musl-disable-ifunc-by-default.patch (100%) rename {toolchain => toolchain-old}/gcc/patches/5.4.0/300-mips_Os_cpu_rtx_cost_model.patch (100%) rename {toolchain => toolchain-old}/gcc/patches/5.4.0/800-arm_v5te_no_ldrd_strd.patch (100%) rename {toolchain => toolchain-old}/gcc/patches/5.4.0/810-arm-softfloat-libgcc.patch (100%) rename {toolchain => toolchain-old}/gcc/patches/5.4.0/820-libgcc_pic.patch (100%) rename {toolchain => toolchain-old}/gcc/patches/5.4.0/830-arm_unbreak_armv4t.patch (100%) rename {toolchain => toolchain-old}/gcc/patches/5.4.0/840-armv4_pass_fix-v4bx_to_ld.patch (100%) rename {toolchain => toolchain-old}/gcc/patches/5.4.0/850-use_shared_libgcc.patch (100%) rename {toolchain => toolchain-old}/gcc/patches/5.4.0/851-libgcc_no_compat.patch (100%) rename {toolchain => toolchain-old}/gcc/patches/5.4.0/870-ppc_no_crtsavres.patch (100%) rename {toolchain => toolchain-old}/gcc/patches/5.4.0/880-no_java_section.patch (100%) rename {toolchain => toolchain-old}/gcc/patches/5.4.0/881-no_tm_section.patch (100%) rename {toolchain => toolchain-old}/gcc/patches/5.4.0/900-bad-mips16-crt.patch (100%) rename {toolchain => toolchain-old}/gcc/patches/5.4.0/910-mbsd_multi.patch (100%) rename {toolchain => toolchain-old}/gcc/patches/5.4.0/920-specs_nonfatal_getenv.patch (100%) rename {toolchain => toolchain-old}/gcc/patches/5.4.0/930-fix-mips-noexecstack.patch (100%) rename {toolchain => toolchain-old}/gcc/patches/5.4.0/931-fix-MIPS-softfloat-build-issue.patch (100%) rename {toolchain => toolchain-old}/gcc/patches/5.4.0/940-no-clobber-stamp-bits.patch (100%) rename {toolchain => toolchain-old}/gcc/patches/5.4.0/950-cpp_file_path_translation.patch (100%) rename {toolchain => toolchain-old}/gcc/patches/5.4.0/960-go_libm.patch (100%) rename {toolchain => toolchain-old}/gcc/patches/5.4.0/970-warn_bug.patch (100%) create mode 100644 toolchain-old/gcc/patches/6.3.0/001-revert_register_mode_search.patch rename {toolchain/gcc/patches/7.1.0 => toolchain-old/gcc/patches/6.3.0}/002-case_insensitive.patch (100%) create mode 100644 toolchain-old/gcc/patches/6.3.0/010-documentation.patch create mode 100644 toolchain-old/gcc/patches/6.3.0/230-musl_libssp.patch create mode 100644 toolchain-old/gcc/patches/6.3.0/280-musl-disable-ifunc-by-default.patch create mode 100644 toolchain-old/gcc/patches/6.3.0/300-mips_Os_cpu_rtx_cost_model.patch create mode 100644 toolchain-old/gcc/patches/6.3.0/800-arm_v5te_no_ldrd_strd.patch create mode 100644 toolchain-old/gcc/patches/6.3.0/810-arm-softfloat-libgcc.patch create mode 100644 toolchain-old/gcc/patches/6.3.0/820-libgcc_pic.patch create mode 100644 toolchain-old/gcc/patches/6.3.0/830-arm_unbreak_armv4t.patch create mode 100644 toolchain-old/gcc/patches/6.3.0/840-armv4_pass_fix-v4bx_to_ld.patch create mode 100644 toolchain-old/gcc/patches/6.3.0/850-use_shared_libgcc.patch rename {toolchain/gcc/patches/7.1.0 => toolchain-old/gcc/patches/6.3.0}/851-libgcc_no_compat.patch (100%) create mode 100644 toolchain-old/gcc/patches/6.3.0/870-ppc_no_crtsavres.patch create mode 100644 toolchain-old/gcc/patches/6.3.0/880-no_java_section.patch rename {toolchain/gcc/patches/7.1.0 => toolchain-old/gcc/patches/6.3.0}/881-no_tm_section.patch (100%) rename {toolchain/gcc/patches/7.1.0 => toolchain-old/gcc/patches/6.3.0}/900-bad-mips16-crt.patch (100%) create mode 100644 toolchain-old/gcc/patches/6.3.0/910-mbsd_multi.patch create mode 100644 toolchain-old/gcc/patches/6.3.0/920-specs_nonfatal_getenv.patch create mode 100644 toolchain-old/gcc/patches/6.3.0/930-fix-mips-noexecstack.patch create mode 100644 toolchain-old/gcc/patches/6.3.0/940-no-clobber-stamp-bits.patch create mode 100644 toolchain-old/gcc/patches/6.3.0/950-cpp_file_path_translation.patch create mode 100644 toolchain-old/gcc/patches/6.3.0/960-fix-ubsan-defref.patch rename {toolchain => toolchain-old}/gcc/patches/7.1.0/001-revert_register_mode_search.patch (100%) create mode 100644 toolchain-old/gcc/patches/7.1.0/002-case_insensitive.patch rename {toolchain => toolchain-old}/gcc/patches/7.1.0/010-documentation.patch (100%) rename {toolchain => toolchain-old}/gcc/patches/7.1.0/230-musl_libssp.patch (100%) rename {toolchain => toolchain-old}/gcc/patches/7.1.0/300-mips_Os_cpu_rtx_cost_model.patch (100%) rename {toolchain => toolchain-old}/gcc/patches/7.1.0/800-arm_v5te_no_ldrd_strd.patch (100%) rename {toolchain => toolchain-old}/gcc/patches/7.1.0/810-arm-softfloat-libgcc.patch (100%) rename {toolchain => toolchain-old}/gcc/patches/7.1.0/820-libgcc_pic.patch (100%) rename {toolchain => toolchain-old}/gcc/patches/7.1.0/840-armv4_pass_fix-v4bx_to_ld.patch (100%) rename {toolchain => toolchain-old}/gcc/patches/7.1.0/850-use_shared_libgcc.patch (100%) create mode 100644 toolchain-old/gcc/patches/7.1.0/851-libgcc_no_compat.patch rename {toolchain => toolchain-old}/gcc/patches/7.1.0/870-ppc_no_crtsavres.patch (100%) create mode 100644 toolchain-old/gcc/patches/7.1.0/881-no_tm_section.patch create mode 100644 toolchain-old/gcc/patches/7.1.0/900-bad-mips16-crt.patch rename {toolchain => toolchain-old}/gcc/patches/7.1.0/910-mbsd_multi.patch (100%) rename {toolchain => toolchain-old}/gcc/patches/7.1.0/920-specs_nonfatal_getenv.patch (100%) rename {toolchain => toolchain-old}/gcc/patches/7.1.0/930-fix-mips-noexecstack.patch (100%) rename {toolchain => toolchain-old}/gcc/patches/7.1.0/940-no-clobber-stamp-bits.patch (100%) rename {toolchain => toolchain-old}/gcc/patches/7.1.0/950-cpp_file_path_translation.patch (100%) create mode 100644 toolchain-old/gcc/patches/arc-2017.03-release/001-revert_register_mode_search.patch create mode 100644 toolchain-old/gcc/patches/arc-2017.03-release/002-case_insensitive.patch create mode 100644 toolchain-old/gcc/patches/arc-2017.03-release/010-documentation.patch create mode 100644 toolchain-old/gcc/patches/arc-2017.03-release/230-musl_libssp.patch create mode 100644 toolchain-old/gcc/patches/arc-2017.03-release/280-musl-disable-ifunc-by-default.patch create mode 100644 toolchain-old/gcc/patches/arc-2017.03-release/300-mips_Os_cpu_rtx_cost_model.patch create mode 100644 toolchain-old/gcc/patches/arc-2017.03-release/800-arm_v5te_no_ldrd_strd.patch create mode 100644 toolchain-old/gcc/patches/arc-2017.03-release/810-arm-softfloat-libgcc.patch create mode 100644 toolchain-old/gcc/patches/arc-2017.03-release/820-libgcc_pic.patch create mode 100644 toolchain-old/gcc/patches/arc-2017.03-release/830-arm_unbreak_armv4t.patch create mode 100644 toolchain-old/gcc/patches/arc-2017.03-release/840-armv4_pass_fix-v4bx_to_ld.patch create mode 100644 toolchain-old/gcc/patches/arc-2017.03-release/850-use_shared_libgcc.patch create mode 100644 toolchain-old/gcc/patches/arc-2017.03-release/851-libgcc_no_compat.patch create mode 100644 toolchain-old/gcc/patches/arc-2017.03-release/870-ppc_no_crtsavres.patch create mode 100644 toolchain-old/gcc/patches/arc-2017.03-release/880-no_java_section.patch create mode 100644 toolchain-old/gcc/patches/arc-2017.03-release/881-no_tm_section.patch create mode 100644 toolchain-old/gcc/patches/arc-2017.03-release/900-bad-mips16-crt.patch create mode 100644 toolchain-old/gcc/patches/arc-2017.03-release/910-mbsd_multi.patch create mode 100644 toolchain-old/gcc/patches/arc-2017.03-release/920-specs_nonfatal_getenv.patch create mode 100644 toolchain-old/gcc/patches/arc-2017.03-release/930-fix-mips-noexecstack.patch create mode 100644 toolchain-old/gcc/patches/arc-2017.03-release/940-no-clobber-stamp-bits.patch create mode 100644 toolchain-old/gcc/patches/arc-2017.03-release/950-cpp_file_path_translation.patch create mode 100644 toolchain-old/gdb/Makefile create mode 100644 toolchain-old/gdb/patches-arc/100-no_extern_inline.patch create mode 100644 toolchain-old/gdb/patches-arc/110-no_testsuite.patch create mode 100644 toolchain-old/gdb/patches-arc/120-fix-compile-flag-mismatch.patch create mode 100644 toolchain-old/gdb/patches/100-no_extern_inline.patch create mode 100644 toolchain-old/gdb/patches/110-no_testsuite.patch create mode 100644 toolchain-old/gdb/patches/120-fix-compile-flag-mismatch.patch create mode 100644 toolchain-old/glibc/Makefile create mode 100644 toolchain-old/glibc/common.mk create mode 100644 toolchain-old/glibc/headers/Makefile create mode 100644 toolchain-old/glibc/include/libintl.h create mode 100644 toolchain-old/glibc/patches/100-fix_cross_rpcgen.patch create mode 100644 toolchain-old/glibc/patches/200-add-dl-search-paths.patch create mode 100644 toolchain-old/info.mk create mode 100644 toolchain-old/kernel-headers/Makefile create mode 100644 toolchain-old/musl/Makefile create mode 100644 toolchain-old/musl/common.mk create mode 100644 toolchain-old/musl/include/bits/wordsize.h create mode 100644 toolchain-old/musl/include/features.h create mode 100644 toolchain-old/musl/include/sgidefs.h create mode 100644 toolchain-old/musl/include/sys/cdefs.h create mode 100644 toolchain-old/musl/include/sys/glibc-types.h create mode 100644 toolchain-old/musl/include/sys/queue.h create mode 100644 toolchain-old/musl/patches/100-add_glob_onlydir.patch create mode 100644 toolchain-old/musl/patches/110-read_timezone_from_fs.patch create mode 100644 toolchain-old/musl/patches/200-add_libssp_nonshared.patch create mode 100644 toolchain-old/musl/patches/300-relative.patch create mode 100644 toolchain-old/musl/patches/400-Add-format-attribute-to-some-function-declarations.patch create mode 100644 toolchain-old/musl/patches/900-iconv_size_hack.patch create mode 100644 toolchain-old/musl/patches/901-crypt_size_hack.patch create mode 100644 toolchain-old/uClibc/Config.in create mode 100644 toolchain-old/uClibc/Makefile create mode 100644 toolchain-old/uClibc/common.mk create mode 100644 toolchain-old/uClibc/config/arc create mode 100644 toolchain-old/uClibc/config/archs create mode 100644 toolchain-old/uClibc/config/arm create mode 100644 toolchain-old/uClibc/config/armeb create mode 100644 toolchain-old/uClibc/config/common create mode 100644 toolchain-old/uClibc/config/debug create mode 100644 toolchain-old/uClibc/config/i386 create mode 100644 toolchain-old/uClibc/config/i686 create mode 100644 toolchain-old/uClibc/config/m68k create mode 100644 toolchain-old/uClibc/config/mips create mode 100644 toolchain-old/uClibc/config/mips64 create mode 100644 toolchain-old/uClibc/config/mips64.32 create mode 100644 toolchain-old/uClibc/config/mips64.64 create mode 100644 toolchain-old/uClibc/config/mips64.n32 create mode 100644 toolchain-old/uClibc/config/mips64el create mode 100644 toolchain-old/uClibc/config/mips64el.32 create mode 100644 toolchain-old/uClibc/config/mips64el.64 create mode 100644 toolchain-old/uClibc/config/mips64el.n32 create mode 100644 toolchain-old/uClibc/config/mipsel create mode 100644 toolchain-old/uClibc/config/mipsel.cobalt create mode 100644 toolchain-old/uClibc/config/powerpc create mode 100644 toolchain-old/uClibc/config/powerpc.e500 create mode 100644 toolchain-old/uClibc/config/sparc create mode 100644 toolchain-old/uClibc/config/sparc.leon create mode 100644 toolchain-old/uClibc/config/x86_64 create mode 100644 toolchain-old/uClibc/headers/Makefile create mode 100644 toolchain-old/uClibc/utils/Makefile create mode 100644 toolchain-old/wrapper/Makefile create mode 100644 toolchain-old/yasm/Makefile create mode 100644 toolchain/binutils/patches/2.29.1/300-001_ld_makefile_patch.patch create mode 100644 toolchain/binutils/patches/2.29.1/300-012_check_ldrunpath_length.patch create mode 100644 toolchain/binutils/patches/2.29.1/400-mips_no_dynamic_linking_sym.patch create mode 100644 toolchain/binutils/patches/2.29.1/500-Change-default-emulation-for-mips64-linux.patch create mode 100644 toolchain/gcc/patches/5.5.0/001-revert_register_mode_search.patch create mode 100644 toolchain/gcc/patches/5.5.0/002-case_insensitive.patch create mode 100644 toolchain/gcc/patches/5.5.0/010-documentation.patch create mode 100644 toolchain/gcc/patches/5.5.0/020-no-plt-backport.patch create mode 100644 toolchain/gcc/patches/5.5.0/040-fix-mips-ICE-PR-68400.patch create mode 100644 toolchain/gcc/patches/5.5.0/200-musl_config.patch create mode 100644 toolchain/gcc/patches/5.5.0/201-musl_arm.patch create mode 100644 toolchain/gcc/patches/5.5.0/202-musl_mips.patch create mode 100644 toolchain/gcc/patches/5.5.0/203-musl_powerpc.patch create mode 100644 toolchain/gcc/patches/5.5.0/204-musl_sh.patch create mode 100644 toolchain/gcc/patches/5.5.0/205-musl_x86.patch create mode 100644 toolchain/gcc/patches/5.5.0/206-musl_aarch64.patch create mode 100644 toolchain/gcc/patches/5.5.0/207-musl_fixincludes.patch create mode 100644 toolchain/gcc/patches/5.5.0/209-musl_libstdc++.patch create mode 100644 toolchain/gcc/patches/5.5.0/230-musl_libssp.patch create mode 100644 toolchain/gcc/patches/5.5.0/240-musl-libitm-fixes.patch create mode 100644 toolchain/gcc/patches/5.5.0/250-add-musl.patch create mode 100644 toolchain/gcc/patches/5.5.0/260-musl-add-unwind-fix.patch create mode 100644 toolchain/gcc/patches/5.5.0/270-musl-add-powerpc-softfloat-fix.patch create mode 100644 toolchain/gcc/patches/5.5.0/280-musl-disable-ifunc-by-default.patch create mode 100644 toolchain/gcc/patches/5.5.0/300-mips_Os_cpu_rtx_cost_model.patch create mode 100644 toolchain/gcc/patches/5.5.0/800-arm_v5te_no_ldrd_strd.patch create mode 100644 toolchain/gcc/patches/5.5.0/810-arm-softfloat-libgcc.patch create mode 100644 toolchain/gcc/patches/5.5.0/820-libgcc_pic.patch create mode 100644 toolchain/gcc/patches/5.5.0/830-arm_unbreak_armv4t.patch create mode 100644 toolchain/gcc/patches/5.5.0/840-armv4_pass_fix-v4bx_to_ld.patch create mode 100644 toolchain/gcc/patches/5.5.0/850-use_shared_libgcc.patch create mode 100644 toolchain/gcc/patches/5.5.0/851-libgcc_no_compat.patch create mode 100644 toolchain/gcc/patches/5.5.0/870-ppc_no_crtsavres.patch create mode 100644 toolchain/gcc/patches/5.5.0/880-no_java_section.patch create mode 100644 toolchain/gcc/patches/5.5.0/881-no_tm_section.patch create mode 100644 toolchain/gcc/patches/5.5.0/900-bad-mips16-crt.patch create mode 100644 toolchain/gcc/patches/5.5.0/910-mbsd_multi.patch create mode 100644 toolchain/gcc/patches/5.5.0/920-specs_nonfatal_getenv.patch create mode 100644 toolchain/gcc/patches/5.5.0/930-fix-mips-noexecstack.patch create mode 100644 toolchain/gcc/patches/5.5.0/931-fix-MIPS-softfloat-build-issue.patch create mode 100644 toolchain/gcc/patches/5.5.0/940-no-clobber-stamp-bits.patch create mode 100644 toolchain/gcc/patches/5.5.0/950-cpp_file_path_translation.patch create mode 100644 toolchain/gcc/patches/5.5.0/960-go_libm.patch create mode 100644 toolchain/gcc/patches/5.5.0/970-warn_bug.patch create mode 100644 toolchain/gcc/patches/7.2.0/001-revert_register_mode_search.patch create mode 100644 toolchain/gcc/patches/7.2.0/002-case_insensitive.patch create mode 100644 toolchain/gcc/patches/7.2.0/010-documentation.patch create mode 100644 toolchain/gcc/patches/7.2.0/230-musl_libssp.patch create mode 100644 toolchain/gcc/patches/7.2.0/300-mips_Os_cpu_rtx_cost_model.patch create mode 100644 toolchain/gcc/patches/7.2.0/800-arm_v5te_no_ldrd_strd.patch create mode 100644 toolchain/gcc/patches/7.2.0/810-arm-softfloat-libgcc.patch create mode 100644 toolchain/gcc/patches/7.2.0/820-libgcc_pic.patch create mode 100644 toolchain/gcc/patches/7.2.0/840-armv4_pass_fix-v4bx_to_ld.patch create mode 100644 toolchain/gcc/patches/7.2.0/850-use_shared_libgcc.patch create mode 100644 toolchain/gcc/patches/7.2.0/851-libgcc_no_compat.patch create mode 100644 toolchain/gcc/patches/7.2.0/870-ppc_no_crtsavres.patch create mode 100644 toolchain/gcc/patches/7.2.0/881-no_tm_section.patch create mode 100644 toolchain/gcc/patches/7.2.0/900-bad-mips16-crt.patch create mode 100644 toolchain/gcc/patches/7.2.0/910-mbsd_multi.patch create mode 100644 toolchain/gcc/patches/7.2.0/920-specs_nonfatal_getenv.patch create mode 100644 toolchain/gcc/patches/7.2.0/930-fix-mips-noexecstack.patch create mode 100644 toolchain/gcc/patches/7.2.0/940-no-clobber-stamp-bits.patch create mode 100644 toolchain/gcc/patches/7.2.0/950-cpp_file_path_translation.patch diff --git a/0027-x86-Add-support-for-kernel-4.14.patch b/0027-x86-Add-support-for-kernel-4.14.patch deleted file mode 100644 index be38619e5..000000000 --- a/0027-x86-Add-support-for-kernel-4.14.patch +++ /dev/null @@ -1,1233 +0,0 @@ -From 481e1f23f5a178f44f6cf89e761ab51d1fc8d6ed Mon Sep 17 00:00:00 2001 -From: Hauke Mehrtens -Date: Sun, 29 Oct 2017 19:34:13 +0100 -Subject: [PATCH 27/37] x86: Add support for kernel 4.14 - -This adds basic support for kernel 4.14, this was tested in qemu only. -The subtarget configuration was refresh with kernel 4.14 and the -options needed to make it compile on kernel 4.9 were added manually. - -Signed-off-by: Hauke Mehrtens ---- - target/linux/x86/64/config-default | 36 +- - target/linux/x86/config-4.14 | 525 +++++++++++++++++++++ - target/linux/x86/generic/config-default | 45 +- - target/linux/x86/geode/config-default | 7 +- - target/linux/x86/legacy/config-default | 30 +- - .../x86/patches-4.14/011-tune_lzma_options.patch | 22 + - .../x86/patches-4.14/100-fix_cs5535_clockevt.patch | 12 + - .../patches-4.14/200-pcengines-apu2-reboot.patch | 19 + - .../800-hwmon-w83627ehf-dont-claim-nct677x.patch | 30 ++ - 9 files changed, 710 insertions(+), 16 deletions(-) - create mode 100644 target/linux/x86/config-4.14 - create mode 100644 target/linux/x86/patches-4.14/011-tune_lzma_options.patch - create mode 100644 target/linux/x86/patches-4.14/100-fix_cs5535_clockevt.patch - create mode 100644 target/linux/x86/patches-4.14/200-pcengines-apu2-reboot.patch - create mode 100644 target/linux/x86/patches-4.14/800-hwmon-w83627ehf-dont-claim-nct677x.patch - -diff --git a/target/linux/x86/64/config-default b/target/linux/x86/64/config-default -index b6fee8b..55b69ce 100644 ---- a/target/linux/x86/64/config-default -+++ b/target/linux/x86/64/config-default -@@ -6,6 +6,7 @@ CONFIG_ACPI_BATTERY=y - CONFIG_ACPI_BUTTON=y - # CONFIG_ACPI_CMPC is not set - CONFIG_ACPI_CONTAINER=y -+CONFIG_ACPI_CPPC_LIB=y - CONFIG_ACPI_CPU_FREQ_PSS=y - # CONFIG_ACPI_CUSTOM_DSDT is not set - # CONFIG_ACPI_DEBUG is not set -@@ -30,9 +31,11 @@ CONFIG_ACPI_THERMAL=y - # CONFIG_ACPI_WMI is not set - CONFIG_ARCH_DEFCONFIG="arch/x86/configs/x86_64_defconfig" - CONFIG_ARCH_HAS_ACPI_TABLE_UPGRADE=y --CONFIG_ARCH_HAS_GIGANTIC_PAGE=y -+CONFIG_ARCH_HAS_ADD_PAGES=y - CONFIG_ARCH_HAS_KCOV=y - CONFIG_ARCH_HAS_PMEM_API=y -+CONFIG_ARCH_HAS_UACCESS_FLUSHCACHE=y -+CONFIG_ARCH_HAS_ZONE_DEVICE=y - CONFIG_ARCH_MIGHT_HAVE_ACPI_PDC=y - CONFIG_ARCH_MMAP_RND_BITS=28 - CONFIG_ARCH_MMAP_RND_BITS_MAX=32 -@@ -41,12 +44,13 @@ CONFIG_ARCH_SPARSEMEM_DEFAULT=y - CONFIG_ARCH_SUPPORTS_INT128=y - CONFIG_ARCH_SUPPORTS_NUMA_BALANCING=y - CONFIG_ARCH_USE_CMPXCHG_LOCKREF=y --CONFIG_ARCH_WANT_BATCHED_UNMAP_TLB_FLUSH=y -+CONFIG_ARCH_WANTS_THP_SWAP=y - CONFIG_AUDIT_ARCH=y - CONFIG_BACKLIGHT_CLASS_DEVICE=y - CONFIG_BACKLIGHT_GENERIC=y - CONFIG_BACKLIGHT_LCD_SUPPORT=y - CONFIG_BLK_DEV_INTEGRITY=y -+CONFIG_BLK_MQ_VIRTIO=y - # CONFIG_BOOTPARAM_HOTPLUG_CPU0 is not set - CONFIG_CALGARY_IOMMU=y - CONFIG_CALGARY_IOMMU_ENABLED_BY_DEFAULT=y -@@ -54,7 +58,6 @@ CONFIG_CONNECTOR=y - # CONFIG_CPU_HOTPLUG_STATE_CONTROL is not set - CONFIG_CPU_RMAP=y - CONFIG_CRC_T10DIF=y --CONFIG_CRYPTO_ABLK_HELPER=y - CONFIG_CRYPTO_AEAD=y - CONFIG_CRYPTO_AEAD2=y - CONFIG_CRYPTO_AES_NI_INTEL=y -@@ -88,6 +91,7 @@ CONFIG_CRYPTO_NULL2=y - # CONFIG_CRYPTO_SHA256_SSSE3 is not set - # CONFIG_CRYPTO_SHA512_MB is not set - # CONFIG_CRYPTO_SHA512_SSSE3 is not set -+CONFIG_CRYPTO_SIMD=y - # CONFIG_CRYPTO_SKEIN is not set - # CONFIG_CRYPTO_TWOFISH_AVX_X86_64 is not set - # CONFIG_CRYPTO_TWOFISH_X86_64 is not set -@@ -100,6 +104,7 @@ CONFIG_EFI=y - CONFIG_EFIVAR_FS=m - # CONFIG_EFI_BOOTLOADER_CONTROL is not set - # CONFIG_EFI_CAPSULE_LOADER is not set -+# CONFIG_EFI_DEV_PATH_PARSER is not set - CONFIG_EFI_ESRT=y - # CONFIG_EFI_FAKE_MEMMAP is not set - # CONFIG_EFI_MIXED is not set -@@ -118,6 +123,7 @@ CONFIG_FB_DEFERRED_IO=y - CONFIG_FB_EFI=y - CONFIG_FB_HYPERV=y - CONFIG_FB_MODE_HELPERS=y -+# CONFIG_FB_PROVIDE_GET_FB_UNMAPPED_AREA is not set - CONFIG_FB_SIMPLE=y - CONFIG_FB_SYS_COPYAREA=y - CONFIG_FB_SYS_FILLRECT=y -@@ -136,6 +142,8 @@ CONFIG_FREEZER=y - CONFIG_GART_IOMMU=y - CONFIG_GENERIC_BUG_RELATIVE_POINTERS=y - CONFIG_GENERIC_CPU=y -+CONFIG_GENERIC_IRQ_EFFECTIVE_AFF_MASK=y -+CONFIG_GENERIC_IRQ_MIGRATION=y - CONFIG_GENERIC_PENDING_IRQ=y - CONFIG_GPIOLIB=y - CONFIG_GPIOLIB_IRQCHIP=y -@@ -145,10 +153,12 @@ CONFIG_GPIO_IT87=y - CONFIG_GPIO_LYNXPOINT=y - CONFIG_GPIO_SCH=y - CONFIG_GPIO_SYSFS=y -+CONFIG_HARDLOCKUP_CHECK_TIMESTAMP=y - CONFIG_HAVE_ACPI_APEI=y - CONFIG_HAVE_ACPI_APEI_NMI=y - # CONFIG_HAVE_AOUT is not set - CONFIG_HAVE_ARCH_SOFT_DIRTY=y -+CONFIG_HAVE_ARCH_TRANSPARENT_HUGEPAGE_PUD=y - CONFIG_HAVE_ARCH_VMAP_STACK=y - CONFIG_HAVE_CONTEXT_TRACKING=y - CONFIG_HAVE_EBPF_JIT=y -@@ -188,7 +198,9 @@ CONFIG_HYPERV_BALLOON=y - CONFIG_HYPERV_KEYBOARD=y - CONFIG_HYPERV_NET=y - CONFIG_HYPERV_STORAGE=y -+CONFIG_HYPERV_TSCPAGE=y - CONFIG_HYPERV_UTILS=y -+# CONFIG_HYPERV_VSOCKETS is not set - CONFIG_I2C=y - CONFIG_I2C_BOARDINFO=y - # CONFIG_I7300_IDLE is not set -@@ -196,6 +208,7 @@ CONFIG_I2C_BOARDINFO=y - CONFIG_ILLEGAL_POINTER_VALUE=0xdead000000000000 - CONFIG_INPUT_XEN_KBDDEV_FRONTEND=y - CONFIG_INTEL_IDLE=y -+# CONFIG_INTEL_INT0002_VGPIO is not set - # CONFIG_INTEL_IPS is not set - # CONFIG_INTEL_MENLOW is not set - # CONFIG_INTEL_MIC_BUS is not set -@@ -203,6 +216,7 @@ CONFIG_INTEL_PCH_THERMAL=y - # CONFIG_INTEL_PMC_IPC is not set - CONFIG_INTEL_SOC_DTS_IOSF_CORE=y - CONFIG_INTEL_SOC_DTS_THERMAL=y -+# CONFIG_INTEL_TURBO_MAX_3 is not set - # CONFIG_IOMMU_DEBUG is not set - CONFIG_IOSF_MBI=y - # CONFIG_IOSF_MBI_DEBUG is not set -@@ -218,6 +232,7 @@ CONFIG_LEGACY_VSYSCALL_NONE=y - CONFIG_LOCK_SPIN_ON_OWNER=y - CONFIG_LPC_ICH=y - CONFIG_LPC_SCH=y -+CONFIG_MAILBOX=y - # CONFIG_MAXSMP is not set - CONFIG_MEMORY_BALLOON=y - # CONFIG_MEMORY_HOTPLUG is not set -@@ -238,6 +253,7 @@ CONFIG_MUTEX_SPIN_ON_OWNER=y - CONFIG_NET_FLOW_LIMIT=y - CONFIG_NR_CPUS=8 - # CONFIG_NUMA is not set -+# CONFIG_ORC_UNWINDER is not set - CONFIG_OUTPUT_FORMAT="elf64-x86-64" - CONFIG_PADATA=y - CONFIG_PARAVIRT=y -@@ -250,6 +266,7 @@ CONFIG_PATA_MPIIX=y - CONFIG_PATA_OLDPIIX=y - CONFIG_PATA_PLATFORM=y - CONFIG_PATA_VIA=y -+CONFIG_PCC=y - CONFIG_PCIEAER=y - CONFIG_PCIEPORTBUS=y - CONFIG_PCIE_PME=y -@@ -260,6 +277,7 @@ CONFIG_PGTABLE_LEVELS=4 - CONFIG_PHYSICAL_ALIGN=0x1000000 - CONFIG_PM=y - # CONFIG_PMIC_OPREGION is not set -+CONFIG_PM_CLK=y - # CONFIG_PM_DEBUG is not set - CONFIG_PM_SLEEP=y - CONFIG_PM_SLEEP_SMP=y -@@ -272,10 +290,12 @@ CONFIG_QUEUED_RWLOCKS=y - CONFIG_QUEUED_SPINLOCKS=y - # CONFIG_RANDOMIZE_BASE is not set - CONFIG_RAS=y -+CONFIG_RCU_NEED_SEGCBLIST=y - CONFIG_RCU_STALL_COMMON=y - CONFIG_REGMAP=y - CONFIG_REGMAP_I2C=y - CONFIG_RELOCATABLE=y -+CONFIG_RESET_ATTACK_MITIGATION=y - CONFIG_RFS_ACCEL=y - CONFIG_RPS=y - CONFIG_RTC_I2C_AND_SPI=y -@@ -283,6 +303,7 @@ CONFIG_RWSEM_SPIN_ON_OWNER=y - # CONFIG_SAMSUNG_Q10 is not set - CONFIG_SATA_AHCI=y - CONFIG_SCHED_MC=y -+CONFIG_SCHED_MC_PRIO=y - CONFIG_SCHED_SMT=y - # CONFIG_SCIF_BUS is not set - CONFIG_SCSI_VIRTIO=y -@@ -308,8 +329,8 @@ CONFIG_THERMAL_HWMON=y - CONFIG_THERMAL_WRITABLE_TRIPS=y - # CONFIG_TOSHIBA_BT_RFKILL is not set - CONFIG_TREE_RCU=y -+CONFIG_TREE_SRCU=y - CONFIG_UCS2_STRING=y --CONFIG_UCSI=y - # CONFIG_UNISYSSPAR is not set - CONFIG_USB_OHCI_HCD_PCI=y - CONFIG_USB_STORAGE=y -@@ -317,6 +338,7 @@ CONFIG_USB_XHCI_HCD=y - CONFIG_USB_XHCI_PCI=y - # CONFIG_USB_XHCI_PLATFORM is not set - CONFIG_VGACON_SOFT_SCROLLBACK=y -+# CONFIG_VGACON_SOFT_SCROLLBACK_PERSISTENT_ENABLE_BY_DEFAULT is not set - CONFIG_VGACON_SOFT_SCROLLBACK_SIZE=64 - CONFIG_VIRTIO=y - CONFIG_VIRTIO_BALLOON=y -@@ -339,6 +361,7 @@ CONFIG_VMXNET3=y - CONFIG_VSOCKETS=y - CONFIG_VT_CONSOLE_SLEEP=y - CONFIG_WATCHDOG_CORE=y -+# CONFIG_X86_5LEVEL is not set - CONFIG_X86_64=y - CONFIG_X86_64_SMP=y - CONFIG_X86_ACPI_CPUFREQ=y -@@ -352,6 +375,8 @@ CONFIG_X86_DEV_DMA_OPS=y - CONFIG_X86_DIRECT_GBPAGES=y - # CONFIG_X86_INTEL_LPSS is not set - # CONFIG_X86_INTEL_MEMORY_PROTECTION_KEYS is not set -+# CONFIG_X86_INTEL_MPX is not set -+CONFIG_X86_INTEL_PSTATE=y - CONFIG_X86_MINIMUM_CPU_FAMILY=64 - # CONFIG_X86_PCC_CPUFREQ is not set - CONFIG_X86_PKG_TEMP_THERMAL=y -@@ -384,8 +409,11 @@ CONFIG_XEN_HAVE_VPMU=y - CONFIG_XEN_NETDEV_FRONTEND=y - CONFIG_XEN_PCIDEV_FRONTEND=y - CONFIG_XEN_PRIVCMD=y -+CONFIG_XEN_PV=y - CONFIG_XEN_PVH=y - CONFIG_XEN_PVHVM=y -+CONFIG_XEN_PVHVM_SMP=y -+CONFIG_XEN_PV_SMP=y - CONFIG_XEN_SAVE_RESTORE=y - CONFIG_XEN_SCRUB_PAGES=y - CONFIG_XEN_SCSI_FRONTEND=y -diff --git a/target/linux/x86/config-4.14 b/target/linux/x86/config-4.14 -new file mode 100644 -index 0000000..05af598 ---- /dev/null -+++ b/target/linux/x86/config-4.14 -@@ -0,0 +1,525 @@ -+# CONFIG_60XX_WDT is not set -+# CONFIG_64BIT is not set -+# CONFIG_ACPI is not set -+# CONFIG_ACQUIRE_WDT is not set -+# CONFIG_ADVANTECH_WDT is not set -+# CONFIG_ALIM1535_WDT is not set -+# CONFIG_ALIX is not set -+CONFIG_AMD_NB=y -+CONFIG_ARCH_CLOCKSOURCE_DATA=y -+CONFIG_ARCH_DEFCONFIG="arch/x86/configs/i386_defconfig" -+CONFIG_ARCH_DISCARD_MEMBLOCK=y -+CONFIG_ARCH_DMA_ADDR_T_64BIT=y -+CONFIG_ARCH_ENABLE_MEMORY_HOTPLUG=y -+CONFIG_ARCH_ENABLE_SPLIT_PMD_PTLOCK=y -+CONFIG_ARCH_HAS_CACHE_LINE_SIZE=y -+CONFIG_ARCH_HAS_CPU_RELAX=y -+CONFIG_ARCH_HAS_DEBUG_VIRTUAL=y -+CONFIG_ARCH_HAS_ELF_RANDOMIZE=y -+CONFIG_ARCH_HAS_FAST_MULTIPLIER=y -+CONFIG_ARCH_HAS_FORTIFY_SOURCE=y -+CONFIG_ARCH_HAS_GCOV_PROFILE_ALL=y -+CONFIG_ARCH_HAS_MEM_ENCRYPT=y -+CONFIG_ARCH_HAS_SET_MEMORY=y -+CONFIG_ARCH_HAS_SG_CHAIN=y -+CONFIG_ARCH_HAS_STRICT_KERNEL_RWX=y -+CONFIG_ARCH_HAS_STRICT_MODULE_RWX=y -+CONFIG_ARCH_HAVE_NMI_SAFE_CMPXCHG=y -+CONFIG_ARCH_HIBERNATION_POSSIBLE=y -+CONFIG_ARCH_MAY_HAVE_PC_FDC=y -+CONFIG_ARCH_MIGHT_HAVE_PC_PARPORT=y -+CONFIG_ARCH_MIGHT_HAVE_PC_SERIO=y -+# CONFIG_ARCH_OPTIONAL_KERNEL_RWX is not set -+# CONFIG_ARCH_OPTIONAL_KERNEL_RWX_DEFAULT is not set -+CONFIG_ARCH_PHYS_ADDR_T_64BIT=y -+CONFIG_ARCH_RANDOM=y -+CONFIG_ARCH_SELECT_MEMORY_MODEL=y -+CONFIG_ARCH_SPARSEMEM_ENABLE=y -+CONFIG_ARCH_SUPPORTS_ATOMIC_RMW=y -+CONFIG_ARCH_SUPPORTS_DEBUG_PAGEALLOC=y -+CONFIG_ARCH_SUPPORTS_DEFERRED_STRUCT_PAGE_INIT=y -+CONFIG_ARCH_SUPPORTS_MEMORY_FAILURE=y -+CONFIG_ARCH_SUPPORTS_OPTIMIZED_INLINING=y -+CONFIG_ARCH_SUPPORTS_UPROBES=y -+CONFIG_ARCH_SUSPEND_POSSIBLE=y -+CONFIG_ARCH_USES_PG_UNCACHED=y -+CONFIG_ARCH_USE_BUILTIN_BSWAP=y -+CONFIG_ARCH_USE_QUEUED_RWLOCKS=y -+CONFIG_ARCH_USE_QUEUED_SPINLOCKS=y -+CONFIG_ARCH_WANTS_DYNAMIC_TASK_STRUCT=y -+# CONFIG_ARCH_WANTS_THP_SWAP is not set -+CONFIG_ARCH_WANT_BATCHED_UNMAP_TLB_FLUSH=y -+CONFIG_ARCH_WANT_GENERAL_HUGETLB=y -+CONFIG_ARCH_WANT_HUGE_PMD_SHARE=y -+CONFIG_ARCH_WANT_IPC_PARSE_VERSION=y -+CONFIG_ATA=y -+CONFIG_ATA_GENERIC=y -+CONFIG_ATA_PIIX=y -+CONFIG_BINFMT_MISC=y -+CONFIG_BLK_DEV_LOOP=y -+CONFIG_BLK_DEV_SD=y -+CONFIG_BLK_MQ_PCI=y -+CONFIG_BLK_SCSI_REQUEST=y -+CONFIG_BOUNCE=y -+CONFIG_BTT=y -+CONFIG_CLKBLD_I8253=y -+CONFIG_CLKDEV_LOOKUP=y -+CONFIG_CLKEVT_I8253=y -+CONFIG_CLKSRC_I8253=y -+CONFIG_CLOCKSOURCE_VALIDATE_LAST_CYCLE=y -+CONFIG_CLOCKSOURCE_WATCHDOG=y -+CONFIG_CLONE_BACKWARDS=y -+CONFIG_COMMON_CLK=y -+CONFIG_COMPAT_32=y -+# CONFIG_COMPAT_VDSO is not set -+CONFIG_CONSOLE_LOGLEVEL_DEFAULT=7 -+CONFIG_CONSOLE_TRANSLATIONS=y -+# CONFIG_CPU5_WDT is not set -+CONFIG_CPU_FREQ=y -+CONFIG_CPU_FREQ_DEFAULT_GOV_ONDEMAND=y -+# CONFIG_CPU_FREQ_DEFAULT_GOV_PERFORMANCE is not set -+CONFIG_CPU_FREQ_GOV_ATTR_SET=y -+CONFIG_CPU_FREQ_GOV_COMMON=y -+# CONFIG_CPU_FREQ_GOV_CONSERVATIVE is not set -+CONFIG_CPU_FREQ_GOV_ONDEMAND=y -+CONFIG_CPU_FREQ_GOV_PERFORMANCE=y -+# CONFIG_CPU_FREQ_GOV_POWERSAVE is not set -+# CONFIG_CPU_FREQ_GOV_USERSPACE is not set -+CONFIG_CPU_FREQ_STAT=y -+CONFIG_CPU_IDLE=y -+CONFIG_CPU_IDLE_GOV_LADDER=y -+CONFIG_CPU_SUP_AMD=y -+CONFIG_CPU_SUP_CENTAUR=y -+CONFIG_CPU_SUP_CYRIX_32=y -+CONFIG_CPU_SUP_INTEL=y -+CONFIG_CPU_SUP_TRANSMETA_32=y -+CONFIG_CPU_SUP_UMC_32=y -+# CONFIG_CRASHLOG is not set -+CONFIG_CRASH_CORE=y -+CONFIG_CRC16=y -+CONFIG_CRYPTO_AES_586=y -+CONFIG_CRYPTO_CRC32=y -+CONFIG_CRYPTO_CRC32C=y -+# CONFIG_CRYPTO_CRC32_PCLMUL is not set -+CONFIG_CRYPTO_HASH=y -+CONFIG_CRYPTO_HASH2=y -+CONFIG_CRYPTO_RNG2=y -+# CONFIG_CRYPTO_SERPENT_SSE2_586 is not set -+CONFIG_CRYPTO_WORKQUEUE=y -+# CONFIG_CX_ECAT is not set -+CONFIG_DCACHE_WORD_ACCESS=y -+# CONFIG_DCDBAS is not set -+# CONFIG_DEBUG_BOOT_PARAMS is not set -+# CONFIG_DEBUG_ENTRY is not set -+CONFIG_DEBUG_MEMORY_INIT=y -+# CONFIG_DEBUG_NMI_SELFTEST is not set -+# CONFIG_DEBUG_TLBFLUSH is not set -+# CONFIG_DEBUG_VIRTUAL is not set -+CONFIG_DECOMPRESS_BZIP2=y -+CONFIG_DECOMPRESS_GZIP=y -+CONFIG_DEFAULT_IO_DELAY_TYPE=0 -+# CONFIG_DELL_RBU is not set -+# CONFIG_DMA_NOOP_OPS is not set -+# CONFIG_DMA_VIRT_OPS is not set -+CONFIG_DMI=y -+CONFIG_DMIID=y -+CONFIG_DMI_SCAN_MACHINE_NON_EFI_FALLBACK=y -+CONFIG_DMI_SYSFS=y -+CONFIG_DNOTIFY=y -+# CONFIG_DRM_LIB_RANDOM is not set -+CONFIG_DUMMY_CONSOLE=y -+CONFIG_EARLY_PRINTK=y -+# CONFIG_EARLY_PRINTK_DBGP is not set -+CONFIG_EDAC_ATOMIC_SCRUB=y -+CONFIG_EDAC_SUPPORT=y -+# CONFIG_EDD is not set -+# CONFIG_EUROTECH_WDT is not set -+CONFIG_EXPORTFS=y -+CONFIG_EXT4_FS=y -+# CONFIG_F2FS_CHECK_FS is not set -+CONFIG_F2FS_FS=y -+# CONFIG_F2FS_FS_SECURITY is not set -+CONFIG_F2FS_FS_XATTR=y -+CONFIG_F2FS_STAT_FS=y -+# CONFIG_F71808E_WDT is not set -+CONFIG_FIRMWARE_IN_KERNEL=y -+CONFIG_FIRMWARE_MEMMAP=y -+CONFIG_FIX_EARLYCON_MEM=y -+CONFIG_FRAME_POINTER=y -+CONFIG_FRAME_POINTER_UNWINDER=y -+CONFIG_FS_MBCACHE=y -+CONFIG_FUSION=y -+# CONFIG_FUSION_CTL is not set -+# CONFIG_FUSION_LOGGING is not set -+CONFIG_FUSION_MAX_SGE=128 -+CONFIG_FUSION_SPI=y -+CONFIG_FUTEX_PI=y -+CONFIG_GENERIC_ALLOCATOR=y -+CONFIG_GENERIC_BUG=y -+CONFIG_GENERIC_CLOCKEVENTS=y -+CONFIG_GENERIC_CLOCKEVENTS_BROADCAST=y -+CONFIG_GENERIC_CLOCKEVENTS_MIN_ADJUST=y -+CONFIG_GENERIC_CMOS_UPDATE=y -+CONFIG_GENERIC_CPU_AUTOPROBE=y -+CONFIG_GENERIC_EARLY_IOREMAP=y -+CONFIG_GENERIC_FIND_FIRST_BIT=y -+CONFIG_GENERIC_IO=y -+CONFIG_GENERIC_IOMAP=y -+CONFIG_GENERIC_IRQ_SHOW=y -+CONFIG_GENERIC_ISA_DMA=y -+CONFIG_GENERIC_MSI_IRQ=y -+CONFIG_GENERIC_MSI_IRQ_DOMAIN=y -+CONFIG_GENERIC_PCI_IOMAP=y -+CONFIG_GENERIC_SMP_IDLE_THREAD=y -+CONFIG_GENERIC_STRNCPY_FROM_USER=y -+CONFIG_GENERIC_STRNLEN_USER=y -+CONFIG_GENERIC_TIME_VSYSCALL=y -+# CONFIG_GEOS is not set -+CONFIG_GLOB=y -+# CONFIG_GRO_CELLS is not set -+# CONFIG_GUESS_UNWINDER is not set -+# CONFIG_HANGCHECK_TIMER is not set -+CONFIG_HAS_DMA=y -+CONFIG_HAS_IOMEM=y -+CONFIG_HAS_IOPORT_MAP=y -+# CONFIG_HAVE_64BIT_ALIGNED_ACCESS is not set -+CONFIG_HAVE_ALIGNED_STRUCT_PAGE=y -+CONFIG_HAVE_AOUT=y -+CONFIG_HAVE_ARCH_AUDITSYSCALL=y -+# CONFIG_HAVE_ARCH_BITREVERSE is not set -+CONFIG_HAVE_ARCH_HUGE_VMAP=y -+CONFIG_HAVE_ARCH_JUMP_LABEL=y -+CONFIG_HAVE_ARCH_KGDB=y -+CONFIG_HAVE_ARCH_KMEMCHECK=y -+CONFIG_HAVE_ARCH_SECCOMP_FILTER=y -+CONFIG_HAVE_ARCH_TRACEHOOK=y -+CONFIG_HAVE_ARCH_TRANSPARENT_HUGEPAGE=y -+CONFIG_HAVE_ATOMIC_IOMAP=y -+# CONFIG_HAVE_BOOTMEM_INFO_NODE is not set -+CONFIG_HAVE_CC_STACKPROTECTOR=y -+CONFIG_HAVE_CLK=y -+CONFIG_HAVE_CLK_PREPARE=y -+CONFIG_HAVE_CMPXCHG_DOUBLE=y -+CONFIG_HAVE_CMPXCHG_LOCAL=y -+CONFIG_HAVE_COPY_THREAD_TLS=y -+CONFIG_HAVE_C_RECORDMCOUNT=y -+CONFIG_HAVE_DEBUG_KMEMLEAK=y -+CONFIG_HAVE_DEBUG_STACKOVERFLOW=y -+CONFIG_HAVE_DMA_API_DEBUG=y -+CONFIG_HAVE_DMA_CONTIGUOUS=y -+CONFIG_HAVE_DYNAMIC_FTRACE=y -+CONFIG_HAVE_DYNAMIC_FTRACE_WITH_REGS=y -+CONFIG_HAVE_EFFICIENT_UNALIGNED_ACCESS=y -+CONFIG_HAVE_FTRACE_MCOUNT_RECORD=y -+CONFIG_HAVE_FUNCTION_GRAPH_TRACER=y -+CONFIG_HAVE_FUNCTION_TRACER=y -+CONFIG_HAVE_GENERIC_DMA_COHERENT=y -+CONFIG_HAVE_GENERIC_GUP=y -+CONFIG_HAVE_HARDLOCKUP_DETECTOR_PERF=y -+CONFIG_HAVE_HW_BREAKPOINT=y -+CONFIG_HAVE_IDE=y -+CONFIG_HAVE_IOREMAP_PROT=y -+CONFIG_HAVE_IRQ_TIME_ACCOUNTING=y -+CONFIG_HAVE_KPROBES_ON_FTRACE=y -+CONFIG_HAVE_KVM=y -+CONFIG_HAVE_MEMBLOCK=y -+CONFIG_HAVE_MEMBLOCK_NODE_MAP=y -+CONFIG_HAVE_MIXED_BREAKPOINTS_REGS=y -+CONFIG_HAVE_MMIOTRACE_SUPPORT=y -+CONFIG_HAVE_MOD_ARCH_SPECIFIC=y -+CONFIG_HAVE_NET_DSA=y -+CONFIG_HAVE_OPROFILE=y -+CONFIG_HAVE_OPTPROBES=y -+CONFIG_HAVE_PCSPKR_PLATFORM=y -+CONFIG_HAVE_PERF_EVENTS=y -+CONFIG_HAVE_PERF_EVENTS_NMI=y -+CONFIG_HAVE_PERF_REGS=y -+CONFIG_HAVE_PERF_USER_STACK_DUMP=y -+CONFIG_HAVE_RCU_TABLE_FREE=y -+CONFIG_HAVE_REGS_AND_STACK_ACCESS_API=y -+CONFIG_HAVE_SETUP_PER_CPU_AREA=y -+CONFIG_HAVE_SYSCALL_TRACEPOINTS=y -+CONFIG_HAVE_UID16=y -+CONFIG_HAVE_UNSTABLE_SCHED_CLOCK=y -+CONFIG_HAVE_USER_RETURN_NOTIFIER=y -+CONFIG_HID=y -+CONFIG_HIGHMEM=y -+# CONFIG_HIGHMEM4G is not set -+CONFIG_HIGHMEM64G=y -+# CONFIG_HIGHPTE is not set -+CONFIG_HPET_EMULATE_RTC=y -+CONFIG_HPET_TIMER=y -+# CONFIG_HP_WATCHDOG is not set -+CONFIG_HT_IRQ=y -+# CONFIG_HUGETLBFS is not set -+CONFIG_HW_CONSOLE=y -+CONFIG_HW_RANDOM=y -+CONFIG_HW_RANDOM_GEODE=y -+CONFIG_HW_RANDOM_VIA=y -+# CONFIG_HYPERVISOR_GUEST is not set -+CONFIG_HZ_PERIODIC=y -+CONFIG_I8253_LOCK=y -+# CONFIG_I8K is not set -+# CONFIG_IB700_WDT is not set -+# CONFIG_IBMASR is not set -+# CONFIG_IBM_RTL is not set -+# CONFIG_IE6XX_WDT is not set -+CONFIG_ILLEGAL_POINTER_VALUE=0 -+CONFIG_INITRAMFS_SOURCE="" -+CONFIG_INPUT=y -+CONFIG_INPUT_KEYBOARD=y -+CONFIG_INSTRUCTION_DECODER=y -+# CONFIG_INTEL_PCH_THERMAL is not set -+# CONFIG_INTEL_POWERCLAMP is not set -+# CONFIG_INTEL_RDT is not set -+# CONFIG_INTEL_SOC_DTS_THERMAL is not set -+CONFIG_IOMMU_HELPER=y -+# CONFIG_IOMMU_STRESS is not set -+# CONFIG_IOSF_MBI is not set -+CONFIG_IO_DELAY_0X80=y -+# CONFIG_IO_DELAY_0XED is not set -+# CONFIG_IO_DELAY_NONE is not set -+CONFIG_IO_DELAY_TYPE_0X80=0 -+CONFIG_IO_DELAY_TYPE_0XED=1 -+CONFIG_IO_DELAY_TYPE_NONE=3 -+CONFIG_IO_DELAY_TYPE_UDELAY=2 -+# CONFIG_IO_DELAY_UDELAY is not set -+CONFIG_IRQ_DOMAIN=y -+CONFIG_IRQ_DOMAIN_HIERARCHY=y -+CONFIG_IRQ_FORCED_THREADING=y -+CONFIG_IRQ_WORK=y -+# CONFIG_ISA is not set -+CONFIG_ISA_DMA_API=y -+# CONFIG_IT8712F_WDT is not set -+# CONFIG_IT87_WDT is not set -+# CONFIG_ITCO_WDT is not set -+CONFIG_JBD2=y -+CONFIG_KALLSYMS=y -+CONFIG_KEXEC=y -+CONFIG_KEXEC_CORE=y -+CONFIG_KEYBOARD_ATKBD=y -+# CONFIG_LEDS_CLEVO_MAIL is not set -+CONFIG_LIBNVDIMM=y -+# CONFIG_M486 is not set -+# CONFIG_M586 is not set -+CONFIG_M586MMX=y -+# CONFIG_M586TSC is not set -+# CONFIG_M686 is not set -+# CONFIG_MACHZ_WDT is not set -+# CONFIG_MATOM is not set -+# CONFIG_MCORE2 is not set -+# CONFIG_MCRUSOE is not set -+# CONFIG_MCYRIXIII is not set -+# CONFIG_MDIO_BUS is not set -+# CONFIG_MEFFICEON is not set -+# CONFIG_MELAN is not set -+# CONFIG_MFD_INTEL_LPSS_PCI is not set -+# CONFIG_MGEODEGX1 is not set -+# CONFIG_MGEODE_LX is not set -+# CONFIG_MICROCODE is not set -+# CONFIG_MK6 is not set -+# CONFIG_MK7 is not set -+# CONFIG_MK8 is not set -+# CONFIG_MODIFY_LDT_SYSCALL is not set -+CONFIG_MODULES_TREE_LOOKUP=y -+CONFIG_MODULES_USE_ELF_REL=y -+# CONFIG_MPENTIUM4 is not set -+# CONFIG_MPENTIUMII is not set -+# CONFIG_MPENTIUMIII is not set -+# CONFIG_MPENTIUMM is not set -+# CONFIG_MTD is not set -+CONFIG_MTRR=y -+# CONFIG_MTRR_SANITIZER is not set -+# CONFIG_MVIAC3_2 is not set -+# CONFIG_MVIAC7 is not set -+# CONFIG_MWINCHIP3D is not set -+# CONFIG_MWINCHIPC6 is not set -+CONFIG_NAMESPACES=y -+CONFIG_ND_BLK=y -+CONFIG_ND_BTT=y -+CONFIG_ND_CLAIM=y -+CONFIG_NEED_DMA_MAP_STATE=y -+CONFIG_NEED_PER_CPU_EMBED_FIRST_CHUNK=y -+CONFIG_NEED_PER_CPU_KM=y -+CONFIG_NEED_PER_CPU_PAGE_FIRST_CHUNK=y -+CONFIG_NEED_SG_DMA_LENGTH=y -+# CONFIG_NET5501 is not set -+# CONFIG_NET_NS is not set -+CONFIG_NLS=y -+# CONFIG_NOHIGHMEM is not set -+CONFIG_NO_BOOTMEM=y -+CONFIG_NR_CPUS=1 -+# CONFIG_NSC_GPIO is not set -+CONFIG_NVRAM=y -+# CONFIG_OF is not set -+CONFIG_OLD_SIGACTION=y -+CONFIG_OLD_SIGSUSPEND3=y -+CONFIG_OPROFILE_NMI_TIMER=y -+# CONFIG_OPTIMIZE_INLINING is not set -+CONFIG_OUTPUT_FORMAT="elf32-i386" -+CONFIG_PAGE_OFFSET=0xC0000000 -+CONFIG_PC104=y -+# CONFIG_PC8736x_GPIO is not set -+# CONFIG_PC87413_WDT is not set -+CONFIG_PCI=y -+CONFIG_PCI_BIOS=y -+CONFIG_PCI_BUS_ADDR_T_64BIT=y -+CONFIG_PCI_DIRECT=y -+CONFIG_PCI_DOMAINS=y -+CONFIG_PCI_GOANY=y -+# CONFIG_PCI_GOBIOS is not set -+# CONFIG_PCI_GODIRECT is not set -+# CONFIG_PCI_GOMMCONFIG is not set -+CONFIG_PCI_LABEL=y -+CONFIG_PCI_LOCKLESS_CONFIG=y -+CONFIG_PCI_MSI=y -+CONFIG_PCI_MSI_IRQ_DOMAIN=y -+CONFIG_PCSPKR_PLATFORM=y -+CONFIG_PERF_EVENTS=y -+CONFIG_PERF_EVENTS_INTEL_CSTATE=y -+CONFIG_PERF_EVENTS_INTEL_RAPL=y -+CONFIG_PERF_EVENTS_INTEL_UNCORE=y -+CONFIG_PGTABLE_LEVELS=3 -+CONFIG_PHYSICAL_ALIGN=0x100000 -+CONFIG_PHYSICAL_START=0x1000000 -+CONFIG_PHYS_ADDR_T_64BIT=y -+CONFIG_PMC_ATOM=y -+CONFIG_POWER_SUPPLY=y -+CONFIG_PRINTK_SAFE_LOG_BUF_SHIFT=13 -+# CONFIG_PROCESSOR_SELECT is not set -+CONFIG_PROC_PAGE_MONITOR=y -+# CONFIG_PROVIDE_OHCI1394_DMA_INIT is not set -+# CONFIG_PUNIT_ATOM_DEBUG is not set -+CONFIG_RATIONAL=y -+# CONFIG_RCU_NEED_SEGCBLIST is not set -+# CONFIG_RCU_STALL_COMMON is not set -+CONFIG_RD_BZIP2=y -+CONFIG_RD_GZIP=y -+CONFIG_RTC_CLASS=y -+CONFIG_RTC_MC146818_LIB=y -+CONFIG_RWSEM_XCHGADD_ALGORITHM=y -+# CONFIG_SBC7240_WDT is not set -+# CONFIG_SBC8360_WDT is not set -+# CONFIG_SBC_EPX_C3_WATCHDOG is not set -+# CONFIG_SC1200_WDT is not set -+# CONFIG_SCHED_INFO is not set -+CONFIG_SCSI=y -+CONFIG_SCSI_SPI_ATTRS=y -+CONFIG_SCx200=y -+CONFIG_SCx200HR_TIMER=y -+# CONFIG_SCx200_GPIO is not set -+# CONFIG_SCx200_WDT is not set -+# CONFIG_SERIAL_8250_FSL is not set -+CONFIG_SERIAL_8250_PCI=y -+CONFIG_SERIO=y -+CONFIG_SERIO_I8042=y -+CONFIG_SERIO_LIBPS2=y -+CONFIG_SERIO_SERPORT=y -+CONFIG_SG_POOL=y -+# CONFIG_SMSC37B787_WDT is not set -+# CONFIG_SMSC_SCH311X_WDT is not set -+CONFIG_SPARSEMEM_STATIC=y -+CONFIG_SPARSE_IRQ=y -+CONFIG_SRCU=y -+CONFIG_STRICT_KERNEL_RWX=y -+CONFIG_STRICT_MODULE_RWX=y -+CONFIG_SWIOTLB=y -+CONFIG_SYSCTL_EXCEPTION_TRACE=y -+# CONFIG_TELCLOCK is not set -+CONFIG_THERMAL=y -+CONFIG_THERMAL_DEFAULT_GOV_STEP_WISE=y -+CONFIG_THERMAL_EMERGENCY_POWEROFF_DELAY_MS=0 -+CONFIG_THERMAL_GOV_STEP_WISE=y -+CONFIG_THIN_ARCHIVES=y -+CONFIG_THREAD_INFO_IN_TASK=y -+CONFIG_TICK_CPU_ACCOUNTING=y -+CONFIG_TINY_SRCU=y -+# CONFIG_TOSHIBA is not set -+CONFIG_UP_LATE_INIT=y -+CONFIG_USB=y -+CONFIG_USB_COMMON=y -+CONFIG_USB_EHCI_HCD=y -+# CONFIG_USB_EHCI_HCD_PLATFORM is not set -+CONFIG_USB_EHCI_PCI=y -+CONFIG_USB_HID=y -+CONFIG_USB_HIDDEV=y -+CONFIG_USB_OHCI_HCD=y -+# CONFIG_USB_OHCI_HCD_PLATFORM is not set -+CONFIG_USB_PCI=y -+CONFIG_USB_SUPPORT=y -+# CONFIG_USB_UHCI_HCD is not set -+# CONFIG_USERIO is not set -+# CONFIG_USER_NS is not set -+CONFIG_USER_STACKTRACE_SUPPORT=y -+# CONFIG_VGACON_SOFT_SCROLLBACK is not set -+CONFIG_VGA_CONSOLE=y -+# CONFIG_VIA_WDT is not set -+# CONFIG_VM86 is not set -+# CONFIG_VMWARE_VMCI is not set -+CONFIG_VM_EVENT_COUNTERS=y -+CONFIG_VT=y -+CONFIG_VT_CONSOLE=y -+CONFIG_VT_HW_CONSOLE_BINDING=y -+# CONFIG_WAFER_WDT is not set -+CONFIG_X86=y -+CONFIG_X86_32=y -+# CONFIG_X86_32_IRIS is not set -+CONFIG_X86_32_LAZY_GS=y -+CONFIG_X86_ALIGNMENT_16=y -+# CONFIG_X86_ANCIENT_MCE is not set -+# CONFIG_X86_CHECK_BIOS_CORRUPTION is not set -+CONFIG_X86_CMPXCHG64=y -+# CONFIG_X86_CPUFREQ_NFORCE2 is not set -+# CONFIG_X86_CPUID is not set -+# CONFIG_X86_DEBUG_FPU is not set -+# CONFIG_X86_EXTENDED_PLATFORM is not set -+CONFIG_X86_F00F_BUG=y -+CONFIG_X86_FAST_FEATURE_TESTS=y -+CONFIG_X86_FEATURE_NAMES=y -+CONFIG_X86_GENERIC=y -+# CONFIG_X86_GX_SUSPMOD is not set -+# CONFIG_X86_INTEL_PSTATE is not set -+CONFIG_X86_INTEL_USERCOPY=y -+CONFIG_X86_INTERNODE_CACHE_SHIFT=6 -+CONFIG_X86_IO_APIC=y -+CONFIG_X86_L1_CACHE_SHIFT=6 -+# CONFIG_X86_LEGACY_VM86 is not set -+CONFIG_X86_LOCAL_APIC=y -+# CONFIG_X86_LONGRUN is not set -+CONFIG_X86_MCE=y -+# CONFIG_X86_MCELOG_LEGACY is not set -+CONFIG_X86_MCE_AMD=y -+# CONFIG_X86_MCE_INJECT is not set -+CONFIG_X86_MCE_INTEL=y -+CONFIG_X86_MCE_THRESHOLD=y -+CONFIG_X86_MINIMUM_CPU_FAMILY=5 -+CONFIG_X86_MPPARSE=y -+CONFIG_X86_MSR=y -+# CONFIG_X86_P4_CLOCKMOD is not set -+CONFIG_X86_PAE=y -+CONFIG_X86_PAT=y -+CONFIG_X86_PLATFORM_DEVICES=y -+CONFIG_X86_PMEM_LEGACY=y -+CONFIG_X86_PMEM_LEGACY_DEVICE=y -+# CONFIG_X86_POWERNOW_K6 is not set -+# CONFIG_X86_POWERNOW_K7 is not set -+CONFIG_X86_PPRO_FENCE=y -+# CONFIG_X86_PTDUMP is not set -+# CONFIG_X86_PTDUMP_CORE is not set -+# CONFIG_X86_REBOOTFIXUPS is not set -+CONFIG_X86_REROUTE_FOR_BROKEN_BOOT_IRQS=y -+CONFIG_X86_RESERVE_LOW=64 -+# CONFIG_X86_SMAP is not set -+# CONFIG_X86_SPEEDSTEP_CENTRINO is not set -+# CONFIG_X86_SPEEDSTEP_ICH is not set -+# CONFIG_X86_SPEEDSTEP_LIB is not set -+# CONFIG_X86_SPEEDSTEP_SMI is not set -+CONFIG_X86_SUPPORTS_MEMORY_FAILURE=y -+CONFIG_X86_THERMAL_VECTOR=y -+CONFIG_X86_TSC=y -+CONFIG_X86_UP_APIC=y -+CONFIG_X86_UP_IOAPIC=y -+CONFIG_X86_VERBOSE_BOOTUP=y -+CONFIG_XZ_DEC_BCJ=y -+CONFIG_XZ_DEC_X86=y -+CONFIG_ZLIB_INFLATE=y -diff --git a/target/linux/x86/generic/config-default b/target/linux/x86/generic/config-default -index f9893f4..c7e7ed3 100644 ---- a/target/linux/x86/generic/config-default -+++ b/target/linux/x86/generic/config-default -@@ -1,3 +1,4 @@ -+# CONFIG_104_QUAD_8 is not set - # CONFIG_3C515 is not set - CONFIG_ACPI=y - CONFIG_ACPI_AC=y -@@ -43,15 +44,13 @@ CONFIG_AGP_INTEL=y - # CONFIG_APM is not set - CONFIG_ARCH_HAS_ACPI_TABLE_UPGRADE=y - CONFIG_ARCH_MIGHT_HAVE_ACPI_PDC=y --CONFIG_ARCH_WANT_BATCHED_UNMAP_TLB_FLUSH=y - CONFIG_BACKLIGHT_CLASS_DEVICE=y - CONFIG_BACKLIGHT_GENERIC=y - CONFIG_BACKLIGHT_LCD_SUPPORT=y - CONFIG_BLK_DEV_SR=y - # CONFIG_BLK_DEV_SR_VENDOR is not set -+CONFIG_BLK_MQ_VIRTIO=y - # CONFIG_BOOTPARAM_HOTPLUG_CPU0 is not set --CONFIG_CLKDEV_LOOKUP=y --CONFIG_COMMON_CLK=y - CONFIG_CONNECTOR=y - # CONFIG_CPU_HOTPLUG_STATE_CONTROL is not set - CONFIG_CPU_IDLE_GOV_MENU=y -@@ -73,18 +72,30 @@ CONFIG_DRM_AMDGPU=y - # CONFIG_DRM_AMD_ACP is not set - CONFIG_DRM_BOCHS=y - CONFIG_DRM_BRIDGE=y -+# CONFIG_DRM_DEBUG_MM is not set -+# CONFIG_DRM_DEBUG_MM_SELFTEST is not set - CONFIG_DRM_FBDEV_EMULATION=y -+CONFIG_DRM_FBDEV_OVERALLOC=100 - # CONFIG_DRM_GMA500 is not set - CONFIG_DRM_I915=y -+# CONFIG_DRM_I915_ALPHA_SUPPORT is not set -+CONFIG_DRM_I915_CAPTURE_ERROR=y -+CONFIG_DRM_I915_COMPRESS_ERROR=y - # CONFIG_DRM_I915_DEBUG is not set -+# CONFIG_DRM_I915_DEBUG_VBLANK_EVADE is not set - # CONFIG_DRM_I915_GVT is not set -+# CONFIG_DRM_I915_LOW_LEVEL_TRACEPOINTS is not set - # CONFIG_DRM_I915_PRELIMINARY_HW_SUPPORT is not set -+# CONFIG_DRM_I915_SELFTEST is not set -+# CONFIG_DRM_I915_SW_FENCE_CHECK_DAG is not set -+# CONFIG_DRM_I915_SW_FENCE_DEBUG_OBJECTS is not set - CONFIG_DRM_I915_USERPTR=y - # CONFIG_DRM_I915_WERROR is not set - CONFIG_DRM_KMS_FB_HELPER=y - CONFIG_DRM_KMS_HELPER=y - CONFIG_DRM_MIPI_DSI=y - CONFIG_DRM_PANEL=y -+CONFIG_DRM_PANEL_BRIDGE=y - CONFIG_DRM_RADEON=y - # CONFIG_DRM_RADEON_USERPTR is not set - CONFIG_DRM_TTM=y -@@ -96,6 +107,8 @@ CONFIG_EFI=y - CONFIG_EFIVAR_FS=m - # CONFIG_EFI_BOOTLOADER_CONTROL is not set - # CONFIG_EFI_CAPSULE_LOADER is not set -+# CONFIG_EFI_CAPSULE_QUIRK_QUARK_CSH is not set -+# CONFIG_EFI_DEV_PATH_PARSER is not set - CONFIG_EFI_ESRT=y - # CONFIG_EFI_FAKE_MEMMAP is not set - # CONFIG_EFI_PGT_DUMP is not set -@@ -115,6 +128,7 @@ CONFIG_FB_DEFERRED_IO=y - CONFIG_FB_EFI=y - CONFIG_FB_HYPERV=y - # CONFIG_FB_I810 is not set -+# CONFIG_FB_PROVIDE_GET_FB_UNMAPPED_AREA is not set - CONFIG_FB_SYS_COPYAREA=y - CONFIG_FB_SYS_FILLRECT=y - CONFIG_FB_SYS_FOPS=y -@@ -128,6 +142,8 @@ CONFIG_FRAMEBUFFER_CONSOLE=y - CONFIG_FRAMEBUFFER_CONSOLE_DETECT_PRIMARY=y - # CONFIG_FRAMEBUFFER_CONSOLE_ROTATION is not set - CONFIG_FREEZER=y -+CONFIG_GENERIC_IRQ_EFFECTIVE_AFF_MASK=y -+CONFIG_GENERIC_IRQ_MIGRATION=y - CONFIG_GENERIC_PENDING_IRQ=y - CONFIG_GENERIC_PINCONF=y - CONFIG_GPIOLIB=y -@@ -138,8 +154,6 @@ CONFIG_GPIOLIB_IRQCHIP=y - CONFIG_GPIO_ACPI=y - CONFIG_HAVE_ACPI_APEI=y - CONFIG_HAVE_ACPI_APEI_NMI=y --CONFIG_HAVE_CLK=y --CONFIG_HAVE_CLK_PREPARE=y - CONFIG_HAVE_KVM_CPU_RELAX_INTERCEPT=y - CONFIG_HAVE_KVM_EVENTFD=y - CONFIG_HAVE_KVM_IRQCHIP=y -@@ -189,12 +203,14 @@ CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768 - CONFIG_INPUT_XEN_KBDDEV_FRONTEND=y - CONFIG_INTEL_GTT=y - CONFIG_INTEL_IDLE=y -+# CONFIG_INTEL_INT0002_VGPIO is not set - # CONFIG_INTEL_IPS is not set - # CONFIG_INTEL_MENLOW is not set - CONFIG_INTEL_PCH_THERMAL=y - # CONFIG_INTEL_PMC_IPC is not set - CONFIG_INTEL_SOC_DTS_IOSF_CORE=y - CONFIG_INTEL_SOC_DTS_THERMAL=y -+# CONFIG_INTEL_SOC_PMIC_CHTWC is not set - CONFIG_INTERVAL_TREE=y - CONFIG_IOSF_MBI=y - # CONFIG_IOSF_MBI_DEBUG is not set -@@ -244,7 +260,9 @@ CONFIG_MOUSE_PS2_ALPS=y - # CONFIG_MOUSE_PS2_ELANTECH is not set - CONFIG_MOUSE_PS2_LIFEBOOK=y - CONFIG_MOUSE_PS2_LOGIPS2PP=y -+CONFIG_MOUSE_PS2_SMBUS=y - CONFIG_MOUSE_PS2_SYNAPTICS=y -+CONFIG_MOUSE_PS2_SYNAPTICS_SMBUS=y - # CONFIG_MOUSE_PS2_TOUCHKIT is not set - CONFIG_MOUSE_PS2_TRACKPOINT=y - # CONFIG_MOUSE_PS2_VMMOUSE is not set -@@ -276,8 +294,12 @@ CONFIG_PCI_XEN=y - CONFIG_PINCTRL=y - CONFIG_PINCTRL_BAYTRAIL=y - CONFIG_PINCTRL_BROXTON=y -+CONFIG_PINCTRL_CANNONLAKE=y - CONFIG_PINCTRL_CHERRYVIEW=y -+CONFIG_PINCTRL_DENVERTON=y -+CONFIG_PINCTRL_GEMINILAKE=y - CONFIG_PINCTRL_INTEL=y -+# CONFIG_PINCTRL_LEWISBURG is not set - CONFIG_PINCTRL_SUNRISEPOINT=y - CONFIG_PM=y - # CONFIG_PMIC_OPREGION is not set -@@ -296,11 +318,13 @@ CONFIG_QUEUED_RWLOCKS=y - CONFIG_QUEUED_SPINLOCKS=y - # CONFIG_RANDOMIZE_BASE is not set - CONFIG_RAS=y --CONFIG_RATIONAL=y -+CONFIG_RCU_NEED_SEGCBLIST=y - CONFIG_RCU_STALL_COMMON=y - CONFIG_REGMAP=y - CONFIG_REGMAP_I2C=y -+# CONFIG_RELAY is not set - CONFIG_RELOCATABLE=y -+CONFIG_RESET_ATTACK_MITIGATION=y - CONFIG_RFS_ACCEL=y - CONFIG_RPS=y - CONFIG_RTC_I2C_AND_SPI=y -@@ -320,6 +344,8 @@ CONFIG_SERIAL_8250_PNP=y - CONFIG_SMP=y - # CONFIG_SURFACE_PRO3_BUTTON is not set - CONFIG_SWIOTLB_XEN=y -+# CONFIG_SW_SYNC is not set -+# CONFIG_SYNC_FILE is not set - CONFIG_SYS_HYPERVISOR=y - CONFIG_TASKSTATS=y - CONFIG_TASK_DELAY_ACCT=y -@@ -328,10 +354,12 @@ CONFIG_THERMAL_HWMON=y - CONFIG_THERMAL_WRITABLE_TRIPS=y - # CONFIG_TOSHIBA_BT_RFKILL is not set - CONFIG_TREE_RCU=y -+CONFIG_TREE_SRCU=y - CONFIG_UCS2_STRING=y - CONFIG_USB_STORAGE=y - CONFIG_USER_RETURN_NOTIFIER=y - CONFIG_VGACON_SOFT_SCROLLBACK=y -+# CONFIG_VGACON_SOFT_SCROLLBACK_PERSISTENT_ENABLE_BY_DEFAULT is not set - CONFIG_VGACON_SOFT_SCROLLBACK_SIZE=64 - CONFIG_VHOST=y - CONFIG_VHOST_NET=y -@@ -390,7 +418,11 @@ CONFIG_XEN_HAVE_VPMU=y - CONFIG_XEN_NETDEV_FRONTEND=y - CONFIG_XEN_PCIDEV_FRONTEND=y - CONFIG_XEN_PRIVCMD=y -+CONFIG_XEN_PV=y -+CONFIG_XEN_PVH=y - CONFIG_XEN_PVHVM=y -+CONFIG_XEN_PVHVM_SMP=y -+CONFIG_XEN_PV_SMP=y - CONFIG_XEN_SAVE_RESTORE=y - CONFIG_XEN_SCRUB_PAGES=y - CONFIG_XEN_SCSI_FRONTEND=y -@@ -399,3 +431,4 @@ CONFIG_XEN_SYS_HYPERVISOR=y - CONFIG_XEN_WDT=y - CONFIG_XEN_XENBUS_FRONTEND=y - CONFIG_XPS=y -+CONFIG_ZLIB_DEFLATE=y -diff --git a/target/linux/x86/geode/config-default b/target/linux/x86/geode/config-default -index daf397b..b564b94 100644 ---- a/target/linux/x86/geode/config-default -+++ b/target/linux/x86/geode/config-default -@@ -1,3 +1,4 @@ -+# CONFIG_104_QUAD_8 is not set - # CONFIG_3C515 is not set - CONFIG_8139CP=y - CONFIG_8139TOO=y -@@ -40,6 +41,7 @@ CONFIG_CS5535_MFGPT=y - CONFIG_CS5535_MFGPT_DEFAULT_IRQ=7 - # CONFIG_DPTF_POWER is not set - # CONFIG_EBC_C384_WDT is not set -+# CONFIG_EFI_DEV_PATH_PARSER is not set - # CONFIG_EISA is not set - # CONFIG_EL3 is not set - CONFIG_GEODE_WDT=y -@@ -63,9 +65,11 @@ CONFIG_I2C_ALGOBIT=y - CONFIG_I2C_ALGOPCA=y - CONFIG_I2C_ALGOPCF=y - CONFIG_I2C_BOARDINFO=y -+# CONFIG_INTEL_INT0002_VGPIO is not set - # CONFIG_INTEL_IPS is not set - # CONFIG_INTEL_MENLOW is not set - # CONFIG_INTEL_PMC_IPC is not set -+# CONFIG_INTEL_SOC_PMIC_CHTWC is not set - CONFIG_ISA=y - # CONFIG_ISAPNP is not set - CONFIG_ISA_BUS_API=y -@@ -110,9 +114,10 @@ CONFIG_SENSORS_LM90=y - CONFIG_SERIAL_8250_PNP=y - # CONFIG_SURFACE_PRO3_BUTTON is not set - # CONFIG_TOSHIBA_BT_RFKILL is not set --CONFIG_USB_OHCI_HCD_PCI=y - # CONFIG_USB_UHCI_HCD is not set -+CONFIG_USB_OHCI_HCD_PCI=y - CONFIG_VGACON_SOFT_SCROLLBACK=y -+# CONFIG_VGACON_SOFT_SCROLLBACK_PERSISTENT_ENABLE_BY_DEFAULT is not set - CONFIG_VGACON_SOFT_SCROLLBACK_SIZE=64 - CONFIG_VIA_RHINE=y - CONFIG_VIA_RHINE_MMIO=y -diff --git a/target/linux/x86/legacy/config-default b/target/linux/x86/legacy/config-default -index 3e0b065..a438eed 100644 ---- a/target/linux/x86/legacy/config-default -+++ b/target/linux/x86/legacy/config-default -@@ -1,3 +1,4 @@ -+# CONFIG_104_QUAD_8 is not set - # CONFIG_3C515 is not set - CONFIG_ACPI=y - CONFIG_ACPI_AC=y -@@ -45,8 +46,6 @@ CONFIG_BACKLIGHT_GENERIC=y - CONFIG_BACKLIGHT_LCD_SUPPORT=y - CONFIG_BLK_DEV_SR=y - # CONFIG_BLK_DEV_SR_VENDOR is not set --CONFIG_CLKDEV_LOOKUP=y --CONFIG_COMMON_CLK=y - CONFIG_CPU_IDLE_GOV_MENU=y - CONFIG_DMA_SHARED_BUFFER=y - # CONFIG_DPTF_POWER is not set -@@ -59,23 +58,36 @@ CONFIG_DRM_AMDGPU=y - # CONFIG_DRM_AMD_ACP is not set - CONFIG_DRM_BOCHS=y - CONFIG_DRM_BRIDGE=y -+# CONFIG_DRM_DEBUG_MM is not set -+# CONFIG_DRM_DEBUG_MM_SELFTEST is not set - CONFIG_DRM_FBDEV_EMULATION=y -+CONFIG_DRM_FBDEV_OVERALLOC=100 - # CONFIG_DRM_GMA500 is not set - CONFIG_DRM_I915=y -+# CONFIG_DRM_I915_ALPHA_SUPPORT is not set -+CONFIG_DRM_I915_CAPTURE_ERROR=y -+CONFIG_DRM_I915_COMPRESS_ERROR=y - # CONFIG_DRM_I915_DEBUG is not set -+# CONFIG_DRM_I915_DEBUG_VBLANK_EVADE is not set - # CONFIG_DRM_I915_GVT is not set -+# CONFIG_DRM_I915_LOW_LEVEL_TRACEPOINTS is not set -+# CONFIG_DRM_I915_SELFTEST is not set - # CONFIG_DRM_I915_PRELIMINARY_HW_SUPPORT is not set -+# CONFIG_DRM_I915_SW_FENCE_CHECK_DAG is not set -+# CONFIG_DRM_I915_SW_FENCE_DEBUG_OBJECTS is not set - CONFIG_DRM_I915_USERPTR=y - # CONFIG_DRM_I915_WERROR is not set - CONFIG_DRM_KMS_FB_HELPER=y - CONFIG_DRM_KMS_HELPER=y - CONFIG_DRM_MIPI_DSI=y - CONFIG_DRM_PANEL=y -+CONFIG_DRM_PANEL_BRIDGE=y - CONFIG_DRM_RADEON=y - # CONFIG_DRM_RADEON_USERPTR is not set - CONFIG_DRM_TTM=y - # CONFIG_DRM_VMWGFX is not set - # CONFIG_EBC_C384_WDT is not set -+# CONFIG_EFI_DEV_PATH_PARSER is not set - # CONFIG_EISA is not set - # CONFIG_EL3 is not set - CONFIG_FB=y -@@ -85,6 +97,7 @@ CONFIG_FB_CFB_IMAGEBLIT=y - CONFIG_FB_CMDLINE=y - CONFIG_FB_DEFERRED_IO=y - # CONFIG_FB_I810 is not set -+# CONFIG_FB_PROVIDE_GET_FB_UNMAPPED_AREA is not set - CONFIG_FB_SYS_COPYAREA=y - CONFIG_FB_SYS_FILLRECT=y - CONFIG_FB_SYS_FOPS=y -@@ -99,8 +112,6 @@ CONFIG_FRAMEBUFFER_CONSOLE_DETECT_PRIMARY=y - # CONFIG_FRAMEBUFFER_CONSOLE_ROTATION is not set - CONFIG_HAVE_ACPI_APEI=y - CONFIG_HAVE_ACPI_APEI_NMI=y --CONFIG_HAVE_CLK=y --CONFIG_HAVE_CLK_PREPARE=y - CONFIG_HDMI=y - CONFIG_HID_BATTERY_STRENGTH=y - # CONFIG_HIGHMEM64G is not set -@@ -121,7 +132,10 @@ CONFIG_INTEL_IDLE=y - # CONFIG_INTEL_IPS is not set - # CONFIG_INTEL_MENLOW is not set - # CONFIG_INTEL_PMC_IPC is not set -+# CONFIG_INTEL_SOC_PMIC_CHTWC is not set - CONFIG_INTERVAL_TREE=y -+CONFIG_IOSF_MBI=y -+# CONFIG_IOSF_MBI_DEBUG is not set - CONFIG_ISA=y - CONFIG_ISAPNP=y - CONFIG_ISA_BUS_API=y -@@ -146,7 +160,9 @@ CONFIG_MOUSE_PS2_ALPS=y - # CONFIG_MOUSE_PS2_ELANTECH is not set - CONFIG_MOUSE_PS2_LIFEBOOK=y - CONFIG_MOUSE_PS2_LOGIPS2PP=y -+CONFIG_MOUSE_PS2_SMBUS=y - CONFIG_MOUSE_PS2_SYNAPTICS=y -+CONFIG_MOUSE_PS2_SYNAPTICS_SMBUS=y - # CONFIG_MOUSE_PS2_TOUCHKIT is not set - CONFIG_MOUSE_PS2_TRACKPOINT=y - # CONFIG_MOUSE_SERIAL is not set -@@ -175,17 +191,20 @@ CONFIG_PNPACPI=y - CONFIG_PNP_DEBUG_MESSAGES=y - # CONFIG_PVPANIC is not set - CONFIG_RAS=y --CONFIG_RATIONAL=y - CONFIG_REGMAP=y - CONFIG_REGMAP_I2C=y -+CONFIG_RELAY=y - CONFIG_RTC_I2C_AND_SPI=y - # CONFIG_SAMSUNG_Q10 is not set - CONFIG_SATA_AHCI=y - CONFIG_SERIAL_8250_PNP=y - # CONFIG_SURFACE_PRO3_BUTTON is not set -+# CONFIG_SW_SYNC is not set -+CONFIG_SYNC_FILE=y - # CONFIG_TOSHIBA_BT_RFKILL is not set - CONFIG_USB_STORAGE=y - CONFIG_VGACON_SOFT_SCROLLBACK=y -+# CONFIG_VGACON_SOFT_SCROLLBACK_PERSISTENT_ENABLE_BY_DEFAULT is not set - CONFIG_VGACON_SOFT_SCROLLBACK_SIZE=64 - # CONFIG_WDT is not set - CONFIG_X86_ACPI_CPUFREQ=y -@@ -200,3 +219,4 @@ CONFIG_X86_MINIMUM_CPU_FAMILY=4 - # CONFIG_X86_PCC_CPUFREQ is not set - CONFIG_X86_PM_TIMER=y - # CONFIG_X86_POWERNOW_K8 is not set -+CONFIG_ZLIB_DEFLATE=y -diff --git a/target/linux/x86/patches-4.14/011-tune_lzma_options.patch b/target/linux/x86/patches-4.14/011-tune_lzma_options.patch -new file mode 100644 -index 0000000..daed310 ---- /dev/null -+++ b/target/linux/x86/patches-4.14/011-tune_lzma_options.patch -@@ -0,0 +1,22 @@ -+--- a/scripts/Makefile.lib -++++ b/scripts/Makefile.lib -+@@ -348,7 +348,7 @@ cmd_bzip2 = (cat $(filter-out FORCE,$^) -+ -+ quiet_cmd_lzma = LZMA $@ -+ cmd_lzma = (cat $(filter-out FORCE,$^) | \ -+- lzma e -d20 -lc1 -lp2 -pb2 -eos -si -so && $(call size_append, $(filter-out FORCE,$^))) > $@ || \ -++ lzma e -lc8 -eos -si -so && $(call size_append, $(filter-out FORCE,$^))) > $@ || \ -+ (rm -f $@ ; false) -+ -+ quiet_cmd_lzo = LZO $@ -+--- a/arch/x86/include/asm/boot.h -++++ b/arch/x86/include/asm/boot.h -+@@ -24,7 +24,7 @@ -+ # error "Invalid value for CONFIG_PHYSICAL_ALIGN" -+ #endif -+ -+-#ifdef CONFIG_KERNEL_BZIP2 -++#if defined(CONFIG_KERNEL_BZIP2) || defined(CONFIG_KERNEL_LZMA) -+ # define BOOT_HEAP_SIZE 0x400000 -+ #else /* !CONFIG_KERNEL_BZIP2 */ -+ # define BOOT_HEAP_SIZE 0x10000 -diff --git a/target/linux/x86/patches-4.14/100-fix_cs5535_clockevt.patch b/target/linux/x86/patches-4.14/100-fix_cs5535_clockevt.patch -new file mode 100644 -index 0000000..c3a7fce ---- /dev/null -+++ b/target/linux/x86/patches-4.14/100-fix_cs5535_clockevt.patch -@@ -0,0 +1,12 @@ -+--- a/drivers/clocksource/cs5535-clockevt.c -++++ b/drivers/clocksource/cs5535-clockevt.c -+@@ -130,7 +130,8 @@ static irqreturn_t mfgpt_tick(int irq, v -+ cs5535_mfgpt_write(cs5535_event_clock, MFGPT_REG_SETUP, -+ MFGPT_SETUP_CNTEN | MFGPT_SETUP_CMP2); -+ -+- cs5535_clockevent.event_handler(&cs5535_clockevent); -++ if (cs5535_clockevent.event_handler) -++ cs5535_clockevent.event_handler(&cs5535_clockevent); -+ return IRQ_HANDLED; -+ } -+ -diff --git a/target/linux/x86/patches-4.14/200-pcengines-apu2-reboot.patch b/target/linux/x86/patches-4.14/200-pcengines-apu2-reboot.patch -new file mode 100644 -index 0000000..048dfae ---- /dev/null -+++ b/target/linux/x86/patches-4.14/200-pcengines-apu2-reboot.patch -@@ -0,0 +1,19 @@ -+--- a/arch/x86/kernel/reboot.c -++++ b/arch/x86/kernel/reboot.c -+@@ -448,6 +448,16 @@ static const struct dmi_system_id reboot -+ }, -+ }, -+ -++ /* PC Engines */ -++ { /* Handle problems with rebooting on PC Engines apu2 */ -++ .callback = set_pci_reboot, -++ .ident = "PC Engines apu2", -++ .matches = { -++ DMI_MATCH(DMI_BOARD_VENDOR, "PC Engines"), -++ DMI_MATCH(DMI_BOARD_NAME, "apu2"), -++ }, -++ }, -++ -+ /* Sony */ -+ { /* Handle problems with rebooting on Sony VGN-Z540N */ -+ .callback = set_bios_reboot, -diff --git a/target/linux/x86/patches-4.14/800-hwmon-w83627ehf-dont-claim-nct677x.patch b/target/linux/x86/patches-4.14/800-hwmon-w83627ehf-dont-claim-nct677x.patch -new file mode 100644 -index 0000000..ef2e133 ---- /dev/null -+++ b/target/linux/x86/patches-4.14/800-hwmon-w83627ehf-dont-claim-nct677x.patch -@@ -0,0 +1,30 @@ -+--- a/drivers/hwmon/w83627ehf.c -++++ b/drivers/hwmon/w83627ehf.c -+@@ -2717,8 +2717,8 @@ static int __init w83627ehf_find(int sio -+ static const char sio_name_W83627UHG[] __initconst = "W83627UHG"; -+ static const char sio_name_W83667HG[] __initconst = "W83667HG"; -+ static const char sio_name_W83667HG_B[] __initconst = "W83667HG-B"; -+- static const char sio_name_NCT6775[] __initconst = "NCT6775F"; -+- static const char sio_name_NCT6776[] __initconst = "NCT6776F"; -++/* static const char sio_name_NCT6775[] __initconst = "NCT6775F"; -++ static const char sio_name_NCT6776[] __initconst = "NCT6776F"; */ -+ -+ u16 val; -+ const char *sio_name; -+@@ -2762,14 +2762,14 @@ static int __init w83627ehf_find(int sio -+ sio_data->kind = w83667hg_b; -+ sio_name = sio_name_W83667HG_B; -+ break; -+- case SIO_NCT6775_ID: -++/* case SIO_NCT6775_ID: -+ sio_data->kind = nct6775; -+ sio_name = sio_name_NCT6775; -+ break; -+ case SIO_NCT6776_ID: -+ sio_data->kind = nct6776; -+ sio_name = sio_name_NCT6776; -+- break; -++ break; */ -+ default: -+ if (val != 0xffff) -+ pr_debug("unsupported chip ID: 0x%04x\n", val); --- -1.9.1 - diff --git a/include/kernel-version.mk b/include/kernel-version.mk index 208baf75a..623d20493 100644 --- a/include/kernel-version.mk +++ b/include/kernel-version.mk @@ -24,4 +24,4 @@ KERNEL_PATCHVER ?= $(KERNEL) # disable the md5sum check for unknown kernel versions LINUX_KERNEL_HASH:=$(LINUX_KERNEL_HASH-$(strip $(LINUX_VERSION))) -LINUX_KERNEL_HASH?=x +LINUX_KERNEL_HASH?=x \ No newline at end of file diff --git a/include/target.mk b/include/target.mk index 6fb5a31bc..3fe99d33a 100644 --- a/include/target.mk +++ b/include/target.mk @@ -16,7 +16,7 @@ DEVICE_TYPE?=router DEFAULT_PACKAGES:=base-files libc libgcc busybox dropbear mtd uci opkg netifd fstools uclient-fetch logd \ iptables-mod-nat-extra kmod-nf-nathelper kmod-nf-nathelper-extra kmod-macvlan block-mount automount \ default-settings ipset-lists luci luci-app-ddns luci-app-sqm luci-app-upnp luci-app-adbyby-plus luci-app-autoreboot \ -luci-app-filetransfer luci-app-shadowsocksr-pro luci-app-usb-printer luci-app-vsftpd luci-app-sfe \ +luci-app-filetransfer luci-app-shadowsocksr-pro luci-app-usb-printer luci-app-vsftpd \ luci-app-pptp-server luci-app-ipsec-vpnd luci-app-vlmcsd luci-app-wifischedule luci-app-wol # For nas targets DEFAULT_PACKAGES.nas:=block-mount fdisk lsblk mdadm diff --git a/package/kernel/kmod-sched-cake/Makefile b/package/kernel/kmod-sched-cake/Makefile index f97967f24..5f57433d6 100644 --- a/package/kernel/kmod-sched-cake/Makefile +++ b/package/kernel/kmod-sched-cake/Makefile @@ -13,9 +13,9 @@ PKG_RELEASE:=1 PKG_SOURCE_PROTO:=git PKG_SOURCE_URL:=https://github.com/dtaht/sch_cake.git -PKG_SOURCE_DATE:=2017-01-28 -PKG_SOURCE_VERSION:=9789742cfc596d48583ba4cdbc8f38d026121fa6 -PKG_MIRROR_HASH:=2a5afc45722c28ca8778eb50452eb305306e7898b32d7d6d73d3e77edf3cce99 +PKG_SOURCE_DATE:=2017-12-07 +PKG_SOURCE_VERSION:=49776da5b93f03c8548e26f2d7982d553d1d226c +PKG_MIRROR_HASH:=d7bc6c333b43f6ff100a4b1d4593a18686fcdd6fd28a3aae55ea8bdad868b67f include $(INCLUDE_DIR)/package.mk diff --git a/package/kernel/linux/modules/block.mk b/package/kernel/linux/modules/block.mk index 62f08218c..ab9d7af8c 100644 --- a/package/kernel/linux/modules/block.mk +++ b/package/kernel/linux/modules/block.mk @@ -206,10 +206,21 @@ endef $(eval $(call KernelPackage,block2mtd)) +define KernelPackage/dax + SUBMENU:=$(BLOCK_MENU) + TITLE:=DAX: direct access to differentiated memory + DEPENDS:=@LINUX_4_14 + KCONFIG:=CONFIG_DAX + FILES:=$(LINUX_DIR)/drivers/dax/dax.ko +endef + +$(eval $(call KernelPackage,dax)) + + define KernelPackage/dm SUBMENU:=$(BLOCK_MENU) TITLE:=Device Mapper - DEPENDS:=+kmod-crypto-manager + DEPENDS:=+kmod-crypto-manager +LINUX_4_14:kmod-dax # All the "=n" are unnecessary, they're only there # to stop the config from asking the question. # MIRROR is M because I've needed it for pvmove. diff --git a/package/kernel/linux/modules/crypto.mk b/package/kernel/linux/modules/crypto.mk index fc2739811..b05552006 100644 --- a/package/kernel/linux/modules/crypto.mk +++ b/package/kernel/linux/modules/crypto.mk @@ -120,6 +120,36 @@ endef $(eval $(call KernelPackage,crypto-rng)) +define KernelPackage/crypto-rsa + TITLE:=RSA algorithm + DEPENDS:=@!LINUX_3_18 +kmod-crypto-manager + KCONFIG:= CONFIG_CRYPTO_RSA + HIDDEN:=1 + FILES:= \ + $(LINUX_DIR)/lib/asn1_decoder.ko \ + $(LINUX_DIR)/lib/mpi/mpi.ko \ + $(LINUX_DIR)/crypto/akcipher.ko \ + $(LINUX_DIR)/crypto/rsa_generic.ko + AUTOLOAD:=$(call AutoLoad,10,rsa_generic) + $(call AddDepends/crypto) +endef + +$(eval $(call KernelPackage,crypto-rsa)) + + +define KernelPackage/crypto-ecdh + TITLE:=ECDH algorithm + DEPENDS:=@!(LINUX_3_18||LINUX_4_4) +kmod-crypto-kpp + KCONFIG:= CONFIG_CRYPTO_ECDH + FILES:= \ + $(LINUX_DIR)/crypto/ecdh_generic.ko + AUTOLOAD:=$(call AutoLoad,10,ecdh_generic) + $(call AddDepends/crypto) +endef + +$(eval $(call KernelPackage,crypto-ecdh)) + + define KernelPackage/crypto-iv TITLE:=CryptoAPI initialization vectors DEPENDS:=+kmod-crypto-manager +kmod-crypto-rng +kmod-crypto-wq @@ -196,12 +226,13 @@ $(eval $(call KernelPackage,crypto-hw-padlock)) define KernelPackage/crypto-hw-ccp TITLE:=AMD Cryptographic Coprocessor - DEPENDS:=+kmod-crypto-authenc +kmod-crypto-hash +kmod-crypto-manager +kmod-random-core +kmod-crypto-sha1 +kmod-crypto-sha256 + DEPENDS:=+kmod-crypto-authenc +kmod-crypto-hash +kmod-crypto-manager +kmod-random-core +kmod-crypto-sha1 +kmod-crypto-sha256 +LINUX_4_14:kmod-crypto-rsa KCONFIG:= \ CONFIG_CRYPTO_HW=y \ CONFIG_CRYPTO_DEV_CCP=y \ CONFIG_CRYPTO_DEV_CCP_CRYPTO \ - CONFIG_CRYPTO_DEV_CCP_DD + CONFIG_CRYPTO_DEV_CCP_DD \ + CONFIG_CRYPTO_DEV_SP_CCP=y FILES:= \ $(LINUX_DIR)/drivers/crypto/ccp/ccp.ko \ $(LINUX_DIR)/drivers/crypto/ccp/ccp-crypto.ko @@ -330,9 +361,33 @@ endef $(eval $(call KernelPackage,crypto-des)) +define KernelPackage/crypto-kpp + TITLE:=Key-agreement Protocol Primitives + KCONFIG:=CONFIG_CRYPTO_KPP + HIDDEN:=1 + FILES:=$(LINUX_DIR)/crypto/kpp.ko + AUTOLOAD:=$(call AutoLoad,09,kpp) + $(call AddDepends/crypto) +endef + +$(eval $(call KernelPackage,crypto-kpp)) + + +define KernelPackage/crypto-acompress + TITLE:=Asynchronous Compression operations + HIDDEN:=1 + KCONFIG:=CONFIG_CRYPTO_ACOMP2 + FILES:=$(LINUX_DIR)/crypto/crypto_acompress.ko + AUTOLOAD:=$(call AutoLoad,09,crypto_acompress) + $(call AddDepends/crypto) +endef + +$(eval $(call KernelPackage,crypto-acompress)) + + define KernelPackage/crypto-deflate TITLE:=Deflate compression CryptoAPI module - DEPENDS:=+kmod-lib-zlib-inflate +kmod-lib-zlib-deflate + DEPENDS:=+kmod-lib-zlib-inflate +kmod-lib-zlib-deflate +LINUX_4_14:kmod-crypto-acompress KCONFIG:=CONFIG_CRYPTO_DEFLATE FILES:=$(LINUX_DIR)/crypto/deflate.ko AUTOLOAD:=$(call AutoLoad,09,deflate) diff --git a/package/kernel/linux/modules/fs.mk b/package/kernel/linux/modules/fs.mk index 3db633a8b..f75758557 100644 --- a/package/kernel/linux/modules/fs.mk +++ b/package/kernel/linux/modules/fs.mk @@ -82,7 +82,7 @@ $(eval $(call KernelPackage,fs-autofs4)) define KernelPackage/fs-btrfs SUBMENU:=$(FS_MENU) TITLE:=BTRFS filesystem support - DEPENDS:=+kmod-lib-crc32c +kmod-lib-lzo +kmod-lib-zlib-inflate +kmod-lib-zlib-deflate +kmod-lib-raid6 +kmod-lib-xor + DEPENDS:=+kmod-lib-crc32c +kmod-lib-lzo +kmod-lib-zlib-inflate +kmod-lib-zlib-deflate +kmod-lib-raid6 +kmod-lib-xor +LINUX_4_14:kmod-lib-zstd KCONFIG:=\ CONFIG_BTRFS_FS \ CONFIG_BTRFS_FS_POSIX_ACL=n \ @@ -106,7 +106,8 @@ define KernelPackage/fs-cifs CONFIG_CIFS \ CONFIG_CIFS_XATTR=y \ CONFIG_CIFS_DFS_UPCALL=n \ - CONFIG_CIFS_UPCALL=n + CONFIG_CIFS_UPCALL=n \ + CONFIG_CIFS_SMB311=n FILES:=$(LINUX_DIR)/fs/cifs/cifs.ko AUTOLOAD:=$(call AutoLoad,30,cifs) $(call AddDepends/nls) diff --git a/package/kernel/linux/modules/i2c.mk b/package/kernel/linux/modules/i2c.mk index 1bb881cb0..5141766a9 100644 --- a/package/kernel/linux/modules/i2c.mk +++ b/package/kernel/linux/modules/i2c.mk @@ -142,6 +142,32 @@ endef $(eval $(call KernelPackage,i2c-piix4)) +I2C_I801_MODULES:= \ + CONFIG_I2C_I801:drivers/i2c/busses/i2c-i801 \ + CONFIG_I2C_SMBUS:drivers/i2c/i2c-smbus + +define KernelPackage/i2c-i801 + $(call i2c_defaults,$(I2C_I801_MODULES),59) + TITLE:=Intel I801 and compatible I2C interfaces + DEPENDS:=@PCI_SUPPORT @TARGET_x86 kmod-i2c-core +endef + +define KernelPackage/i2c-i801/description + Support for the Intel I801 family of mainboard I2C interfaces, + specifically 82801AA, 82801AB, 82801BA, 82801CA/CAM, 82801DB, + 82801EB/ER (ICH5/ICH5R), 6300ESB, ICH6, ICH7, ESB2, ICH8, ICH9, + EP80579 (Tolapai), ICH10, 5/3400 Series (PCH), 6 Series (PCH), + Patsburg (PCH), DH89xxCC (PCH), Panther Point (PCH), + Lynx Point (PCH), Lynx Point-LP (PCH), Avoton (SOC), + Wellsburg (PCH), Coleto Creek (PCH), Wildcat Point (PCH), + Wildcat Point-LP (PCH), BayTrail (SOC), Sunrise Point-H (PCH), + Sunrise Point-LP (PCH), DNV (SOC), Broxton (SOC), + Lewisburg (PCH). +endef + +$(eval $(call KernelPackage,i2c-i801)) + + I2C_MUX_MODULES:= \ CONFIG_I2C_MUX:drivers/i2c/i2c-mux diff --git a/package/kernel/linux/modules/iio.mk b/package/kernel/linux/modules/iio.mk new file mode 100644 index 000000000..8990e5481 --- /dev/null +++ b/package/kernel/linux/modules/iio.mk @@ -0,0 +1,120 @@ +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +IIO_MENU:=Industrial I/O Modules + + +define KernelPackage/iio-core + SUBMENU:=$(IIO_MENU) + TITLE:=Industrial IO core + KCONFIG:= \ + CONFIG_IIO \ + CONFIG_IIO_BUFFER=y \ + CONFIG_IIO_KFIFO_BUF \ + CONFIG_IIO_TRIGGER=y \ + CONFIG_IIO_TRIGGERED_BUFFER + FILES:= \ + $(LINUX_DIR)/drivers/iio/industrialio.ko \ + $(if $(CONFIG_IIO_TRIGGERED_BUFFER),$(LINUX_DIR)/drivers/iio/industrialio-triggered-buffer.ko@lt4.4) \ + $(if $(CONFIG_IIO_TRIGGERED_BUFFER),$(LINUX_DIR)/drivers/iio/buffer/industrialio-triggered-buffer.ko@ge4.4) \ + $(LINUX_DIR)/drivers/iio/kfifo_buf.ko@lt4.4 \ + $(LINUX_DIR)/drivers/iio/buffer/kfifo_buf.ko@ge4.4 + AUTOLOAD:=$(call AutoLoad,55,industrialio kfifo_buf industrialio-triggered-buffer) +endef + +define KernelPackage/iio-core/description + The industrial I/O subsystem provides a unified framework for + drivers for many different types of embedded sensors using a + number of different physical interfaces (i2c, spi, etc) +endef + +$(eval $(call KernelPackage,iio-core)) + + +define KernelPackage/iio-ad799x + SUBMENU:=$(IIO_MENU) + DEPENDS:=+kmod-i2c-core +kmod-iio-core + TITLE:=Analog Devices AD799x ADC driver + KCONFIG:= \ + CONFIG_AD799X_RING_BUFFER=y \ + CONFIG_AD799X + FILES:=$(LINUX_DIR)/drivers/iio/adc/ad799x.ko + AUTOLOAD:=$(call AutoLoad,56,ad799x) +endef + +define KernelPackage/iio-ad799x/description + support for Analog Devices: + ad7991, ad7995, ad7999, ad7992, ad7993, ad7994, ad7997, ad7998 + i2c analog to digital converters (ADC). +endef + +$(eval $(call KernelPackage,iio-ad799x)) + + +define KernelPackage/iio-dht11 + SUBMENU:=$(IIO_MENU) + DEPENDS:=+kmod-iio-core @GPIO_SUPPORT @USES_DEVICETREE + TITLE:=DHT11 (and compatible) humidity and temperature sensors + KCONFIG:= \ + CONFIG_DHT11 + FILES:=$(LINUX_DIR)/drivers/iio/humidity/dht11.ko + AUTOLOAD:=$(call AutoLoad,56,dht11) +endef + +define KernelPackage/iio-dht11/description + support for DHT11 and DHT22 digitial humidity and temperature sensors + attached at GPIO lines. You will need a custom device tree file to + specify the GPIO line to use. +endef + +$(eval $(call KernelPackage,iio-dht11)) + +define KernelPackage/iio-bmp280 + SUBMENU:=$(IIO_MENU) + TITLE:=BMP180/BMP280/BME280 pressure/temperatur sensor + DEPENDS:=@(LINUX_4_9||LINUX_4_14) +kmod-iio-core +kmod-regmap + KCONFIG:=CONFIG_BMP280 + FILES:=$(LINUX_DIR)/drivers/iio/pressure/bmp280.ko +endef + +define KernelPackage/iio-bmp280/description + This driver adds support for Bosch Sensortec BMP180 and BMP280 pressure and + temperature sensors. Also supports the BME280 with an additional humidity + sensor channel. +endef + +$(eval $(call KernelPackage,iio-bmp280)) + + +define KernelPackage/iio-bmp280-i2c + SUBMENU:=$(IIO_MENU) + TITLE:=BMP180/BMP280/BME280 pressure/temperatur sensor (I2C) + DEPENDS:=+kmod-iio-bmp280 +kmod-i2c-core + KCONFIG:=CONFIG_BMP280_I2C + FILES:=$(LINUX_DIR)/drivers/iio/pressure/bmp280-i2c.ko + AUTOLOAD:=$(call AutoProbe,iio-bmp280-i2c) +endef +define KernelPackage/iio-bmp280-i2c/description + This driver adds support for Bosch Sensortec's digital pressure and + temperature sensor connected via I2C. +endef + +$(eval $(call KernelPackage,iio-bmp280-i2c)) + + +define KernelPackage/iio-bmp280-spi + SUBMENU:=$(IIO_MENU) + TITLE:=BMP180/BMP280/BME280 pressure/temperatur sensor (SPI) + DEPENDS:=+kmod-iio-bmp280 +kmod-spi-bitbang + KCONFIG:=CONFIG_BMP280_SPI + FILES:=$(LINUX_DIR)/drivers/iio/pressure/bmp280-spi.ko + AUTOLOAD:=$(call AutoProbe,iio-bmp280-spi) +endef +define KernelPackage/iio-bmp280-spi/description + This driver adds support for Bosch Sensortec's digital pressure and + temperature sensor connected via SPI. +endef + +$(eval $(call KernelPackage,iio-bmp280-spi)) diff --git a/package/kernel/linux/modules/lib.mk b/package/kernel/linux/modules/lib.mk index 72c5eff69..6d7e0dc99 100644 --- a/package/kernel/linux/modules/lib.mk +++ b/package/kernel/linux/modules/lib.mk @@ -101,14 +101,17 @@ $(eval $(call KernelPackage,lib-crc32c)) define KernelPackage/lib-lzo SUBMENU:=$(LIB_MENU) TITLE:=LZO support + DEPENDS:=+LINUX_4_14:kmod-crypto-acompress KCONFIG:= \ + CONFIG_CRYPTO_LZO@ge4.9 \ CONFIG_LZO_COMPRESS \ CONFIG_LZO_DECOMPRESS HIDDEN:=1 FILES:= \ + $(LINUX_DIR)/crypto/lzo.ko@ge4.9 \ $(LINUX_DIR)/lib/lzo/lzo_compress.ko \ $(LINUX_DIR)/lib/lzo/lzo_decompress.ko - AUTOLOAD:=$(call AutoProbe,lzo_compress lzo_decompress) + AUTOLOAD:=$(call AutoProbe,lzo@ge4.9 lzo_compress lzo_decompress) endef define KernelPackage/lib-lzo/description @@ -118,17 +121,42 @@ endef $(eval $(call KernelPackage,lib-lzo)) +define KernelPackage/lib-zstd + SUBMENU:=$(LIB_MENU) + TITLE:=ZSTD support + KCONFIG:= \ + CONFIG_ZSTD_COMPRESS \ + CONFIG_ZSTD_DECOMPRESS \ + CONFIG_XXHASH + HIDDEN:=1 + FILES:= \ + $(LINUX_DIR)/lib/xxhash.ko \ + $(LINUX_DIR)/lib/zstd/zstd_compress.ko \ + $(LINUX_DIR)/lib/zstd/zstd_decompress.ko + AUTOLOAD:=$(call AutoProbe,xxhash zstd_compress zstd_decompress) +endef + +define KernelPackage/lib-zstd/description + Kernel module for ZSTD compression/decompression support +endef + +$(eval $(call KernelPackage,lib-zstd)) + + define KernelPackage/lib-lz4 SUBMENU:=$(LIB_MENU) TITLE:=LZ4 support + DEPENDS:=+LINUX_4_14:kmod-crypto-acompress HIDDEN:=1 KCONFIG:= \ + CONFIG_CRYPTO_LZ4@ge4.9 \ CONFIG_LZ4_COMPRESS \ CONFIG_LZ4_DECOMPRESS FILES:= \ + $(LINUX_DIR)/crypto/lz4.ko@ge4.9 \ $(LINUX_DIR)/lib/lz4/lz4_compress.ko \ $(LINUX_DIR)/lib/lz4/lz4_decompress.ko - AUTOLOAD:=$(call AutoProbe,lz4_compress lz4_decompress) + AUTOLOAD:=$(call AutoProbe,lz4@ge4.9 lz4_compress lz4_decompress) endef define KernelPackage/lib-lz4/description diff --git a/package/kernel/linux/modules/netdevices.mk b/package/kernel/linux/modules/netdevices.mk index a3ff005eb..a9740ef35 100644 --- a/package/kernel/linux/modules/netdevices.mk +++ b/package/kernel/linux/modules/netdevices.mk @@ -304,6 +304,22 @@ endef $(eval $(call KernelPackage,r6040)) +define KernelPackage/niu + SUBMENU:=$(NETWORK_DEVICES_MENU) + TITLE:=Sun Neptune 10Gbit Ethernet support + DEPENDS:=@PCI_SUPPORT + KCONFIG:=CONFIG_NIU + FILES:=$(LINUX_DIR)/drivers/net/ethernet/sun/niu.ko + AUTOLOAD:=$(call AutoProbe,niu) +endef + +define KernelPackage/niu/description + This enables support for cards based upon Sun's Neptune chipset. +endef + +$(eval $(call KernelPackage,niu)) + + define KernelPackage/sis900 SUBMENU:=$(NETWORK_DEVICES_MENU) TITLE:=SiS 900 Ethernet support @@ -555,6 +571,25 @@ endef $(eval $(call KernelPackage,ixgbe)) +define KernelPackage/ixgbevf + SUBMENU:=$(NETWORK_DEVICES_MENU) + TITLE:=Intel(R) 82599 Virtual Function Ethernet support + DEPENDS:=@PCI_SUPPORT +kmod-ixgbe + KCONFIG:=CONFIG_IXGBEVF \ + CONFIG_IXGBE_VXLAN=n \ + CONFIG_IXGBE_HWMON=n \ + CONFIG_IXGBE_DCA=n + FILES:=$(LINUX_DIR)/drivers/net/ethernet/intel/ixgbevf/ixgbevf.ko + AUTOLOAD:=$(call AutoLoad,35,ixgbevf) +endef + +define KernelPackage/ixgbevf/description + Kernel modules for Intel(R) 82599 Virtual Function Ethernet adapters. +endef + +$(eval $(call KernelPackage,ixgbevf)) + + define KernelPackage/b44 TITLE:=Broadcom 44xx driver KCONFIG:=CONFIG_B44 @@ -611,8 +646,9 @@ $(eval $(call KernelPackage,pcnet32)) define KernelPackage/tg3 TITLE:=Broadcom Tigon3 Gigabit Ethernet - KCONFIG:=CONFIG_TIGON3 - DEPENDS:=+!TARGET_brcm47xx:kmod-libphy +kmod-hwmon-core +kmod-ptp + KCONFIG:=CONFIG_TIGON3 \ + CONFIG_TIGON3_HWMON=n + DEPENDS:=+!TARGET_brcm47xx:kmod-libphy +!LINUX_4_14:kmod-hwmon-core +kmod-ptp SUBMENU:=$(NETWORK_DEVICES_MENU) FILES:=$(LINUX_DIR)/drivers/net/ethernet/broadcom/tg3.ko AUTOLOAD:=$(call AutoLoad,19,tg3,1) diff --git a/package/kernel/linux/modules/netfilter.mk b/package/kernel/linux/modules/netfilter.mk index 0ad6987aa..0d817ed7f 100644 --- a/package/kernel/linux/modules/netfilter.mk +++ b/package/kernel/linux/modules/netfilter.mk @@ -529,6 +529,23 @@ endef $(eval $(call KernelPackage,ipt-u32)) +define KernelPackage/ipt-checksum + TITLE:=CHECKSUM support + KCONFIG:= \ + CONFIG_NETFILTER_XT_TARGET_CHECKSUM + FILES:= \ + $(LINUX_DIR)/net/netfilter/xt_CHECKSUM.ko \ + $(foreach mod,$(IPT_CHECKSUM-m),$(LINUX_DIR)/net/$(mod).ko) + AUTOLOAD:=$(call AutoProbe,$(notdir $(IPT_CHECKSUM-m))) + $(call AddDepends/ipt) +endef + +define KernelPackage/ipt-checksum/description + Kernel modules for CHECKSUM fillin target +endef + +$(eval $(call KernelPackage,ipt-checksum)) + define KernelPackage/ipt-iprange TITLE:=Module for matching ip ranges diff --git a/package/kernel/linux/modules/netsupport.mk b/package/kernel/linux/modules/netsupport.mk index 6c9b03be1..836034ad1 100644 --- a/package/kernel/linux/modules/netsupport.mk +++ b/package/kernel/linux/modules/netsupport.mk @@ -271,7 +271,8 @@ define KernelPackage/ipsec4 CONFIG_INET_XFRM_MODE_BEET \ CONFIG_INET_XFRM_MODE_TRANSPORT \ CONFIG_INET_XFRM_MODE_TUNNEL \ - CONFIG_INET_XFRM_TUNNEL + CONFIG_INET_XFRM_TUNNEL \ + CONFIG_INET_ESP_OFFLOAD=n FILES:=$(foreach mod,$(IPSEC4-m),$(LINUX_DIR)/net/$(mod).ko) AUTOLOAD:=$(call AutoLoad,32,$(notdir $(IPSEC4-m))) endef @@ -311,7 +312,8 @@ define KernelPackage/ipsec6 CONFIG_INET6_XFRM_MODE_BEET \ CONFIG_INET6_XFRM_MODE_TRANSPORT \ CONFIG_INET6_XFRM_MODE_TUNNEL \ - CONFIG_INET6_XFRM_TUNNEL + CONFIG_INET6_XFRM_TUNNEL \ + CONFIG_INET6_ESP_OFFLOAD=n FILES:=$(foreach mod,$(IPSEC6-m),$(LINUX_DIR)/net/$(mod).ko) AUTOLOAD:=$(call AutoLoad,32,$(notdir $(IPSEC6-m))) endef @@ -923,9 +925,10 @@ define KernelPackage/rxrpc CONFIG_RXKAD=m \ CONFIG_AF_RXRPC_DEBUG=n FILES:= \ - $(LINUX_DIR)/net/rxrpc/af-rxrpc.ko \ + $(LINUX_DIR)/net/rxrpc/af-rxrpc.ko@lt4.11 \ + $(LINUX_DIR)/net/rxrpc/rxrpc.ko@ge4.11 \ $(LINUX_DIR)/net/rxrpc/rxkad.ko@lt4.7 - AUTOLOAD:=$(call AutoLoad,30,rxkad@lt4.7 af-rxrpc) + AUTOLOAD:=$(call AutoLoad,30,rxkad@lt4.7 af-rxrpc.ko@lt4.11 rxrpc.ko@ge4.11) DEPENDS:= +kmod-crypto-manager +kmod-crypto-pcbc +kmod-crypto-fcrypt endef @@ -942,6 +945,7 @@ define KernelPackage/mpls KCONFIG:= \ CONFIG_MPLS=y \ CONFIG_LWTUNNEL=y \ + CONFIG_LWTUNNEL_BPF=n \ CONFIG_NET_MPLS_GSO=m \ CONFIG_MPLS_ROUTING=m \ CONFIG_MPLS_IPTUNNEL=m @@ -965,6 +969,7 @@ define KernelPackage/9pnet KCONFIG:= \ CONFIG_NET_9P \ CONFIG_NET_9P_DEBUG=n \ + CONFIG_NET_9P_XEN=n \ CONFIG_NET_9P_VIRTIO FILES:= \ $(LINUX_DIR)/net/9p/9pnet.ko \ @@ -1009,3 +1014,18 @@ define KernelPackage/mdio/description endef $(eval $(call KernelPackage,mdio)) + +define KernelPackage/macsec + SUBMENU:=$(NETWORK_SUPPORT_MENU) + TITLE:=IEEE 802.1AE MAC-level encryption (MAC) + DEPENDS:=+kmod-crypto-gcm @!LINUX_3_18 @!LINUX_4_1 @!LINUX_4_4 + KCONFIG:=CONFIG_MACSEC + FILES:=$(LINUX_DIR)/drivers/net/macsec.ko + AUTOLOAD:=$(call AutoLoad,13,macsec) +endef + +define KernelPackage/macsec/description + MACsec is an encryption standard for Ethernet. +endef + +$(eval $(call KernelPackage,macsec)) diff --git a/package/kernel/linux/modules/other.mk b/package/kernel/linux/modules/other.mk index 1b31a861f..1c7869e7c 100644 --- a/package/kernel/linux/modules/other.mk +++ b/package/kernel/linux/modules/other.mk @@ -30,7 +30,7 @@ $(eval $(call KernelPackage,6lowpan)) define KernelPackage/bluetooth SUBMENU:=$(OTHER_MENU) TITLE:=Bluetooth support - DEPENDS:=@USB_SUPPORT +kmod-usb-core +kmod-crypto-hash +kmod-crypto-ecb +kmod-lib-crc16 +kmod-hid +!LINUX_3_18:kmod-crypto-cmac +!LINUX_3_18:kmod-regmap + DEPENDS:=@USB_SUPPORT +kmod-usb-core +kmod-crypto-hash +kmod-crypto-ecb +kmod-lib-crc16 +kmod-hid +!LINUX_3_18:kmod-crypto-cmac +!LINUX_3_18:kmod-regmap +LINUX_4_14:kmod-crypto-ecdh KCONFIG:= \ CONFIG_BLUEZ \ CONFIG_BLUEZ_L2CAP \ @@ -114,6 +114,27 @@ endef $(eval $(call KernelPackage,bluetooth_6lowpan)) +define KernelPackage/btmrvl + SUBMENU:=$(OTHER_MENU) + TITLE:=Marvell Bluetooth Kernel Module support + DEPENDS:=+kmod-mmc +kmod-bluetooth +mwifiex-sdio-firmware + KCONFIG:= \ + CONFIG_BT_MRVL \ + CONFIG_BT_MRVL_SDIO + $(call AddDepends/bluetooth) + FILES:= \ + $(LINUX_DIR)/drivers/bluetooth/btmrvl.ko \ + $(LINUX_DIR)/drivers/bluetooth/btmrvl_sdio.ko + AUTOLOAD:=$(call AutoProbe,btmrvl btmrvl_sdio) +endef + +define KernelPackage/btmrvl/description + Kernel support for Marvell SDIO Bluetooth Module +endef + +$(eval $(call KernelPackage,btmrvl)) + + define KernelPackage/dma-buf SUBMENU:=$(OTHER_MENU) TITLE:=DMA shared buffer support @@ -263,71 +284,6 @@ endef $(eval $(call KernelPackage,gpio-pcf857x)) -define KernelPackage/iio-core - SUBMENU:=$(OTHER_MENU) - TITLE:=Industrial IO core - KCONFIG:= \ - CONFIG_IIO \ - CONFIG_IIO_BUFFER=y \ - CONFIG_IIO_KFIFO_BUF \ - CONFIG_IIO_TRIGGER=y \ - CONFIG_IIO_TRIGGERED_BUFFER - FILES:= \ - $(LINUX_DIR)/drivers/iio/industrialio.ko \ - $(if $(CONFIG_IIO_TRIGGERED_BUFFER),$(LINUX_DIR)/drivers/iio/industrialio-triggered-buffer.ko@lt4.4) \ - $(if $(CONFIG_IIO_TRIGGERED_BUFFER),$(LINUX_DIR)/drivers/iio/buffer/industrialio-triggered-buffer.ko@ge4.4) \ - $(LINUX_DIR)/drivers/iio/kfifo_buf.ko@lt4.4 \ - $(LINUX_DIR)/drivers/iio/buffer/kfifo_buf.ko@ge4.4 - AUTOLOAD:=$(call AutoLoad,55,industrialio kfifo_buf industrialio-triggered-buffer) -endef - -define KernelPackage/iio-core/description - The industrial I/O subsystem provides a unified framework for - drivers for many different types of embedded sensors using a - number of different physical interfaces (i2c, spi, etc) -endef - -$(eval $(call KernelPackage,iio-core)) - - -define KernelPackage/iio-ad799x - SUBMENU:=$(OTHER_MENU) - DEPENDS:=kmod-i2c-core kmod-iio-core - TITLE:=Analog Devices AD799x ADC driver - KCONFIG:= \ - CONFIG_AD799X_RING_BUFFER=y \ - CONFIG_AD799X - FILES:=$(LINUX_DIR)/drivers/iio/adc/ad799x.ko - AUTOLOAD:=$(call AutoLoad,56,ad799x) -endef - -define KernelPackage/iio-ad799x/description - support for Analog Devices: - ad7991, ad7995, ad7999, ad7992, ad7993, ad7994, ad7997, ad7998 - i2c analog to digital converters (ADC). -endef - -$(eval $(call KernelPackage,iio-ad799x)) - - -define KernelPackage/iio-dht11 - SUBMENU:=$(OTHER_MENU) - DEPENDS:=kmod-iio-core @GPIO_SUPPORT @USES_DEVICETREE - TITLE:=DHT11 (and compatible) humidity and temperature sensors - KCONFIG:= \ - CONFIG_DHT11 - FILES:=$(LINUX_DIR)/drivers/iio/humidity/dht11.ko - AUTOLOAD:=$(call AutoLoad,56,dht11) -endef - -define KernelPackage/iio-dht11/description - support for DHT11 and DHT22 digitial humidity and temperature sensors - attached at GPIO lines. You will need a custom device tree file to - specify the GPIO line to use. -endef - -$(eval $(call KernelPackage,iio-dht11)) - define KernelPackage/lp SUBMENU:=$(OTHER_MENU) @@ -361,7 +317,8 @@ define KernelPackage/mmc CONFIG_SDIO_UART=n FILES:= \ $(LINUX_DIR)/drivers/mmc/core/mmc_core.ko \ - $(LINUX_DIR)/drivers/mmc/card/mmc_block.ko + $(LINUX_DIR)/drivers/mmc/card/mmc_block.ko@lt4.10 \ + $(LINUX_DIR)/drivers/mmc/core/mmc_block.ko@ge4.10 AUTOLOAD:=$(call AutoProbe,mmc_core mmc_block,1) endef @@ -486,7 +443,7 @@ define KernelPackage/rtc-ds1307 SUBMENU:=$(OTHER_MENU) TITLE:=Dallas/Maxim DS1307 (and compatible) RTC support DEFAULT:=m if ALL_KMODS && RTC_SUPPORT - DEPENDS:=+kmod-i2c-core + DEPENDS:=+kmod-i2c-core +LINUX_4_14:kmod-regmap KCONFIG:=CONFIG_RTC_DRV_DS1307 \ CONFIG_RTC_CLASS=y FILES:=$(LINUX_DIR)/drivers/rtc/rtc-ds1307.ko @@ -648,6 +605,20 @@ endef $(eval $(call KernelPackage,mtdtests)) +define KernelPackage/mtdoops + SUBMENU:=$(OTHER_MENU) + TITLE:=Log panic/oops to an MTD buffer + KCONFIG:=CONFIG_MTD_OOPS + FILES:=$(LINUX_DIR)/drivers/mtd/mtdoops.ko +endef + +define KernelPackage/mtdoops/description + Kernel modules for Log panic/oops to an MTD buffer +endef + +$(eval $(call KernelPackage,mtdoops)) + + define KernelPackage/serial-8250 SUBMENU:=$(OTHER_MENU) TITLE:=8250 UARTs @@ -722,6 +693,7 @@ define KernelPackage/zram CONFIG_ZRAM \ CONFIG_ZRAM_DEBUG=n \ CONFIG_PGTABLE_MAPPING=n \ + CONFIG_ZRAM_WRITEBACK=n \ CONFIG_ZSMALLOC_STAT=n \ CONFIG_ZRAM_LZ4_COMPRESS=y FILES:= \ @@ -1044,3 +1016,38 @@ define KernelPackage/w83627hf-wdt/description endef $(eval $(call KernelPackage,w83627hf-wdt)) + + +define KernelPackage/itco-wdt + SUBMENU:=$(OTHER_MENU) + TITLE:=Intel iTCO Watchdog Timer + KCONFIG:=CONFIG_ITCO_WDT \ + CONFIG_ITCO_VENDOR_SUPPORT=y + FILES:=$(LINUX_DIR)/drivers/$(WATCHDOG_DIR)/iTCO_wdt.ko \ + $(LINUX_DIR)/drivers/$(WATCHDOG_DIR)/iTCO_vendor_support.ko + AUTOLOAD:=$(call AutoLoad,50,iTCO_vendor_support iTCO_wdt,1) +endef + +define KernelPackage/itco-wdt/description + Kernel module for Intel iTCO Watchdog Timer +endef + +$(eval $(call KernelPackage,itco-wdt)) + + +define KernelPackage/it87-wdt + SUBMENU:=$(OTHER_MENU) + TITLE:=ITE IT87 Watchdog Timer + KCONFIG:=CONFIG_IT87_WDT + FILES:=$(LINUX_DIR)/drivers/$(WATCHDOG_DIR)/it87_wdt.ko + AUTOLOAD:=$(call AutoLoad,50,it87-wdt,1) + MODPARAMS.it87-wdt:= \ + nogameport=1 \ + nocir=1 +endef + +define KernelPackage/it87-wdt/description + Kernel module for ITE IT87 Watchdog Timer +endef + +$(eval $(call KernelPackage,it87-wdt)) diff --git a/package/kernel/linux/modules/sound.mk b/package/kernel/linux/modules/sound.mk index 75aa3d3fc..faee1f367 100644 --- a/package/kernel/linux/modules/sound.mk +++ b/package/kernel/linux/modules/sound.mk @@ -24,7 +24,8 @@ SOUNDCORE_FILES ?= \ $(LINUX_DIR)/sound/soundcore.ko \ $(LINUX_DIR)/sound/core/snd.ko \ $(LINUX_DIR)/sound/core/snd-hwdep.ko \ - $(LINUX_DIR)/sound/core/seq/snd-seq-device.ko \ + $(LINUX_DIR)/sound/core/seq/snd-seq-device.ko@lt4.13 \ + $(LINUX_DIR)/sound/core/snd-seq-device.ko@ge4.13 \ $(LINUX_DIR)/sound/core/snd-rawmidi.ko \ $(LINUX_DIR)/sound/core/snd-timer.ko \ $(LINUX_DIR)/sound/core/snd-pcm.ko \ diff --git a/package/kernel/linux/modules/usb.mk b/package/kernel/linux/modules/usb.mk index ee5b95438..d1fb5f4cd 100644 --- a/package/kernel/linux/modules/usb.mk +++ b/package/kernel/linux/modules/usb.mk @@ -509,6 +509,7 @@ define KernelPackage/usb-serial-edgeport FILES:=$(LINUX_DIR)/drivers/usb/serial/io_edgeport.ko AUTOLOAD:=$(call AutoProbe,io_edgeport) $(call AddDepends/usb-serial) + DEPENDS+=+edgeport-firmware endef define KernelPackage/usb-serial-edgeport/description @@ -531,14 +532,6 @@ define KernelPackage/usb-serial-edgeport/description Edgeport/16 Dual endef -define KernelPackage/usb-serial-edgeport/install - $(INSTALL_DIR) $(1)/lib/firmware/edgeport - $(INSTALL_DATA) $(LINUX_DIR)/firmware/edgeport/boot.fw $(1)/lib/firmware/edgeport/ - $(INSTALL_DATA) $(LINUX_DIR)/firmware/edgeport/boot2.fw $(1)/lib/firmware/edgeport/ - $(INSTALL_DATA) $(LINUX_DIR)/firmware/edgeport/down.fw $(1)/lib/firmware/edgeport/ - $(INSTALL_DATA) $(LINUX_DIR)/firmware/edgeport/down2.fw $(1)/lib/firmware/edgeport/ -endef - $(eval $(call KernelPackage,usb-serial-edgeport)) @@ -895,6 +888,25 @@ endef $(eval $(call KernelPackage,usb-storage-extras)) +define KernelPackage/usb-storage-uas + SUBMENU:=$(USB_MENU) + TITLE:=USB Attached SCSI (UASP) support + DEPENDS:=+kmod-usb-storage + KCONFIG:=CONFIG_USB_UAS + FILES:=$(LINUX_DIR)/drivers/usb/storage/uas.ko + AUTOLOAD:=$(call AutoProbe,uas) +endef + +define KernelPackage/usb-storage-uas/description + Say Y here if you want to include support for + USB Attached SCSI (UAS/UASP), a higher + performance protocol available on many + newer USB 3.0 storage devices +endef + +$(eval $(call KernelPackage,usb-storage-uas)) + + define KernelPackage/usb-atm TITLE:=Support for ATM on USB bus DEPENDS:=+kmod-atm diff --git a/package/kernel/linux/modules/video.mk b/package/kernel/linux/modules/video.mk index ef6bd4bc0..8f0f0dc9e 100644 --- a/package/kernel/linux/modules/video.mk +++ b/package/kernel/linux/modules/video.mk @@ -81,7 +81,7 @@ $(eval $(call KernelPackage,fb)) define KernelPackage/fbcon SUBMENU:=$(VIDEO_MENU) TITLE:=Framebuffer Console support - DEPENDS:=+kmod-fb + DEPENDS:=+kmod-fb @!LINUX_4_14 KCONFIG:= \ CONFIG_FRAMEBUFFER_CONSOLE \ CONFIG_FRAMEBUFFER_CONSOLE_DETECT_PRIMARY=y \ diff --git a/package/lean/automount/Makefile b/package/lean/automount/Makefile index 8881a060d..3d8589c90 100644 --- a/package/lean/automount/Makefile +++ b/package/lean/automount/Makefile @@ -17,7 +17,7 @@ include $(INCLUDE_DIR)/package.mk define Package/automount TITLE:=Mount autoconfig hotplug script. MAINTAINER:=Lean - DEPENDS:=block-mount +kmod-usb-storage +kmod-usb-storage-extras +kmod-fs-ext4 +kmod-fs-vfat +kmod-fs-exfat +ntfs-3g + DEPENDS:=block-mount +kmod-usb-storage +kmod-usb-storage-extras +kmod-fs-ext4 +kmod-fs-vfat +ntfs-3g endef define Package/automount/description diff --git a/target/linux/x86/Makefile b/target/linux/x86/Makefile index 058edd1a3..b82a0f4e9 100644 --- a/target/linux/x86/Makefile +++ b/target/linux/x86/Makefile @@ -13,7 +13,7 @@ FEATURES:=squashfs ext4 vdi vmdk pcmcia targz fpu SUBTARGETS:=generic legacy geode 64 MAINTAINER:=Felix Fietkau -KERNEL_PATCHVER:=4.9 +KERNEL_PATCHVER:=4.14 KERNELNAME:=bzImage diff --git a/toolchain-old/Config.in b/toolchain-old/Config.in new file mode 100644 index 000000000..f6753ad8b --- /dev/null +++ b/toolchain-old/Config.in @@ -0,0 +1,318 @@ +# Copyright (C) 2006-2013 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +menuconfig TARGET_OPTIONS + bool "Target Options" if DEVEL + + config TARGET_OPTIMIZATION + string "Target Optimizations" if TARGET_OPTIONS + default DEFAULT_TARGET_OPTIMIZATION + help + Optimizations to use when building for the target host. + + config SOFT_FLOAT + bool "Use software floating point by default" if TARGET_OPTIONS + default y if !HAS_FPU + depends on arm || armeb || powerpc || mipsel || mips || mips64el || mips64 + help + If your target CPU does not have a Floating Point Unit (FPU) or a + kernel FPU emulator, but you still wish to support floating point + functions, then everything will need to be compiled with soft floating + point support (-msoft-float). + + Most people will answer N. + + config USE_MIPS16 + bool "Build packages with MIPS16 instructions" if TARGET_OPTIONS + depends on HAS_MIPS16 + default y + help + If your target CPU does support the MIPS16 instruction set + and you want to use it for packages, enable this option. + MIPS16 produces smaller binaries thus reducing pressure on + caches and TLB. + + Most people will answer N. + + +menuconfig EXTERNAL_TOOLCHAIN + bool + prompt "Use external toolchain" if DEVEL + help + If enabled, LEDE will compile using an existing toolchain instead of + compiling one. + + config NATIVE_TOOLCHAIN + bool + prompt "Use host's toolchain" if DEVEL + depends on EXTERNAL_TOOLCHAIN + select NO_STRIP + help + If enabled, LEDE will compile using the native toolchain for your + host instead of compiling one. + + config TARGET_NAME + string + prompt "Target name" if DEVEL + depends on EXTERNAL_TOOLCHAIN && !NATIVE_TOOLCHAIN + default "aarch64-unknown-linux-gnu" if aarch64 + default "aarch64_be-unknown-linux-gnu" if aarch64_be + default "arm-unknown-linux-gnu" if arm + default "armeb-unknown-linux-gnu" if armeb + default "i486-unknown-linux-gnu" if i386 + default "mips-unknown-linux-gnu" if mips + default "mipsel-unknown-linux-gnu" if mipsel + default "powerpc-unknown-linux-gnu" if powerpc + default "x86_64-unknown-linux-gnu" if x86_64 + + config TOOLCHAIN_PREFIX + string + prompt "Toolchain prefix" if DEVEL + depends on EXTERNAL_TOOLCHAIN && !NATIVE_TOOLCHAIN + default "aarch64-unknown-linux-gnu" if aarch64 + default "aarch64_be-unknown-linux-gnu" if aarch64_be + default "arm-unknown-linux-gnu-" if arm + default "armeb-unknown-linux-gnu-" if armeb + default "i486-unknown-linux-gnu-" if i386 + default "mips-unknown-linux-gnu-" if mips + default "mipsel-unknown-linux-gnu-" if mipsel + default "powerpc-unknown-linux-gnu-" if powerpc + default "x86_64-unknown-linux-gnu-" if x86_64 + + config TOOLCHAIN_ROOT + string + prompt "Toolchain root" if DEVEL + depends on EXTERNAL_TOOLCHAIN && !NATIVE_TOOLCHAIN + default "/opt/cross/aarch64-unknown-linux-gnu" if aarch64 + default "/opt/cross/aarch64_be-unknown-linux-gnu" if aarch64_be + default "/opt/cross/arm-unknown-linux-gnu" if arm + default "/opt/cross/armeb-unknown-linux-gnu" if armeb + default "/opt/cross/i486-unknown-linux-gnu" if i386 + default "/opt/cross/mips-unknown-linux-gnu" if mips + default "/opt/cross/mipsel-unknown-linux-gnu" if mipsel + default "/opt/cross/powerpc-unknown-linux-gnu" if powerpc + default "/opt/cross/x86_64-unknown-linux-gnu" if x86_64 + + choice TOOLCHAIN_LIBC_TYPE + prompt "Toolchain libc" if DEVEL + depends on EXTERNAL_TOOLCHAIN && !NATIVE_TOOLCHAIN + default EXTERNAL_TOOLCHAIN_LIBC_USE_MUSL + help + Specify the libc type used by the external toolchain. The given value + is passed as -m flag to all gcc and g++ invocations. This is mainly + intended for multilib toolchains which support glibc and uclibc at + the same time. If no value is specified, no -m flag is passed. + + config EXTERNAL_TOOLCHAIN_LIBC_USE_GLIBC + bool "glibc" + select USE_GLIBC + + config EXTERNAL_TOOLCHAIN_LIBC_USE_UCLIBC + bool "uClibc" + select USE_UCLIBC + depends on !(aarch64 || aarch64_be) + + config EXTERNAL_TOOLCHAIN_LIBC_USE_MUSL + bool "musl" + select USE_MUSL + + endchoice + + config TOOLCHAIN_LIBC + string + depends on EXTERNAL_TOOLCHAIN && !NATIVE_TOOLCHAIN + default "glibc" if EXTERNAL_TOOLCHAIN_LIBC_USE_GLIBC + default "uclibc" if EXTERNAL_TOOLCHAIN_LIBC_USE_UCLIBC + default "musl" if EXTERNAL_TOOLCHAIN_LIBC_USE_MUSL + + config TOOLCHAIN_BIN_PATH + string + prompt "Toolchain program path" if DEVEL + depends on EXTERNAL_TOOLCHAIN && !NATIVE_TOOLCHAIN + default "./usr/bin ./bin" + help + Specify additional directories searched for toolchain binaries + (override PATH). Use ./DIR for directories relative to the root above. + + config TOOLCHAIN_INC_PATH + string + prompt "Toolchain include path" if DEVEL + depends on EXTERNAL_TOOLCHAIN && !NATIVE_TOOLCHAIN + default "./usr/include ./include" + help + Specify additional directories searched for header files (override + CPPFLAGS). Use ./DIR for directories relative to the root above. + + config TOOLCHAIN_LIB_PATH + string + prompt "Toolchain library path" if DEVEL + depends on EXTERNAL_TOOLCHAIN && !NATIVE_TOOLCHAIN + default "./usr/lib ./lib" + help + Specify additional directories searched for libraries (override LDFLAGS). + Use ./DIR for directories relative to the root above. + +config NEED_TOOLCHAIN + bool + depends on DEVEL + default y if !EXTERNAL_TOOLCHAIN + +menuconfig TOOLCHAINOPTS + bool "Toolchain Options" if DEVEL + depends on NEED_TOOLCHAIN + +menuconfig EXTRA_TARGET_ARCH + bool + prompt "Enable an extra toolchain target architecture" if TOOLCHAINOPTS + depends on !sparc + default y if powerpc64 + default n + help + Some builds may require a 'biarch' toolchain. This option + allows you to specify an additional target arch. + + Most people will answer N here. + + config EXTRA_TARGET_ARCH_NAME + string + default "powerpc64" if powerpc64 + prompt "Extra architecture name" if EXTRA_TARGET_ARCH + help + Specify the cpu name (eg powerpc64 or x86_64) of the + additional target architecture. + + config EXTRA_TARGET_ARCH_OPTS + string + default "-m64" if powerpc64 + prompt "Extra architecture compiler options" if EXTRA_TARGET_ARCH + help + If you're specifying an addition target architecture, + you'll probably need to also provide options to make + the compiler use this alternate arch. + + For example, if you're building a compiler that can build + both powerpc and powerpc64 binaries, you'll need to + specify -m64 here. + + + choice + prompt "MIPS64 user-land ABI" if TOOLCHAINOPTS && (mips64 || mips64el) + default MIPS64_ABI_N64 + help + MIPS64 supports 3 different user-land ABIs: o32 (legacy), + n32 and n64. + + config MIPS64_ABI_N64 + bool "n64" + + config MIPS64_ABI_N32 + depends on !LIBC_USE_MUSL + bool "n32" + + config MIPS64_ABI_O32 + bool "o32" + + endchoice + +comment "Binary tools" + depends on TOOLCHAINOPTS + +source "toolchain/binutils/Config.in" + +comment "Compiler" + depends on TOOLCHAINOPTS + +source "toolchain/gcc/Config.in" + +config YASM + bool + depends on ( i386 || x86_64 ) + prompt "Build yasm" if TOOLCHAINOPTS + default y + help + Enable if you want to build yasm + +comment "C Library" + depends on TOOLCHAINOPTS + +choice + prompt "C Library implementation" if TOOLCHAINOPTS + default LIBC_USE_UCLIBC if arc + default LIBC_USE_MUSL + help + Select the C library implementation. + + config LIBC_USE_GLIBC + bool "Use glibc" + select USE_GLIBC + depends on !arc + + config LIBC_USE_UCLIBC + select USE_UCLIBC + bool "Use uClibc" + depends on !(aarch64 || aarch64_be) + depends on BROKEN || !(arm || armeb || i386 || x86_64 || mips || mipsel || mips64 || mips64el || powerpc) + + config LIBC_USE_MUSL + select USE_MUSL + bool "Use musl" + depends on !(arc) + +endchoice + +source "toolchain/uClibc/Config.in" + +comment "Debuggers" + depends on TOOLCHAINOPTS + +config GDB + bool + depends on !(aarch64 || aarch64_be) + prompt "Build gdb" if TOOLCHAINOPTS + default y if !EXTERNAL_TOOLCHAIN + help + Enable if you want to build the gdb. + +config USE_GLIBC + bool + +config USE_UCLIBC + default y if !TOOLCHAINOPTS && !EXTERNAL_TOOLCHAIN && !NATIVE_TOOLCHAIN && (arc) + bool + +config USE_MUSL + default y if !TOOLCHAINOPTS && !EXTERNAL_TOOLCHAIN && !NATIVE_TOOLCHAIN && !(arc) + bool + +config USE_EXTERNAL_LIBC + bool + default y if EXTERNAL_TOOLCHAIN || NATIVE_TOOLCHAIN + +source "toolchain/binutils/Config.version" +source "toolchain/gcc/Config.version" + +config LIBC + string + default "glibc" if USE_GLIBC + default "uClibc" if USE_UCLIBC + default "musl" if USE_MUSL + +config TARGET_SUFFIX + string + default "gnueabi" if USE_GLIBC && (arm || armeb) + default "gnu" if USE_GLIBC && !(arm || armeb) + default "uclibcgnueabi" if USE_UCLIBC && (arm || armeb) + default "uclibc" if USE_UCLIBC && !(arm || armeb) + default "muslgnueabi" if USE_MUSL && (arm || armeb) + default "musl" if USE_MUSL && !(arm || armeb) + +config MIPS64_ABI + depends on mips64 || mips64el + string + default "64" if MIPS64_ABI_N64 + default "n32" if MIPS64_ABI_N32 + default "32" if MIPS64_ABI_O32 + default "64" diff --git a/toolchain-old/Makefile b/toolchain-old/Makefile new file mode 100644 index 000000000..409955c23 --- /dev/null +++ b/toolchain-old/Makefile @@ -0,0 +1,97 @@ +# +# Copyright (C) 2007-2009 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# +# Main makefile for the toolchain +# +# Steps: +# 1) toolchain/binutils/compile +# build & install binutils +# 2) toolchain/gcc/minimal/compile +# build & install a minimal gcc, needed for steps 3 & 4 +# 3) toolchain/kernel-headers/compile +# install kernel headers, needed for step 4 +# 4) toolchain/libc/headers/compile +# build & install libc headers & support files, needed for step 5 +# 5) toolchain/gcc/initial/compile +# build & install an initial gcc, needed for step 6 +# 6) toolchain/libc/compile +# build & install the final libc +# 7) toolchain/gcc/final/compile +# build & install the final gcc +# 8) toolchain/libc/utils/compile +# build & install libc utilities +# +# For musl, steps 2 and 4 are skipped, and step 3 is done after 5 + +curdir:=toolchain + +# subdirectories to descend into +$(curdir)/builddirs := $(if $(CONFIG_GDB),gdb) $(if $(CONFIG_EXTERNAL_TOOLCHAIN),wrapper,kernel-headers binutils gcc/initial gcc/final $(LIBC) fortify-headers) $(if $(CONFIG_YASM),yasm) +ifdef CONFIG_USE_UCLIBC + $(curdir)/builddirs += $(LIBC)/utils +endif + +# builddir dependencies +ifeq ($(CONFIG_EXTERNAL_TOOLCHAIN),) + ifdef CONFIG_USE_MUSL + $(curdir)/kernel-headers/compile:=$(curdir)/gcc/initial/compile + $(curdir)/$(LIBC)/compile:=$(curdir)/kernel-headers/compile + else + $(curdir)/builddirs += $(LIBC)/headers gcc/minimal + $(curdir)/gcc/minimal/compile:=$(curdir)/binutils/compile + $(curdir)/kernel-headers/compile:=$(curdir)/gcc/minimal/compile + $(curdir)/$(LIBC)/headers/compile:=$(curdir)/kernel-headers/compile + $(curdir)/gcc/initial/compile:=$(curdir)/$(LIBC)/headers/compile + endif + + $(curdir)/gcc/initial/compile+=$(curdir)/binutils/compile + $(curdir)/$(LIBC)/compile:=$(curdir)/gcc/initial/compile + $(curdir)/gcc/final/compile:=$(curdir)/$(LIBC)/compile + $(curdir)/$(LIBC)/utils/compile:=$(curdir)/gcc/final/compile +endif + +ifndef DUMP_TARGET_DB +ifneq ($(ARCH),) + $(TOOLCHAIN_DIR)/info.mk: .config + @for dir in $(TOOLCHAIN_DIR); do ( \ + $(if $(QUIET),,set -x;) \ + mkdir -p "$$dir"; \ + cd "$$dir"; \ + ln -nsf lib lib64; \ + ln -nsf lib lib32; \ + mkdir -p stamp lib usr/include usr/lib ; \ + ); done + @grep GCC_VERSION $@ >/dev/null 2>&1 || $(INSTALL_DATA) $(TOPDIR)/toolchain/info.mk $@ + @touch $@ +endif +endif + +ifdef CONFIG_BUILDBOT + $(TOOLCHAIN_DIR)/stamp/.ver_check: $(TMP_DIR)/.build + cd "$(TOPDIR)"; git log --format=%h -1 toolchain > $(TMP_DIR)/.ver_check + cmp -s $(TMP_DIR)/.ver_check $@ || { \ + rm -rf $(BUILD_DIR) $(STAGING_DIR) $(TOOLCHAIN_DIR) $(BUILD_DIR_TOOLCHAIN); \ + mkdir -p $(TOOLCHAIN_DIR)/stamp; \ + mv $(TMP_DIR)/.ver_check $@; \ + } + +$(TOOLCHAIN_DIR)/info.mk $(STAGING_DIR)/.prepared: $(TOOLCHAIN_DIR)/stamp/.ver_check +endif + +# prerequisites for the individual targets +$(curdir)/ := .config prereq +$(curdir)//compile = $(STAGING_DIR)/.prepared $(TOOLCHAIN_DIR)/info.mk $(tools/stamp-compile) + +ifndef DUMP_TARGET_DB +$(TOOLCHAIN_DIR)/stamp/.gcc-initial_installed: +endif + +$(curdir)/install: $(curdir)/compile + +$(eval $(call stampfile,$(curdir),toolchain,compile,$(TOOLCHAIN_DIR)/stamp/.gcc-initial_installed,,$(TOOLCHAIN_DIR))) +$(eval $(call stampfile,$(curdir),toolchain,check,$(TMP_DIR)/.build)) +$(eval $(call subdir,$(curdir))) + diff --git a/toolchain-old/binutils/Config.in b/toolchain-old/binutils/Config.in new file mode 100644 index 000000000..8fe33fb6b --- /dev/null +++ b/toolchain-old/binutils/Config.in @@ -0,0 +1,32 @@ +# Choose binutils version. + +choice + prompt "Binutils Version" if TOOLCHAINOPTS + default BINUTILS_USE_VERSION_2_28 if !arc + default BINUTILS_USE_VERSION_2_28_ARC if arc + help + Select the version of binutils you wish to use. + + config BINUTILS_USE_VERSION_2_27 + depends on !arc + bool "Binutils 2.27" + select BINUTILS_VERSION_2_27 + + config BINUTILS_USE_VERSION_2_28 + depends on !arc + bool "Binutils 2.28" + select BINUTILS_VERSION_2_28 + + config BINUTILS_USE_VERSION_2_28_ARC + depends on arc + bool "ARC binutils 2.28" + select BINUTILS_VERSION_2_28_ARC + +endchoice + +config EXTRA_BINUTILS_CONFIG_OPTIONS + string + prompt "Additional binutils configure options" if TOOLCHAINOPTS + default "" + help + Any additional binutils options you may want to include.... diff --git a/toolchain-old/binutils/Config.version b/toolchain-old/binutils/Config.version new file mode 100644 index 000000000..1b223e410 --- /dev/null +++ b/toolchain-old/binutils/Config.version @@ -0,0 +1,16 @@ +config BINUTILS_VERSION_2_27 + bool + +config BINUTILS_VERSION_2_28 + default y if (!TOOLCHAINOPTS && !arc) + bool + +config BINUTILS_VERSION_2_28_ARC + default y if (!TOOLCHAINOPTS && arc) + bool + +config BINUTILS_VERSION + string + default "2.27" if BINUTILS_VERSION_2_27 + default "2.28" if BINUTILS_VERSION_2_28 + default "arc-2017.03" if BINUTILS_VERSION_2_28_ARC diff --git a/toolchain-old/binutils/Makefile b/toolchain-old/binutils/Makefile new file mode 100644 index 000000000..6df11fbd3 --- /dev/null +++ b/toolchain-old/binutils/Makefile @@ -0,0 +1,112 @@ +# +# Copyright (C) 2006-2013 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# +include $(TOPDIR)/rules.mk + +PKG_NAME:=binutils +PKG_VERSION:=$(call qstrip,$(CONFIG_BINUTILS_VERSION)) +BIN_VERSION:=$(PKG_VERSION) + +PKG_SOURCE_URL:=@GNU/binutils/ +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2 + +ifeq ($(PKG_VERSION),2.27) + PKG_HASH:=369737ce51587f92466041a97ab7d2358c6d9e1b6490b3940eb09fb0a9a6ac88 +endif + +ifeq ($(PKG_VERSION),2.28) + PKG_HASH:=6297433ee120b11b4b0a1c8f3512d7d73501753142ab9e2daa13c5a3edd32a72 +endif + +ifneq ($(CONFIG_BINUTILS_VERSION_2_28_ARC),) + PKG_REV:=arc-2017.03-release + PKG_SOURCE_URL:=https://github.com/foss-for-synopsys-dwc-arc-processors/binutils-gdb/archive/$(PKG_REV)/ + PKG_SOURCE:=$(PKG_NAME)-$(PKG_REV).tar.gz + PKG_HASH:=f9c1e09ef10aaf9619181f49587f464ba0a70d29b7f6f879047140acac852409 + BINUTILS_DIR:=$(PKG_NAME)-gdb-$(PKG_REV) + HOST_BUILD_DIR:=$(BUILD_DIR_TOOLCHAIN)/$(BINUTILS_DIR) +endif + +HOST_BUILD_PARALLEL:=1 + +PATCH_DIR:=./patches/$(PKG_VERSION) + +include $(INCLUDE_DIR)/toolchain-build.mk + +BINUTILS_CONFIGURE:= \ + ./configure \ + --prefix=$(TOOLCHAIN_DIR) \ + --build=$(GNU_HOST_NAME) \ + --host=$(GNU_HOST_NAME) \ + --target=$(REAL_GNU_TARGET_NAME) \ + --with-sysroot=$(TOOLCHAIN_DIR) \ + --enable-deterministic-archives \ + --enable-plugins \ + --disable-multilib \ + --disable-werror \ + --disable-nls \ + --disable-sim \ + --disable-gdb \ + $(GRAPHITE_CONFIGURE) \ + $(SOFT_FLOAT_CONFIG_OPTION) \ + $(call qstrip,$(CONFIG_EXTRA_BINUTILS_CONFIG_OPTIONS)) + +ifneq ($(CONFIG_SSP_SUPPORT),) + BINUTILS_CONFIGURE+= \ + --enable-libssp +else + BINUTILS_CONFIGURE+= \ + --disable-libssp +endif + +ifneq ($(CONFIG_EXTRA_TARGET_ARCH),) + BINUTILS_CONFIGURE+= \ + --enable-targets=$(call qstrip,$(CONFIG_EXTRA_TARGET_ARCH_NAME))-linux-$(TARGET_SUFFIX) +endif + +define Host/Prepare + $(call Host/Prepare/Default) + ln -snf $(notdir $(HOST_BUILD_DIR)) $(BUILD_DIR_TOOLCHAIN)/$(PKG_NAME) + $(CP) $(SCRIPT_DIR)/config.{guess,sub} $(HOST_BUILD_DIR)/ + $(SED) 's, " Linaro.*,,' $(HOST_BUILD_DIR)/bfd/version.h +endef + +define Host/Configure + (cd $(HOST_BUILD_DIR); \ + $(BINUTILS_CONFIGURE) \ + ); +endef + +define Host/Compile + +$(MAKE) $(HOST_JOBS) -C $(HOST_BUILD_DIR) all +endef + +define Host/Install + mkdir -p $(TOOLCHAIN_DIR)/initial + $(MAKE) -C $(HOST_BUILD_DIR) \ + prefix=$(TOOLCHAIN_DIR)/initial \ + install + $(MAKE) -C $(HOST_BUILD_DIR) \ + prefix=$(TOOLCHAIN_DIR) \ + install + $(call FixupLibdir,$(TOOLCHAIN_DIR)/initial) + $(RM) $(TOOLCHAIN_DIR)/initial/lib/libiberty.a + $(CP) $(TOOLCHAIN_DIR)/bin/$(REAL_GNU_TARGET_NAME)-readelf $(HOST_BUILD_PREFIX)/bin/readelf + # ARC gcc requires extlib. + # If extlib is not available in "initial" folder + # initial gcc will fail to build libc. + if [ -d $(TOOLCHAIN_DIR)/extlib ]; then \ + $(CP) -r $(TOOLCHAIN_DIR)/extlib $(TOOLCHAIN_DIR)/initial/; \ + fi +endef + +define Host/Clean + rm -rf \ + $(HOST_BUILD_DIR) \ + $(BUILD_DIR_TOOLCHAIN)/$(PKG_NAME) +endef + +$(eval $(call HostBuild)) diff --git a/toolchain-old/binutils/patches/2.27/001-MIPS_BFD_Remove_EI_ABIVERSION_5.patch b/toolchain-old/binutils/patches/2.27/001-MIPS_BFD_Remove_EI_ABIVERSION_5.patch new file mode 100644 index 000000000..36e09b1bb --- /dev/null +++ b/toolchain-old/binutils/patches/2.27/001-MIPS_BFD_Remove_EI_ABIVERSION_5.patch @@ -0,0 +1,36 @@ +From 4d4f40e041ce7c8c7c8e50f957e0440b64ab7e95 Mon Sep 17 00:00:00 2001 +From: "Maciej W. Rozycki" +Date: Fri, 23 Dec 2016 20:03:36 +0000 +Subject: [PATCH] MIPS/BFD: Remove EI_ABIVERSION 5 allocation for PT_GNU_STACK + support + +Revert commit 17733f5be961 ("Increment the ABIVERSION to 5 for MIPS +objects with non-executable stacks.") and remove EI_ABIVERSION 5 +allocation for PT_GNU_STACK support, which has not made it to glibc +and will be reassigned. + + bfd/ + * bfd/elfxx-mips.c (_bfd_mips_post_process_headers): Revert + 2016-02-23 change and remove EI_ABIVERSION 5 support. +--- + bfd/ChangeLog | 5 +++++ + bfd/elfxx-mips.c | 3 --- + 2 files changed, 5 insertions(+), 3 deletions(-) + +diff --git a/bfd/elfxx-mips.c b/bfd/elfxx-mips.c +index d649676..486607c 100644 +--- a/bfd/elfxx-mips.c ++++ b/bfd/elfxx-mips.c +@@ -16358,9 +16358,6 @@ _bfd_mips_post_process_headers (bfd *abfd, struct bfd_link_info *link_info) + if (mips_elf_tdata (abfd)->abiflags.fp_abi == Val_GNU_MIPS_ABI_FP_64 + || mips_elf_tdata (abfd)->abiflags.fp_abi == Val_GNU_MIPS_ABI_FP_64A) + i_ehdrp->e_ident[EI_ABIVERSION] = 3; +- +- if (elf_stack_flags (abfd) && !(elf_stack_flags (abfd) & PF_X)) +- i_ehdrp->e_ident[EI_ABIVERSION] = 5; + } + + int +-- +2.9.3 + diff --git a/toolchain-old/binutils/patches/2.27/300-001_ld_makefile_patch.patch b/toolchain-old/binutils/patches/2.27/300-001_ld_makefile_patch.patch new file mode 100644 index 000000000..e4cec7f69 --- /dev/null +++ b/toolchain-old/binutils/patches/2.27/300-001_ld_makefile_patch.patch @@ -0,0 +1,22 @@ +--- 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 +@@ -451,7 +451,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-old/binutils/patches/2.27/300-012_check_ldrunpath_length.patch b/toolchain-old/binutils/patches/2.27/300-012_check_ldrunpath_length.patch new file mode 100644 index 000000000..95d3f75b8 --- /dev/null +++ b/toolchain-old/binutils/patches/2.27/300-012_check_ldrunpath_length.patch @@ -0,0 +1,20 @@ +--- a/ld/emultempl/elf32.em ++++ b/ld/emultempl/elf32.em +@@ -1244,6 +1244,8 @@ fragment <link.next) + if (bfd_get_flavour (abfd) == bfd_target_elf_flavour) diff --git a/toolchain-old/binutils/patches/2.27/400-mips_no_dynamic_linking_sym.patch b/toolchain-old/binutils/patches/2.27/400-mips_no_dynamic_linking_sym.patch new file mode 100644 index 000000000..b7458e58a --- /dev/null +++ b/toolchain-old/binutils/patches/2.27/400-mips_no_dynamic_linking_sym.patch @@ -0,0 +1,18 @@ +--- a/bfd/elfxx-mips.c ++++ b/bfd/elfxx-mips.c +@@ -7713,6 +7713,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))) +@@ -7725,6 +7726,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-old/binutils/patches/2.27/500-Change-default-emulation-for-mips64-linux.patch b/toolchain-old/binutils/patches/2.27/500-Change-default-emulation-for-mips64-linux.patch new file mode 100644 index 000000000..7a8f0ae13 --- /dev/null +++ b/toolchain-old/binutils/patches/2.27/500-Change-default-emulation-for-mips64-linux.patch @@ -0,0 +1,37 @@ +--- a/bfd/config.bfd ++++ b/bfd/config.bfd +@@ -1101,12 +1101,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 +@@ -513,11 +513,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-old/binutils/patches/2.28/300-001_ld_makefile_patch.patch b/toolchain-old/binutils/patches/2.28/300-001_ld_makefile_patch.patch new file mode 100644 index 000000000..e4cec7f69 --- /dev/null +++ b/toolchain-old/binutils/patches/2.28/300-001_ld_makefile_patch.patch @@ -0,0 +1,22 @@ +--- 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 +@@ -451,7 +451,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-old/binutils/patches/2.28/300-012_check_ldrunpath_length.patch b/toolchain-old/binutils/patches/2.28/300-012_check_ldrunpath_length.patch new file mode 100644 index 000000000..95d3f75b8 --- /dev/null +++ b/toolchain-old/binutils/patches/2.28/300-012_check_ldrunpath_length.patch @@ -0,0 +1,20 @@ +--- a/ld/emultempl/elf32.em ++++ b/ld/emultempl/elf32.em +@@ -1244,6 +1244,8 @@ fragment <link.next) + if (bfd_get_flavour (abfd) == bfd_target_elf_flavour) diff --git a/toolchain-old/binutils/patches/2.28/400-mips_no_dynamic_linking_sym.patch b/toolchain-old/binutils/patches/2.28/400-mips_no_dynamic_linking_sym.patch new file mode 100644 index 000000000..b7458e58a --- /dev/null +++ b/toolchain-old/binutils/patches/2.28/400-mips_no_dynamic_linking_sym.patch @@ -0,0 +1,18 @@ +--- a/bfd/elfxx-mips.c ++++ b/bfd/elfxx-mips.c +@@ -7713,6 +7713,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))) +@@ -7725,6 +7726,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-old/binutils/patches/2.28/500-Change-default-emulation-for-mips64-linux.patch b/toolchain-old/binutils/patches/2.28/500-Change-default-emulation-for-mips64-linux.patch new file mode 100644 index 000000000..7a8f0ae13 --- /dev/null +++ b/toolchain-old/binutils/patches/2.28/500-Change-default-emulation-for-mips64-linux.patch @@ -0,0 +1,37 @@ +--- a/bfd/config.bfd ++++ b/bfd/config.bfd +@@ -1101,12 +1101,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 +@@ -513,11 +513,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-old/binutils/patches/arc-2016.09-release/300-001_ld_makefile_patch.patch b/toolchain-old/binutils/patches/arc-2016.09-release/300-001_ld_makefile_patch.patch new file mode 100644 index 000000000..e4cec7f69 --- /dev/null +++ b/toolchain-old/binutils/patches/arc-2016.09-release/300-001_ld_makefile_patch.patch @@ -0,0 +1,22 @@ +--- 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 +@@ -451,7 +451,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-old/binutils/patches/arc-2016.09-release/300-012_check_ldrunpath_length.patch b/toolchain-old/binutils/patches/arc-2016.09-release/300-012_check_ldrunpath_length.patch new file mode 100644 index 000000000..95d3f75b8 --- /dev/null +++ b/toolchain-old/binutils/patches/arc-2016.09-release/300-012_check_ldrunpath_length.patch @@ -0,0 +1,20 @@ +--- a/ld/emultempl/elf32.em ++++ b/ld/emultempl/elf32.em +@@ -1244,6 +1244,8 @@ fragment <link.next) + if (bfd_get_flavour (abfd) == bfd_target_elf_flavour) diff --git a/toolchain-old/fortify-headers/Makefile b/toolchain-old/fortify-headers/Makefile new file mode 100644 index 000000000..8caf8c84c --- /dev/null +++ b/toolchain-old/fortify-headers/Makefile @@ -0,0 +1,28 @@ +# +# Copyright (C) 2015 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# +include $(TOPDIR)/rules.mk +include $(INCLUDE_DIR)/target.mk + +PKG_NAME:=fortify-headers +PKG_VERSION:=0.8 +PKG_RELEASE=1 + +PKG_SOURCE_URL:=http://dl.2f30.org/releases +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz +PKG_HASH:=afcd073d6d8d175eede2a28a7dd71b7150cb03290f99102261892c793f6b4cb1 + +include $(INCLUDE_DIR)/toolchain-build.mk + +define Host/Compile + true +endef + +define Host/Install + $(MAKE) -C $(HOST_BUILD_DIR) PREFIX="" DESTDIR="$(TOOLCHAIN_DIR)" install +endef + +$(eval $(call HostBuild)) diff --git a/toolchain-old/gcc/Config.in b/toolchain-old/gcc/Config.in new file mode 100644 index 000000000..ea33ac29c --- /dev/null +++ b/toolchain-old/gcc/Config.in @@ -0,0 +1,78 @@ +# Choose gcc version. + +choice + prompt "GCC compiler Version" if TOOLCHAINOPTS + default GCC_USE_VERSION_6_3_ARC if arc + default GCC_USE_VERSION_5 + help + Select the version of gcc you wish to use. + + config GCC_USE_VERSION_6_3_ARC + select GCC_VERSION_6_3_ARC + bool "gcc 6.3.x with support of ARC cores" + depends on arc + + config GCC_USE_VERSION_5 + bool "gcc 5.x" + depends on !arc + + config GCC_USE_VERSION_6 + bool "gcc 6.x" + depends on !arc + + config GCC_USE_VERSION_7 + bool "gcc 7.x" + depends on !arc + +endchoice + +config GCC_USE_GRAPHITE + bool + prompt "Compile in support for the new Graphite framework in GCC 4.4+" if TOOLCHAINOPTS + +config EXTRA_GCC_CONFIG_OPTIONS + string + prompt "Additional gcc configure options" if TOOLCHAINOPTS + default "" + help + Any additional gcc options you may want to include.... + +config SSP_SUPPORT + bool + prompt "Enable Stack-Smashing Protection support" if TOOLCHAINOPTS + depends on !USE_MUSL + default y if !USE_MUSL + help + Enable Stack-Smashing Protection support + +config SJLJ_EXCEPTIONS + bool + prompt "Use setjump()/longjump() exceptions" if TOOLCHAINOPTS + default n + help + Use old setjump()/longjump() exceptions instead of the newer + frame unwinding exceptions handling routines. Warning: increases + code size and runtime memory usage. + +config INSTALL_LIBGCJ + bool + prompt "Build/install java compiler and GNU classpath ?" if TOOLCHAINOPTS + default n + help + Build/install java compiler and GNU classpath ? + + +config INSTALL_GFORTRAN + bool + prompt "Build/install fortran compiler?" if TOOLCHAINOPTS + default n + help + Build/install GNU fortran compiler ? + +config INSTALL_GCCGO + bool + prompt "Build/install Go compiler?" if TOOLCHAINOPTS + depends on USE_GLIBC || BROKEN + default n + help + Build/install GNU gccgo compiler ? diff --git a/toolchain-old/gcc/Config.version b/toolchain-old/gcc/Config.version new file mode 100644 index 000000000..86c723dc9 --- /dev/null +++ b/toolchain-old/gcc/Config.version @@ -0,0 +1,14 @@ +config GCC_VERSION_6_3_ARC + default y if (!TOOLCHAINOPTS && arc) + bool + +config GCC_VERSION + string + default "arc-2017.03-release" if GCC_VERSION_6_3_ARC + default "6.3.0" if GCC_USE_VERSION_6 + default "7.1.0" if GCC_USE_VERSION_7 + default "5.4.0" + +config GCC_VERSION_6_3 + bool + default y if GCC_VERSION_6_3_ARC diff --git a/toolchain-old/gcc/common.mk b/toolchain-old/gcc/common.mk new file mode 100644 index 000000000..abf69bfdc --- /dev/null +++ b/toolchain-old/gcc/common.mk @@ -0,0 +1,228 @@ +# +# Copyright (C) 2002-2003 Erik Andersen +# Copyright (C) 2004 Manuel Novoa III +# Copyright (C) 2005-2006 Felix Fietkau +# Copyright (C) 2006-2014 OpenWrt.org +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +include $(TOPDIR)/rules.mk + +PKG_NAME:=gcc +GCC_VERSION:=$(call qstrip,$(CONFIG_GCC_VERSION)) +PKG_VERSION:=$(firstword $(subst +, ,$(GCC_VERSION))) +GCC_DIR:=$(PKG_NAME)-$(PKG_VERSION) + +PKG_SOURCE_URL:=@GNU/gcc/gcc-$(PKG_VERSION) +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2 + +ifeq ($(PKG_VERSION),5.4.0) + PKG_HASH:=608df76dec2d34de6558249d8af4cbee21eceddbcb580d666f7a5a583ca3303a +endif + +ifeq ($(PKG_VERSION),6.3.0) + PKG_HASH:=f06ae7f3f790fbf0f018f6d40e844451e6bc3b7bc96e128e63b09825c1f8b29f +endif + +ifeq ($(PKG_VERSION),7.1.0) + PKG_HASH:=8a8136c235f64c6fef69cac0d73a46a1a09bb250776a050aec8f9fc880bebc17 +endif + +ifneq ($(CONFIG_GCC_VERSION_6_3_ARC),) + PKG_VERSION:=6.3.0 + PKG_SOURCE_URL:=https://github.com/foss-for-synopsys-dwc-arc-processors/gcc/archive/$(GCC_VERSION) + PKG_SOURCE:=$(PKG_NAME)-$(GCC_VERSION).tar.gz + PKG_HASH:=b7223e134199b1a6f71de629da6aa845790e55d28e9892143dde09b1bc878110 + PKG_REV:=2017.03-release + GCC_DIR:=gcc-arc-$(PKG_REV) + HOST_BUILD_DIR = $(BUILD_DIR_HOST)/$(PKG_NAME)-$(GCC_VERSION) +endif + +PATCH_DIR=../patches/$(GCC_VERSION) + +BUGURL=http://www.lede-project.org/bugs/ +PKGVERSION=OpenWrt GCC $(PKG_VERSION) $(REVISION) + +HOST_BUILD_PARALLEL:=1 + +include $(INCLUDE_DIR)/toolchain-build.mk + +HOST_SOURCE_DIR:=$(HOST_BUILD_DIR) +ifeq ($(GCC_VARIANT),minimal) + GCC_BUILD_DIR:=$(HOST_BUILD_DIR)-$(GCC_VARIANT) +else + HOST_BUILD_DIR:=$(HOST_BUILD_DIR)-$(GCC_VARIANT) + GCC_BUILD_DIR:=$(HOST_BUILD_DIR) +endif + +HOST_STAMP_PREPARED:=$(HOST_BUILD_DIR)/.prepared +HOST_STAMP_BUILT:=$(GCC_BUILD_DIR)/.built +HOST_STAMP_CONFIGURED:=$(GCC_BUILD_DIR)/.configured +HOST_STAMP_INSTALLED:=$(HOST_BUILD_PREFIX)/stamp/.gcc_$(GCC_VARIANT)_installed + +SEP:=, +TARGET_LANGUAGES:="c,c++$(if $(CONFIG_INSTALL_LIBGCJ),$(SEP)java)$(if $(CONFIG_INSTALL_GFORTRAN),$(SEP)fortran)$(if $(CONFIG_INSTALL_GCCGO),$(SEP)go)" + +TAR_OPTIONS += \ + --exclude-from='$(CURDIR)/../exclude-testsuite' --exclude=gcc/ada/*.ad* \ + +ifndef CONFIG_INSTALL_LIBGCJ + TAR_OPTIONS += --exclude=libjava +endif + +export libgcc_cv_fixed_point=no +ifdef CONFIG_USE_UCLIBC + export glibcxx_cv_c99_math_tr1=no +endif +ifdef CONFIG_INSTALL_GCCGO + export libgo_cv_c_split_stack_supported=no +endif + +ifdef CONFIG_GCC_USE_GRAPHITE + GRAPHITE_CONFIGURE:= --with-isl=$(TOPDIR)/staging_dir/host +else + GRAPHITE_CONFIGURE:= --without-isl --without-cloog +endif + +GCC_CONFIGURE:= \ + SHELL="$(BASH)" \ + $(if $(shell gcc --version 2>&1 | grep LLVM), \ + CFLAGS="-O2 -fbracket-depth=512 -pipe" \ + CXXFLAGS="-O2 -fbracket-depth=512 -pipe" \ + ) \ + $(HOST_SOURCE_DIR)/configure \ + --with-bugurl=$(BUGURL) \ + --with-pkgversion="$(PKGVERSION)" \ + --prefix=$(TOOLCHAIN_DIR) \ + --build=$(GNU_HOST_NAME) \ + --host=$(GNU_HOST_NAME) \ + --target=$(REAL_GNU_TARGET_NAME) \ + --with-gnu-ld \ + --enable-target-optspace \ + --disable-libgomp \ + --disable-libmudflap \ + --disable-multilib \ + --disable-libmpx \ + --disable-nls \ + $(GRAPHITE_CONFIGURE) \ + --with-host-libstdcxx=-lstdc++ \ + $(SOFT_FLOAT_CONFIG_OPTION) \ + $(call qstrip,$(CONFIG_EXTRA_GCC_CONFIG_OPTIONS)) \ + $(if $(CONFIG_mips64)$(CONFIG_mips64el),--with-arch=mips64 \ + --with-abi=$(call qstrip,$(CONFIG_MIPS64_ABI))) \ + $(if $(CONFIG_arc),--with-cpu=$(CONFIG_CPU_TYPE)) \ + --with-gmp=$(TOPDIR)/staging_dir/host \ + --with-mpfr=$(TOPDIR)/staging_dir/host \ + --with-mpc=$(TOPDIR)/staging_dir/host \ + --disable-decimal-float +ifneq ($(CONFIG_mips)$(CONFIG_mipsel),) + GCC_CONFIGURE += --with-mips-plt +endif + +ifndef GCC_VERSION_4_8 + GCC_CONFIGURE += --with-diagnostics-color=auto-if-env +endif + +ifneq ($(CONFIG_SSP_SUPPORT),) + GCC_CONFIGURE+= \ + --enable-libssp +else + GCC_CONFIGURE+= \ + --disable-libssp +endif + +ifneq ($(CONFIG_EXTRA_TARGET_ARCH),) + GCC_CONFIGURE+= \ + --enable-biarch \ + --enable-targets=$(call qstrip,$(CONFIG_EXTRA_TARGET_ARCH_NAME))-linux-$(TARGET_SUFFIX) +endif + +ifdef CONFIG_sparc + GCC_CONFIGURE+= \ + --enable-targets=all \ + --with-long-double-128 +endif + +ifeq ($(LIBC),uClibc) + GCC_CONFIGURE+= \ + --disable-__cxa_atexit +else + GCC_CONFIGURE+= \ + --enable-__cxa_atexit +endif + +ifneq ($(GCC_ARCH),) + GCC_CONFIGURE+= --with-arch=$(GCC_ARCH) +endif + +ifneq ($(CONFIG_SOFT_FLOAT),y) + ifeq ($(CONFIG_arm),y) + GCC_CONFIGURE+= \ + --with-float=hard + endif +endif + +ifeq ($(CONFIG_TARGET_x86)$(CONFIG_USE_GLIBC)$(CONFIG_INSTALL_GCCGO),yyy) + TARGET_CFLAGS+=-fno-split-stack +endif + +GCC_MAKE:= \ + export SHELL="$(BASH)"; \ + $(MAKE) \ + CFLAGS="$(HOST_CFLAGS)" \ + CFLAGS_FOR_TARGET="$(TARGET_CFLAGS)" \ + CXXFLAGS_FOR_TARGET="$(TARGET_CFLAGS)" \ + GOCFLAGS_FOR_TARGET="$(TARGET_CFLAGS)" + +define Host/SetToolchainInfo + $(SED) 's,TARGET_CROSS=.*,TARGET_CROSS=$(REAL_GNU_TARGET_NAME)-,' $(TOOLCHAIN_DIR)/info.mk + $(SED) 's,GCC_VERSION=.*,GCC_VERSION=$(GCC_VERSION),' $(TOOLCHAIN_DIR)/info.mk +endef + +ifneq ($(GCC_PREPARE),) + define Host/Prepare + $(call Host/SetToolchainInfo) + $(call Host/Prepare/Default) + ln -snf $(GCC_DIR) $(BUILD_DIR_TOOLCHAIN)/$(PKG_NAME) + $(CP) $(SCRIPT_DIR)/config.{guess,sub} $(HOST_SOURCE_DIR)/ + $(SED) 's,^MULTILIB_OSDIRNAMES,# MULTILIB_OSDIRNAMES,' $(HOST_SOURCE_DIR)/gcc/config/*/t-* + $(SED) 'd' $(HOST_SOURCE_DIR)/gcc/DEV-PHASE + $(SED) 's, DATESTAMP,,' $(HOST_SOURCE_DIR)/gcc/version.c + #(cd $(HOST_SOURCE_DIR)/libstdc++-v3; autoconf;); + $(SED) 's,gcc_no_link=yes,gcc_no_link=no,' $(HOST_SOURCE_DIR)/libstdc++-v3/configure + mkdir -p $(GCC_BUILD_DIR) + endef +else + define Host/Prepare + mkdir -p $(GCC_BUILD_DIR) + endef +endif + +define Host/Configure + (cd $(GCC_BUILD_DIR) && rm -f config.cache; \ + $(GCC_CONFIGURE) \ + ); +endef + +define Host/Clean + rm -rf $(if $(GCC_PREPARE),$(HOST_SOURCE_DIR)) \ + $(HOST_BUILD_PREFIX)/stamp/.gcc_* \ + $(HOST_BUILD_PREFIX)/stamp/.binutils_* \ + $(GCC_BUILD_DIR) \ + $(BUILD_DIR_TOOLCHAIN)/$(PKG_NAME) \ + $(TOOLCHAIN_DIR)/$(REAL_GNU_TARGET_NAME) \ + $(TOOLCHAIN_DIR)/bin/$(REAL_GNU_TARGET_NAME)-gc* \ + $(TOOLCHAIN_DIR)/bin/$(REAL_GNU_TARGET_NAME)-c* +endef diff --git a/toolchain-old/gcc/exclude-testsuite b/toolchain-old/gcc/exclude-testsuite new file mode 100644 index 000000000..37a8f2476 --- /dev/null +++ b/toolchain-old/gcc/exclude-testsuite @@ -0,0 +1,9 @@ +gcc-*/gcc/testsuite/ada +gcc-*/gcc/testsuite/brig.dg +gcc-*/gcc/testsuite/c-c++-common +gcc-*/gcc/testsuite/ChangeLog* +gcc-*/gcc/testsuite/config +gcc-*/gcc/testsuite/g* +gcc-*/gcc/testsuite/jit.dg +gcc-*/gcc/testsuite/lib +gcc-*/gcc/testsuite/o* diff --git a/toolchain-old/gcc/files/alternate-arch-cc.in b/toolchain-old/gcc/files/alternate-arch-cc.in new file mode 100644 index 000000000..e169951eb --- /dev/null +++ b/toolchain-old/gcc/files/alternate-arch-cc.in @@ -0,0 +1,3 @@ +#!/bin/sh + +exec @CC_BASE@ @EXTRA_ARCH_OPTS@ "$@" diff --git a/toolchain-old/gcc/final/Makefile b/toolchain-old/gcc/final/Makefile new file mode 100644 index 000000000..b815f677d --- /dev/null +++ b/toolchain-old/gcc/final/Makefile @@ -0,0 +1,87 @@ +GCC_VARIANT:=final + +include ../common.mk + +GCC_CONFIGURE += \ + --with-headers=$(TOOLCHAIN_DIR)/include \ + --disable-libsanitizer \ + --enable-languages=$(TARGET_LANGUAGES) \ + --enable-shared \ + --enable-threads \ + --with-slibdir=$(TOOLCHAIN_DIR)/lib \ + --enable-lto \ + --with-libelf=$(TOPDIR)/staging_dir/host + +ifdef CONFIG_USE_MUSL + GCC_MAKE += gcc_cv_libc_provides_ssp=yes +endif + +ifneq ($(CONFIG_SJLJ_EXCEPTIONS),) + GCC_CONFIGURE += \ + --enable-sjlj-exceptions +endif + +define CleanupToolchain + $(INSTALL_DIR) $(TOOLCHAIN_DIR)/$(REAL_GNU_TARGET_NAME) + # Important! Required for limits.h to be fixed. + rm -rf $(TOOLCHAIN_DIR)/$(REAL_GNU_TARGET_NAME)/sys-include + ln -sf ../include $(TOOLCHAIN_DIR)/$(REAL_GNU_TARGET_NAME)/sys-include + rm -rf $(TOOLCHAIN_DIR)/$(REAL_GNU_TARGET_NAME)/lib + ln -sf ../lib $(TOOLCHAIN_DIR)/$(REAL_GNU_TARGET_NAME)/lib + $(if $(CONFIG_ARCH_64BIT),ln -sf ../lib64 $(TOOLCHAIN_DIR)/$(REAL_GNU_TARGET_NAME)/lib64) +endef + +define Host/Configure + $(CleanupToolchain) + mkdir -p $(GCC_BUILD_DIR) + (cd $(GCC_BUILD_DIR) && rm -f config.cache; \ + $(GCC_CONFIGURE) \ + ); +endef + +ifeq ($(CONFIG_USE_GLIBC)$(CONFIG_INSTALL_GCCGO),yy) +define FixGogccCrt + # link crtX.o for gotools + mkdir -p $(GCC_BUILD_DIR)/gotools + $(foreach crt, i 1 n, ln -sf ../../glibc-dev/lib/crt$(crt).o $(GCC_BUILD_DIR)/gotools/ ; ) +endef +endif + +define Host/Compile + $(FixGogccCrt) + +$(GCC_MAKE) $(HOST_JOBS) -C $(GCC_BUILD_DIR) all +endef + +define SetupExtraArch + for app in $(TOOLCHAIN_DIR)/bin/$(OPTIMIZE_FOR_CPU)*-{gcc,gcc-*,g++}; do \ + [ -e $$$$app ] || continue; \ + old_base=$$$$(basename $$$$app); \ + new_base=$(call qstrip,$(CONFIG_EXTRA_TARGET_ARCH_NAME))-$$$${old_base##$(OPTIMIZE_FOR_CPU)-}; \ + sed -e "s/@CC_BASE@/$$$$old_base/" \ + -e 's/@EXTRA_ARCH_OPTS@/$(call qstrip,$(CONFIG_EXTRA_TARGET_ARCH_OPTS))/' \ + ../files/alternate-arch-cc.in > \ + $(TOOLCHAIN_DIR)/bin/$$$$new_base; \ + chmod a+x $(TOOLCHAIN_DIR)/bin/$$$$new_base; \ + done +endef + +define Host/Install + $(CleanupToolchain) + +$(GCC_MAKE) $(HOST_JOBS) -C $(GCC_BUILD_DIR) install + # Set up the symlinks to enable lying about target name. + set -e; \ + (cd $(TOOLCHAIN_DIR); \ + ln -sf $(REAL_GNU_TARGET_NAME) $(GNU_TARGET_NAME); \ + cd bin; \ + for app in $(REAL_GNU_TARGET_NAME)-* ; do \ + ln -sf $$$${app} \ + $(GNU_TARGET_NAME)$$$${app##$(REAL_GNU_TARGET_NAME)}; \ + done; \ + ); + $(if $(CONFIG_EXTRA_TARGET_ARCH),$(call SetupExtraArch)) + $(RM) $(TOOLCHAIN_DIR)/lib/libiberty.a + $(SCRIPT_DIR)/patch-specs.sh "$(TOOLCHAIN_DIR)" +endef + +$(eval $(call HostBuild)) + diff --git a/toolchain-old/gcc/initial/Makefile b/toolchain-old/gcc/initial/Makefile new file mode 100644 index 000000000..c71b17dd8 --- /dev/null +++ b/toolchain-old/gcc/initial/Makefile @@ -0,0 +1,36 @@ +GCC_VARIANT:=initial +GCC_PREPARE=$(CONFIG_USE_MUSL) + +include ../common.mk + +GCC_CONFIGURE += \ + --with-newlib \ + --with-sysroot=$(TOOLCHAIN_DIR) \ + --enable-languages=c \ + --disable-shared \ + --disable-threads \ + +define Host/Compile + +$(GCC_MAKE) $(HOST_JOBS) -C $(GCC_BUILD_DIR) \ + all-build-libiberty \ + all-gcc \ + all-target-libgcc +endef + +define Host/Install + +$(GCC_MAKE) $(HOST_JOBS) -C $(GCC_BUILD_DIR) \ + prefix="$(TOOLCHAIN_DIR)/initial" \ + install-gcc \ + install-target-libgcc + + # XXX: glibc insists on linking against libgcc_eh + ( cd $(TOOLCHAIN_DIR)/initial/lib/gcc/$(REAL_GNU_TARGET_NAME)/$(PKG_VERSION) ; \ + [ -e libgcc_eh.a ] || ln -sf libgcc.a libgcc_eh.a ; \ + cp libgcc.a libgcc_initial.a; \ + ) + + $(call FixupLibdir,$(TOOLCHAIN_DIR)/initial) + $$(call file_copy,$(TOOLCHAIN_DIR)/initial/.,$(TOOLCHAIN_DIR)/) +endef + +$(eval $(call HostBuild)) diff --git a/toolchain-old/gcc/minimal/Makefile b/toolchain-old/gcc/minimal/Makefile new file mode 100644 index 000000000..31d6f675a --- /dev/null +++ b/toolchain-old/gcc/minimal/Makefile @@ -0,0 +1,29 @@ +GCC_VARIANT:=minimal +GCC_PREPARE=$(if $(CONFIG_USE_MUSL),,1) + +include ../common.mk + +GCC_CONFIGURE += \ + --with-newlib \ + --without-headers \ + --enable-languages=c \ + --disable-libsanitizer \ + --disable-libssp \ + --disable-shared \ + --disable-threads + +define Host/Compile + +$(GCC_MAKE) $(HOST_JOBS) -C $(GCC_BUILD_DIR) all-gcc all-target-libgcc +endef + +define Host/Install + $(GCC_MAKE) -C $(GCC_BUILD_DIR) install-gcc install-target-libgcc +endef + +define Host/Clean + rm -rf \ + $(HOST_BUILD_DIR) \ + $(GCC_BUILD_DIR) +endef + +$(eval $(call HostBuild)) diff --git a/toolchain/gcc/patches/5.4.0/001-revert_register_mode_search.patch b/toolchain-old/gcc/patches/5.4.0/001-revert_register_mode_search.patch similarity index 100% rename from toolchain/gcc/patches/5.4.0/001-revert_register_mode_search.patch rename to toolchain-old/gcc/patches/5.4.0/001-revert_register_mode_search.patch diff --git a/toolchain/gcc/patches/5.4.0/002-case_insensitive.patch b/toolchain-old/gcc/patches/5.4.0/002-case_insensitive.patch similarity index 100% rename from toolchain/gcc/patches/5.4.0/002-case_insensitive.patch rename to toolchain-old/gcc/patches/5.4.0/002-case_insensitive.patch diff --git a/toolchain/gcc/patches/5.4.0/010-documentation.patch b/toolchain-old/gcc/patches/5.4.0/010-documentation.patch similarity index 100% rename from toolchain/gcc/patches/5.4.0/010-documentation.patch rename to toolchain-old/gcc/patches/5.4.0/010-documentation.patch diff --git a/toolchain/gcc/patches/5.4.0/020-no-plt-backport.patch b/toolchain-old/gcc/patches/5.4.0/020-no-plt-backport.patch similarity index 100% rename from toolchain/gcc/patches/5.4.0/020-no-plt-backport.patch rename to toolchain-old/gcc/patches/5.4.0/020-no-plt-backport.patch diff --git a/toolchain/gcc/patches/5.4.0/040-fix-mips-ICE-PR-68400.patch b/toolchain-old/gcc/patches/5.4.0/040-fix-mips-ICE-PR-68400.patch similarity index 100% rename from toolchain/gcc/patches/5.4.0/040-fix-mips-ICE-PR-68400.patch rename to toolchain-old/gcc/patches/5.4.0/040-fix-mips-ICE-PR-68400.patch diff --git a/toolchain/gcc/patches/5.4.0/200-musl_config.patch b/toolchain-old/gcc/patches/5.4.0/200-musl_config.patch similarity index 100% rename from toolchain/gcc/patches/5.4.0/200-musl_config.patch rename to toolchain-old/gcc/patches/5.4.0/200-musl_config.patch diff --git a/toolchain/gcc/patches/5.4.0/201-musl_arm.patch b/toolchain-old/gcc/patches/5.4.0/201-musl_arm.patch similarity index 100% rename from toolchain/gcc/patches/5.4.0/201-musl_arm.patch rename to toolchain-old/gcc/patches/5.4.0/201-musl_arm.patch diff --git a/toolchain/gcc/patches/5.4.0/202-musl_mips.patch b/toolchain-old/gcc/patches/5.4.0/202-musl_mips.patch similarity index 100% rename from toolchain/gcc/patches/5.4.0/202-musl_mips.patch rename to toolchain-old/gcc/patches/5.4.0/202-musl_mips.patch diff --git a/toolchain/gcc/patches/5.4.0/203-musl_powerpc.patch b/toolchain-old/gcc/patches/5.4.0/203-musl_powerpc.patch similarity index 100% rename from toolchain/gcc/patches/5.4.0/203-musl_powerpc.patch rename to toolchain-old/gcc/patches/5.4.0/203-musl_powerpc.patch diff --git a/toolchain/gcc/patches/5.4.0/204-musl_sh.patch b/toolchain-old/gcc/patches/5.4.0/204-musl_sh.patch similarity index 100% rename from toolchain/gcc/patches/5.4.0/204-musl_sh.patch rename to toolchain-old/gcc/patches/5.4.0/204-musl_sh.patch diff --git a/toolchain/gcc/patches/5.4.0/205-musl_x86.patch b/toolchain-old/gcc/patches/5.4.0/205-musl_x86.patch similarity index 100% rename from toolchain/gcc/patches/5.4.0/205-musl_x86.patch rename to toolchain-old/gcc/patches/5.4.0/205-musl_x86.patch diff --git a/toolchain/gcc/patches/5.4.0/206-musl_aarch64.patch b/toolchain-old/gcc/patches/5.4.0/206-musl_aarch64.patch similarity index 100% rename from toolchain/gcc/patches/5.4.0/206-musl_aarch64.patch rename to toolchain-old/gcc/patches/5.4.0/206-musl_aarch64.patch diff --git a/toolchain/gcc/patches/5.4.0/207-musl_fixincludes.patch b/toolchain-old/gcc/patches/5.4.0/207-musl_fixincludes.patch similarity index 100% rename from toolchain/gcc/patches/5.4.0/207-musl_fixincludes.patch rename to toolchain-old/gcc/patches/5.4.0/207-musl_fixincludes.patch diff --git a/toolchain/gcc/patches/5.4.0/209-musl_libstdc++.patch b/toolchain-old/gcc/patches/5.4.0/209-musl_libstdc++.patch similarity index 100% rename from toolchain/gcc/patches/5.4.0/209-musl_libstdc++.patch rename to toolchain-old/gcc/patches/5.4.0/209-musl_libstdc++.patch diff --git a/toolchain/gcc/patches/5.4.0/230-musl_libssp.patch b/toolchain-old/gcc/patches/5.4.0/230-musl_libssp.patch similarity index 100% rename from toolchain/gcc/patches/5.4.0/230-musl_libssp.patch rename to toolchain-old/gcc/patches/5.4.0/230-musl_libssp.patch diff --git a/toolchain/gcc/patches/5.4.0/240-musl-libitm-fixes.patch b/toolchain-old/gcc/patches/5.4.0/240-musl-libitm-fixes.patch similarity index 100% rename from toolchain/gcc/patches/5.4.0/240-musl-libitm-fixes.patch rename to toolchain-old/gcc/patches/5.4.0/240-musl-libitm-fixes.patch diff --git a/toolchain/gcc/patches/5.4.0/250-add-musl.patch b/toolchain-old/gcc/patches/5.4.0/250-add-musl.patch similarity index 100% rename from toolchain/gcc/patches/5.4.0/250-add-musl.patch rename to toolchain-old/gcc/patches/5.4.0/250-add-musl.patch diff --git a/toolchain/gcc/patches/5.4.0/260-musl-add-unwind-fix.patch b/toolchain-old/gcc/patches/5.4.0/260-musl-add-unwind-fix.patch similarity index 100% rename from toolchain/gcc/patches/5.4.0/260-musl-add-unwind-fix.patch rename to toolchain-old/gcc/patches/5.4.0/260-musl-add-unwind-fix.patch diff --git a/toolchain/gcc/patches/5.4.0/270-musl-add-powerpc-softfloat-fix.patch b/toolchain-old/gcc/patches/5.4.0/270-musl-add-powerpc-softfloat-fix.patch similarity index 100% rename from toolchain/gcc/patches/5.4.0/270-musl-add-powerpc-softfloat-fix.patch rename to toolchain-old/gcc/patches/5.4.0/270-musl-add-powerpc-softfloat-fix.patch diff --git a/toolchain/gcc/patches/5.4.0/280-musl-disable-ifunc-by-default.patch b/toolchain-old/gcc/patches/5.4.0/280-musl-disable-ifunc-by-default.patch similarity index 100% rename from toolchain/gcc/patches/5.4.0/280-musl-disable-ifunc-by-default.patch rename to toolchain-old/gcc/patches/5.4.0/280-musl-disable-ifunc-by-default.patch diff --git a/toolchain/gcc/patches/5.4.0/300-mips_Os_cpu_rtx_cost_model.patch b/toolchain-old/gcc/patches/5.4.0/300-mips_Os_cpu_rtx_cost_model.patch similarity index 100% rename from toolchain/gcc/patches/5.4.0/300-mips_Os_cpu_rtx_cost_model.patch rename to toolchain-old/gcc/patches/5.4.0/300-mips_Os_cpu_rtx_cost_model.patch diff --git a/toolchain/gcc/patches/5.4.0/800-arm_v5te_no_ldrd_strd.patch b/toolchain-old/gcc/patches/5.4.0/800-arm_v5te_no_ldrd_strd.patch similarity index 100% rename from toolchain/gcc/patches/5.4.0/800-arm_v5te_no_ldrd_strd.patch rename to toolchain-old/gcc/patches/5.4.0/800-arm_v5te_no_ldrd_strd.patch diff --git a/toolchain/gcc/patches/5.4.0/810-arm-softfloat-libgcc.patch b/toolchain-old/gcc/patches/5.4.0/810-arm-softfloat-libgcc.patch similarity index 100% rename from toolchain/gcc/patches/5.4.0/810-arm-softfloat-libgcc.patch rename to toolchain-old/gcc/patches/5.4.0/810-arm-softfloat-libgcc.patch diff --git a/toolchain/gcc/patches/5.4.0/820-libgcc_pic.patch b/toolchain-old/gcc/patches/5.4.0/820-libgcc_pic.patch similarity index 100% rename from toolchain/gcc/patches/5.4.0/820-libgcc_pic.patch rename to toolchain-old/gcc/patches/5.4.0/820-libgcc_pic.patch diff --git a/toolchain/gcc/patches/5.4.0/830-arm_unbreak_armv4t.patch b/toolchain-old/gcc/patches/5.4.0/830-arm_unbreak_armv4t.patch similarity index 100% rename from toolchain/gcc/patches/5.4.0/830-arm_unbreak_armv4t.patch rename to toolchain-old/gcc/patches/5.4.0/830-arm_unbreak_armv4t.patch diff --git a/toolchain/gcc/patches/5.4.0/840-armv4_pass_fix-v4bx_to_ld.patch b/toolchain-old/gcc/patches/5.4.0/840-armv4_pass_fix-v4bx_to_ld.patch similarity index 100% rename from toolchain/gcc/patches/5.4.0/840-armv4_pass_fix-v4bx_to_ld.patch rename to toolchain-old/gcc/patches/5.4.0/840-armv4_pass_fix-v4bx_to_ld.patch diff --git a/toolchain/gcc/patches/5.4.0/850-use_shared_libgcc.patch b/toolchain-old/gcc/patches/5.4.0/850-use_shared_libgcc.patch similarity index 100% rename from toolchain/gcc/patches/5.4.0/850-use_shared_libgcc.patch rename to toolchain-old/gcc/patches/5.4.0/850-use_shared_libgcc.patch diff --git a/toolchain/gcc/patches/5.4.0/851-libgcc_no_compat.patch b/toolchain-old/gcc/patches/5.4.0/851-libgcc_no_compat.patch similarity index 100% rename from toolchain/gcc/patches/5.4.0/851-libgcc_no_compat.patch rename to toolchain-old/gcc/patches/5.4.0/851-libgcc_no_compat.patch diff --git a/toolchain/gcc/patches/5.4.0/870-ppc_no_crtsavres.patch b/toolchain-old/gcc/patches/5.4.0/870-ppc_no_crtsavres.patch similarity index 100% rename from toolchain/gcc/patches/5.4.0/870-ppc_no_crtsavres.patch rename to toolchain-old/gcc/patches/5.4.0/870-ppc_no_crtsavres.patch diff --git a/toolchain/gcc/patches/5.4.0/880-no_java_section.patch b/toolchain-old/gcc/patches/5.4.0/880-no_java_section.patch similarity index 100% rename from toolchain/gcc/patches/5.4.0/880-no_java_section.patch rename to toolchain-old/gcc/patches/5.4.0/880-no_java_section.patch diff --git a/toolchain/gcc/patches/5.4.0/881-no_tm_section.patch b/toolchain-old/gcc/patches/5.4.0/881-no_tm_section.patch similarity index 100% rename from toolchain/gcc/patches/5.4.0/881-no_tm_section.patch rename to toolchain-old/gcc/patches/5.4.0/881-no_tm_section.patch diff --git a/toolchain/gcc/patches/5.4.0/900-bad-mips16-crt.patch b/toolchain-old/gcc/patches/5.4.0/900-bad-mips16-crt.patch similarity index 100% rename from toolchain/gcc/patches/5.4.0/900-bad-mips16-crt.patch rename to toolchain-old/gcc/patches/5.4.0/900-bad-mips16-crt.patch diff --git a/toolchain/gcc/patches/5.4.0/910-mbsd_multi.patch b/toolchain-old/gcc/patches/5.4.0/910-mbsd_multi.patch similarity index 100% rename from toolchain/gcc/patches/5.4.0/910-mbsd_multi.patch rename to toolchain-old/gcc/patches/5.4.0/910-mbsd_multi.patch diff --git a/toolchain/gcc/patches/5.4.0/920-specs_nonfatal_getenv.patch b/toolchain-old/gcc/patches/5.4.0/920-specs_nonfatal_getenv.patch similarity index 100% rename from toolchain/gcc/patches/5.4.0/920-specs_nonfatal_getenv.patch rename to toolchain-old/gcc/patches/5.4.0/920-specs_nonfatal_getenv.patch diff --git a/toolchain/gcc/patches/5.4.0/930-fix-mips-noexecstack.patch b/toolchain-old/gcc/patches/5.4.0/930-fix-mips-noexecstack.patch similarity index 100% rename from toolchain/gcc/patches/5.4.0/930-fix-mips-noexecstack.patch rename to toolchain-old/gcc/patches/5.4.0/930-fix-mips-noexecstack.patch diff --git a/toolchain/gcc/patches/5.4.0/931-fix-MIPS-softfloat-build-issue.patch b/toolchain-old/gcc/patches/5.4.0/931-fix-MIPS-softfloat-build-issue.patch similarity index 100% rename from toolchain/gcc/patches/5.4.0/931-fix-MIPS-softfloat-build-issue.patch rename to toolchain-old/gcc/patches/5.4.0/931-fix-MIPS-softfloat-build-issue.patch diff --git a/toolchain/gcc/patches/5.4.0/940-no-clobber-stamp-bits.patch b/toolchain-old/gcc/patches/5.4.0/940-no-clobber-stamp-bits.patch similarity index 100% rename from toolchain/gcc/patches/5.4.0/940-no-clobber-stamp-bits.patch rename to toolchain-old/gcc/patches/5.4.0/940-no-clobber-stamp-bits.patch diff --git a/toolchain/gcc/patches/5.4.0/950-cpp_file_path_translation.patch b/toolchain-old/gcc/patches/5.4.0/950-cpp_file_path_translation.patch similarity index 100% rename from toolchain/gcc/patches/5.4.0/950-cpp_file_path_translation.patch rename to toolchain-old/gcc/patches/5.4.0/950-cpp_file_path_translation.patch diff --git a/toolchain/gcc/patches/5.4.0/960-go_libm.patch b/toolchain-old/gcc/patches/5.4.0/960-go_libm.patch similarity index 100% rename from toolchain/gcc/patches/5.4.0/960-go_libm.patch rename to toolchain-old/gcc/patches/5.4.0/960-go_libm.patch diff --git a/toolchain/gcc/patches/5.4.0/970-warn_bug.patch b/toolchain-old/gcc/patches/5.4.0/970-warn_bug.patch similarity index 100% rename from toolchain/gcc/patches/5.4.0/970-warn_bug.patch rename to toolchain-old/gcc/patches/5.4.0/970-warn_bug.patch diff --git a/toolchain-old/gcc/patches/6.3.0/001-revert_register_mode_search.patch b/toolchain-old/gcc/patches/6.3.0/001-revert_register_mode_search.patch new file mode 100644 index 000000000..bd6fbdb4a --- /dev/null +++ b/toolchain-old/gcc/patches/6.3.0/001-revert_register_mode_search.patch @@ -0,0 +1,65 @@ +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 +@@ -625,35 +625,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.1.0/002-case_insensitive.patch b/toolchain-old/gcc/patches/6.3.0/002-case_insensitive.patch similarity index 100% rename from toolchain/gcc/patches/7.1.0/002-case_insensitive.patch rename to toolchain-old/gcc/patches/6.3.0/002-case_insensitive.patch diff --git a/toolchain-old/gcc/patches/6.3.0/010-documentation.patch b/toolchain-old/gcc/patches/6.3.0/010-documentation.patch new file mode 100644 index 000000000..2adb28c83 --- /dev/null +++ b/toolchain-old/gcc/patches/6.3.0/010-documentation.patch @@ -0,0 +1,23 @@ +--- a/gcc/Makefile.in ++++ b/gcc/Makefile.in +@@ -3021,18 +3021,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-old/gcc/patches/6.3.0/230-musl_libssp.patch b/toolchain-old/gcc/patches/6.3.0/230-musl_libssp.patch new file mode 100644 index 000000000..8dfd1fc28 --- /dev/null +++ b/toolchain-old/gcc/patches/6.3.0/230-musl_libssp.patch @@ -0,0 +1,13 @@ +--- a/gcc/gcc.c ++++ b/gcc/gcc.c +@@ -858,7 +858,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-old/gcc/patches/6.3.0/280-musl-disable-ifunc-by-default.patch b/toolchain-old/gcc/patches/6.3.0/280-musl-disable-ifunc-by-default.patch new file mode 100644 index 000000000..df09e4f63 --- /dev/null +++ b/toolchain-old/gcc/patches/6.3.0/280-musl-disable-ifunc-by-default.patch @@ -0,0 +1,36 @@ +From 450fb05e2a7510d37744f044009f8237d902f65c Mon Sep 17 00:00:00 2001 +From: nsz +Date: Tue, 30 Aug 2016 10:26:22 +0000 +Subject: [PATCH] disable ifunc on *-musl by default + +gcc/ + * config.gcc (*-*-*musl*): Disable gnu-indirect-function. + + + +git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@239859 138bc75d-0d04-0410-961f-82ee72b054a4 +--- + gcc/ChangeLog | 4 ++++ + gcc/config.gcc | 4 ++-- + 2 files changed, 6 insertions(+), 2 deletions(-) + +--- a/gcc/config.gcc ++++ b/gcc/config.gcc +@@ -1495,7 +1495,7 @@ i[34567]86-*-linux* | i[34567]86-*-kfree + extra_options="${extra_options} linux-android.opt" + # Assume modern glibc if not targeting Android nor uclibc. + case ${target} in +- *-*-*android*|*-*-*uclibc*) ++ *-*-*android*|*-*-*uclibc*|*-*-*musl*) + ;; + *) + default_gnu_indirect_function=yes +@@ -1564,7 +1564,7 @@ x86_64-*-linux* | x86_64-*-kfreebsd*-gnu + extra_options="${extra_options} linux-android.opt" + # Assume modern glibc if not targeting Android nor uclibc. + case ${target} in +- *-*-*android*|*-*-*uclibc*) ++ *-*-*android*|*-*-*uclibc*|*-*-*musl*) + ;; + *) + default_gnu_indirect_function=yes diff --git a/toolchain-old/gcc/patches/6.3.0/300-mips_Os_cpu_rtx_cost_model.patch b/toolchain-old/gcc/patches/6.3.0/300-mips_Os_cpu_rtx_cost_model.patch new file mode 100644 index 000000000..d76bd8cb1 --- /dev/null +++ b/toolchain-old/gcc/patches/6.3.0/300-mips_Os_cpu_rtx_cost_model.patch @@ -0,0 +1,11 @@ +--- a/gcc/config/mips/mips.c ++++ b/gcc/config/mips/mips.c +@@ -17928,7 +17928,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-old/gcc/patches/6.3.0/800-arm_v5te_no_ldrd_strd.patch b/toolchain-old/gcc/patches/6.3.0/800-arm_v5te_no_ldrd_strd.patch new file mode 100644 index 000000000..2e7c23f85 --- /dev/null +++ b/toolchain-old/gcc/patches/6.3.0/800-arm_v5te_no_ldrd_strd.patch @@ -0,0 +1,11 @@ +--- a/gcc/config/arm/arm.h ++++ b/gcc/config/arm/arm.h +@@ -166,7 +166,7 @@ extern void (*arm_lang_output_object_att + /* 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-old/gcc/patches/6.3.0/810-arm-softfloat-libgcc.patch b/toolchain-old/gcc/patches/6.3.0/810-arm-softfloat-libgcc.patch new file mode 100644 index 000000000..1d06f5b2e --- /dev/null +++ b/toolchain-old/gcc/patches/6.3.0/810-arm-softfloat-libgcc.patch @@ -0,0 +1,25 @@ +--- 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 +@@ -60,8 +60,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-old/gcc/patches/6.3.0/820-libgcc_pic.patch b/toolchain-old/gcc/patches/6.3.0/820-libgcc_pic.patch new file mode 100644 index 000000000..f925d96f6 --- /dev/null +++ b/toolchain-old/gcc/patches/6.3.0/820-libgcc_pic.patch @@ -0,0 +1,36 @@ +--- a/libgcc/Makefile.in ++++ b/libgcc/Makefile.in +@@ -888,11 +888,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)"; \ +@@ -913,7 +914,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) +@@ -1115,6 +1116,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-old/gcc/patches/6.3.0/830-arm_unbreak_armv4t.patch b/toolchain-old/gcc/patches/6.3.0/830-arm_unbreak_armv4t.patch new file mode 100644 index 000000000..37f8f2a54 --- /dev/null +++ b/toolchain-old/gcc/patches/6.3.0/830-arm_unbreak_armv4t.patch @@ -0,0 +1,13 @@ +http://sourceware.org/ml/crossgcc/2008-05/msg00009.html + +--- a/gcc/config/arm/linux-eabi.h ++++ b/gcc/config/arm/linux-eabi.h +@@ -45,7 +45,7 @@ + The ARM10TDMI core is the default for armv5t, so set + SUBTARGET_CPU_DEFAULT to achieve this. */ + #undef SUBTARGET_CPU_DEFAULT +-#define SUBTARGET_CPU_DEFAULT TARGET_CPU_arm10tdmi ++#define SUBTARGET_CPU_DEFAULT TARGET_CPU_arm9tdmi + + /* TARGET_BIG_ENDIAN_DEFAULT is set in + config.gcc for big endian configurations. */ diff --git a/toolchain-old/gcc/patches/6.3.0/840-armv4_pass_fix-v4bx_to_ld.patch b/toolchain-old/gcc/patches/6.3.0/840-armv4_pass_fix-v4bx_to_ld.patch new file mode 100644 index 000000000..cb1fb9823 --- /dev/null +++ b/toolchain-old/gcc/patches/6.3.0/840-armv4_pass_fix-v4bx_to_ld.patch @@ -0,0 +1,19 @@ +--- a/gcc/config/arm/linux-eabi.h ++++ b/gcc/config/arm/linux-eabi.h +@@ -94,10 +94,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-old/gcc/patches/6.3.0/850-use_shared_libgcc.patch b/toolchain-old/gcc/patches/6.3.0/850-use_shared_libgcc.patch new file mode 100644 index 000000000..cd20244c6 --- /dev/null +++ b/toolchain-old/gcc/patches/6.3.0/850-use_shared_libgcc.patch @@ -0,0 +1,47 @@ +--- a/gcc/config/arm/linux-eabi.h ++++ b/gcc/config/arm/linux-eabi.h +@@ -132,10 +132,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 +@@ -132,5 +132,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.1.0/851-libgcc_no_compat.patch b/toolchain-old/gcc/patches/6.3.0/851-libgcc_no_compat.patch similarity index 100% rename from toolchain/gcc/patches/7.1.0/851-libgcc_no_compat.patch rename to toolchain-old/gcc/patches/6.3.0/851-libgcc_no_compat.patch diff --git a/toolchain-old/gcc/patches/6.3.0/870-ppc_no_crtsavres.patch b/toolchain-old/gcc/patches/6.3.0/870-ppc_no_crtsavres.patch new file mode 100644 index 000000000..9e543a0fc --- /dev/null +++ b/toolchain-old/gcc/patches/6.3.0/870-ppc_no_crtsavres.patch @@ -0,0 +1,11 @@ +--- a/gcc/config/rs6000/rs6000.c ++++ b/gcc/config/rs6000/rs6000.c +@@ -24171,7 +24171,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-old/gcc/patches/6.3.0/880-no_java_section.patch b/toolchain-old/gcc/patches/6.3.0/880-no_java_section.patch new file mode 100644 index 000000000..0fa9e627c --- /dev/null +++ b/toolchain-old/gcc/patches/6.3.0/880-no_java_section.patch @@ -0,0 +1,11 @@ +--- a/gcc/defaults.h ++++ b/gcc/defaults.h +@@ -395,7 +395,7 @@ see the files COPYING3 and COPYING.RUNTI + /* If we have named section and we support weak symbols, then use the + .jcr section for recording java classes which need to be registered + at program start-up time. */ +-#if defined (TARGET_ASM_NAMED_SECTION) && SUPPORTS_WEAK ++#if 0 && defined (TARGET_ASM_NAMED_SECTION) && SUPPORTS_WEAK + #ifndef JCR_SECTION_NAME + #define JCR_SECTION_NAME ".jcr" + #endif diff --git a/toolchain/gcc/patches/7.1.0/881-no_tm_section.patch b/toolchain-old/gcc/patches/6.3.0/881-no_tm_section.patch similarity index 100% rename from toolchain/gcc/patches/7.1.0/881-no_tm_section.patch rename to toolchain-old/gcc/patches/6.3.0/881-no_tm_section.patch diff --git a/toolchain/gcc/patches/7.1.0/900-bad-mips16-crt.patch b/toolchain-old/gcc/patches/6.3.0/900-bad-mips16-crt.patch similarity index 100% rename from toolchain/gcc/patches/7.1.0/900-bad-mips16-crt.patch rename to toolchain-old/gcc/patches/6.3.0/900-bad-mips16-crt.patch diff --git a/toolchain-old/gcc/patches/6.3.0/910-mbsd_multi.patch b/toolchain-old/gcc/patches/6.3.0/910-mbsd_multi.patch new file mode 100644 index 000000000..b747935f0 --- /dev/null +++ b/toolchain-old/gcc/patches/6.3.0/910-mbsd_multi.patch @@ -0,0 +1,222 @@ + + This patch brings over a few features 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. + * -Werror-maybe-reset + Has the effect of -Wno-error if GCC_NO_WERROR is + set and not '0', a no-operation otherwise. This is + to be able to use -Werror in "make" but prevent + GNU autoconf generated configure scripts from + freaking out. + + 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 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); +@@ -442,6 +445,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; +@@ -1041,6 +1050,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 +@@ -438,6 +438,10 @@ Wfloat-conversion + C ObjC C++ ObjC++ Var(warn_float_conversion) Warning LangEnabledBy(C ObjC C++ ObjC++,Wconversion) + Warn for implicit type conversions that cause loss of floating point precision. + ++Werror-maybe-reset ++C ObjC C++ ObjC++ ++; Documented in common.opt ++ + Wfloat-equal + C ObjC C++ ObjC++ Var(warn_float_equal) Warning + Warn if testing floating point numbers for equality. +@@ -1252,6 +1256,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 +@@ -581,6 +581,10 @@ Werror= + Common Joined + Treat specified warning as error. + ++Werror-maybe-reset ++Common ++If environment variable GCC_NO_WERROR is set, act as -Wno-error ++ + Wextra + Common Var(extra_warnings) Warning + Print extra (possibly unwanted) warnings. +@@ -1432,6 +1436,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 +@@ -1783,6 +1783,17 @@ common_handle_option (struct gcc_options + opts, opts_set, loc, dc); + break; + ++ case OPT_Werror_maybe_reset: ++ { ++ char *ev = getenv ("GCC_NO_WERROR"); ++ if ((ev != NULL) && (*ev != '0')) ++ warnings_are_errors = 0; ++ } ++ 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/cppopts.texi ++++ b/gcc/doc/cppopts.texi +@@ -163,6 +163,11 @@ in older programs. This warning is on b + Make all warnings into hard errors. Source code which triggers warnings + will be rejected. + ++@item -Werror-maybe-reset ++@opindex Werror-maybe-reset ++Act like @samp{-Wno-error} if the @env{GCC_NO_WERROR} environment ++variable is set to anything other than 0 or empty. ++ + @item -Wsystem-headers + @opindex Wsystem-headers + Issue warnings for code in system headers. These are normally unhelpful +--- a/gcc/doc/invoke.texi ++++ b/gcc/doc/invoke.texi +@@ -263,7 +263,7 @@ Objective-C and Objective-C++ Dialects}. + -Wno-discarded-qualifiers -Wno-discarded-array-qualifiers @gol + -Wno-div-by-zero -Wdouble-promotion -Wduplicated-cond @gol + -Wempty-body -Wenum-compare -Wno-endif-labels @gol +--Werror -Werror=* -Wfatal-errors -Wfloat-equal -Wformat -Wformat=2 @gol ++-Werror -Werror=* -Werror-maybe-reset -Wfatal-errors -Wfloat-equal -Wformat -Wformat=2 @gol + -Wno-format-contains-nul -Wno-format-extra-args -Wformat-nonliteral @gol + -Wformat-security -Wformat-signedness -Wformat-y2k -Wframe-address @gol + -Wframe-larger-than=@var{len} -Wno-free-nonheap-object -Wjump-misses-init @gol +@@ -5737,6 +5737,22 @@ This option is only supported for C and + @option{-Wall} and by @option{-Wpedantic}, which can be disabled with + @option{-Wno-pointer-sign}. + ++@item -Werror-maybe-reset ++@opindex Werror-maybe-reset ++Act like @samp{-Wno-error} if the @env{GCC_NO_WERROR} environment ++variable is set to anything other than 0 or empty. ++ ++@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 +@@ -6605,7 +6621,7 @@ so, the first branch is redirected to ei + second branch or a point immediately following it, depending on whether + the condition is known to be true or false. + +-Enabled at levels @option{-O2}, @option{-O3}, @option{-Os}. ++Enabled at levels @option{-O3}. + + @item -fsplit-wide-types + @opindex fsplit-wide-types +--- a/gcc/java/jvspec.c ++++ b/gcc/java/jvspec.c +@@ -629,6 +629,7 @@ lang_specific_pre_link (void) + class name. Append dummy `.c' that can be stripped by set_input so %b + is correct. */ + set_input (concat (main_class_name, "main.c", NULL)); ++ putenv ("GCC_HONOUR_COPTS=s"); /* XXX hack! */ + err = do_spec (jvgenmain_spec); + if (err == 0) + { diff --git a/toolchain-old/gcc/patches/6.3.0/920-specs_nonfatal_getenv.patch b/toolchain-old/gcc/patches/6.3.0/920-specs_nonfatal_getenv.patch new file mode 100644 index 000000000..dc0acb95a --- /dev/null +++ b/toolchain-old/gcc/patches/6.3.0/920-specs_nonfatal_getenv.patch @@ -0,0 +1,15 @@ +--- a/gcc/gcc.c ++++ b/gcc/gcc.c +@@ -9198,8 +9198,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-old/gcc/patches/6.3.0/930-fix-mips-noexecstack.patch b/toolchain-old/gcc/patches/6.3.0/930-fix-mips-noexecstack.patch new file mode 100644 index 000000000..2a99840b6 --- /dev/null +++ b/toolchain-old/gcc/patches/6.3.0/930-fix-mips-noexecstack.patch @@ -0,0 +1,111 @@ +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 +@@ -20228,6 +20228,9 @@ mips_promote_function_mode (const_tree t + #undef TARGET_HARD_REGNO_SCRATCH_OK + #define TARGET_HARD_REGNO_SCRATCH_OK mips_hard_regno_scratch_ok + ++#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-old/gcc/patches/6.3.0/940-no-clobber-stamp-bits.patch b/toolchain-old/gcc/patches/6.3.0/940-no-clobber-stamp-bits.patch new file mode 100644 index 000000000..68e62865b --- /dev/null +++ b/toolchain-old/gcc/patches/6.3.0/940-no-clobber-stamp-bits.patch @@ -0,0 +1,11 @@ +--- a/libstdc++-v3/include/Makefile.in ++++ b/libstdc++-v3/include/Makefile.in +@@ -1459,7 +1459,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-old/gcc/patches/6.3.0/950-cpp_file_path_translation.patch b/toolchain-old/gcc/patches/6.3.0/950-cpp_file_path_translation.patch new file mode 100644 index 000000000..d467eb7c9 --- /dev/null +++ b/toolchain-old/gcc/patches/6.3.0/950-cpp_file_path_translation.patch @@ -0,0 +1,182 @@ +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 +@@ -574,6 +574,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 +@@ -1632,6 +1632,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 +@@ -4444,6 +4444,7 @@ without notice. + @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{-W}@var{warn}@dots{}] + [@option{-M}|@option{-MM}] [@option{-MG}] [@option{-MF} @var{filename}] + [@option{-MP}] [@option{-MQ} @var{target}@dots{}] +--- a/gcc/doc/cppopts.texi ++++ b/gcc/doc/cppopts.texi +@@ -532,6 +532,12 @@ Search @var{dir} only for header files r + If @var{dir} begins with @code{=}, then the @code{=} will be replaced + by the sysroot prefix; see @option{--sysroot} and @option{-isysroot}. + ++@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 +@@ -476,8 +476,8 @@ Objective-C and Objective-C++ Dialects}. + @item Directory Options + @xref{Directory Options,,Options for Directory Search}. + @gccoptlist{-B@var{prefix} -I@var{dir} -iplugindir=@var{dir} @gol +--iquote@var{dir} -L@var{dir} -no-canonical-prefixes -I- @gol +---sysroot=@var{dir} --no-sysroot-suffix} ++-iquote@var{dir} -iremap@var{src}:@var{dst} -L@var{dir} -no-canonical-prefixes @gol ++-I- --sysroot=@var{dir} --no-sysroot-suffix} + + @item Code Generation Options + @xref{Code Gen Options,,Options for Code Generation Conventions}. +@@ -10861,6 +10861,12 @@ be searched for header files only for th + "@var{file}"}; they are not searched for @code{#include <@var{file}>}, + otherwise just like @option{-I}. + ++@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 +@@ -760,6 +760,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-old/gcc/patches/6.3.0/960-fix-ubsan-defref.patch b/toolchain-old/gcc/patches/6.3.0/960-fix-ubsan-defref.patch new file mode 100644 index 000000000..72d86c149 --- /dev/null +++ b/toolchain-old/gcc/patches/6.3.0/960-fix-ubsan-defref.patch @@ -0,0 +1,11 @@ +--- a/gcc/ubsan.c ++++ b/gcc/ubsan.c +@@ -1471,7 +1471,7 @@ ubsan_use_new_style_p (location_t loc) + + expanded_location xloc = expand_location (loc); + if (xloc.file == NULL || strncmp (xloc.file, "\1", 2) == 0 +- || xloc.file == '\0' || xloc.file[0] == '\xff' ++ || xloc.file[0] == '\0' || xloc.file[0] == '\xff' + || xloc.file[1] == '\xff') + return false; + diff --git a/toolchain/gcc/patches/7.1.0/001-revert_register_mode_search.patch b/toolchain-old/gcc/patches/7.1.0/001-revert_register_mode_search.patch similarity index 100% rename from toolchain/gcc/patches/7.1.0/001-revert_register_mode_search.patch rename to toolchain-old/gcc/patches/7.1.0/001-revert_register_mode_search.patch diff --git a/toolchain-old/gcc/patches/7.1.0/002-case_insensitive.patch b/toolchain-old/gcc/patches/7.1.0/002-case_insensitive.patch new file mode 100644 index 000000000..b3d2dbe29 --- /dev/null +++ b/toolchain-old/gcc/patches/7.1.0/002-case_insensitive.patch @@ -0,0 +1,14 @@ +--- 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/7.1.0/010-documentation.patch b/toolchain-old/gcc/patches/7.1.0/010-documentation.patch similarity index 100% rename from toolchain/gcc/patches/7.1.0/010-documentation.patch rename to toolchain-old/gcc/patches/7.1.0/010-documentation.patch diff --git a/toolchain/gcc/patches/7.1.0/230-musl_libssp.patch b/toolchain-old/gcc/patches/7.1.0/230-musl_libssp.patch similarity index 100% rename from toolchain/gcc/patches/7.1.0/230-musl_libssp.patch rename to toolchain-old/gcc/patches/7.1.0/230-musl_libssp.patch diff --git a/toolchain/gcc/patches/7.1.0/300-mips_Os_cpu_rtx_cost_model.patch b/toolchain-old/gcc/patches/7.1.0/300-mips_Os_cpu_rtx_cost_model.patch similarity index 100% rename from toolchain/gcc/patches/7.1.0/300-mips_Os_cpu_rtx_cost_model.patch rename to toolchain-old/gcc/patches/7.1.0/300-mips_Os_cpu_rtx_cost_model.patch diff --git a/toolchain/gcc/patches/7.1.0/800-arm_v5te_no_ldrd_strd.patch b/toolchain-old/gcc/patches/7.1.0/800-arm_v5te_no_ldrd_strd.patch similarity index 100% rename from toolchain/gcc/patches/7.1.0/800-arm_v5te_no_ldrd_strd.patch rename to toolchain-old/gcc/patches/7.1.0/800-arm_v5te_no_ldrd_strd.patch diff --git a/toolchain/gcc/patches/7.1.0/810-arm-softfloat-libgcc.patch b/toolchain-old/gcc/patches/7.1.0/810-arm-softfloat-libgcc.patch similarity index 100% rename from toolchain/gcc/patches/7.1.0/810-arm-softfloat-libgcc.patch rename to toolchain-old/gcc/patches/7.1.0/810-arm-softfloat-libgcc.patch diff --git a/toolchain/gcc/patches/7.1.0/820-libgcc_pic.patch b/toolchain-old/gcc/patches/7.1.0/820-libgcc_pic.patch similarity index 100% rename from toolchain/gcc/patches/7.1.0/820-libgcc_pic.patch rename to toolchain-old/gcc/patches/7.1.0/820-libgcc_pic.patch diff --git a/toolchain/gcc/patches/7.1.0/840-armv4_pass_fix-v4bx_to_ld.patch b/toolchain-old/gcc/patches/7.1.0/840-armv4_pass_fix-v4bx_to_ld.patch similarity index 100% rename from toolchain/gcc/patches/7.1.0/840-armv4_pass_fix-v4bx_to_ld.patch rename to toolchain-old/gcc/patches/7.1.0/840-armv4_pass_fix-v4bx_to_ld.patch diff --git a/toolchain/gcc/patches/7.1.0/850-use_shared_libgcc.patch b/toolchain-old/gcc/patches/7.1.0/850-use_shared_libgcc.patch similarity index 100% rename from toolchain/gcc/patches/7.1.0/850-use_shared_libgcc.patch rename to toolchain-old/gcc/patches/7.1.0/850-use_shared_libgcc.patch diff --git a/toolchain-old/gcc/patches/7.1.0/851-libgcc_no_compat.patch b/toolchain-old/gcc/patches/7.1.0/851-libgcc_no_compat.patch new file mode 100644 index 000000000..80c347684 --- /dev/null +++ b/toolchain-old/gcc/patches/7.1.0/851-libgcc_no_compat.patch @@ -0,0 +1,12 @@ +--- 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/7.1.0/870-ppc_no_crtsavres.patch b/toolchain-old/gcc/patches/7.1.0/870-ppc_no_crtsavres.patch similarity index 100% rename from toolchain/gcc/patches/7.1.0/870-ppc_no_crtsavres.patch rename to toolchain-old/gcc/patches/7.1.0/870-ppc_no_crtsavres.patch diff --git a/toolchain-old/gcc/patches/7.1.0/881-no_tm_section.patch b/toolchain-old/gcc/patches/7.1.0/881-no_tm_section.patch new file mode 100644 index 000000000..fab5db3be --- /dev/null +++ b/toolchain-old/gcc/patches/7.1.0/881-no_tm_section.patch @@ -0,0 +1,11 @@ +--- 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-old/gcc/patches/7.1.0/900-bad-mips16-crt.patch b/toolchain-old/gcc/patches/7.1.0/900-bad-mips16-crt.patch new file mode 100644 index 000000000..dd6e9dc88 --- /dev/null +++ b/toolchain-old/gcc/patches/7.1.0/900-bad-mips16-crt.patch @@ -0,0 +1,9 @@ +--- 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.1.0/910-mbsd_multi.patch b/toolchain-old/gcc/patches/7.1.0/910-mbsd_multi.patch similarity index 100% rename from toolchain/gcc/patches/7.1.0/910-mbsd_multi.patch rename to toolchain-old/gcc/patches/7.1.0/910-mbsd_multi.patch diff --git a/toolchain/gcc/patches/7.1.0/920-specs_nonfatal_getenv.patch b/toolchain-old/gcc/patches/7.1.0/920-specs_nonfatal_getenv.patch similarity index 100% rename from toolchain/gcc/patches/7.1.0/920-specs_nonfatal_getenv.patch rename to toolchain-old/gcc/patches/7.1.0/920-specs_nonfatal_getenv.patch diff --git a/toolchain/gcc/patches/7.1.0/930-fix-mips-noexecstack.patch b/toolchain-old/gcc/patches/7.1.0/930-fix-mips-noexecstack.patch similarity index 100% rename from toolchain/gcc/patches/7.1.0/930-fix-mips-noexecstack.patch rename to toolchain-old/gcc/patches/7.1.0/930-fix-mips-noexecstack.patch diff --git a/toolchain/gcc/patches/7.1.0/940-no-clobber-stamp-bits.patch b/toolchain-old/gcc/patches/7.1.0/940-no-clobber-stamp-bits.patch similarity index 100% rename from toolchain/gcc/patches/7.1.0/940-no-clobber-stamp-bits.patch rename to toolchain-old/gcc/patches/7.1.0/940-no-clobber-stamp-bits.patch diff --git a/toolchain/gcc/patches/7.1.0/950-cpp_file_path_translation.patch b/toolchain-old/gcc/patches/7.1.0/950-cpp_file_path_translation.patch similarity index 100% rename from toolchain/gcc/patches/7.1.0/950-cpp_file_path_translation.patch rename to toolchain-old/gcc/patches/7.1.0/950-cpp_file_path_translation.patch diff --git a/toolchain-old/gcc/patches/arc-2017.03-release/001-revert_register_mode_search.patch b/toolchain-old/gcc/patches/arc-2017.03-release/001-revert_register_mode_search.patch new file mode 100644 index 000000000..bd6fbdb4a --- /dev/null +++ b/toolchain-old/gcc/patches/arc-2017.03-release/001-revert_register_mode_search.patch @@ -0,0 +1,65 @@ +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 +@@ -625,35 +625,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-old/gcc/patches/arc-2017.03-release/002-case_insensitive.patch b/toolchain-old/gcc/patches/arc-2017.03-release/002-case_insensitive.patch new file mode 100644 index 000000000..b3d2dbe29 --- /dev/null +++ b/toolchain-old/gcc/patches/arc-2017.03-release/002-case_insensitive.patch @@ -0,0 +1,14 @@ +--- 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-old/gcc/patches/arc-2017.03-release/010-documentation.patch b/toolchain-old/gcc/patches/arc-2017.03-release/010-documentation.patch new file mode 100644 index 000000000..2adb28c83 --- /dev/null +++ b/toolchain-old/gcc/patches/arc-2017.03-release/010-documentation.patch @@ -0,0 +1,23 @@ +--- a/gcc/Makefile.in ++++ b/gcc/Makefile.in +@@ -3021,18 +3021,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-old/gcc/patches/arc-2017.03-release/230-musl_libssp.patch b/toolchain-old/gcc/patches/arc-2017.03-release/230-musl_libssp.patch new file mode 100644 index 000000000..8dfd1fc28 --- /dev/null +++ b/toolchain-old/gcc/patches/arc-2017.03-release/230-musl_libssp.patch @@ -0,0 +1,13 @@ +--- a/gcc/gcc.c ++++ b/gcc/gcc.c +@@ -858,7 +858,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-old/gcc/patches/arc-2017.03-release/280-musl-disable-ifunc-by-default.patch b/toolchain-old/gcc/patches/arc-2017.03-release/280-musl-disable-ifunc-by-default.patch new file mode 100644 index 000000000..df09e4f63 --- /dev/null +++ b/toolchain-old/gcc/patches/arc-2017.03-release/280-musl-disable-ifunc-by-default.patch @@ -0,0 +1,36 @@ +From 450fb05e2a7510d37744f044009f8237d902f65c Mon Sep 17 00:00:00 2001 +From: nsz +Date: Tue, 30 Aug 2016 10:26:22 +0000 +Subject: [PATCH] disable ifunc on *-musl by default + +gcc/ + * config.gcc (*-*-*musl*): Disable gnu-indirect-function. + + + +git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@239859 138bc75d-0d04-0410-961f-82ee72b054a4 +--- + gcc/ChangeLog | 4 ++++ + gcc/config.gcc | 4 ++-- + 2 files changed, 6 insertions(+), 2 deletions(-) + +--- a/gcc/config.gcc ++++ b/gcc/config.gcc +@@ -1495,7 +1495,7 @@ i[34567]86-*-linux* | i[34567]86-*-kfree + extra_options="${extra_options} linux-android.opt" + # Assume modern glibc if not targeting Android nor uclibc. + case ${target} in +- *-*-*android*|*-*-*uclibc*) ++ *-*-*android*|*-*-*uclibc*|*-*-*musl*) + ;; + *) + default_gnu_indirect_function=yes +@@ -1564,7 +1564,7 @@ x86_64-*-linux* | x86_64-*-kfreebsd*-gnu + extra_options="${extra_options} linux-android.opt" + # Assume modern glibc if not targeting Android nor uclibc. + case ${target} in +- *-*-*android*|*-*-*uclibc*) ++ *-*-*android*|*-*-*uclibc*|*-*-*musl*) + ;; + *) + default_gnu_indirect_function=yes diff --git a/toolchain-old/gcc/patches/arc-2017.03-release/300-mips_Os_cpu_rtx_cost_model.patch b/toolchain-old/gcc/patches/arc-2017.03-release/300-mips_Os_cpu_rtx_cost_model.patch new file mode 100644 index 000000000..d76bd8cb1 --- /dev/null +++ b/toolchain-old/gcc/patches/arc-2017.03-release/300-mips_Os_cpu_rtx_cost_model.patch @@ -0,0 +1,11 @@ +--- a/gcc/config/mips/mips.c ++++ b/gcc/config/mips/mips.c +@@ -17928,7 +17928,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-old/gcc/patches/arc-2017.03-release/800-arm_v5te_no_ldrd_strd.patch b/toolchain-old/gcc/patches/arc-2017.03-release/800-arm_v5te_no_ldrd_strd.patch new file mode 100644 index 000000000..2e7c23f85 --- /dev/null +++ b/toolchain-old/gcc/patches/arc-2017.03-release/800-arm_v5te_no_ldrd_strd.patch @@ -0,0 +1,11 @@ +--- a/gcc/config/arm/arm.h ++++ b/gcc/config/arm/arm.h +@@ -166,7 +166,7 @@ extern void (*arm_lang_output_object_att + /* 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-old/gcc/patches/arc-2017.03-release/810-arm-softfloat-libgcc.patch b/toolchain-old/gcc/patches/arc-2017.03-release/810-arm-softfloat-libgcc.patch new file mode 100644 index 000000000..1d06f5b2e --- /dev/null +++ b/toolchain-old/gcc/patches/arc-2017.03-release/810-arm-softfloat-libgcc.patch @@ -0,0 +1,25 @@ +--- 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 +@@ -60,8 +60,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-old/gcc/patches/arc-2017.03-release/820-libgcc_pic.patch b/toolchain-old/gcc/patches/arc-2017.03-release/820-libgcc_pic.patch new file mode 100644 index 000000000..f925d96f6 --- /dev/null +++ b/toolchain-old/gcc/patches/arc-2017.03-release/820-libgcc_pic.patch @@ -0,0 +1,36 @@ +--- a/libgcc/Makefile.in ++++ b/libgcc/Makefile.in +@@ -888,11 +888,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)"; \ +@@ -913,7 +914,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) +@@ -1115,6 +1116,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-old/gcc/patches/arc-2017.03-release/830-arm_unbreak_armv4t.patch b/toolchain-old/gcc/patches/arc-2017.03-release/830-arm_unbreak_armv4t.patch new file mode 100644 index 000000000..37f8f2a54 --- /dev/null +++ b/toolchain-old/gcc/patches/arc-2017.03-release/830-arm_unbreak_armv4t.patch @@ -0,0 +1,13 @@ +http://sourceware.org/ml/crossgcc/2008-05/msg00009.html + +--- a/gcc/config/arm/linux-eabi.h ++++ b/gcc/config/arm/linux-eabi.h +@@ -45,7 +45,7 @@ + The ARM10TDMI core is the default for armv5t, so set + SUBTARGET_CPU_DEFAULT to achieve this. */ + #undef SUBTARGET_CPU_DEFAULT +-#define SUBTARGET_CPU_DEFAULT TARGET_CPU_arm10tdmi ++#define SUBTARGET_CPU_DEFAULT TARGET_CPU_arm9tdmi + + /* TARGET_BIG_ENDIAN_DEFAULT is set in + config.gcc for big endian configurations. */ diff --git a/toolchain-old/gcc/patches/arc-2017.03-release/840-armv4_pass_fix-v4bx_to_ld.patch b/toolchain-old/gcc/patches/arc-2017.03-release/840-armv4_pass_fix-v4bx_to_ld.patch new file mode 100644 index 000000000..cb1fb9823 --- /dev/null +++ b/toolchain-old/gcc/patches/arc-2017.03-release/840-armv4_pass_fix-v4bx_to_ld.patch @@ -0,0 +1,19 @@ +--- a/gcc/config/arm/linux-eabi.h ++++ b/gcc/config/arm/linux-eabi.h +@@ -94,10 +94,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-old/gcc/patches/arc-2017.03-release/850-use_shared_libgcc.patch b/toolchain-old/gcc/patches/arc-2017.03-release/850-use_shared_libgcc.patch new file mode 100644 index 000000000..cd20244c6 --- /dev/null +++ b/toolchain-old/gcc/patches/arc-2017.03-release/850-use_shared_libgcc.patch @@ -0,0 +1,47 @@ +--- a/gcc/config/arm/linux-eabi.h ++++ b/gcc/config/arm/linux-eabi.h +@@ -132,10 +132,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 +@@ -132,5 +132,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-old/gcc/patches/arc-2017.03-release/851-libgcc_no_compat.patch b/toolchain-old/gcc/patches/arc-2017.03-release/851-libgcc_no_compat.patch new file mode 100644 index 000000000..80c347684 --- /dev/null +++ b/toolchain-old/gcc/patches/arc-2017.03-release/851-libgcc_no_compat.patch @@ -0,0 +1,12 @@ +--- 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-old/gcc/patches/arc-2017.03-release/870-ppc_no_crtsavres.patch b/toolchain-old/gcc/patches/arc-2017.03-release/870-ppc_no_crtsavres.patch new file mode 100644 index 000000000..9e543a0fc --- /dev/null +++ b/toolchain-old/gcc/patches/arc-2017.03-release/870-ppc_no_crtsavres.patch @@ -0,0 +1,11 @@ +--- a/gcc/config/rs6000/rs6000.c ++++ b/gcc/config/rs6000/rs6000.c +@@ -24171,7 +24171,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-old/gcc/patches/arc-2017.03-release/880-no_java_section.patch b/toolchain-old/gcc/patches/arc-2017.03-release/880-no_java_section.patch new file mode 100644 index 000000000..0fa9e627c --- /dev/null +++ b/toolchain-old/gcc/patches/arc-2017.03-release/880-no_java_section.patch @@ -0,0 +1,11 @@ +--- a/gcc/defaults.h ++++ b/gcc/defaults.h +@@ -395,7 +395,7 @@ see the files COPYING3 and COPYING.RUNTI + /* If we have named section and we support weak symbols, then use the + .jcr section for recording java classes which need to be registered + at program start-up time. */ +-#if defined (TARGET_ASM_NAMED_SECTION) && SUPPORTS_WEAK ++#if 0 && defined (TARGET_ASM_NAMED_SECTION) && SUPPORTS_WEAK + #ifndef JCR_SECTION_NAME + #define JCR_SECTION_NAME ".jcr" + #endif diff --git a/toolchain-old/gcc/patches/arc-2017.03-release/881-no_tm_section.patch b/toolchain-old/gcc/patches/arc-2017.03-release/881-no_tm_section.patch new file mode 100644 index 000000000..fab5db3be --- /dev/null +++ b/toolchain-old/gcc/patches/arc-2017.03-release/881-no_tm_section.patch @@ -0,0 +1,11 @@ +--- 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-old/gcc/patches/arc-2017.03-release/900-bad-mips16-crt.patch b/toolchain-old/gcc/patches/arc-2017.03-release/900-bad-mips16-crt.patch new file mode 100644 index 000000000..dd6e9dc88 --- /dev/null +++ b/toolchain-old/gcc/patches/arc-2017.03-release/900-bad-mips16-crt.patch @@ -0,0 +1,9 @@ +--- 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-old/gcc/patches/arc-2017.03-release/910-mbsd_multi.patch b/toolchain-old/gcc/patches/arc-2017.03-release/910-mbsd_multi.patch new file mode 100644 index 000000000..62203dfcf --- /dev/null +++ b/toolchain-old/gcc/patches/arc-2017.03-release/910-mbsd_multi.patch @@ -0,0 +1,222 @@ + + This patch brings over a few features 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. + * -Werror-maybe-reset + Has the effect of -Wno-error if GCC_NO_WERROR is + set and not '0', a no-operation otherwise. This is + to be able to use -Werror in "make" but prevent + GNU autoconf generated configure scripts from + freaking out. + + 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 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); +@@ -442,6 +445,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; +@@ -1041,6 +1050,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 +@@ -438,6 +438,10 @@ Wfloat-conversion + C ObjC C++ ObjC++ Var(warn_float_conversion) Warning LangEnabledBy(C ObjC C++ ObjC++,Wconversion) + Warn for implicit type conversions that cause loss of floating point precision. + ++Werror-maybe-reset ++C ObjC C++ ObjC++ ++; Documented in common.opt ++ + Wfloat-equal + C ObjC C++ ObjC++ Var(warn_float_equal) Warning + Warn if testing floating point numbers for equality. +@@ -1252,6 +1256,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 +@@ -581,6 +581,10 @@ Werror= + Common Joined + Treat specified warning as error. + ++Werror-maybe-reset ++Common ++If environment variable GCC_NO_WERROR is set, act as -Wno-error ++ + Wextra + Common Var(extra_warnings) Warning + Print extra (possibly unwanted) warnings. +@@ -1432,6 +1436,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 +@@ -1783,6 +1783,17 @@ common_handle_option (struct gcc_options + opts, opts_set, loc, dc); + break; + ++ case OPT_Werror_maybe_reset: ++ { ++ char *ev = getenv ("GCC_NO_WERROR"); ++ if ((ev != NULL) && (*ev != '0')) ++ warnings_are_errors = 0; ++ } ++ 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/cppopts.texi ++++ b/gcc/doc/cppopts.texi +@@ -163,6 +163,11 @@ in older programs. This warning is on b + Make all warnings into hard errors. Source code which triggers warnings + will be rejected. + ++ at item -Werror-maybe-reset ++ at opindex Werror-maybe-reset ++Act like @samp{-Wno-error} if the @env{GCC_NO_WERROR} environment ++variable is set to anything other than 0 or empty. ++ + @item -Wsystem-headers + @opindex Wsystem-headers + Issue warnings for code in system headers. These are normally unhelpful +--- a/gcc/doc/invoke.texi ++++ b/gcc/doc/invoke.texi +@@ -263,7 +263,7 @@ Objective-C and Objective-C++ Dialects}. + -Wno-discarded-qualifiers -Wno-discarded-array-qualifiers @gol + -Wno-div-by-zero -Wdouble-promotion -Wduplicated-cond @gol + -Wempty-body -Wenum-compare -Wno-endif-labels @gol +--Werror -Werror=* -Wfatal-errors -Wfloat-equal -Wformat -Wformat=2 @gol ++-Werror -Werror=* -Werror-maybe-reset -Wfatal-errors -Wfloat-equal -Wformat -Wformat=2 @gol + -Wno-format-contains-nul -Wno-format-extra-args -Wformat-nonliteral @gol + -Wformat-security -Wformat-signedness -Wformat-y2k -Wframe-address @gol + -Wframe-larger-than=@var{len} -Wno-free-nonheap-object -Wjump-misses-init @gol +@@ -5737,6 +5737,22 @@ This option is only supported for C and + @option{-Wall} and by @option{-Wpedantic}, which can be disabled with + @option{-Wno-pointer-sign}. + ++ at item -Werror-maybe-reset ++ at opindex Werror-maybe-reset ++Act like @samp{-Wno-error} if the @env{GCC_NO_WERROR} environment ++variable is set to anything other than 0 or empty. ++ ++ at item -fhonour-copts ++ at 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 +@@ -6605,7 +6621,7 @@ so, the first branch is redirected to ei + second branch or a point immediately following it, depending on whether + the condition is known to be true or false. + +-Enabled at levels @option{-O2}, @option{-O3}, @option{-Os}. ++Enabled at levels @option{-O3}. + + @item -fsplit-wide-types + @opindex fsplit-wide-types +--- a/gcc/java/jvspec.c ++++ b/gcc/java/jvspec.c +@@ -629,6 +629,7 @@ lang_specific_pre_link (void) + class name. Append dummy `.c' that can be stripped by set_input so %b + is correct. */ + set_input (concat (main_class_name, "main.c", NULL)); ++ putenv ("GCC_HONOUR_COPTS=s"); /* XXX hack! */ + err = do_spec (jvgenmain_spec); + if (err == 0) + { diff --git a/toolchain-old/gcc/patches/arc-2017.03-release/920-specs_nonfatal_getenv.patch b/toolchain-old/gcc/patches/arc-2017.03-release/920-specs_nonfatal_getenv.patch new file mode 100644 index 000000000..dc0acb95a --- /dev/null +++ b/toolchain-old/gcc/patches/arc-2017.03-release/920-specs_nonfatal_getenv.patch @@ -0,0 +1,15 @@ +--- a/gcc/gcc.c ++++ b/gcc/gcc.c +@@ -9198,8 +9198,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-old/gcc/patches/arc-2017.03-release/930-fix-mips-noexecstack.patch b/toolchain-old/gcc/patches/arc-2017.03-release/930-fix-mips-noexecstack.patch new file mode 100644 index 000000000..2a99840b6 --- /dev/null +++ b/toolchain-old/gcc/patches/arc-2017.03-release/930-fix-mips-noexecstack.patch @@ -0,0 +1,111 @@ +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 +@@ -20228,6 +20228,9 @@ mips_promote_function_mode (const_tree t + #undef TARGET_HARD_REGNO_SCRATCH_OK + #define TARGET_HARD_REGNO_SCRATCH_OK mips_hard_regno_scratch_ok + ++#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-old/gcc/patches/arc-2017.03-release/940-no-clobber-stamp-bits.patch b/toolchain-old/gcc/patches/arc-2017.03-release/940-no-clobber-stamp-bits.patch new file mode 100644 index 000000000..68e62865b --- /dev/null +++ b/toolchain-old/gcc/patches/arc-2017.03-release/940-no-clobber-stamp-bits.patch @@ -0,0 +1,11 @@ +--- a/libstdc++-v3/include/Makefile.in ++++ b/libstdc++-v3/include/Makefile.in +@@ -1459,7 +1459,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-old/gcc/patches/arc-2017.03-release/950-cpp_file_path_translation.patch b/toolchain-old/gcc/patches/arc-2017.03-release/950-cpp_file_path_translation.patch new file mode 100644 index 000000000..d467eb7c9 --- /dev/null +++ b/toolchain-old/gcc/patches/arc-2017.03-release/950-cpp_file_path_translation.patch @@ -0,0 +1,182 @@ +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 +@@ -574,6 +574,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 +@@ -1632,6 +1632,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 +@@ -4444,6 +4444,7 @@ without notice. + @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{-W}@var{warn}@dots{}] + [@option{-M}|@option{-MM}] [@option{-MG}] [@option{-MF} @var{filename}] + [@option{-MP}] [@option{-MQ} @var{target}@dots{}] +--- a/gcc/doc/cppopts.texi ++++ b/gcc/doc/cppopts.texi +@@ -532,6 +532,12 @@ Search @var{dir} only for header files r + If @var{dir} begins with @code{=}, then the @code{=} will be replaced + by the sysroot prefix; see @option{--sysroot} and @option{-isysroot}. + ++@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 +@@ -476,8 +476,8 @@ Objective-C and Objective-C++ Dialects}. + @item Directory Options + @xref{Directory Options,,Options for Directory Search}. + @gccoptlist{-B@var{prefix} -I@var{dir} -iplugindir=@var{dir} @gol +--iquote@var{dir} -L@var{dir} -no-canonical-prefixes -I- @gol +---sysroot=@var{dir} --no-sysroot-suffix} ++-iquote@var{dir} -iremap@var{src}:@var{dst} -L@var{dir} -no-canonical-prefixes @gol ++-I- --sysroot=@var{dir} --no-sysroot-suffix} + + @item Code Generation Options + @xref{Code Gen Options,,Options for Code Generation Conventions}. +@@ -10861,6 +10861,12 @@ be searched for header files only for th + "@var{file}"}; they are not searched for @code{#include <@var{file}>}, + otherwise just like @option{-I}. + ++@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 +@@ -760,6 +760,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-old/gdb/Makefile b/toolchain-old/gdb/Makefile new file mode 100644 index 000000000..77e24f460 --- /dev/null +++ b/toolchain-old/gdb/Makefile @@ -0,0 +1,68 @@ +# +# Copyright (C) 2006-2016 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# +include $(TOPDIR)/rules.mk + +PKG_NAME:=gdb + +ifeq ($(CONFIG_arc),y) +PKG_VERSION:=arc-2017.03-gdb + +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz +PKG_SOURCE_URL:=https://github.com/foss-for-synopsys-dwc-arc-processors/binutils-gdb/archive/arc-2017.03-gdb +PKG_HASH:=f47930161e9e99c46ab018dabbf56024739dda29c51f92495eaa0d4d7e3511f6 +GDB_DIR:=binutils-$(PKG_NAME)-$(PKG_VERSION) +PATCH_DIR:=./patches-arc +else +PKG_VERSION:=7.12.1 + +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz +PKG_SOURCE_URL:=@GNU/gdb +PKG_HASH:=4607680b973d3ec92c30ad029f1b7dbde3876869e6b3a117d8a7e90081113186 +GDB_DIR:=$(PKG_NAME)-$(PKG_VERSION) +endif + +HOST_BUILD_DIR:=$(BUILD_DIR_TOOLCHAIN)/$(GDB_DIR) + +HOST_BUILD_PARALLEL:=1 + +include $(INCLUDE_DIR)/toolchain-build.mk + +HOST_CONFIGURE_VARS += \ + gdb_cv_func_sigsetjmp=yes + +HOST_CONFIGURE_ARGS = \ + --prefix=$(TOOLCHAIN_DIR) \ + --build=$(GNU_HOST_NAME) \ + --host=$(GNU_HOST_NAME) \ + --target=$(REAL_GNU_TARGET_NAME) \ + --disable-werror \ + --without-uiout \ + --disable-tui --disable-gdbtk --without-x \ + --without-included-gettext \ + --enable-threads \ + --with-expat \ + --without-python \ + --disable-binutils \ + --disable-ld \ + --disable-gas \ + --disable-sim + +define Host/Install + mkdir -p $(TOOLCHAIN_DIR)/bin + $(INSTALL_BIN) $(HOST_BUILD_DIR)/gdb/gdb $(TOOLCHAIN_DIR)/bin/$(TARGET_CROSS)gdb + ln -fs $(TARGET_CROSS)gdb $(TOOLCHAIN_DIR)/bin/$(GNU_TARGET_NAME)-gdb + strip $(TOOLCHAIN_DIR)/bin/$(TARGET_CROSS)gdb +endef + +define Host/Clean + rm -rf \ + $(HOST_BUILD_DIR) \ + $(TOOLCHAIN_DIR)/bin/$(TARGET_CROSS)gdb \ + $(TOOLCHAIN_DIR)/bin/$(GNU_TARGET_NAME)-gdb +endef + +$(eval $(call HostBuild)) diff --git a/toolchain-old/gdb/patches-arc/100-no_extern_inline.patch b/toolchain-old/gdb/patches-arc/100-no_extern_inline.patch new file mode 100644 index 000000000..8c18c6e2e --- /dev/null +++ b/toolchain-old/gdb/patches-arc/100-no_extern_inline.patch @@ -0,0 +1,32 @@ +--- a/sim/common/sim-arange.c ++++ b/sim/common/sim-arange.c +@@ -280,11 +280,7 @@ sim_addr_range_delete (ADDR_RANGE *ar, a + build_search_tree (ar); + } + +-#endif /* DEFINE_NON_INLINE_P */ +- +-#if DEFINE_INLINE_P +- +-SIM_ARANGE_INLINE int ++int + sim_addr_range_hit_p (ADDR_RANGE *ar, address_word addr) + { + ADDR_RANGE_TREE *t = ar->range_tree; +@@ -301,4 +297,4 @@ sim_addr_range_hit_p (ADDR_RANGE *ar, ad + return 0; + } + +-#endif /* DEFINE_INLINE_P */ ++#endif /* DEFINE_NON_INLINE_P */ +--- a/sim/common/sim-arange.h ++++ b/sim/common/sim-arange.h +@@ -73,7 +73,7 @@ extern void sim_addr_range_delete (ADDR_ + + /* Return non-zero if ADDR is in range AR, traversing the entire tree. + If no range is specified, that is defined to mean "everything". */ +-SIM_ARANGE_INLINE int ++extern int + sim_addr_range_hit_p (ADDR_RANGE * /*ar*/, address_word /*addr*/); + #define ADDR_RANGE_HIT_P(ar, addr) \ + ((ar)->range_tree == NULL || sim_addr_range_hit_p ((ar), (addr))) diff --git a/toolchain-old/gdb/patches-arc/110-no_testsuite.patch b/toolchain-old/gdb/patches-arc/110-no_testsuite.patch new file mode 100644 index 000000000..1b284ea76 --- /dev/null +++ b/toolchain-old/gdb/patches-arc/110-no_testsuite.patch @@ -0,0 +1,21 @@ +--- a/gdb/configure ++++ b/gdb/configure +@@ -870,8 +870,7 @@ MAKEINFOFLAGS + YACC + YFLAGS + XMKMF' +-ac_subdirs_all='testsuite +-gdbtk ++ac_subdirs_all='gdbtk + multi-ice + gdbserver' + +@@ -5610,7 +5610,7 @@ $as_echo "$with_auto_load_safe_path" >&6 + + + +-subdirs="$subdirs testsuite" ++subdirs="$subdirs" + + + # Check whether to support alternative target configurations diff --git a/toolchain-old/gdb/patches-arc/120-fix-compile-flag-mismatch.patch b/toolchain-old/gdb/patches-arc/120-fix-compile-flag-mismatch.patch new file mode 100644 index 000000000..c8b41f264 --- /dev/null +++ b/toolchain-old/gdb/patches-arc/120-fix-compile-flag-mismatch.patch @@ -0,0 +1,11 @@ +--- a/gdb/gdbserver/configure ++++ b/gdb/gdbserver/configure +@@ -2468,7 +2468,7 @@ $as_echo "$as_me: error: \`$ac_var' was + ac_cache_corrupted=: ;; + ,);; + *) +- if test "x$ac_old_val" != "x$ac_new_val"; then ++ if test "`echo x$ac_old_val`" != "`echo x$ac_new_val`"; then + # differences in whitespace do not lead to failure. + ac_old_val_w=`echo x $ac_old_val` + ac_new_val_w=`echo x $ac_new_val` diff --git a/toolchain-old/gdb/patches/100-no_extern_inline.patch b/toolchain-old/gdb/patches/100-no_extern_inline.patch new file mode 100644 index 000000000..8c18c6e2e --- /dev/null +++ b/toolchain-old/gdb/patches/100-no_extern_inline.patch @@ -0,0 +1,32 @@ +--- a/sim/common/sim-arange.c ++++ b/sim/common/sim-arange.c +@@ -280,11 +280,7 @@ sim_addr_range_delete (ADDR_RANGE *ar, a + build_search_tree (ar); + } + +-#endif /* DEFINE_NON_INLINE_P */ +- +-#if DEFINE_INLINE_P +- +-SIM_ARANGE_INLINE int ++int + sim_addr_range_hit_p (ADDR_RANGE *ar, address_word addr) + { + ADDR_RANGE_TREE *t = ar->range_tree; +@@ -301,4 +297,4 @@ sim_addr_range_hit_p (ADDR_RANGE *ar, ad + return 0; + } + +-#endif /* DEFINE_INLINE_P */ ++#endif /* DEFINE_NON_INLINE_P */ +--- a/sim/common/sim-arange.h ++++ b/sim/common/sim-arange.h +@@ -73,7 +73,7 @@ extern void sim_addr_range_delete (ADDR_ + + /* Return non-zero if ADDR is in range AR, traversing the entire tree. + If no range is specified, that is defined to mean "everything". */ +-SIM_ARANGE_INLINE int ++extern int + sim_addr_range_hit_p (ADDR_RANGE * /*ar*/, address_word /*addr*/); + #define ADDR_RANGE_HIT_P(ar, addr) \ + ((ar)->range_tree == NULL || sim_addr_range_hit_p ((ar), (addr))) diff --git a/toolchain-old/gdb/patches/110-no_testsuite.patch b/toolchain-old/gdb/patches/110-no_testsuite.patch new file mode 100644 index 000000000..68d1c9035 --- /dev/null +++ b/toolchain-old/gdb/patches/110-no_testsuite.patch @@ -0,0 +1,21 @@ +--- a/gdb/configure ++++ b/gdb/configure +@@ -874,8 +874,7 @@ MAKEINFOFLAGS + YACC + YFLAGS + XMKMF' +-ac_subdirs_all='testsuite +-gdbtk ++ac_subdirs_all='gdbtk + multi-ice + gdbserver' + +@@ -5617,7 +5616,7 @@ $as_echo "$with_auto_load_safe_path" >&6 + + + +-subdirs="$subdirs testsuite" ++subdirs="$subdirs" + + + # Check whether to support alternative target configurations diff --git a/toolchain-old/gdb/patches/120-fix-compile-flag-mismatch.patch b/toolchain-old/gdb/patches/120-fix-compile-flag-mismatch.patch new file mode 100644 index 000000000..562902c50 --- /dev/null +++ b/toolchain-old/gdb/patches/120-fix-compile-flag-mismatch.patch @@ -0,0 +1,11 @@ +--- a/gdb/gdbserver/configure ++++ b/gdb/gdbserver/configure +@@ -2476,7 +2476,7 @@ $as_echo "$as_me: error: \`$ac_var' was + ac_cache_corrupted=: ;; + ,);; + *) +- if test "x$ac_old_val" != "x$ac_new_val"; then ++ if test "`echo x$ac_old_val`" != "`echo x$ac_new_val`"; then + # differences in whitespace do not lead to failure. + ac_old_val_w=`echo x $ac_old_val` + ac_new_val_w=`echo x $ac_new_val` diff --git a/toolchain-old/glibc/Makefile b/toolchain-old/glibc/Makefile new file mode 100644 index 000000000..24526ceec --- /dev/null +++ b/toolchain-old/glibc/Makefile @@ -0,0 +1,32 @@ +PATH_PREFIX := . +VARIANT:=final +HOST_BUILD_PARALLEL:=1 + +include ./common.mk + +define Host/Compile + +$(MAKE) -C $(CUR_BUILD_DIR) \ + PARALLELMFLAGS="$(HOST_JOBS)" \ + BUILD_CFLAGS="$(HOST_CFLAGS)" \ + default-rpath="/lib:/usr/lib" \ + all +endef + +define Host/Install + $(call Host/SetToolchainInfo) + $(MAKE) -C $(CUR_BUILD_DIR) \ + BUILD_CFLAGS="$(HOST_CFLAGS)" \ + install_root="$(TOOLCHAIN_DIR)" \ + install + ( cd $(TOOLCHAIN_DIR) ; \ + for d in lib usr/lib ; do \ + for f in libc.so libpthread.so libgcc_s.so ; do \ + if [ -f $$$$d/$$$$f -a ! -L $$$$d/$$$$f ] ; then \ + $(SED) 's,/usr/lib/,,g;s,/lib/,,g' $$$$d/$$$$f ; \ + fi \ + done \ + done \ + ) +endef + +$(eval $(call HostBuild)) diff --git a/toolchain-old/glibc/common.mk b/toolchain-old/glibc/common.mk new file mode 100644 index 000000000..0ea166e77 --- /dev/null +++ b/toolchain-old/glibc/common.mk @@ -0,0 +1,94 @@ +# +# Copyright (C) 2006-2016 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# +include $(TOPDIR)/rules.mk + +PKG_NAME:=glibc +PKG_VERSION:=2.25 + +PKG_SOURCE_URL:=@GNU/libc +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz +PKG_HASH:=067bd9bb3390e79aa45911537d13c3721f1d9d3769931a30c2681bfee66f23a0 + +PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION) +HOST_BUILD_DIR:=$(BUILD_DIR_TOOLCHAIN)/$(PKG_SOURCE_SUBDIR) +CUR_BUILD_DIR:=$(HOST_BUILD_DIR)-$(VARIANT) + +include $(INCLUDE_DIR)/toolchain-build.mk + +HOST_STAMP_PREPARED:=$(HOST_BUILD_DIR)/.prepared +HOST_STAMP_CONFIGURED:=$(CUR_BUILD_DIR)/.configured +HOST_STAMP_BUILT:=$(CUR_BUILD_DIR)/.built +HOST_STAMP_INSTALLED:=$(TOOLCHAIN_DIR)/stamp/.glibc_$(VARIANT)_installed + +ifeq ($(ARCH),mips64) + ifdef CONFIG_MIPS64_ABI_N64 + TARGET_CFLAGS += -mabi=64 + endif + ifdef CONFIG_MIPS64_ABI_N32 + TARGET_CFLAGS += -mabi=n32 + endif + ifdef CONFIG_MIPS64_ABI_O32 + TARGET_CFLAGS += -mabi=32 + endif +endif + + +# -Os miscompiles w. 2.24 gcc5/gcc6 +# only -O2 tested by upstream changeset +# "Optimize i386 syscall inlining for GCC 5" +GLIBC_CONFIGURE:= \ + BUILD_CC="$(HOSTCC)" \ + $(TARGET_CONFIGURE_OPTS) \ + CFLAGS="-O2 $(filter-out -Os,$(call qstrip,$(TARGET_CFLAGS)))" \ + libc_cv_slibdir="/lib" \ + use_ldconfig=no \ + $(HOST_BUILD_DIR)/$(GLIBC_PATH)configure \ + --prefix= \ + --build=$(GNU_HOST_NAME) \ + --host=$(REAL_GNU_TARGET_NAME) \ + --with-headers=$(TOOLCHAIN_DIR)/include \ + --disable-profile \ + --disable-werror \ + --without-gd \ + --without-cvs \ + --enable-add-ons \ + --$(if $(CONFIG_SOFT_FLOAT),without,with)-fp + +export libc_cv_ssp=no +export libc_cv_ssp_strong=no +export ac_cv_header_cpuid_h=yes +export HOST_CFLAGS := $(HOST_CFLAGS) -idirafter $(CURDIR)/$(PATH_PREFIX)/include + +define Host/SetToolchainInfo + $(SED) 's,^\(LIBC_TYPE\)=.*,\1=$(PKG_NAME),' $(TOOLCHAIN_DIR)/info.mk + $(SED) 's,^\(LIBC_URL\)=.*,\1=http://www.gnu.org/software/libc/,' $(TOOLCHAIN_DIR)/info.mk + $(SED) 's,^\(LIBC_VERSION\)=.*,\1=$(PKG_VERSION),' $(TOOLCHAIN_DIR)/info.mk + $(SED) 's,^\(LIBC_SO_VERSION\)=.*,\1=$(PKG_VERSION),' $(TOOLCHAIN_DIR)/info.mk +endef + +define Host/Configure + [ -f $(HOST_BUILD_DIR)/.autoconf ] || { \ + cd $(HOST_BUILD_DIR)/; \ + autoconf --force && \ + touch $(HOST_BUILD_DIR)/.autoconf; \ + } + mkdir -p $(CUR_BUILD_DIR) + ( cd $(CUR_BUILD_DIR); rm -f config.cache; \ + $(GLIBC_CONFIGURE) \ + ); +endef + +define Host/Prepare + $(call Host/Prepare/Default) + ln -snf $(PKG_SOURCE_SUBDIR) $(BUILD_DIR_TOOLCHAIN)/$(PKG_NAME) +endef + +define Host/Clean + rm -rf $(CUR_BUILD_DIR)* \ + $(BUILD_DIR_TOOLCHAIN)/$(LIBC)-dev \ + $(BUILD_DIR_TOOLCHAIN)/$(PKG_NAME) +endef diff --git a/toolchain-old/glibc/headers/Makefile b/toolchain-old/glibc/headers/Makefile new file mode 100644 index 000000000..f1d8a8bc6 --- /dev/null +++ b/toolchain-old/glibc/headers/Makefile @@ -0,0 +1,28 @@ +PATH_PREFIX:=.. +VARIANT:=headers + +include ../common.mk + +define Host/Compile + +endef + +define Host/Install + $(call Host/SetToolchainInfo) + mkdir -p $(BUILD_DIR_TOOLCHAIN)/$(LIBC)-dev/{include,lib} + $(MAKE) -C $(CUR_BUILD_DIR) \ + BUILD_CFLAGS="$(HOST_CFLAGS)" \ + install_root="$(BUILD_DIR_TOOLCHAIN)/$(LIBC)-dev" \ + install-bootstrap-headers=yes \ + install-headers + $(CP) $(BUILD_DIR_TOOLCHAIN)/linux-dev/* $(BUILD_DIR_TOOLCHAIN)/$(LIBC)-dev/ + $(MAKE) -C $(CUR_BUILD_DIR) \ + csu/subdir_lib + ( cd $(CUR_BUILD_DIR); \ + $(CP) csu/crt1.o csu/crti.o csu/crtn.o $(BUILD_DIR_TOOLCHAIN)/$(LIBC)-dev/lib/ \ + ) + $(TARGET_CC) -nostdlib -nostartfiles -shared -x c /dev/null \ + -o $(BUILD_DIR_TOOLCHAIN)/$(LIBC)-dev/lib/libc.so +endef + +$(eval $(call HostBuild)) diff --git a/toolchain-old/glibc/include/libintl.h b/toolchain-old/glibc/include/libintl.h new file mode 100644 index 000000000..69cb887a2 --- /dev/null +++ b/toolchain-old/glibc/include/libintl.h @@ -0,0 +1,6 @@ +#ifndef __FAKE_LIBINTL_H +#define __FAKE_LIBINTL_H + +#define _(X) (X) + +#endif diff --git a/toolchain-old/glibc/patches/100-fix_cross_rpcgen.patch b/toolchain-old/glibc/patches/100-fix_cross_rpcgen.patch new file mode 100644 index 000000000..6a5e537b7 --- /dev/null +++ b/toolchain-old/glibc/patches/100-fix_cross_rpcgen.patch @@ -0,0 +1,52 @@ +--- a/sunrpc/rpc/types.h ++++ b/sunrpc/rpc/types.h +@@ -75,18 +75,23 @@ typedef unsigned long rpcport_t; + #endif + + #ifndef __u_char_defined +-typedef __u_char u_char; +-typedef __u_short u_short; +-typedef __u_int u_int; +-typedef __u_long u_long; +-typedef __quad_t quad_t; +-typedef __u_quad_t u_quad_t; +-typedef __fsid_t fsid_t; ++typedef unsigned char u_char; ++typedef unsigned short u_short; ++typedef unsigned int u_int; ++typedef unsigned long u_long; ++#if __WORDSIZE == 64 ++typedef long int quad_t; ++typedef unsigned long int u_quad_t; ++#elif defined __GLIBC_HAVE_LONG_LONG ++typedef long long int quad_t; ++typedef unsigned long long int u_quad_t; ++#endif ++typedef u_quad_t fsid_t; + # define __u_char_defined + #endif +-#ifndef __daddr_t_defined +-typedef __daddr_t daddr_t; +-typedef __caddr_t caddr_t; ++#if !defined(__daddr_t_defined) && defined(linux) ++typedef long int daddr_t; ++typedef char *caddr_t; + # define __daddr_t_defined + #endif + +--- a/sunrpc/rpc_main.c ++++ b/sunrpc/rpc_main.c +@@ -958,9 +958,10 @@ mkfile_output (struct commandline *cmd) + abort (); + temp = rindex (cmd->infile, '.'); + cp = stpcpy (mkfilename, "Makefile."); +- if (temp != NULL) +- *((char *) stpncpy (cp, cmd->infile, temp - cmd->infile)) = '\0'; +- else ++ if (temp != NULL) { ++ strncpy(cp, cmd->infile, temp - cmd->infile); ++ cp[temp - cmd->infile - 1] = 0; ++ } else + stpcpy (cp, cmd->infile); + + } diff --git a/toolchain-old/glibc/patches/200-add-dl-search-paths.patch b/toolchain-old/glibc/patches/200-add-dl-search-paths.patch new file mode 100644 index 000000000..8f720cb9f --- /dev/null +++ b/toolchain-old/glibc/patches/200-add-dl-search-paths.patch @@ -0,0 +1,14 @@ +add /usr/lib to default search path for the dynamic linker + +--- a/Makeconfig ++++ b/Makeconfig +@@ -571,6 +571,9 @@ else + default-rpath = $(libdir) + endif + ++# Add /usr/lib to default search path for the dynamic linker ++user-defined-trusted-dirs := /usr/lib ++ + ifndef link-extra-libs + link-extra-libs = $(LDLIBS-$(@F)) + link-extra-libs-static = $(link-extra-libs) diff --git a/toolchain-old/info.mk b/toolchain-old/info.mk new file mode 100644 index 000000000..4f311c550 --- /dev/null +++ b/toolchain-old/info.mk @@ -0,0 +1,6 @@ +TARGET_CROSS= +GCC_VERSION=unknown +LIBC_TYPE=unknown +LIBC_URL=unknown +LIBC_VERSION=unknown +LIBC_SO_VERSION=unknown diff --git a/toolchain-old/kernel-headers/Makefile b/toolchain-old/kernel-headers/Makefile new file mode 100644 index 000000000..1bf5598d6 --- /dev/null +++ b/toolchain-old/kernel-headers/Makefile @@ -0,0 +1,102 @@ +# +# Copyright (C) 2006-2009 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# +include $(TOPDIR)/rules.mk + +KERNEL_BUILD_DIR := $(BUILD_DIR_TOOLCHAIN) +BUILD_DIR := $(KERNEL_BUILD_DIR) + +override QUILT:= +override HOST_QUILT:= + +include $(INCLUDE_DIR)/kernel.mk + +PKG_NAME:=linux +PKG_VERSION:=$(LINUX_VERSION) +PKG_SOURCE:=$(LINUX_SOURCE) +PKG_SOURCE_URL:=$(LINUX_SITE) +HOST_BUILD_DIR:=$(KERNEL_BUILD_DIR)/linux-$(LINUX_VERSION) +PKG_HASH:=$(LINUX_KERNEL_HASH) +LINUX_DIR := $(HOST_BUILD_DIR) +FILES_DIR := +PATCH_DIR := ./patches$(if $(wildcard ./patches-$(LINUX_VERSION)),-$(LINUX_VERSION)) + +include $(INCLUDE_DIR)/toolchain-build.mk +include $(INCLUDE_DIR)/kernel-defaults.mk + +ifeq ($(strip $(BOARD)),uml) + LINUX_KARCH:=$(subst x86_64,x86,$(subst i386,x86,$(ARCH))) +endif + +HOST_EXTRACFLAGS= + +LINUX_HAS_HEADERS_INSTALL:=y + +KMAKE := $(MAKE) -C $(HOST_BUILD_DIR) \ + HOSTCFLAGS="$(HOST_CFLAGS) -Wall -Wmissing-prototypes -Wstrict-prototypes" \ + ARCH=$(LINUX_KARCH) \ + CC="$(KERNEL_CC)" \ + CFLAGS="$(TARGET_CFLAGS)" \ + CROSS_COMPILE=$(TARGET_CROSS) \ + KBUILD_HAVE_NLS=no \ + CONFIG_SHELL=$(BASH) + +define Host/Configure/all + mkdir -p $(BUILD_DIR_TOOLCHAIN)/linux-dev + $(KMAKE) \ + INSTALL_HDR_PATH="$(BUILD_DIR_TOOLCHAIN)/linux-dev/" \ + headers_install +endef + +# XXX: the following is needed to build lzma-loader +ifneq ($(CONFIG_mips)$(CONFIG_mipsel),) + define Host/Configure/lzma + $(CP) \ + $(HOST_BUILD_DIR)/arch/mips/include/asm/asm.h \ + $(HOST_BUILD_DIR)/arch/mips/include/asm/regdef.h \ + $(HOST_BUILD_DIR)/arch/mips/include/asm/asm-eva.h \ + $(BUILD_DIR_TOOLCHAIN)/linux-dev/include/asm/ + endef +endif + +define Host/Configure/post/mips + $(call Host/Configure/lzma) +endef + +define Host/Configure/post/mipsel + $(call Host/Configure/lzma) +endef + +define Host/Prepare + rm -rf $(BUILD_DIR_TOOLCHAIN)/linux-* + $(call Kernel/Prepare/Default) + rm -f $(BUILD_DIR_TOOLCHAIN)/linux + ln -s linux-$(LINUX_VERSION) $(BUILD_DIR_TOOLCHAIN)/linux + $(SED) 's/@expr length/@-expr length/' $(HOST_BUILD_DIR)/Makefile +endef + +define Host/Configure + env + yes '' | $(KMAKE) oldconfig + $(call Host/Configure/all) + $(call Host/Configure/post/$(ARCH)) +endef + +define Host/Compile +endef + +define Host/Install + $(CP) $(BUILD_DIR_TOOLCHAIN)/linux-dev/* $(TOOLCHAIN_DIR)/ +endef + +define Host/Clean + rm -rf \ + $(HOST_BUILD_DIR) \ + $(BUILD_DIR_TOOLCHAIN)/linux \ + $(BUILD_DIR_TOOLCHAIN)/linux-dev +endef + +$(eval $(call HostBuild)) diff --git a/toolchain-old/musl/Makefile b/toolchain-old/musl/Makefile new file mode 100644 index 000000000..2b9312bcb --- /dev/null +++ b/toolchain-old/musl/Makefile @@ -0,0 +1,31 @@ +PATH_PREFIX=. + +include ./common.mk + +HOST_STAMP_BUILT:=$(HOST_BUILD_DIR)/.built +HOST_STAMP_INSTALLED:=$(TOOLCHAIN_DIR)/stamp/.musl_installed + +HOST_BUILD_PARALLEL:=1 + +MUSL_MAKEOPTS = -C $(HOST_BUILD_DIR) \ + DESTDIR="$(TOOLCHAIN_DIR)/" \ + LIBCC="$(subst libgcc.a,libgcc_initial.a,$(shell $(TARGET_CC) -print-libgcc-file-name))" + +define Host/SetToolchainInfo + $(SED) 's,^\(LIBC_TYPE\)=.*,\1=$(PKG_NAME),' $(TOOLCHAIN_DIR)/info.mk + $(SED) 's,^\(LIBC_URL\)=.*,\1=http://www.musl-libc.org/,' $(TOOLCHAIN_DIR)/info.mk + $(SED) 's,^\(LIBC_VERSION\)=.*,\1=$(PKG_VERSION),' $(TOOLCHAIN_DIR)/info.mk + $(SED) 's,^\(LIBC_SO_VERSION\)=.*,\1=$(LIBC_SO_VERSION),' $(TOOLCHAIN_DIR)/info.mk +endef + +define Host/Compile + +$(MAKE) $(HOST_JOBS) $(MUSL_MAKEOPTS) all +endef + +define Host/Install + $(call Host/SetToolchainInfo) + +$(MAKE) $(HOST_JOBS) $(MUSL_MAKEOPTS) DESTDIR="$(TOOLCHAIN_DIR)/" install + $(CP) ./include $(TOOLCHAIN_DIR)/ +endef + +$(eval $(call HostBuild)) diff --git a/toolchain-old/musl/common.mk b/toolchain-old/musl/common.mk new file mode 100644 index 000000000..0a45828f7 --- /dev/null +++ b/toolchain-old/musl/common.mk @@ -0,0 +1,62 @@ +# +# Copyright (C) 2012-2013 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# +include $(TOPDIR)/rules.mk +include $(INCLUDE_DIR)/target.mk + +PKG_NAME:=musl +PKG_VERSION:=1.1.16 +PKG_RELEASE=1 + +PKG_SOURCE_PROTO:=git +PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION) +PKG_SOURCE_VERSION:=5f7efb87a28a311ad377dd26adf53715dedb096d +PKG_MIRROR_HASH:=da18ef24f270e5cae6bc4c440479da17bec1949ae5a1bc990352ca04f24c4378 +PKG_SOURCE_URL:=git://git.musl-libc.org/musl +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.xz + +LIBC_SO_VERSION:=$(PKG_VERSION) +PATCH_DIR:=$(PATH_PREFIX)/patches + +HOST_BUILD_DIR:=$(BUILD_DIR_TOOLCHAIN)/$(PKG_NAME)-$(PKG_VERSION) + +include $(INCLUDE_DIR)/toolchain-build.mk +include $(INCLUDE_DIR)/hardening.mk + +MUSL_CONFIGURE:= \ + $(TARGET_CONFIGURE_OPTS) \ + CFLAGS="$(TARGET_CFLAGS)" \ + CROSS_COMPILE="$(TARGET_CROSS)" \ + $(HOST_BUILD_DIR)/configure \ + --prefix=/ \ + --host=$(GNU_HOST_NAME) \ + --target=$(REAL_GNU_TARGET_NAME) \ + --disable-gcc-wrapper \ + --enable-debug + +define Host/Prepare + $(call Host/Prepare/Default) + $(if $(strip $(QUILT)), \ + cd $(HOST_BUILD_DIR); \ + if $(QUILT_CMD) next >/dev/null 2>&1; then \ + $(QUILT_CMD) push -a; \ + fi + ) + ln -snf $(PKG_NAME)-$(PKG_VERSION) $(BUILD_DIR_TOOLCHAIN)/$(PKG_NAME) +endef + +define Host/Configure + ( cd $(HOST_BUILD_DIR); rm -f config.cache; \ + $(MUSL_CONFIGURE) \ + ); +endef + +define Host/Clean + rm -rf \ + $(HOST_BUILD_DIR) \ + $(BUILD_DIR_TOOLCHAIN)/$(PKG_NAME) \ + $(BUILD_DIR_TOOLCHAIN)/$(LIBC)-dev +endef diff --git a/toolchain-old/musl/include/bits/wordsize.h b/toolchain-old/musl/include/bits/wordsize.h new file mode 100644 index 000000000..2d4cbe831 --- /dev/null +++ b/toolchain-old/musl/include/bits/wordsize.h @@ -0,0 +1 @@ +#include diff --git a/toolchain-old/musl/include/features.h b/toolchain-old/musl/include/features.h new file mode 100644 index 000000000..edb8cc72d --- /dev/null +++ b/toolchain-old/musl/include/features.h @@ -0,0 +1,48 @@ +#ifndef _FEATURES_H +#define _FEATURES_H + +#ifdef _ALL_SOURCE +#define _GNU_SOURCE 1 +#endif + +#if !defined(_POSIX_SOURCE) && !defined(_POSIX_C_SOURCE) \ + && !defined(_XOPEN_SOURCE) && !defined(_GNU_SOURCE) \ + && !defined(_BSD_SOURCE) && !defined(__STRICT_ANSI__) +#define _BSD_SOURCE 1 +#define _XOPEN_SOURCE 700 +#endif + +#if __STDC_VERSION__ >= 199901L +#define __restrict restrict +#elif !defined(__GNUC__) +#define __restrict +#endif + +#if __STDC_VERSION__ >= 199901L || defined(__cplusplus) +#define __inline inline +#endif + +#if __STDC_VERSION__ >= 201112L +#elif defined(__GNUC__) +#define _Noreturn __attribute__((__noreturn__)) +#else +#define _Noreturn +#endif + +/* Convenience macros to test the versions of glibc and gcc. + Use them like this: + #if __GNUC_PREREQ (2,8) + ... code requiring gcc 2.8 or later ... + #endif + Note - they won't work for gcc1 or glibc1, since the _MINOR macros + were not defined then. */ +#if defined __GNUC__ && defined __GNUC_MINOR__ +# define __GNUC_PREREQ(maj, min) \ + ((__GNUC__ << 16) + __GNUC_MINOR__ >= ((maj) << 16) + (min)) +#else +# define __GNUC_PREREQ(maj, min) 0 +#endif + +#include + +#endif diff --git a/toolchain-old/musl/include/sgidefs.h b/toolchain-old/musl/include/sgidefs.h new file mode 100644 index 000000000..74509fdbd --- /dev/null +++ b/toolchain-old/musl/include/sgidefs.h @@ -0,0 +1,73 @@ +/* Copyright (C) 1996, 1997, 1998, 2003, 2004 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Ralf Baechle . + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, write to the Free + Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA + 02111-1307 USA. */ + +#ifndef _SGIDEFS_H +#define _SGIDEFS_H 1 + +/* + * A crude hack to stop + */ +#undef __ASM_SGIDEFS_H +#define __ASM_SGIDEFS_H + +/* + * And remove any damage it might have already done + */ +#undef _MIPS_ISA_MIPS1 +#undef _MIPS_ISA_MIPS2 +#undef _MIPS_ISA_MIPS3 +#undef _MIPS_ISA_MIPS4 +#undef _MIPS_ISA_MIPS5 +#undef _MIPS_ISA_MIPS32 +#undef _MIPS_ISA_MIPS64 + +#undef _MIPS_SIM_ABI32 +#undef _MIPS_SIM_NABI32 +#undef _MIPS_SIM_ABI64 + +/* + * Definitions for the ISA level + */ +#define _MIPS_ISA_MIPS1 1 +#define _MIPS_ISA_MIPS2 2 +#define _MIPS_ISA_MIPS3 3 +#define _MIPS_ISA_MIPS4 4 +#define _MIPS_ISA_MIPS5 5 +#define _MIPS_ISA_MIPS32 6 +#define _MIPS_ISA_MIPS64 7 + +/* + * Subprogram calling convention + */ +#ifndef _ABIO32 +# define _ABIO32 1 +#endif +#define _MIPS_SIM_ABI32 _ABIO32 + +#ifndef _ABIN32 +# define _ABIN32 2 +#endif +#define _MIPS_SIM_NABI32 _ABIN32 + +#ifndef _ABI64 +# define _ABI64 3 +#endif +#define _MIPS_SIM_ABI64 _ABI64 + +#endif /* sgidefs.h */ diff --git a/toolchain-old/musl/include/sys/cdefs.h b/toolchain-old/musl/include/sys/cdefs.h new file mode 100644 index 000000000..e9866700d --- /dev/null +++ b/toolchain-old/musl/include/sys/cdefs.h @@ -0,0 +1,378 @@ +/* Copyright (C) 1992-2002, 2004, 2005, 2006, 2007, 2009, 2011, 2012 + Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, see + . */ + +#ifndef _SYS_CDEFS_H +#define _SYS_CDEFS_H 1 + +/* We are almost always included from features.h. */ +#ifndef _FEATURES_H +# include +#endif + +/* The GNU libc does not support any K&R compilers or the traditional mode + of ISO C compilers anymore. Check for some of the combinations not + anymore supported. */ +#if defined __GNUC__ && !defined __STDC__ +# error "You need a ISO C conforming compiler to use the glibc headers" +#endif + +/* Some user header file might have defined this before. */ +#undef __P +#undef __PMT + +#ifdef __GNUC__ + +/* All functions, except those with callbacks or those that + synchronize memory, are leaf functions. */ +# if __GNUC_PREREQ (4, 6) && !defined _LIBC +# define __LEAF , __leaf__ +# define __LEAF_ATTR __attribute__ ((__leaf__)) +# else +# define __LEAF +# define __LEAF_ATTR +# endif + +/* GCC can always grok prototypes. For C++ programs we add throw() + to help it optimize the function calls. But this works only with + gcc 2.8.x and egcs. For gcc 3.2 and up we even mark C functions + as non-throwing using a function attribute since programs can use + the -fexceptions options for C code as well. */ +# if !defined __cplusplus && __GNUC_PREREQ (3, 3) +# define __THROW __attribute__ ((__nothrow__ __LEAF)) +# define __THROWNL __attribute__ ((__nothrow__)) +# define __NTH(fct) __attribute__ ((__nothrow__ __LEAF)) fct +# else +# if defined __cplusplus && __GNUC_PREREQ (2,8) +# define __THROW throw () +# define __THROWNL throw () +# define __NTH(fct) __LEAF_ATTR fct throw () +# else +# define __THROW +# define __THROWNL +# define __NTH(fct) fct +# endif +# endif + +#else /* Not GCC. */ + +# define __inline /* No inline functions. */ + +# define __THROW +# define __THROWNL +# define __NTH(fct) fct + +#endif /* GCC. */ + +/* These two macros are not used in glibc anymore. They are kept here + only because some other projects expect the macros to be defined. */ +#define __P(args) args +#define __PMT(args) args + +/* For these things, GCC behaves the ANSI way normally, + and the non-ANSI way under -traditional. */ + +#define __CONCAT(x,y) x ## y +#define __STRING(x) #x + +/* This is not a typedef so `const __ptr_t' does the right thing. */ +#define __ptr_t void * +#define __long_double_t long double + + +/* C++ needs to know that types and declarations are C, not C++. */ +#ifdef __cplusplus +# define __BEGIN_DECLS extern "C" { +# define __END_DECLS } +#else +# define __BEGIN_DECLS +# define __END_DECLS +#endif + + +/* The standard library needs the functions from the ISO C90 standard + in the std namespace. At the same time we want to be safe for + future changes and we include the ISO C99 code in the non-standard + namespace __c99. The C++ wrapper header take case of adding the + definitions to the global namespace. */ +#if defined __cplusplus && defined _GLIBCPP_USE_NAMESPACES +# define __BEGIN_NAMESPACE_STD namespace std { +# define __END_NAMESPACE_STD } +# define __USING_NAMESPACE_STD(name) using std::name; +# define __BEGIN_NAMESPACE_C99 namespace __c99 { +# define __END_NAMESPACE_C99 } +# define __USING_NAMESPACE_C99(name) using __c99::name; +#else +/* For compatibility we do not add the declarations into any + namespace. They will end up in the global namespace which is what + old code expects. */ +# define __BEGIN_NAMESPACE_STD +# define __END_NAMESPACE_STD +# define __USING_NAMESPACE_STD(name) +# define __BEGIN_NAMESPACE_C99 +# define __END_NAMESPACE_C99 +# define __USING_NAMESPACE_C99(name) +#endif + + +/* Support for bounded pointers. */ +#ifndef __BOUNDED_POINTERS__ +# define __bounded /* nothing */ +# define __unbounded /* nothing */ +# define __ptrvalue /* nothing */ +#endif + + +/* Fortify support. */ +#define __bos(ptr) __builtin_object_size (ptr, __USE_FORTIFY_LEVEL > 1) +#define __bos0(ptr) __builtin_object_size (ptr, 0) +#define __fortify_function __extern_always_inline __attribute_artificial__ + +#if __GNUC_PREREQ (4,3) +# define __warndecl(name, msg) \ + extern void name (void) __attribute__((__warning__ (msg))) +# define __warnattr(msg) __attribute__((__warning__ (msg))) +# define __errordecl(name, msg) \ + extern void name (void) __attribute__((__error__ (msg))) +#else +# define __warndecl(name, msg) extern void name (void) +# define __warnattr(msg) +# define __errordecl(name, msg) extern void name (void) +#endif + +/* Support for flexible arrays. */ +#if __GNUC_PREREQ (2,97) +/* GCC 2.97 supports C99 flexible array members. */ +# define __flexarr [] +#else +# ifdef __GNUC__ +# define __flexarr [0] +# else +# if defined __STDC_VERSION__ && __STDC_VERSION__ >= 199901L +# define __flexarr [] +# else +/* Some other non-C99 compiler. Approximate with [1]. */ +# define __flexarr [1] +# endif +# endif +#endif + + +/* __asm__ ("xyz") is used throughout the headers to rename functions + at the assembly language level. This is wrapped by the __REDIRECT + macro, in order to support compilers that can do this some other + way. When compilers don't support asm-names at all, we have to do + preprocessor tricks instead (which don't have exactly the right + semantics, but it's the best we can do). + + Example: + int __REDIRECT(setpgrp, (__pid_t pid, __pid_t pgrp), setpgid); */ + +#if defined __GNUC__ && __GNUC__ >= 2 + +# define __REDIRECT(name, proto, alias) name proto __asm__ (__ASMNAME (#alias)) +# ifdef __cplusplus +# define __REDIRECT_NTH(name, proto, alias) \ + name proto __THROW __asm__ (__ASMNAME (#alias)) +# define __REDIRECT_NTHNL(name, proto, alias) \ + name proto __THROWNL __asm__ (__ASMNAME (#alias)) +# else +# define __REDIRECT_NTH(name, proto, alias) \ + name proto __asm__ (__ASMNAME (#alias)) __THROW +# define __REDIRECT_NTHNL(name, proto, alias) \ + name proto __asm__ (__ASMNAME (#alias)) __THROWNL +# endif +# define __ASMNAME(cname) __ASMNAME2 (__USER_LABEL_PREFIX__, cname) +# define __ASMNAME2(prefix, cname) __STRING (prefix) cname + +/* +#elif __SOME_OTHER_COMPILER__ + +# define __REDIRECT(name, proto, alias) name proto; \ + _Pragma("let " #name " = " #alias) +*/ +#endif + +/* GCC has various useful declarations that can be made with the + `__attribute__' syntax. All of the ways we use this do fine if + they are omitted for compilers that don't understand it. */ +#if !defined __GNUC__ || __GNUC__ < 2 +# define __attribute__(xyz) /* Ignore */ +#endif + +/* At some point during the gcc 2.96 development the `malloc' attribute + for functions was introduced. We don't want to use it unconditionally + (although this would be possible) since it generates warnings. */ +#if __GNUC_PREREQ (2,96) +# define __attribute_malloc__ __attribute__ ((__malloc__)) +#else +# define __attribute_malloc__ /* Ignore */ +#endif + +/* At some point during the gcc 2.96 development the `pure' attribute + for functions was introduced. We don't want to use it unconditionally + (although this would be possible) since it generates warnings. */ +#if __GNUC_PREREQ (2,96) +# define __attribute_pure__ __attribute__ ((__pure__)) +#else +# define __attribute_pure__ /* Ignore */ +#endif + +/* This declaration tells the compiler that the value is constant. */ +#if __GNUC_PREREQ (2,5) +# define __attribute_const__ __attribute__ ((__const__)) +#else +# define __attribute_const__ /* Ignore */ +#endif + +/* At some point during the gcc 3.1 development the `used' attribute + for functions was introduced. We don't want to use it unconditionally + (although this would be possible) since it generates warnings. */ +#if __GNUC_PREREQ (3,1) +# define __attribute_used__ __attribute__ ((__used__)) +# define __attribute_noinline__ __attribute__ ((__noinline__)) +#else +# define __attribute_used__ __attribute__ ((__unused__)) +# define __attribute_noinline__ /* Ignore */ +#endif + +/* gcc allows marking deprecated functions. */ +#if __GNUC_PREREQ (3,2) +# define __attribute_deprecated__ __attribute__ ((__deprecated__)) +#else +# define __attribute_deprecated__ /* Ignore */ +#endif + +/* At some point during the gcc 2.8 development the `format_arg' attribute + for functions was introduced. We don't want to use it unconditionally + (although this would be possible) since it generates warnings. + If several `format_arg' attributes are given for the same function, in + gcc-3.0 and older, all but the last one are ignored. In newer gccs, + all designated arguments are considered. */ +#if __GNUC_PREREQ (2,8) +# define __attribute_format_arg__(x) __attribute__ ((__format_arg__ (x))) +#else +# define __attribute_format_arg__(x) /* Ignore */ +#endif + +/* At some point during the gcc 2.97 development the `strfmon' format + attribute for functions was introduced. We don't want to use it + unconditionally (although this would be possible) since it + generates warnings. */ +#if __GNUC_PREREQ (2,97) +# define __attribute_format_strfmon__(a,b) \ + __attribute__ ((__format__ (__strfmon__, a, b))) +#else +# define __attribute_format_strfmon__(a,b) /* Ignore */ +#endif + +/* The nonull function attribute allows to mark pointer parameters which + must not be NULL. */ +#if __GNUC_PREREQ (3,3) +# define __nonnull(params) __attribute__ ((__nonnull__ params)) +#else +# define __nonnull(params) +#endif + +/* If fortification mode, we warn about unused results of certain + function calls which can lead to problems. */ +#if __GNUC_PREREQ (3,4) +# define __attribute_warn_unused_result__ \ + __attribute__ ((__warn_unused_result__)) +# if __USE_FORTIFY_LEVEL > 0 +# define __wur __attribute_warn_unused_result__ +# endif +#else +# define __attribute_warn_unused_result__ /* empty */ +#endif +#ifndef __wur +# define __wur /* Ignore */ +#endif + +/* Forces a function to be always inlined. */ +#if __GNUC_PREREQ (3,2) +# define __always_inline __inline __attribute__ ((__always_inline__)) +#else +# define __always_inline __inline +#endif + +/* Associate error messages with the source location of the call site rather + than with the source location inside the function. */ +#if __GNUC_PREREQ (4,3) +# define __attribute_artificial__ __attribute__ ((__artificial__)) +#else +# define __attribute_artificial__ /* Ignore */ +#endif + +/* GCC 4.3 and above with -std=c99 or -std=gnu99 implements ISO C99 + inline semantics, unless -fgnu89-inline is used. */ +#if !defined __cplusplus || __GNUC_PREREQ (4,3) +# if defined __GNUC_STDC_INLINE__ || defined __cplusplus +# define __extern_inline extern __inline __attribute__ ((__gnu_inline__)) +# define __extern_always_inline \ + extern __always_inline __attribute__ ((__gnu_inline__)) +# else +# define __extern_inline extern __inline +# define __extern_always_inline extern __always_inline +# endif +#endif + +/* GCC 4.3 and above allow passing all anonymous arguments of an + __extern_always_inline function to some other vararg function. */ +#if __GNUC_PREREQ (4,3) +# define __va_arg_pack() __builtin_va_arg_pack () +# define __va_arg_pack_len() __builtin_va_arg_pack_len () +#endif + +/* It is possible to compile containing GCC extensions even if GCC is + run in pedantic mode if the uses are carefully marked using the + `__extension__' keyword. But this is not generally available before + version 2.8. */ +#if !__GNUC_PREREQ (2,8) +# define __extension__ /* Ignore */ +#endif + +/* __restrict is known in EGCS 1.2 and above. */ +#if !__GNUC_PREREQ (2,92) +# define __restrict /* Ignore */ +#endif + +/* ISO C99 also allows to declare arrays as non-overlapping. The syntax is + array_name[restrict] + GCC 3.1 supports this. */ +#if __GNUC_PREREQ (3,1) && !defined __GNUG__ +# define __restrict_arr __restrict +#else +# ifdef __GNUC__ +# define __restrict_arr /* Not supported in old GCC. */ +# else +# if defined __STDC_VERSION__ && __STDC_VERSION__ >= 199901L +# define __restrict_arr restrict +# else +/* Some other non-C99 compiler. */ +# define __restrict_arr /* Not supported. */ +# endif +# endif +#endif + +#if __GNUC__ >= 3 +# define __glibc_unlikely(cond) __builtin_expect((cond), 0) +#else +# define __glibc_unlikely(cond) (cond) +#endif + +#endif /* sys/cdefs.h */ diff --git a/toolchain-old/musl/include/sys/glibc-types.h b/toolchain-old/musl/include/sys/glibc-types.h new file mode 100644 index 000000000..fa0684ced --- /dev/null +++ b/toolchain-old/musl/include/sys/glibc-types.h @@ -0,0 +1,35 @@ +#ifndef __MUSL_GLIBC_TYPES_H +#define __MUSL_GLIBC_TYPES_H + +#include + +/* Convenience types. */ +typedef unsigned char __u_char; +typedef unsigned short int __u_short; +typedef unsigned int __u_int; +typedef unsigned long int __u_long; + +/* Fixed-size types, underlying types depend on word size and compiler. */ +typedef signed char __int8_t; +typedef unsigned char __uint8_t; +typedef signed short int __int16_t; +typedef unsigned short int __uint16_t; +typedef signed int __int32_t; +typedef unsigned int __uint32_t; +#if __WORDSIZE == 64 +typedef signed long int __int64_t; +typedef unsigned long int __uint64_t; +#else +__extension__ typedef signed long long int __int64_t; +__extension__ typedef unsigned long long int __uint64_t; +#endif + +#define __off64_t off_t +#define __loff_t off_t +typedef char *__caddr_t; +#define __locale_t locale_t + +#define __gid_t gid_t +#define __uid_t uid_t + +#endif diff --git a/toolchain-old/musl/include/sys/queue.h b/toolchain-old/musl/include/sys/queue.h new file mode 100644 index 000000000..daf4553d3 --- /dev/null +++ b/toolchain-old/musl/include/sys/queue.h @@ -0,0 +1,574 @@ +/* + * Copyright (c) 1991, 1993 + * The Regents of the University of California. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. Neither the name of the University nor the names of its contributors + * may be used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + * @(#)queue.h 8.5 (Berkeley) 8/20/94 + */ + +#ifndef _SYS_QUEUE_H_ +#define _SYS_QUEUE_H_ + +/* + * This file defines five types of data structures: singly-linked lists, + * lists, simple queues, tail queues, and circular queues. + * + * A singly-linked list is headed by a single forward pointer. The + * elements are singly linked for minimum space and pointer manipulation + * overhead at the expense of O(n) removal for arbitrary elements. New + * elements can be added to the list after an existing element or at the + * head of the list. Elements being removed from the head of the list + * should use the explicit macro for this purpose for optimum + * efficiency. A singly-linked list may only be traversed in the forward + * direction. Singly-linked lists are ideal for applications with large + * datasets and few or no removals or for implementing a LIFO queue. + * + * A list is headed by a single forward pointer (or an array of forward + * pointers for a hash table header). The elements are doubly linked + * so that an arbitrary element can be removed without a need to + * traverse the list. New elements can be added to the list before + * or after an existing element or at the head of the list. A list + * may only be traversed in the forward direction. + * + * A simple queue is headed by a pair of pointers, one the head of the + * list and the other to the tail of the list. The elements are singly + * linked to save space, so elements can only be removed from the + * head of the list. New elements can be added to the list after + * an existing element, at the head of the list, or at the end of the + * list. A simple queue may only be traversed in the forward direction. + * + * A tail queue is headed by a pair of pointers, one to the head of the + * list and the other to the tail of the list. The elements are doubly + * linked so that an arbitrary element can be removed without a need to + * traverse the list. New elements can be added to the list before or + * after an existing element, at the head of the list, or at the end of + * the list. A tail queue may be traversed in either direction. + * + * A circle queue is headed by a pair of pointers, one to the head of the + * list and the other to the tail of the list. The elements are doubly + * linked so that an arbitrary element can be removed without a need to + * traverse the list. New elements can be added to the list before or after + * an existing element, at the head of the list, or at the end of the list. + * A circle queue may be traversed in either direction, but has a more + * complex end of list detection. + * + * For details on the use of these macros, see the queue(3) manual page. + */ + +/* + * List definitions. + */ +#define LIST_HEAD(name, type) \ +struct name { \ + struct type *lh_first; /* first element */ \ +} + +#define LIST_HEAD_INITIALIZER(head) \ + { NULL } + +#define LIST_ENTRY(type) \ +struct { \ + struct type *le_next; /* next element */ \ + struct type **le_prev; /* address of previous next element */ \ +} + +/* + * List functions. + */ +#define LIST_INIT(head) do { \ + (head)->lh_first = NULL; \ +} while (/*CONSTCOND*/0) + +#define LIST_INSERT_AFTER(listelm, elm, field) do { \ + if (((elm)->field.le_next = (listelm)->field.le_next) != NULL) \ + (listelm)->field.le_next->field.le_prev = \ + &(elm)->field.le_next; \ + (listelm)->field.le_next = (elm); \ + (elm)->field.le_prev = &(listelm)->field.le_next; \ +} while (/*CONSTCOND*/0) + +#define LIST_INSERT_BEFORE(listelm, elm, field) do { \ + (elm)->field.le_prev = (listelm)->field.le_prev; \ + (elm)->field.le_next = (listelm); \ + *(listelm)->field.le_prev = (elm); \ + (listelm)->field.le_prev = &(elm)->field.le_next; \ +} while (/*CONSTCOND*/0) + +#define LIST_INSERT_HEAD(head, elm, field) do { \ + if (((elm)->field.le_next = (head)->lh_first) != NULL) \ + (head)->lh_first->field.le_prev = &(elm)->field.le_next;\ + (head)->lh_first = (elm); \ + (elm)->field.le_prev = &(head)->lh_first; \ +} while (/*CONSTCOND*/0) + +#define LIST_REMOVE(elm, field) do { \ + if ((elm)->field.le_next != NULL) \ + (elm)->field.le_next->field.le_prev = \ + (elm)->field.le_prev; \ + *(elm)->field.le_prev = (elm)->field.le_next; \ +} while (/*CONSTCOND*/0) + +#define LIST_FOREACH(var, head, field) \ + for ((var) = ((head)->lh_first); \ + (var); \ + (var) = ((var)->field.le_next)) + +/* + * List access methods. + */ +#define LIST_EMPTY(head) ((head)->lh_first == NULL) +#define LIST_FIRST(head) ((head)->lh_first) +#define LIST_NEXT(elm, field) ((elm)->field.le_next) + + +/* + * Singly-linked List definitions. + */ +#define SLIST_HEAD(name, type) \ +struct name { \ + struct type *slh_first; /* first element */ \ +} + +#define SLIST_HEAD_INITIALIZER(head) \ + { NULL } + +#define SLIST_ENTRY(type) \ +struct { \ + struct type *sle_next; /* next element */ \ +} + +/* + * Singly-linked List functions. + */ +#define SLIST_INIT(head) do { \ + (head)->slh_first = NULL; \ +} while (/*CONSTCOND*/0) + +#define SLIST_INSERT_AFTER(slistelm, elm, field) do { \ + (elm)->field.sle_next = (slistelm)->field.sle_next; \ + (slistelm)->field.sle_next = (elm); \ +} while (/*CONSTCOND*/0) + +#define SLIST_INSERT_HEAD(head, elm, field) do { \ + (elm)->field.sle_next = (head)->slh_first; \ + (head)->slh_first = (elm); \ +} while (/*CONSTCOND*/0) + +#define SLIST_REMOVE_HEAD(head, field) do { \ + (head)->slh_first = (head)->slh_first->field.sle_next; \ +} while (/*CONSTCOND*/0) + +#define SLIST_REMOVE(head, elm, type, field) do { \ + if ((head)->slh_first == (elm)) { \ + SLIST_REMOVE_HEAD((head), field); \ + } \ + else { \ + struct type *curelm = (head)->slh_first; \ + while(curelm->field.sle_next != (elm)) \ + curelm = curelm->field.sle_next; \ + curelm->field.sle_next = \ + curelm->field.sle_next->field.sle_next; \ + } \ +} while (/*CONSTCOND*/0) + +#define SLIST_FOREACH(var, head, field) \ + for((var) = (head)->slh_first; (var); (var) = (var)->field.sle_next) + +/* + * Singly-linked List access methods. + */ +#define SLIST_EMPTY(head) ((head)->slh_first == NULL) +#define SLIST_FIRST(head) ((head)->slh_first) +#define SLIST_NEXT(elm, field) ((elm)->field.sle_next) + + +/* + * Singly-linked Tail queue declarations. + */ +#define STAILQ_HEAD(name, type) \ +struct name { \ + struct type *stqh_first; /* first element */ \ + struct type **stqh_last; /* addr of last next element */ \ +} + +#define STAILQ_HEAD_INITIALIZER(head) \ + { NULL, &(head).stqh_first } + +#define STAILQ_ENTRY(type) \ +struct { \ + struct type *stqe_next; /* next element */ \ +} + +/* + * Singly-linked Tail queue functions. + */ +#define STAILQ_INIT(head) do { \ + (head)->stqh_first = NULL; \ + (head)->stqh_last = &(head)->stqh_first; \ +} while (/*CONSTCOND*/0) + +#define STAILQ_INSERT_HEAD(head, elm, field) do { \ + if (((elm)->field.stqe_next = (head)->stqh_first) == NULL) \ + (head)->stqh_last = &(elm)->field.stqe_next; \ + (head)->stqh_first = (elm); \ +} while (/*CONSTCOND*/0) + +#define STAILQ_INSERT_TAIL(head, elm, field) do { \ + (elm)->field.stqe_next = NULL; \ + *(head)->stqh_last = (elm); \ + (head)->stqh_last = &(elm)->field.stqe_next; \ +} while (/*CONSTCOND*/0) + +#define STAILQ_INSERT_AFTER(head, listelm, elm, field) do { \ + if (((elm)->field.stqe_next = (listelm)->field.stqe_next) == NULL)\ + (head)->stqh_last = &(elm)->field.stqe_next; \ + (listelm)->field.stqe_next = (elm); \ +} while (/*CONSTCOND*/0) + +#define STAILQ_REMOVE_HEAD(head, field) do { \ + if (((head)->stqh_first = (head)->stqh_first->field.stqe_next) == NULL) \ + (head)->stqh_last = &(head)->stqh_first; \ +} while (/*CONSTCOND*/0) + +#define STAILQ_REMOVE(head, elm, type, field) do { \ + if ((head)->stqh_first == (elm)) { \ + STAILQ_REMOVE_HEAD((head), field); \ + } else { \ + struct type *curelm = (head)->stqh_first; \ + while (curelm->field.stqe_next != (elm)) \ + curelm = curelm->field.stqe_next; \ + if ((curelm->field.stqe_next = \ + curelm->field.stqe_next->field.stqe_next) == NULL) \ + (head)->stqh_last = &(curelm)->field.stqe_next; \ + } \ +} while (/*CONSTCOND*/0) + +#define STAILQ_FOREACH(var, head, field) \ + for ((var) = ((head)->stqh_first); \ + (var); \ + (var) = ((var)->field.stqe_next)) + +#define STAILQ_CONCAT(head1, head2) do { \ + if (!STAILQ_EMPTY((head2))) { \ + *(head1)->stqh_last = (head2)->stqh_first; \ + (head1)->stqh_last = (head2)->stqh_last; \ + STAILQ_INIT((head2)); \ + } \ +} while (/*CONSTCOND*/0) + +/* + * Singly-linked Tail queue access methods. + */ +#define STAILQ_EMPTY(head) ((head)->stqh_first == NULL) +#define STAILQ_FIRST(head) ((head)->stqh_first) +#define STAILQ_NEXT(elm, field) ((elm)->field.stqe_next) + + +/* + * Simple queue definitions. + */ +#define SIMPLEQ_HEAD(name, type) \ +struct name { \ + struct type *sqh_first; /* first element */ \ + struct type **sqh_last; /* addr of last next element */ \ +} + +#define SIMPLEQ_HEAD_INITIALIZER(head) \ + { NULL, &(head).sqh_first } + +#define SIMPLEQ_ENTRY(type) \ +struct { \ + struct type *sqe_next; /* next element */ \ +} + +/* + * Simple queue functions. + */ +#define SIMPLEQ_INIT(head) do { \ + (head)->sqh_first = NULL; \ + (head)->sqh_last = &(head)->sqh_first; \ +} while (/*CONSTCOND*/0) + +#define SIMPLEQ_INSERT_HEAD(head, elm, field) do { \ + if (((elm)->field.sqe_next = (head)->sqh_first) == NULL) \ + (head)->sqh_last = &(elm)->field.sqe_next; \ + (head)->sqh_first = (elm); \ +} while (/*CONSTCOND*/0) + +#define SIMPLEQ_INSERT_TAIL(head, elm, field) do { \ + (elm)->field.sqe_next = NULL; \ + *(head)->sqh_last = (elm); \ + (head)->sqh_last = &(elm)->field.sqe_next; \ +} while (/*CONSTCOND*/0) + +#define SIMPLEQ_INSERT_AFTER(head, listelm, elm, field) do { \ + if (((elm)->field.sqe_next = (listelm)->field.sqe_next) == NULL)\ + (head)->sqh_last = &(elm)->field.sqe_next; \ + (listelm)->field.sqe_next = (elm); \ +} while (/*CONSTCOND*/0) + +#define SIMPLEQ_REMOVE_HEAD(head, field) do { \ + if (((head)->sqh_first = (head)->sqh_first->field.sqe_next) == NULL) \ + (head)->sqh_last = &(head)->sqh_first; \ +} while (/*CONSTCOND*/0) + +#define SIMPLEQ_REMOVE(head, elm, type, field) do { \ + if ((head)->sqh_first == (elm)) { \ + SIMPLEQ_REMOVE_HEAD((head), field); \ + } else { \ + struct type *curelm = (head)->sqh_first; \ + while (curelm->field.sqe_next != (elm)) \ + curelm = curelm->field.sqe_next; \ + if ((curelm->field.sqe_next = \ + curelm->field.sqe_next->field.sqe_next) == NULL) \ + (head)->sqh_last = &(curelm)->field.sqe_next; \ + } \ +} while (/*CONSTCOND*/0) + +#define SIMPLEQ_FOREACH(var, head, field) \ + for ((var) = ((head)->sqh_first); \ + (var); \ + (var) = ((var)->field.sqe_next)) + +/* + * Simple queue access methods. + */ +#define SIMPLEQ_EMPTY(head) ((head)->sqh_first == NULL) +#define SIMPLEQ_FIRST(head) ((head)->sqh_first) +#define SIMPLEQ_NEXT(elm, field) ((elm)->field.sqe_next) + + +/* + * Tail queue definitions. + */ +#define _TAILQ_HEAD(name, type, qual) \ +struct name { \ + qual type *tqh_first; /* first element */ \ + qual type *qual *tqh_last; /* addr of last next element */ \ +} +#define TAILQ_HEAD(name, type) _TAILQ_HEAD(name, struct type,) + +#define TAILQ_HEAD_INITIALIZER(head) \ + { NULL, &(head).tqh_first } + +#define _TAILQ_ENTRY(type, qual) \ +struct { \ + qual type *tqe_next; /* next element */ \ + qual type *qual *tqe_prev; /* address of previous next element */\ +} +#define TAILQ_ENTRY(type) _TAILQ_ENTRY(struct type,) + +/* + * Tail queue functions. + */ +#define TAILQ_INIT(head) do { \ + (head)->tqh_first = NULL; \ + (head)->tqh_last = &(head)->tqh_first; \ +} while (/*CONSTCOND*/0) + +#define TAILQ_INSERT_HEAD(head, elm, field) do { \ + if (((elm)->field.tqe_next = (head)->tqh_first) != NULL) \ + (head)->tqh_first->field.tqe_prev = \ + &(elm)->field.tqe_next; \ + else \ + (head)->tqh_last = &(elm)->field.tqe_next; \ + (head)->tqh_first = (elm); \ + (elm)->field.tqe_prev = &(head)->tqh_first; \ +} while (/*CONSTCOND*/0) + +#define TAILQ_INSERT_TAIL(head, elm, field) do { \ + (elm)->field.tqe_next = NULL; \ + (elm)->field.tqe_prev = (head)->tqh_last; \ + *(head)->tqh_last = (elm); \ + (head)->tqh_last = &(elm)->field.tqe_next; \ +} while (/*CONSTCOND*/0) + +#define TAILQ_INSERT_AFTER(head, listelm, elm, field) do { \ + if (((elm)->field.tqe_next = (listelm)->field.tqe_next) != NULL)\ + (elm)->field.tqe_next->field.tqe_prev = \ + &(elm)->field.tqe_next; \ + else \ + (head)->tqh_last = &(elm)->field.tqe_next; \ + (listelm)->field.tqe_next = (elm); \ + (elm)->field.tqe_prev = &(listelm)->field.tqe_next; \ +} while (/*CONSTCOND*/0) + +#define TAILQ_INSERT_BEFORE(listelm, elm, field) do { \ + (elm)->field.tqe_prev = (listelm)->field.tqe_prev; \ + (elm)->field.tqe_next = (listelm); \ + *(listelm)->field.tqe_prev = (elm); \ + (listelm)->field.tqe_prev = &(elm)->field.tqe_next; \ +} while (/*CONSTCOND*/0) + +#define TAILQ_REMOVE(head, elm, field) do { \ + if (((elm)->field.tqe_next) != NULL) \ + (elm)->field.tqe_next->field.tqe_prev = \ + (elm)->field.tqe_prev; \ + else \ + (head)->tqh_last = (elm)->field.tqe_prev; \ + *(elm)->field.tqe_prev = (elm)->field.tqe_next; \ +} while (/*CONSTCOND*/0) + +#define TAILQ_FOREACH(var, head, field) \ + for ((var) = ((head)->tqh_first); \ + (var); \ + (var) = ((var)->field.tqe_next)) + +#define TAILQ_FOREACH_REVERSE(var, head, headname, field) \ + for ((var) = (*(((struct headname *)((head)->tqh_last))->tqh_last)); \ + (var); \ + (var) = (*(((struct headname *)((var)->field.tqe_prev))->tqh_last))) + +#define TAILQ_CONCAT(head1, head2, field) do { \ + if (!TAILQ_EMPTY(head2)) { \ + *(head1)->tqh_last = (head2)->tqh_first; \ + (head2)->tqh_first->field.tqe_prev = (head1)->tqh_last; \ + (head1)->tqh_last = (head2)->tqh_last; \ + TAILQ_INIT((head2)); \ + } \ +} while (/*CONSTCOND*/0) + +/* + * Tail queue access methods. + */ +#define TAILQ_EMPTY(head) ((head)->tqh_first == NULL) +#define TAILQ_FIRST(head) ((head)->tqh_first) +#define TAILQ_NEXT(elm, field) ((elm)->field.tqe_next) + +#define TAILQ_LAST(head, headname) \ + (*(((struct headname *)((head)->tqh_last))->tqh_last)) +#define TAILQ_PREV(elm, headname, field) \ + (*(((struct headname *)((elm)->field.tqe_prev))->tqh_last)) + + +/* + * Circular queue definitions. + */ +#define CIRCLEQ_HEAD(name, type) \ +struct name { \ + struct type *cqh_first; /* first element */ \ + struct type *cqh_last; /* last element */ \ +} + +#define CIRCLEQ_HEAD_INITIALIZER(head) \ + { (void *)&head, (void *)&head } + +#define CIRCLEQ_ENTRY(type) \ +struct { \ + struct type *cqe_next; /* next element */ \ + struct type *cqe_prev; /* previous element */ \ +} + +/* + * Circular queue functions. + */ +#define CIRCLEQ_INIT(head) do { \ + (head)->cqh_first = (void *)(head); \ + (head)->cqh_last = (void *)(head); \ +} while (/*CONSTCOND*/0) + +#define CIRCLEQ_INSERT_AFTER(head, listelm, elm, field) do { \ + (elm)->field.cqe_next = (listelm)->field.cqe_next; \ + (elm)->field.cqe_prev = (listelm); \ + if ((listelm)->field.cqe_next == (void *)(head)) \ + (head)->cqh_last = (elm); \ + else \ + (listelm)->field.cqe_next->field.cqe_prev = (elm); \ + (listelm)->field.cqe_next = (elm); \ +} while (/*CONSTCOND*/0) + +#define CIRCLEQ_INSERT_BEFORE(head, listelm, elm, field) do { \ + (elm)->field.cqe_next = (listelm); \ + (elm)->field.cqe_prev = (listelm)->field.cqe_prev; \ + if ((listelm)->field.cqe_prev == (void *)(head)) \ + (head)->cqh_first = (elm); \ + else \ + (listelm)->field.cqe_prev->field.cqe_next = (elm); \ + (listelm)->field.cqe_prev = (elm); \ +} while (/*CONSTCOND*/0) + +#define CIRCLEQ_INSERT_HEAD(head, elm, field) do { \ + (elm)->field.cqe_next = (head)->cqh_first; \ + (elm)->field.cqe_prev = (void *)(head); \ + if ((head)->cqh_last == (void *)(head)) \ + (head)->cqh_last = (elm); \ + else \ + (head)->cqh_first->field.cqe_prev = (elm); \ + (head)->cqh_first = (elm); \ +} while (/*CONSTCOND*/0) + +#define CIRCLEQ_INSERT_TAIL(head, elm, field) do { \ + (elm)->field.cqe_next = (void *)(head); \ + (elm)->field.cqe_prev = (head)->cqh_last; \ + if ((head)->cqh_first == (void *)(head)) \ + (head)->cqh_first = (elm); \ + else \ + (head)->cqh_last->field.cqe_next = (elm); \ + (head)->cqh_last = (elm); \ +} while (/*CONSTCOND*/0) + +#define CIRCLEQ_REMOVE(head, elm, field) do { \ + if ((elm)->field.cqe_next == (void *)(head)) \ + (head)->cqh_last = (elm)->field.cqe_prev; \ + else \ + (elm)->field.cqe_next->field.cqe_prev = \ + (elm)->field.cqe_prev; \ + if ((elm)->field.cqe_prev == (void *)(head)) \ + (head)->cqh_first = (elm)->field.cqe_next; \ + else \ + (elm)->field.cqe_prev->field.cqe_next = \ + (elm)->field.cqe_next; \ +} while (/*CONSTCOND*/0) + +#define CIRCLEQ_FOREACH(var, head, field) \ + for ((var) = ((head)->cqh_first); \ + (var) != (const void *)(head); \ + (var) = ((var)->field.cqe_next)) + +#define CIRCLEQ_FOREACH_REVERSE(var, head, field) \ + for ((var) = ((head)->cqh_last); \ + (var) != (const void *)(head); \ + (var) = ((var)->field.cqe_prev)) + +/* + * Circular queue access methods. + */ +#define CIRCLEQ_EMPTY(head) ((head)->cqh_first == (void *)(head)) +#define CIRCLEQ_FIRST(head) ((head)->cqh_first) +#define CIRCLEQ_LAST(head) ((head)->cqh_last) +#define CIRCLEQ_NEXT(elm, field) ((elm)->field.cqe_next) +#define CIRCLEQ_PREV(elm, field) ((elm)->field.cqe_prev) + +#define CIRCLEQ_LOOP_NEXT(head, elm, field) \ + (((elm)->field.cqe_next == (void *)(head)) \ + ? ((head)->cqh_first) \ + : (elm->field.cqe_next)) +#define CIRCLEQ_LOOP_PREV(head, elm, field) \ + (((elm)->field.cqe_prev == (void *)(head)) \ + ? ((head)->cqh_last) \ + : (elm->field.cqe_prev)) + +#endif /* sys/queue.h */ diff --git a/toolchain-old/musl/patches/100-add_glob_onlydir.patch b/toolchain-old/musl/patches/100-add_glob_onlydir.patch new file mode 100644 index 000000000..db0bc22af --- /dev/null +++ b/toolchain-old/musl/patches/100-add_glob_onlydir.patch @@ -0,0 +1,11 @@ +--- a/include/glob.h ++++ b/include/glob.h +@@ -31,6 +31,8 @@ void globfree(glob_t *); + #define GLOB_NOESCAPE 0x40 + #define GLOB_PERIOD 0x80 + ++#define GLOB_ONLYDIR 0x100 ++ + #define GLOB_NOSPACE 1 + #define GLOB_ABORTED 2 + #define GLOB_NOMATCH 3 diff --git a/toolchain-old/musl/patches/110-read_timezone_from_fs.patch b/toolchain-old/musl/patches/110-read_timezone_from_fs.patch new file mode 100644 index 000000000..b4349e736 --- /dev/null +++ b/toolchain-old/musl/patches/110-read_timezone_from_fs.patch @@ -0,0 +1,28 @@ +--- a/src/time/__tz.c ++++ b/src/time/__tz.c +@@ -23,6 +23,9 @@ static int r0[5], r1[5]; + static const unsigned char *zi, *trans, *index, *types, *abbrevs, *abbrevs_end; + static size_t map_size; + ++static const char *tzfile; ++static size_t tzfile_size; ++ + static char old_tz_buf[32]; + static char *old_tz = old_tz_buf; + static size_t old_tz_size = sizeof old_tz_buf; +@@ -125,6 +128,15 @@ static void do_tzset() + "/usr/share/zoneinfo/\0/share/zoneinfo/\0/etc/zoneinfo/\0"; + + s = getenv("TZ"); ++ ++ /* if TZ is empty try to read it from /etc/TZ */ ++ if (!s || !*s) { ++ if (tzfile) ++ __munmap((void*)tzfile, tzfile_size); ++ ++ s = tzfile = (void *)__map_file("/etc/TZ", &tzfile_size); ++ } ++ + if (!s) s = "/etc/localtime"; + if (!*s) s = __gmt; + diff --git a/toolchain-old/musl/patches/200-add_libssp_nonshared.patch b/toolchain-old/musl/patches/200-add_libssp_nonshared.patch new file mode 100644 index 000000000..218ca4140 --- /dev/null +++ b/toolchain-old/musl/patches/200-add_libssp_nonshared.patch @@ -0,0 +1,50 @@ +From 7ec87fbbc3cac99b4173d082dd6195f47c9a32e7 Mon Sep 17 00:00:00 2001 +From: Steven Barth +Date: Mon, 22 Jun 2015 11:01:56 +0200 +Subject: [PATCH] Add libssp_nonshared.a so GCC's is not needed + +Signed-off-by: Steven Barth +--- + Makefile | 10 ++++++++-- + libssp_nonshared/__stack_chk_fail_local.c | 2 ++ + 2 files changed, 10 insertions(+), 2 deletions(-) + create mode 100644 libssp_nonshared/__stack_chk_fail_local.c + +--- a/Makefile ++++ b/Makefile +@@ -66,7 +66,7 @@ CRT_LIBS = $(addprefix lib/,$(notdir $(C + STATIC_LIBS = lib/libc.a + SHARED_LIBS = lib/libc.so + TOOL_LIBS = lib/musl-gcc.specs +-ALL_LIBS = $(CRT_LIBS) $(STATIC_LIBS) $(SHARED_LIBS) $(EMPTY_LIBS) $(TOOL_LIBS) ++ALL_LIBS = $(CRT_LIBS) $(STATIC_LIBS) $(SHARED_LIBS) $(EMPTY_LIBS) $(TOOL_LIBS) lib/libssp_nonshared.a + ALL_TOOLS = obj/musl-gcc + + WRAPCC_GCC = gcc +@@ -129,7 +129,8 @@ NOSSP_SRCS = $(wildcard crt/*.c) \ + src/thread/__set_thread_area.c src/thread/$(ARCH)/__set_thread_area.c \ + src/string/memset.c src/string/$(ARCH)/memset.c \ + src/string/memcpy.c src/string/$(ARCH)/memcpy.c \ +- ldso/dlstart.c ldso/dynlink.c ++ ldso/dlstart.c ldso/dynlink.c \ ++ src/libssp_nonshared/__stack_chk_fail_local.c + $(NOSSP_SRCS:%.c=obj/%.o) $(NOSSP_SRCS:%.c=obj/%.lo): CFLAGS_ALL += $(CFLAGS_NOSSP) + + $(CRT_OBJS): CFLAGS_ALL += -DCRT +@@ -172,6 +173,11 @@ lib/libc.a: $(AOBJS) + $(AR) rc $@ $(AOBJS) + $(RANLIB) $@ + ++lib/libssp_nonshared.a: obj/src/libssp_nonshared/__stack_chk_fail_local.o ++ rm -f $@ ++ $(AR) rc $@ $< ++ $(RANLIB) $@ ++ + $(EMPTY_LIBS): + rm -f $@ + $(AR) rc $@ +--- /dev/null ++++ b/src/libssp_nonshared/__stack_chk_fail_local.c +@@ -0,0 +1,2 @@ ++#include "atomic.h" ++void __attribute__((visibility ("hidden"))) __stack_chk_fail_local(void) { a_crash(); } diff --git a/toolchain-old/musl/patches/300-relative.patch b/toolchain-old/musl/patches/300-relative.patch new file mode 100644 index 000000000..6e30e0a88 --- /dev/null +++ b/toolchain-old/musl/patches/300-relative.patch @@ -0,0 +1,11 @@ +--- a/Makefile ++++ b/Makefile +@@ -221,7 +221,7 @@ $(DESTDIR)$(includedir)/%: $(srcdir)/inc + $(INSTALL) -D -m 644 $< $@ + + $(DESTDIR)$(LDSO_PATHNAME): $(DESTDIR)$(libdir)/libc.so +- $(INSTALL) -D -l $(libdir)/libc.so $@ || true ++ $(INSTALL) -D -l libc.so $@ || true + + install-libs: $(ALL_LIBS:lib/%=$(DESTDIR)$(libdir)/%) $(if $(SHARED_LIBS),$(DESTDIR)$(LDSO_PATHNAME),) + diff --git a/toolchain-old/musl/patches/400-Add-format-attribute-to-some-function-declarations.patch b/toolchain-old/musl/patches/400-Add-format-attribute-to-some-function-declarations.patch new file mode 100644 index 000000000..c495d67e0 --- /dev/null +++ b/toolchain-old/musl/patches/400-Add-format-attribute-to-some-function-declarations.patch @@ -0,0 +1,197 @@ +From e6683d001a95d7c3d4d992496f00f77e01fcd268 Mon Sep 17 00:00:00 2001 +From: Hauke Mehrtens +Date: Sun, 22 Nov 2015 15:04:23 +0100 +Subject: [PATCH v2] Add format attribute to some function declarations + +GCC and Clang are able to check the format arguments given to a +function and warn the user if there is a error in the format arguments +or if there is a potential uncontrolled format string security problem +in the code. GCC does this automatically for some functions like +printf(), but it is also possible to annotate other functions in a way +that it will check them too. This feature is used by glibc for many +functions. This patch adds the attribute to the some functions of musl +expect for these functions where gcc automatically adds it. + +GCC automatically adds checks for these functions: printf, fprintf, +sprintf, scanf, fscanf, sscanf, strftime, vprintf, vfprintf and +vsprintf. + +The documentation from gcc is here: +https://gcc.gnu.org/onlinedocs/gcc/Common-Function-Attributes.html + +The documentation from Clang is here: +http://clang.llvm.org/docs/AttributeReference.html#format-gnu-format + +Signed-off-by: Hauke Mehrtens +--- + include/err.h | 26 +++++++++++++++++--------- + include/monetary.h | 12 ++++++++++-- + include/stdio.h | 29 ++++++++++++++++++++--------- + include/syslog.h | 12 ++++++++++-- + 4 files changed, 57 insertions(+), 22 deletions(-) + +--- a/include/err.h ++++ b/include/err.h +@@ -8,15 +8,23 @@ + extern "C" { + #endif + +-void warn(const char *, ...); +-void vwarn(const char *, va_list); +-void warnx(const char *, ...); +-void vwarnx(const char *, va_list); ++#if __GNUC__ >= 3 ++#define __fp(x, y) __attribute__ ((__format__ (__printf__, x, y))) ++#else ++#define __fp(x, y) ++#endif + +-_Noreturn void err(int, const char *, ...); +-_Noreturn void verr(int, const char *, va_list); +-_Noreturn void errx(int, const char *, ...); +-_Noreturn void verrx(int, const char *, va_list); ++void warn(const char *, ...) __fp(1, 2); ++void vwarn(const char *, va_list) __fp(1, 0); ++void warnx(const char *, ...) __fp(1, 2); ++void vwarnx(const char *, va_list) __fp(1, 0); ++ ++_Noreturn void err(int, const char *, ...) __fp(2, 3); ++_Noreturn void verr(int, const char *, va_list) __fp(2, 0); ++_Noreturn void errx(int, const char *, ...) __fp(2, 3); ++_Noreturn void verrx(int, const char *, va_list) __fp(2, 0); ++ ++#undef __fp + + #ifdef __cplusplus + } +--- a/include/monetary.h ++++ b/include/monetary.h +@@ -13,8 +13,16 @@ extern "C" { + + #include + +-ssize_t strfmon(char *__restrict, size_t, const char *__restrict, ...); +-ssize_t strfmon_l(char *__restrict, size_t, locale_t, const char *__restrict, ...); ++#if __GNUC__ >= 3 ++#define __fsfm(x, y) __attribute__ ((__format__ (__strfmon__, x, y))) ++#else ++#define __fsfm(x, y) ++#endif ++ ++ssize_t strfmon(char *__restrict, size_t, const char *__restrict, ...) __fsfm(3, 4); ++ssize_t strfmon_l(char *__restrict, size_t, locale_t, const char *__restrict, ...) __fsfm(4, 5); ++ ++#undef __fsfm + + #ifdef __cplusplus + } +--- a/include/stdio.h ++++ b/include/stdio.h +@@ -21,6 +21,14 @@ extern "C" { + + #include + ++#if __GNUC__ >= 3 ++#define __fp(x, y) __attribute__ ((__format__ (__printf__, x, y))) ++#define __fs(x, y) __attribute__ ((__format__ (__scanf__, x, y))) ++#else ++#define __fp(x, y) ++#define __fs(x, y) ++#endif ++ + #ifdef __cplusplus + #define NULL 0L + #else +@@ -102,19 +110,19 @@ int puts(const char *); + int printf(const char *__restrict, ...); + int fprintf(FILE *__restrict, const char *__restrict, ...); + int sprintf(char *__restrict, const char *__restrict, ...); +-int snprintf(char *__restrict, size_t, const char *__restrict, ...); ++int snprintf(char *__restrict, size_t, const char *__restrict, ...) __fp(3, 4); + + int vprintf(const char *__restrict, __isoc_va_list); + int vfprintf(FILE *__restrict, const char *__restrict, __isoc_va_list); + int vsprintf(char *__restrict, const char *__restrict, __isoc_va_list); +-int vsnprintf(char *__restrict, size_t, const char *__restrict, __isoc_va_list); ++int vsnprintf(char *__restrict, size_t, const char *__restrict, __isoc_va_list) __fp(3, 0); + + int scanf(const char *__restrict, ...); + int fscanf(FILE *__restrict, const char *__restrict, ...); + int sscanf(const char *__restrict, const char *__restrict, ...); +-int vscanf(const char *__restrict, __isoc_va_list); +-int vfscanf(FILE *__restrict, const char *__restrict, __isoc_va_list); +-int vsscanf(const char *__restrict, const char *__restrict, __isoc_va_list); ++int vscanf(const char *__restrict, __isoc_va_list) __fs(1, 0); ++int vfscanf(FILE *__restrict, const char *__restrict, __isoc_va_list) __fs(2, 0); ++int vsscanf(const char *__restrict, const char *__restrict, __isoc_va_list) __fs(2, 0); + + void perror(const char *); + +@@ -135,8 +143,8 @@ int pclose(FILE *); + int fileno(FILE *); + int fseeko(FILE *, off_t, int); + off_t ftello(FILE *); +-int dprintf(int, const char *__restrict, ...); +-int vdprintf(int, const char *__restrict, __isoc_va_list); ++int dprintf(int, const char *__restrict, ...) __fp(2, 3); ++int vdprintf(int, const char *__restrict, __isoc_va_list) __fp(2, 0); + void flockfile(FILE *); + int ftrylockfile(FILE *); + void funlockfile(FILE *); +@@ -175,8 +183,8 @@ int fileno_unlocked(FILE *); + int getw(FILE *); + int putw(int, FILE *); + char *fgetln(FILE *, size_t *); +-int asprintf(char **, const char *, ...); +-int vasprintf(char **, const char *, __isoc_va_list); ++int asprintf(char **, const char *, ...) __fp(2, 3); ++int vasprintf(char **, const char *, __isoc_va_list) __fp(2, 0); + #endif + + #ifdef _GNU_SOURCE +@@ -184,6 +192,9 @@ char *fgets_unlocked(char *, int, FILE * + int fputs_unlocked(const char *, FILE *); + #endif + ++#undef __fp ++#undef __fs ++ + #if defined(_LARGEFILE64_SOURCE) || defined(_GNU_SOURCE) + #define tmpfile64 tmpfile + #define fopen64 fopen +--- a/include/syslog.h ++++ b/include/syslog.h +@@ -56,16 +56,22 @@ extern "C" { + #define LOG_NOWAIT 0x10 + #define LOG_PERROR 0x20 + ++#if __GNUC__ >= 3 ++#define __fp(x, y) __attribute__ ((__format__ (__printf__, x, y))) ++#else ++#define __fp(x, y) ++#endif ++ + void closelog (void); + void openlog (const char *, int, int); + int setlogmask (int); +-void syslog (int, const char *, ...); ++void syslog (int, const char *, ...) __fp(2, 3); + + #if defined(_GNU_SOURCE) || defined(_BSD_SOURCE) + #define _PATH_LOG "/dev/log" + #define __NEED_va_list + #include +-void vsyslog (int, const char *, va_list); ++void vsyslog (int, const char *, va_list) __fp(2, 0); + #if defined(SYSLOG_NAMES) + #define INTERNAL_NOPRI 0x10 + #define INTERNAL_MARK (LOG_NFACILITIES<<3) +@@ -93,6 +99,8 @@ typedef struct { + #endif + #endif + ++#undef __fp ++ + #ifdef __cplusplus + } + #endif diff --git a/toolchain-old/musl/patches/900-iconv_size_hack.patch b/toolchain-old/musl/patches/900-iconv_size_hack.patch new file mode 100644 index 000000000..343915fb0 --- /dev/null +++ b/toolchain-old/musl/patches/900-iconv_size_hack.patch @@ -0,0 +1,68 @@ +--- a/src/locale/iconv.c ++++ b/src/locale/iconv.c +@@ -39,6 +39,7 @@ static const unsigned char charmaps[] = + "ucs4\0ucs4be\0utf32\0utf32be\0\0\300" + "ucs4le\0utf32le\0\0\303" + "ascii\0usascii\0iso646\0iso646us\0\0\307" ++#ifdef FULL_ICONV + "eucjp\0\0\320" + "shiftjis\0sjis\0\0\321" + "gb18030\0\0\330" +@@ -46,6 +47,7 @@ static const unsigned char charmaps[] = + "gb2312\0\0\332" + "big5\0bigfive\0cp950\0big5hkscs\0\0\340" + "euckr\0ksc5601\0ksx1001\0cp949\0\0\350" ++#endif + #include "codepages.h" + ; + +@@ -53,6 +55,7 @@ static const unsigned short legacy_chars + #include "legacychars.h" + }; + ++#ifdef FULL_ICONV + static const unsigned short jis0208[84][94] = { + #include "jis0208.h" + }; +@@ -72,6 +75,7 @@ static const unsigned short hkscs[] = { + static const unsigned short ksc[93][94] = { + #include "ksc.h" + }; ++#endif + + static int fuzzycmp(const unsigned char *a, const unsigned char *b) + { +@@ -216,6 +220,7 @@ size_t iconv(iconv_t cd0, char **restric + c = ((c-0xd7c0)<<10) + (d-0xdc00); + } + break; ++#ifdef FULL_ICONV + case SHIFT_JIS: + if (c-0xa1 <= 0xdf-0xa1) { + c += 0xff61-0xa1; +@@ -362,6 +367,7 @@ size_t iconv(iconv_t cd0, char **restric + c = ksc[c][d]; + if (!c) goto ilseq; + break; ++#endif + default: + if (c < 128+type) break; + c -= 128+type; +--- a/src/locale/codepages.h ++++ b/src/locale/codepages.h +@@ -118,6 +118,7 @@ + "\0\0\0\100\15\0\344\0\0\0\0\0\0\0\0\0\0\0\0\0\103\270\1\0\0\0\340\1\200\40" + "\230\0\0\0\0\0\44\341\12\0" + ++#ifdef FULL_ICONV + "cp1250\0" + "windows1250\0" + "\0\0" +@@ -214,6 +215,7 @@ + "\0\0\0\0\0\0\0\0\0\15\0\0\0\0\0\0\0\0\0\0\266\0\0\0\0\102\0\220\13\0" + "\0\234\2\0\0\0\0\0\0\0\0\244\202\13\0\0\0\0\100\15\0\0\0\0\0\0\0\0\0\0" + "\267\0\0\0\0\103\0\240\13\0\0\240\2\0\0\0\0\0\0\0\0\250\62\45\0" ++#endif + + "koi8r\0" + "\0\0" diff --git a/toolchain-old/musl/patches/901-crypt_size_hack.patch b/toolchain-old/musl/patches/901-crypt_size_hack.patch new file mode 100644 index 000000000..8cd7b1989 --- /dev/null +++ b/toolchain-old/musl/patches/901-crypt_size_hack.patch @@ -0,0 +1,60 @@ +--- a/src/crypt/crypt_r.c ++++ b/src/crypt/crypt_r.c +@@ -19,12 +19,6 @@ char *__crypt_r(const char *key, const c + if (salt[0] == '$' && salt[1] && salt[2]) { + if (salt[1] == '1' && salt[2] == '$') + return __crypt_md5(key, salt, output); +- if (salt[1] == '2' && salt[3] == '$') +- return __crypt_blowfish(key, salt, output); +- if (salt[1] == '5' && salt[2] == '$') +- return __crypt_sha256(key, salt, output); +- if (salt[1] == '6' && salt[2] == '$') +- return __crypt_sha512(key, salt, output); + } + return __crypt_des(key, salt, output); + } +--- a/src/crypt/crypt_sha512.c ++++ b/src/crypt/crypt_sha512.c +@@ -12,6 +12,7 @@ + #include + #include + #include ++#if 0 + + /* public domain sha512 implementation based on fips180-3 */ + /* >=2^64 bits messages are not supported (about 2000 peta bytes) */ +@@ -369,3 +370,4 @@ char *__crypt_sha512(const char *key, co + return "*"; + return p; + } ++#endif +--- a/src/crypt/crypt_blowfish.c ++++ b/src/crypt/crypt_blowfish.c +@@ -50,6 +50,7 @@ + #include + #include + ++#if 0 + typedef uint32_t BF_word; + typedef int32_t BF_word_signed; + +@@ -796,3 +797,4 @@ char *__crypt_blowfish(const char *key, + + return "*"; + } ++#endif +--- a/src/crypt/crypt_sha256.c ++++ b/src/crypt/crypt_sha256.c +@@ -13,6 +13,7 @@ + #include + #include + ++#if 0 + /* public domain sha256 implementation based on fips180-3 */ + + struct sha256 { +@@ -320,3 +321,4 @@ char *__crypt_sha256(const char *key, co + return "*"; + return p; + } ++#endif diff --git a/toolchain-old/uClibc/Config.in b/toolchain-old/uClibc/Config.in new file mode 100644 index 000000000..3bcb0037e --- /dev/null +++ b/toolchain-old/uClibc/Config.in @@ -0,0 +1,6 @@ +# Debug version. + +config UCLIBC_ENABLE_DEBUG + bool "Build with debug information" + depends on TOOLCHAINOPTS && USE_UCLIBC && !EXTERNAL_TOOLCHAIN + default n diff --git a/toolchain-old/uClibc/Makefile b/toolchain-old/uClibc/Makefile new file mode 100644 index 000000000..4764f2fa1 --- /dev/null +++ b/toolchain-old/uClibc/Makefile @@ -0,0 +1,37 @@ +PATH_PREFIX=. + +include ./common.mk + +HOST_STAMP_BUILT:=$(HOST_BUILD_DIR)/.built +HOST_STAMP_INSTALLED:=$(TOOLCHAIN_DIR)/stamp/.uclibc_installed + +HOST_BUILD_PARALLEL:=1 + +define Host/SetToolchainInfo + $(SED) 's,^\(LIBC_TYPE\)=.*,\1=$(PKG_NAME),' $(TOOLCHAIN_DIR)/info.mk + $(SED) 's,^\(LIBC_URL\)=.*,\1=http://www.uclibc.org/,' $(TOOLCHAIN_DIR)/info.mk + $(SED) 's,^\(LIBC_VERSION\)=.*,\1=$(PKG_VERSION),' $(TOOLCHAIN_DIR)/info.mk + $(SED) 's,^\(LIBC_SO_VERSION\)=.*,\1=$(LIBC_SO_VERSION),' $(TOOLCHAIN_DIR)/info.mk +endef + +define Host/Compile + $(SED) 's,^CROSS=.*,CROSS=$(TARGET_CROSS),g' $(HOST_BUILD_DIR)/Rules.mak + $(UCLIBC_MAKE) PREFIX= all +endef + +define Host/Install + $(call Host/SetToolchainInfo) + $(UCLIBC_MAKE) PREFIX="$(TOOLCHAIN_DIR)/" install_runtime install_dev + $(CP) $(HOST_BUILD_DIR)/libc/libc_so.a $(TOOLCHAIN_DIR)/lib/ + ( cd $(TOOLCHAIN_DIR) ; \ + for d in lib usr/lib ; do \ + for f in libc.so libgcc_s.so ; do \ + if [ -f $$$$d/$$$$f -a ! -L $$$$d/$$$$f ] ; then \ + $(SED) 's,/usr/lib/,,g;s,/lib/,,g' $$$$d/$$$$f ; \ + fi \ + done \ + done \ + ) +endef + +$(eval $(call HostBuild)) diff --git a/toolchain-old/uClibc/common.mk b/toolchain-old/uClibc/common.mk new file mode 100644 index 000000000..384d73233 --- /dev/null +++ b/toolchain-old/uClibc/common.mk @@ -0,0 +1,97 @@ +# +# Copyright (C) 2006-2012 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# +include $(TOPDIR)/rules.mk +include $(INCLUDE_DIR)/target.mk + +PKG_VERSION:=1.0.22 + +PKG_NAME:=uClibc-ng +PKG_SOURCE_URL = http://downloads.uclibc-ng.org/releases/$(PKG_VERSION)/ +PATCH_DIR:=$(PATH_PREFIX)/patches +CONFIG_DIR:=$(PATH_PREFIX)/config +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz +LIBC_SO_VERSION:=$(PKG_VERSION) + +PKG_HASH:=f2004c85db8e07e9f1c2e8b7c513fa7c237bc9f9685d8e1bfc89535b8a85449b + +HOST_BUILD_DIR:=$(BUILD_DIR_TOOLCHAIN)/$(PKG_NAME)-$(PKG_VERSION) + +include $(INCLUDE_DIR)/toolchain-build.mk + +UCLIBC_TARGET_ARCH:=$(shell echo $(ARCH) | sed -e s'/-.*//' \ + -e 's/arc.*/arc/' \ + -e 's/i.86/i386/' \ + -e 's/sparc.*/sparc/' \ + -e 's/arm.*/arm/g' \ + -e 's/m68k.*/m68k/' \ + -e 's/ppc/powerpc/g' \ + -e 's/v850.*/v850/g' \ + -e 's/sh64/sh/' \ + -e 's/sh[234].*/sh/' \ + -e 's/mips.*/mips/' \ + -e 's/mipsel.*/mips/' \ +) + +GEN_CONFIG=$(SCRIPT_DIR)/kconfig.pl -n \ + $(if $(wildcard $(CONFIG_DIR)/common),'+' $(CONFIG_DIR)/common) \ + $(if $(CONFIG_UCLIBC_ENABLE_DEBUG),$(if $(wildcard $(CONFIG_DIR)/debug),'+' $(CONFIG_DIR)/debug)) \ + $(CONFIG_DIR)/$(ARCH)$(strip \ + $(if $(wildcard $(CONFIG_DIR)/$(ARCH).$(BOARD)),.$(BOARD), \ + $(if $(filter archs,$(subst ",,$(CONFIG_CPU_TYPE))),hs, \ + $(if $(CONFIG_MIPS64_ABI),.$(subst ",,$(CONFIG_MIPS64_ABI)), \ + $(if $(CONFIG_HAS_SPE_FPU),$(if $(wildcard $(CONFIG_DIR)/$(ARCH).e500),.e500)))))) + +CPU_CFLAGS = \ + -funsigned-char -fno-builtin -fno-asm \ + --std=gnu99 -ffunction-sections -fdata-sections \ + -Wno-unused-but-set-variable \ + $(TARGET_CFLAGS) -ggdb + +UCLIBC_MAKE = PATH='$(TOOLCHAIN_DIR)/initial/bin:$(TARGET_PATH)' $(MAKE) $(HOST_JOBS) -C $(HOST_BUILD_DIR) \ + $(TARGET_CONFIGURE_OPTS) \ + DEVEL_PREFIX=/ \ + RUNTIME_PREFIX=/ \ + HOSTCC="$(HOSTCC)" \ + CPU_CFLAGS="$(CPU_CFLAGS)" \ + ARCH="$(CONFIG_ARCH)" \ + LIBGCC="$(subst libgcc.a,libgcc_initial.a,$(shell $(TARGET_CC) -print-libgcc-file-name))" \ + DOSTRIP="" + +define Host/Prepare + $(call Host/Prepare/Default) + $(if $(strip $(QUILT)), \ + cd $(HOST_BUILD_DIR); \ + if $(QUILT_CMD) next >/dev/null 2>&1; then \ + $(QUILT_CMD) push -a; \ + fi + ) + ln -snf $(PKG_NAME)-$(PKG_VERSION) $(BUILD_DIR_TOOLCHAIN)/$(PKG_NAME) +endef + +define Host/Configure + $(GEN_CONFIG) > $(HOST_BUILD_DIR)/.config.new + $(SED) 's,^KERNEL_HEADERS=.*,KERNEL_HEADERS=\"$(BUILD_DIR_TOOLCHAIN)/linux-dev/include\",g' \ + -e 's,^.*UCLIBC_HAS_FPU.*,UCLIBC_HAS_FPU=$(if $(CONFIG_SOFT_FLOAT),n,y),g' \ + -e 's,^.*UCLIBC_HAS_SOFT_FLOAT.*,UCLIBC_HAS_SOFT_FLOAT=$(if $(CONFIG_SOFT_FLOAT),y,n),g' \ + -e 's,^.*UCLIBC_HAS_LOCALE.*,UCLIBC_HAS_LOCALE=$(if $(CONFIG_BUILD_NLS),y,n),g' \ + -e 's,^.*UCLIBC_BUILD_ALL_LOCALE.*,UCLIBC_BUILD_ALL_LOCALE=$(if $(CONFIG_BUILD_NLS),y,n),g' \ + -e 's,^.*UCLIBC_HAS_SSP[^_].*,UCLIBC_HAS_SSP=$(if $(or $(CONFIG_PKG_CC_STACKPROTECTOR_REGULAR),$(CONFIG_PKG_CC_STACKPROTECTOR_STRONG)),y,n),g' \ + $(HOST_BUILD_DIR)/.config.new + cmp -s $(HOST_BUILD_DIR)/.config.new $(HOST_BUILD_DIR)/.config.last || { \ + cp $(HOST_BUILD_DIR)/.config.new $(HOST_BUILD_DIR)/.config && \ + $(MAKE) -C $(HOST_BUILD_DIR) olddefconfig KBUILD_HAVE_NLS= HOSTCFLAGS="-DKBUILD_NO_NLS" && \ + $(MAKE) -C $(HOST_BUILD_DIR)/extra/config conf KBUILD_HAVE_NLS= HOSTCFLAGS="-DKBUILD_NO_NLS" && \ + cp $(HOST_BUILD_DIR)/.config.new $(HOST_BUILD_DIR)/.config.last; \ + } +endef + +define Host/Clean + rm -rf \ + $(HOST_BUILD_DIR) \ + $(BUILD_DIR_TOOLCHAIN)/$(PKG_NAME) \ + $(BUILD_DIR_TOOLCHAIN)/$(LIBC)-dev +endef diff --git a/toolchain-old/uClibc/config/arc b/toolchain-old/uClibc/config/arc new file mode 100644 index 000000000..de1ffc441 --- /dev/null +++ b/toolchain-old/uClibc/config/arc @@ -0,0 +1,10 @@ +ARCH_ANY_ENDIAN=y +ARCH_LITTLE_ENDIAN=y +ARCH_WANTS_LITTLE_ENDIAN=y +TARGET_ARCH="arc" +TARGET_arc=y +CONFIG_ARC_CPU_700=y +# CONFIG_ARC_CPU_HS is not set +CONFIG_ARC_PAGE_SIZE_8K=y +# CONFIG_ARC_PAGE_SIZE_16K is not set +# CONFIG_ARC_PAGE_SIZE_4K is not set diff --git a/toolchain-old/uClibc/config/archs b/toolchain-old/uClibc/config/archs new file mode 100644 index 000000000..961628ed8 --- /dev/null +++ b/toolchain-old/uClibc/config/archs @@ -0,0 +1,10 @@ +ARCH_ANY_ENDIAN=y +ARCH_LITTLE_ENDIAN=y +ARCH_WANTS_LITTLE_ENDIAN=y +TARGET_ARCH="arc" +TARGET_arc=y +# CONFIG_ARC_CPU_700 is not set +CONFIG_ARC_CPU_HS=y +CONFIG_ARC_PAGE_SIZE_8K=y +# CONFIG_ARC_PAGE_SIZE_16K is not set +# CONFIG_ARC_PAGE_SIZE_4K is not set diff --git a/toolchain-old/uClibc/config/arm b/toolchain-old/uClibc/config/arm new file mode 100644 index 000000000..41a60b1c3 --- /dev/null +++ b/toolchain-old/uClibc/config/arm @@ -0,0 +1,9 @@ +ARCH_ANY_ENDIAN=y +ARCH_LITTLE_ENDIAN=y +ARCH_WANTS_LITTLE_ENDIAN=y +# COMPILE_IN_THUMB_MODE is not set +TARGET_ARCH="arm" +TARGET_arm=y +# USE_BX is not set +CONFIG_ARM_EABI=y + diff --git a/toolchain-old/uClibc/config/armeb b/toolchain-old/uClibc/config/armeb new file mode 100644 index 000000000..2e46dd67d --- /dev/null +++ b/toolchain-old/uClibc/config/armeb @@ -0,0 +1,9 @@ +ARCH_ANY_ENDIAN=y +ARCH_BIG_ENDIAN=y +ARCH_WANTS_BIG_ENDIAN=y +# COMPILE_IN_THUMB_MODE is not set +TARGET_ARCH="arm" +TARGET_arm=y +# USE_BX is not set +CONFIG_ARM_EABI=y + diff --git a/toolchain-old/uClibc/config/common b/toolchain-old/uClibc/config/common new file mode 100644 index 000000000..b679c0a1e --- /dev/null +++ b/toolchain-old/uClibc/config/common @@ -0,0 +1,226 @@ +# ARCH_ANY_ENDIAN is not set +ARCH_HAS_MMU=y +# ARCH_HAS_NO_LDSO is not set +# ARCH_HAS_NO_SHARED is not set +# ARCH_LITTLE_ENDIAN is not set +ARCH_USE_MMU=y +# ARCH_WANTS_BIG_ENDIAN is not set +# ARCH_WANTS_LITTLE_ENDIAN is not set +ASSUME_DEVPTS=y +# COMPAT_ATEXIT is not set +CROSS_COMPILER_PREFIX="" +DEVEL_PREFIX="/usr/" +# DOASSERTS is not set +# DODEBUG is not set +# DODEBUG_PT is not set +# DOMULTI is not set +DOPIC=y +DOSTRIP=y +DO_C99_MATH=y +# DO_XSI_MATH is not set +# EXTRA_WARNINGS is not set +FORCE_OPTIONS_FOR_ARCH=y +# FORCE_SHAREABLE_TEXT_SEGMENTS is not set +# HARDWIRED_ABSPATH is not set +# HAS_NO_THREADS is not set +HAVE_DOT_CONFIG=y +# HAVE_NO_PIC is not set +# HAVE_NO_SSP is not set +HAVE_SHARED=y +KERNEL_HEADERS="." +LDSO_BASE_FILENAME="ld.so" +LDSO_CACHE_SUPPORT=y +# LDSO_GNU_HASH_SUPPORT is not set +LDSO_LD_LIBRARY_PATH=y +LDSO_LDD_SUPPORT=y +# LDSO_NO_CLEANUP is not set +# LDSO_PRELINK_SUPPORT is not set +# LDSO_PRELOAD_FILE_SUPPORT is not set +LDSO_PRELOAD_ENV_SUPPORT=y +LDSO_RUNPATH=y +LDSO_SAFE_RUNPATH=y +# LDSO_RUNPATH_OF_EXECUTABLE is not set +# LDSO_SEARCH_INTERP_PATH is not set +# LDSO_STANDALONE_SUPPORT is not set +# LINUXTHREADS_NEW is not set +# LINUXTHREADS_OLD is not set +# UCLIBC_HAS_BACKTRACE is not set +UCLIBC_HAS_THREADS_NATIVE=y +# MALLOC is not set +MALLOC_GLIBC_COMPAT=y +# MALLOC_SIMPLE is not set +MALLOC_STANDARD=y +MULTILIB_DIR="lib" +PTHREADS_DEBUG_SUPPORT=y +RUNTIME_PREFIX="/" +# SUPPORT_LD_DEBUG is not set +# SUPPORT_LD_DEBUG_EARLY is not set +TARGET_SUBARCH="" +# TARGET_alpha is not set +# TARGET_arc is not set +# TARGET_arm is not set +# TARGET_avr32 is not set +# TARGET_bfin is not set +# TARGET_c6x is not set +# TARGET_cris is not set +# TARGET_e1 is not set +# TARGET_frv is not set +# TARGET_h8300 is not set +# TARGET_hppa is not set +# TARGET_i386 is not set +# TARGET_i960 is not set +# TARGET_ia64 is not set +# TARGET_lm32 is not set +# TARGET_m68k is not set +# TARGET_metag is not set +# TARGET_microblaze is not set +# TARGET_mips is not set +# TARGET_nios is not set +# TARGET_nios2 is not set +# TARGET_or1k is not set +# TARGET_powerpc is not set +# TARGET_sh is not set +# TARGET_sh64 is not set +# TARGET_sparc is not set +# TARGET_v850 is not set +# TARGET_vax is not set +# TARGET_x86_64 is not set +# TARGET_xtensa is not set +UCLIBC_BSD_SPECIFIC=y +UCLIBC_BUILD_NOEXECSTACK=y +# UCLIBC_BUILD_NOW is not set +# UCLIBC_BUILD_PIE is not set +UCLIBC_BUILD_RELRO=y +UCLIBC_CTOR_DTOR=y +UCLIBC_DYNAMIC_ATEXIT=y +UCLIBC_EXTRA_CFLAGS="" +UCLIBC_GRP_BUFFER_SIZE=256 +UCLIBC_HAS_ADVANCED_REALTIME=y +# UCLIBC_HAS_ARC4RANDOM is not set +# UCLIBC_HAS_ARGP is not set +UCLIBC_HAS_BSD_ERR=y +UCLIBC_HAS_BSD_RES_CLOSE=y +# UCLIBC_HAS_COMPAT_RES_STATE is not set +UCLIBC_HAS_CRYPT=y +UCLIBC_HAS_CRYPT_IMPL=y +UCLIBC_HAS_CTYPE_CHECKED=y +# UCLIBC_HAS_CTYPE_ENFORCED is not set +UCLIBC_HAS_CTYPE_SIGNED=y +UCLIBC_HAS_CTYPE_TABLES=y +# UCLIBC_HAS_CTYPE_UNSAFE is not set +UCLIBC_HAS_EPOLL=y +UCLIBC_HAS_ERRNO_MESSAGES=y +# UCLIBC_HAS_EXTRA_COMPAT_RES_STATE is not set +# UCLIBC_HAS_FENV is not set +UCLIBC_HAS_FLOATS=y +UCLIBC_HAS_FNMATCH=y +UCLIBC_HAS_FNMATCH_OLD=y +# UCLIBC_HAS_FOPEN_CLOSEEXEC_MODE is not set +UCLIBC_HAS_FOPEN_EXCLUSIVE_MODE=y +# UCLIBC_HAS_FOPEN_LARGEFILE_MODE is not set +# UCLIBC_HAS_FPU is not set +UCLIBC_HAS_FTS=y +UCLIBC_HAS_FTW=y +# UCLIBC_HAS_FULL_RPC is not set +UCLIBC_HAS_GETPT=y +UCLIBC_HAS_GLIBC_CUSTOM_PRINTF=y +UCLIBC_HAS_GLIBC_CUSTOM_STREAMS=y +# UCLIBC_HAS_GLIBC_DIGIT_GROUPING is not set +UCLIBC_HAS_GLOB=y +UCLIBC_HAS_GNU_ERROR=y +UCLIBC_HAS_GNU_GETOPT=y +UCLIBC_HAS_GNU_GETSUBOPT=y +UCLIBC_HAS_GNU_GLOB=y +UCLIBC_HAS_HEXADECIMAL_FLOATS=y +UCLIBC_HAS_IPV4=y +UCLIBC_HAS_IPV6=y +UCLIBC_HAS_LFS=y +UCLIBC_HAS_LIBNSL_STUB=y +UCLIBC_HAS_LIBRESOLV_STUB=y +UCLIBC_HAS_LIBUTIL=y +# UCLIBC_HAS_LOCALE is not set +# UCLIBC_BUILD_ALL_LOCALE is not set +# UCLIBC_BUILD_MINIMAL_LOCALE is not set +# UCLIBC_PREGENERATED_LOCALE_DATA is not set +UCLIBC_HAS_LONG_DOUBLE_MATH=y +UCLIBC_HAS_NETWORK_SUPPORT=y +UCLIBC_HAS_NFTW=y +UCLIBC_HAS_OBSOLETE_BSD_SIGNAL=y +# UCLIBC_HAS_OBSOLETE_SYSV_SIGNAL is not set +UCLIBC_HAS_PRINTF_M_SPEC=y +# UCLIBC_HAS_PROFILING is not set +UCLIBC_HAS_PROGRAM_INVOCATION_NAME=y +UCLIBC_HAS_PTY=y +UCLIBC_HAS_REALTIME=y +# UCLIBC_HAS_REENTRANT_RPC is not set +UCLIBC_HAS_REGEX=y +UCLIBC_HAS_REGEX_OLD=y +UCLIBC_HAS_RESOLVER_SUPPORT=y +# UCLIBC_HAS_RPC is not set +UCLIBC_HAS_SCANF_GLIBC_A_FLAG=y +# UCLIBC_HAS_SHA256_CRYPT_IMPL is not set +# UCLIBC_HAS_SHA512_CRYPT_IMPL is not set +UCLIBC_HAS_SHADOW=y +UCLIBC_HAS_SIGNUM_MESSAGES=y +UCLIBC_HAS_SOCKET=y +UCLIBC_HAS_SOFT_FLOAT=y +# UCLIBC_HAS_SSP is not set +# UCLIBC_HAS_SSP_COMPAT is not set +UCLIBC_HAS_STDIO_AUTO_RW_TRANSITION=y +# UCLIBC_HAS_STDIO_BUFSIZ_1024 is not set +# UCLIBC_HAS_STDIO_BUFSIZ_2048 is not set +# UCLIBC_HAS_STDIO_BUFSIZ_256 is not set +UCLIBC_HAS_STDIO_BUFSIZ_4096=y +# UCLIBC_HAS_STDIO_BUFSIZ_512 is not set +# UCLIBC_HAS_STDIO_BUFSIZ_8192 is not set +# UCLIBC_HAS_STDIO_BUFSIZ_NONE is not set +# UCLIBC_HAS_STDIO_BUILTIN_BUFFER_4 is not set +# UCLIBC_HAS_STDIO_BUILTIN_BUFFER_8 is not set +UCLIBC_HAS_STDIO_BUILTIN_BUFFER_NONE=y +UCLIBC_HAS_STDIO_GETC_MACRO=y +UCLIBC_HAS_STDIO_PUTC_MACRO=y +# UCLIBC_HAS_STDIO_SHUTDOWN_ON_ABORT is not set +UCLIBC_HAS_STRING_ARCH_OPT=y +UCLIBC_HAS_STRING_GENERIC_OPT=y +# UCLIBC_HAS_STUBS is not set +UCLIBC_HAS_SYSLOG=y +# UCLIBC_HAS_SYS_ERRLIST is not set +# UCLIBC_HAS_SYS_SIGLIST is not set +UCLIBC_HAS_THREADS=y +UCLIBC_HAS_TM_EXTENSIONS=y +UCLIBC_HAS_TZ_CACHING=y +UCLIBC_HAS_TZ_FILE=y +UCLIBC_HAS_TZ_FILE_READ_MANY=y +UCLIBC_HAS_UTMPX=y +UCLIBC_HAS_UTMP=y +UCLIBC_HAS_WCHAR=y +UCLIBC_HAS_WORDEXP=y +UCLIBC_HAS_XATTR=y +# UCLIBC_HAS_XLOCALE is not set +UCLIBC_HAS___PROGNAME=y +# UCLIBC_LINUX_MODULE_24 is not set +UCLIBC_LINUX_MODULE_26=y +UCLIBC_LINUX_SPECIFIC=y +# UCLIBC_MALLOC_DEBUGGING is not set +# UCLIBC_MJN3_ONLY is not set +# UCLIBC_NTP_LEGACY is not set +# USE_OLD_VFPRINTF is not set +UCLIBC_PRINTF_SCANF_POSITIONAL_ARGS=9 +UCLIBC_PWD_BUFFER_SIZE=256 +# UCLIBC_STATIC_LDCONFIG is not set +# UCLIBC_STRICT_HEADERS is not set +UCLIBC_SUPPORT_AI_ADDRCONFIG=y +UCLIBC_SUSV3_LEGACY=y +UCLIBC_SUSV3_LEGACY_MACROS=y +UCLIBC_SUSV4_LEGACY=y +# UCLIBC_SV4_DEPRECATED is not set +UCLIBC_TZ_FILE_PATH="/etc/TZ" +# UCLIBC_FALLBACK_TO_ETC_LOCALTIME is not set +UCLIBC_USE_NETLINK=y +# UNIX98PTY_ONLY is not set +USE_BX=y +WARNINGS="-Wall" +# UCLIBC_HAS_OBSTACK is not set +# UCLIBC_SUSV2_LEGACY is not set +# UCLIBC_HAS_CONTEXT_FUNCS is not set +UCLIBC_HAS_GETOPT_LONG=y diff --git a/toolchain-old/uClibc/config/debug b/toolchain-old/uClibc/config/debug new file mode 100644 index 000000000..b366e66e3 --- /dev/null +++ b/toolchain-old/uClibc/config/debug @@ -0,0 +1,6 @@ +DODEBUG=y +DODEBUG_PT=y +PTHREADS_DEBUG_SUPPORT=y +SUPPORT_LD_DEBUG=y +SUPPORT_LD_DEBUG_EARLY=y +UCLIBC_MALLOC_DEBUGGING=y diff --git a/toolchain-old/uClibc/config/i386 b/toolchain-old/uClibc/config/i386 new file mode 100644 index 000000000..5ef264c27 --- /dev/null +++ b/toolchain-old/uClibc/config/i386 @@ -0,0 +1,21 @@ +ARCH_LITTLE_ENDIAN=y +# CONFIG_386 is not set +CONFIG_486=y +# CONFIG_586 is not set +# CONFIG_586MMX is not set +# CONFIG_686 is not set +# CONFIG_CRUSOE is not set +# CONFIG_CYRIXIII is not set +# CONFIG_ELAN is not set +# CONFIG_GENERIC_386 is not set +# CONFIG_K6 is not set +# CONFIG_K7 is not set +# CONFIG_NEHEMIAH is not set +# CONFIG_PENTIUM4 is not set +# CONFIG_PENTIUMII is not set +# CONFIG_PENTIUMIII is not set +# CONFIG_WINCHIP2 is not set +# CONFIG_WINCHIPC6 is not set +TARGET_ARCH="i386" +TARGET_i386=y +UCLIBC_HAS_FPU=y diff --git a/toolchain-old/uClibc/config/i686 b/toolchain-old/uClibc/config/i686 new file mode 100644 index 000000000..ba615f6b8 --- /dev/null +++ b/toolchain-old/uClibc/config/i686 @@ -0,0 +1,21 @@ +ARCH_LITTLE_ENDIAN=y +# CONFIG_386 is not set +# CONFIG_486 is not set +# CONFIG_586 is not set +# CONFIG_586MMX is not set +CONFIG_686=y +# CONFIG_CRUSOE is not set +# CONFIG_CYRIXIII is not set +# CONFIG_ELAN is not set +# CONFIG_GENERIC_386 is not set +# CONFIG_K6 is not set +# CONFIG_K7 is not set +# CONFIG_NEHEMIAH is not set +# CONFIG_PENTIUM4 is not set +# CONFIG_PENTIUMII is not set +# CONFIG_PENTIUMIII is not set +# CONFIG_WINCHIP2 is not set +# CONFIG_WINCHIPC6 is not set +TARGET_ARCH="i386" +TARGET_i386=y +UCLIBC_HAS_FPU=y diff --git a/toolchain-old/uClibc/config/m68k b/toolchain-old/uClibc/config/m68k new file mode 100644 index 000000000..14ce5aef7 --- /dev/null +++ b/toolchain-old/uClibc/config/m68k @@ -0,0 +1,6 @@ +ARCH_BIG_ENDIAN=y +LINUXTHREADS_OLD=y +TARGET_ARCH="m68k" +TARGET_SUBARCH="" +TARGET_m68k=y +# UCLIBC_HAS_THREADS_NATIVE is not set diff --git a/toolchain-old/uClibc/config/mips b/toolchain-old/uClibc/config/mips new file mode 100644 index 000000000..8cec22f4d --- /dev/null +++ b/toolchain-old/uClibc/config/mips @@ -0,0 +1,18 @@ +ARCH_ANY_ENDIAN=y +ARCH_BIG_ENDIAN=y +ARCH_CFLAGS="-mno-split-addresses" +ARCH_WANTS_BIG_ENDIAN=y +# CONFIG_MIPS_ISA_1 is not set +# CONFIG_MIPS_ISA_2 is not set +# CONFIG_MIPS_ISA_3 is not set +# CONFIG_MIPS_ISA_4 is not set +CONFIG_MIPS_ISA_MIPS32=y +# CONFIG_MIPS_ISA_MIPS32R2 is not set +# CONFIG_MIPS_ISA_MIPS64 is not set +# CONFIG_MIPS_ISA_MIPS64R2 is not set +# CONFIG_MIPS_N32_ABI is not set +# CONFIG_MIPS_N64_ABI is not set +CONFIG_MIPS_O32_ABI=y +TARGET_ARCH="mips" +TARGET_mips=y +UCLIBC_HAS_FPU=y diff --git a/toolchain-old/uClibc/config/mips64 b/toolchain-old/uClibc/config/mips64 new file mode 100644 index 000000000..566d87a6e --- /dev/null +++ b/toolchain-old/uClibc/config/mips64 @@ -0,0 +1,18 @@ +ARCH_ANY_ENDIAN=y +ARCH_BIG_ENDIAN=y +ARCH_CFLAGS="-mno-split-addresses" +ARCH_WANTS_BIG_ENDIAN=y +# CONFIG_MIPS_ISA_1 is not set +# CONFIG_MIPS_ISA_2 is not set +# CONFIG_MIPS_ISA_3 is not set +# CONFIG_MIPS_ISA_4 is not set +# CONFIG_MIPS_ISA_MIPS32 is not set +# CONFIG_MIPS_ISA_MIPS32R2 is not set +CONFIG_MIPS_ISA_MIPS64=y +# CONFIG_MIPS_ISA_MIPS64R2 is not set +# CONFIG_MIPS_N32_ABI is not set +CONFIG_MIPS_N64_ABI=y +# CONFIG_MIPS_O32_ABI is not set +TARGET_ARCH="mips" +TARGET_mips=y +UCLIBC_HAS_FPU=y diff --git a/toolchain-old/uClibc/config/mips64.32 b/toolchain-old/uClibc/config/mips64.32 new file mode 100644 index 000000000..b7ea8f457 --- /dev/null +++ b/toolchain-old/uClibc/config/mips64.32 @@ -0,0 +1,19 @@ +ARCH_ANY_ENDIAN=y +ARCH_BIG_ENDIAN=y +ARCH_CFLAGS="-mno-split-addresses" +ARCH_WANTS_BIG_ENDIAN=y +# CONFIG_MIPS_ISA_1 is not set +# CONFIG_MIPS_ISA_2 is not set +# CONFIG_MIPS_ISA_3 is not set +# CONFIG_MIPS_ISA_4 is not set +# CONFIG_MIPS_ISA_MIPS32 is not set +# CONFIG_MIPS_ISA_MIPS32R2 is not set +CONFIG_MIPS_ISA_MIPS64=y +# CONFIG_MIPS_ISA_MIPS64R2 is not set +# CONFIG_MIPS_N32_ABI is not set +# CONFIG_MIPS_N64_ABI is not set +CONFIG_MIPS_O32_ABI=y +TARGET_ARCH="mips" +TARGET_mips=y +TARGET_SUBARCH="mips64" +UCLIBC_HAS_FPU=y diff --git a/toolchain-old/uClibc/config/mips64.64 b/toolchain-old/uClibc/config/mips64.64 new file mode 100644 index 000000000..2a0b755a7 --- /dev/null +++ b/toolchain-old/uClibc/config/mips64.64 @@ -0,0 +1,19 @@ +ARCH_ANY_ENDIAN=y +ARCH_BIG_ENDIAN=y +ARCH_CFLAGS="-mno-split-addresses" +ARCH_WANTS_BIG_ENDIAN=y +# CONFIG_MIPS_ISA_1 is not set +# CONFIG_MIPS_ISA_2 is not set +# CONFIG_MIPS_ISA_3 is not set +# CONFIG_MIPS_ISA_4 is not set +# CONFIG_MIPS_ISA_MIPS32 is not set +# CONFIG_MIPS_ISA_MIPS32R2 is not set +CONFIG_MIPS_ISA_MIPS64=y +# CONFIG_MIPS_ISA_MIPS64R2 is not set +# CONFIG_MIPS_N32_ABI is not set +CONFIG_MIPS_N64_ABI=y +# CONFIG_MIPS_O32_ABI is not set +TARGET_ARCH="mips" +TARGET_mips=y +TARGET_SUBARCH="mips64" +UCLIBC_HAS_FPU=y diff --git a/toolchain-old/uClibc/config/mips64.n32 b/toolchain-old/uClibc/config/mips64.n32 new file mode 100644 index 000000000..f8def5837 --- /dev/null +++ b/toolchain-old/uClibc/config/mips64.n32 @@ -0,0 +1,19 @@ +ARCH_ANY_ENDIAN=y +ARCH_BIG_ENDIAN=y +ARCH_CFLAGS="-mno-split-addresses" +ARCH_WANTS_BIG_ENDIAN=y +# CONFIG_MIPS_ISA_1 is not set +# CONFIG_MIPS_ISA_2 is not set +# CONFIG_MIPS_ISA_3 is not set +# CONFIG_MIPS_ISA_4 is not set +# CONFIG_MIPS_ISA_MIPS32 is not set +# CONFIG_MIPS_ISA_MIPS32R2 is not set +CONFIG_MIPS_ISA_MIPS64=y +# CONFIG_MIPS_ISA_MIPS64R2 is not set +CONFIG_MIPS_N32_ABI=y +# CONFIG_MIPS_N64_ABI is not set +# CONFIG_MIPS_O32_ABI is not set +TARGET_ARCH="mips" +TARGET_mips=y +TARGET_SUBARCH="mips64" +UCLIBC_HAS_FPU=y diff --git a/toolchain-old/uClibc/config/mips64el b/toolchain-old/uClibc/config/mips64el new file mode 100644 index 000000000..53580787b --- /dev/null +++ b/toolchain-old/uClibc/config/mips64el @@ -0,0 +1,18 @@ +ARCH_ANY_ENDIAN=y +ARCH_CFLAGS="-mno-split-addresses" +ARCH_LITTLE_ENDIAN=y +ARCH_WANTS_LITTLE_ENDIAN=y +# CONFIG_MIPS_ISA_1 is not set +# CONFIG_MIPS_ISA_2 is not set +# CONFIG_MIPS_ISA_3 is not set +# CONFIG_MIPS_ISA_4 is not set +# CONFIG_MIPS_ISA_MIPS32 is not set +# CONFIG_MIPS_ISA_MIPS32R2 is not set +CONFIG_MIPS_ISA_MIPS64=y +# CONFIG_MIPS_ISA_MIPS64R2 is not set +# CONFIG_MIPS_N32_ABI is not set +CONFIG_MIPS_N64_ABI=y +# CONFIG_MIPS_O32_ABI is not set +TARGET_ARCH="mips" +TARGET_mips=y +UCLIBC_HAS_FPU=y diff --git a/toolchain-old/uClibc/config/mips64el.32 b/toolchain-old/uClibc/config/mips64el.32 new file mode 100644 index 000000000..a10840bf9 --- /dev/null +++ b/toolchain-old/uClibc/config/mips64el.32 @@ -0,0 +1,19 @@ +ARCH_ANY_ENDIAN=y +ARCH_CFLAGS="-mno-split-addresses" +ARCH_LITTLE_ENDIAN=y +ARCH_WANTS_LITTLE_ENDIAN=y +# CONFIG_MIPS_ISA_1 is not set +# CONFIG_MIPS_ISA_2 is not set +# CONFIG_MIPS_ISA_3 is not set +# CONFIG_MIPS_ISA_4 is not set +# CONFIG_MIPS_ISA_MIPS32 is not set +# CONFIG_MIPS_ISA_MIPS32R2 is not set +CONFIG_MIPS_ISA_MIPS64=y +# CONFIG_MIPS_ISA_MIPS64R2 is not set +# CONFIG_MIPS_N32_ABI is not set +# CONFIG_MIPS_N64_ABI is not set +CONFIG_MIPS_O32_ABI=y +TARGET_ARCH="mips" +TARGET_mips=y +TARGET_SUBARCH="mips64" +UCLIBC_HAS_FPU=y diff --git a/toolchain-old/uClibc/config/mips64el.64 b/toolchain-old/uClibc/config/mips64el.64 new file mode 100644 index 000000000..8b90a54a5 --- /dev/null +++ b/toolchain-old/uClibc/config/mips64el.64 @@ -0,0 +1,19 @@ +ARCH_ANY_ENDIAN=y +ARCH_CFLAGS="-mno-split-addresses" +ARCH_LITTLE_ENDIAN=y +ARCH_WANTS_LITTLE_ENDIAN=y +# CONFIG_MIPS_ISA_1 is not set +# CONFIG_MIPS_ISA_2 is not set +# CONFIG_MIPS_ISA_3 is not set +# CONFIG_MIPS_ISA_4 is not set +# CONFIG_MIPS_ISA_MIPS32 is not set +# CONFIG_MIPS_ISA_MIPS32R2 is not set +CONFIG_MIPS_ISA_MIPS64=y +# CONFIG_MIPS_ISA_MIPS64R2 is not set +# CONFIG_MIPS_N32_ABI is not set +CONFIG_MIPS_N64_ABI=y +# CONFIG_MIPS_O32_ABI is not set +TARGET_ARCH="mips" +TARGET_mips=y +TARGET_SUBARCH="mips64" +UCLIBC_HAS_FPU=y diff --git a/toolchain-old/uClibc/config/mips64el.n32 b/toolchain-old/uClibc/config/mips64el.n32 new file mode 100644 index 000000000..4ac4d06c0 --- /dev/null +++ b/toolchain-old/uClibc/config/mips64el.n32 @@ -0,0 +1,19 @@ +ARCH_ANY_ENDIAN=y +ARCH_CFLAGS="-mno-split-addresses" +ARCH_LITTLE_ENDIAN=y +ARCH_WANTS_LITTLE_ENDIAN=y +# CONFIG_MIPS_ISA_1 is not set +# CONFIG_MIPS_ISA_2 is not set +# CONFIG_MIPS_ISA_3 is not set +# CONFIG_MIPS_ISA_4 is not set +# CONFIG_MIPS_ISA_MIPS32 is not set +# CONFIG_MIPS_ISA_MIPS32R2 is not set +CONFIG_MIPS_ISA_MIPS64=y +# CONFIG_MIPS_ISA_MIPS64R2 is not set +CONFIG_MIPS_N32_ABI=y +# CONFIG_MIPS_N64_ABI is not set +# CONFIG_MIPS_O32_ABI is not set +TARGET_ARCH="mips" +TARGET_mips=y +TARGET_SUBARCH="mips64" +UCLIBC_HAS_FPU=y diff --git a/toolchain-old/uClibc/config/mipsel b/toolchain-old/uClibc/config/mipsel new file mode 100644 index 000000000..d9dedbb02 --- /dev/null +++ b/toolchain-old/uClibc/config/mipsel @@ -0,0 +1,18 @@ +ARCH_ANY_ENDIAN=y +ARCH_CFLAGS="-mno-split-addresses" +ARCH_LITTLE_ENDIAN=y +ARCH_WANTS_LITTLE_ENDIAN=y +# CONFIG_MIPS_ISA_1 is not set +# CONFIG_MIPS_ISA_2 is not set +# CONFIG_MIPS_ISA_3 is not set +# CONFIG_MIPS_ISA_4 is not set +CONFIG_MIPS_ISA_MIPS32=y +# CONFIG_MIPS_ISA_MIPS32R2 is not set +# CONFIG_MIPS_ISA_MIPS64 is not set +# CONFIG_MIPS_ISA_MIPS64R2 is not set +# CONFIG_MIPS_N32_ABI is not set +# CONFIG_MIPS_N64_ABI is not set +CONFIG_MIPS_O32_ABI=y +TARGET_ARCH="mips" +TARGET_mips=y +UCLIBC_HAS_FPU=y diff --git a/toolchain-old/uClibc/config/mipsel.cobalt b/toolchain-old/uClibc/config/mipsel.cobalt new file mode 100644 index 000000000..1d42a70f2 --- /dev/null +++ b/toolchain-old/uClibc/config/mipsel.cobalt @@ -0,0 +1,18 @@ +ARCH_ANY_ENDIAN=y +ARCH_CFLAGS="-mno-split-addresses" +ARCH_LITTLE_ENDIAN=y +ARCH_WANTS_LITTLE_ENDIAN=y +# CONFIG_MIPS_ISA_1 is not set +# CONFIG_MIPS_ISA_2 is not set +CONFIG_MIPS_ISA_3=y +# CONFIG_MIPS_ISA_4 is not set +# CONFIG_MIPS_ISA_MIPS32 is not set +# CONFIG_MIPS_ISA_MIPS32R2 is not set +# CONFIG_MIPS_ISA_MIPS64 is not set +# CONFIG_MIPS_ISA_MIPS64R2 is not set +# CONFIG_MIPS_N32_ABI is not set +# CONFIG_MIPS_N64_ABI is not set +CONFIG_MIPS_O32_ABI=y +TARGET_ARCH="mips" +TARGET_mips=y +UCLIBC_HAS_FPU=y diff --git a/toolchain-old/uClibc/config/powerpc b/toolchain-old/uClibc/config/powerpc new file mode 100644 index 000000000..5b1292d12 --- /dev/null +++ b/toolchain-old/uClibc/config/powerpc @@ -0,0 +1,6 @@ +ARCH_BIG_ENDIAN=y +CONFIG_CLASSIC=y +# CONFIG_E500 is not set +TARGET_ARCH="powerpc" +TARGET_SUBARCH="classic" +TARGET_powerpc=y diff --git a/toolchain-old/uClibc/config/powerpc.e500 b/toolchain-old/uClibc/config/powerpc.e500 new file mode 100644 index 000000000..a835c3d5e --- /dev/null +++ b/toolchain-old/uClibc/config/powerpc.e500 @@ -0,0 +1,6 @@ +ARCH_BIG_ENDIAN=y +# CONFIG_CLASSIC is not set +CONFIG_E500=y +TARGET_ARCH="powerpc" +TARGET_SUBARCH="classic" +TARGET_powerpc=y diff --git a/toolchain-old/uClibc/config/sparc b/toolchain-old/uClibc/config/sparc new file mode 100644 index 000000000..e1596c410 --- /dev/null +++ b/toolchain-old/uClibc/config/sparc @@ -0,0 +1,8 @@ +ARCH_BIG_ENDIAN=y +# CONFIG_SPARC_V7 is not set +# CONFIG_SPARC_V8 is not set +CONFIG_SPARC_V9=y +# CONFIG_SPARC_V9B is not set +TARGET_ARCH="sparc" +TARGET_sparc=y +UCLIBC_HAS_LONG_DOUBLE_MATH=y diff --git a/toolchain-old/uClibc/config/sparc.leon b/toolchain-old/uClibc/config/sparc.leon new file mode 100644 index 000000000..eb725ac05 --- /dev/null +++ b/toolchain-old/uClibc/config/sparc.leon @@ -0,0 +1,8 @@ +ARCH_BIG_ENDIAN=y +# CONFIG_SPARC_V7 is not set +CONFIG_SPARC_V8=y +# CONFIG_SPARC_V9 is not set +# CONFIG_SPARC_V9B is not set +TARGET_ARCH="sparc" +TARGET_sparc=y +UCLIBC_HAS_LONG_DOUBLE_MATH=y diff --git a/toolchain-old/uClibc/config/x86_64 b/toolchain-old/uClibc/config/x86_64 new file mode 100644 index 000000000..b6dc2c2af --- /dev/null +++ b/toolchain-old/uClibc/config/x86_64 @@ -0,0 +1,6 @@ +ARCH_LITTLE_ENDIAN=y +# LINUXTHREADS_NEW is not set +TARGET_ARCH="x86_64" +TARGET_x86_64=y +UCLIBC_BSD_SPECIFIC=y +UCLIBC_HAS_FPU=y diff --git a/toolchain-old/uClibc/headers/Makefile b/toolchain-old/uClibc/headers/Makefile new file mode 100644 index 000000000..abd3620d3 --- /dev/null +++ b/toolchain-old/uClibc/headers/Makefile @@ -0,0 +1,27 @@ +PATH_PREFIX:=.. + +include ../common.mk + +HOST_STAMP_BUILT:=$(HOST_BUILD_DIR)/.headers_built +HOST_STAMP_INSTALLED:=$(TOOLCHAIN_DIR)/stamp/.uclibc_headers_installed + +define Host/Compile + +endef + +define Host/Install + PATH='$(TARGET_PATH)' $(MAKE) -C $(HOST_BUILD_DIR) \ + PREFIX="$(BUILD_DIR_TOOLCHAIN)/$(LIBC)-dev/" \ + DEVEL_PREFIX=/ \ + RUNTIME_PREFIX="$(BUILD_DIR_TOOLCHAIN)/$(LIBC)-dev/" \ + HOSTCC="$(HOSTCC)" \ + CC="$(TARGET_CC)" \ + CPU_CFLAGS="$(TARGET_CFLAGS)" \ + ARCH="$(CONFIG_ARCH)" \ + pregen \ + install_headers + $(CP) $(BUILD_DIR_TOOLCHAIN)/linux-dev/* $(BUILD_DIR_TOOLCHAIN)/$(LIBC)-dev/ +endef + +$(eval $(call HostBuild)) + diff --git a/toolchain-old/uClibc/utils/Makefile b/toolchain-old/uClibc/utils/Makefile new file mode 100644 index 000000000..83100d70c --- /dev/null +++ b/toolchain-old/uClibc/utils/Makefile @@ -0,0 +1,24 @@ +PATH_PREFIX=.. + +include ../common.mk + +HOST_STAMP_BUILT:=$(HOST_BUILD_DIR)/.utils_built +HOST_STAMP_INSTALLED:=$(TOOLCHAIN_DIR)/stamp/.uclibc_utils_installed + +define Host/Compile + $(SED) 's,^CROSS=.*,CROSS=$(TARGET_CROSS),g' $(HOST_BUILD_DIR)/Rules.mak + $(UCLIBC_MAKE) PREFIX= utils +endef + +define Host/Install + $(INSTALL_DIR) $(TOOLCHAIN_DIR)/bin + $(INSTALL_BIN) \ + $(HOST_BUILD_DIR)/utils/ldd \ + $(TOOLCHAIN_DIR)/bin/ + $(INSTALL_DIR) $(TOOLCHAIN_DIR)/sbin + $(INSTALL_BIN) \ + $(HOST_BUILD_DIR)/utils/ldconfig \ + $(TOOLCHAIN_DIR)/sbin/ +endef + +$(eval $(call HostBuild)) diff --git a/toolchain-old/wrapper/Makefile b/toolchain-old/wrapper/Makefile new file mode 100644 index 000000000..3398e407c --- /dev/null +++ b/toolchain-old/wrapper/Makefile @@ -0,0 +1,62 @@ +# +# Copyright (C) 2012 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=wrapper +PKG_VERSION:=1 + +include $(INCLUDE_DIR)/toolchain-build.mk + + +# 1: args +define toolchain_util +$(strip $(SCRIPT_DIR)/ext-toolchain.sh --toolchain $(CONFIG_TOOLCHAIN_ROOT) \ + --cflags $(CONFIG_TARGET_OPTIMIZATION) \ + --cflags "$(if $(call qstrip,$(CONFIG_TOOLCHAIN_LIBC)),-m$(call qstrip,$(CONFIG_TOOLCHAIN_LIBC))) $(if $(CONFIG_SOFT_FLOAT),-msoft-float)" \ + --cflags "$(patsubst ./%,-I$(TOOLCHAIN_ROOT_DIR)/%,$(call qstrip,$(CONFIG_TOOLCHAIN_INC_PATH)))" \ + --cflags "$(patsubst ./%,-L$(TOOLCHAIN_ROOT_DIR)/%,$(call qstrip,$(CONFIG_TOOLCHAIN_LIB_PATH)))" \ + $(1)) +endef + +# 1: config symbol +# 2: feature +define toolchain_test +$$(if $$($(1)), \ + @echo -n "Testing external toolchain for $(2) support ... "; \ + if $(call toolchain_util,--test "$(2)"); then \ + echo "ok"; exit 0; \ + else \ + echo "failed"; \ + echo "ERROR: $(1) is enabled but the external toolchain does not support it"; \ + exit 1; \ + fi) +endef + + +define Host/Prepare + $(call toolchain_test,CONFIG_SOFT_FLOAT,softfloat) + $(call toolchain_test,CONFIG_IPV6,ipv6) + $(call toolchain_test,CONFIG_NLS,wchar) + $(call toolchain_test,CONFIG_PACKAGE_libpthread,threads) +endef + +define Host/Configure +endef + +define Host/Compile +endef + +define Host/Install + $(call toolchain_util,--wrap "$(TOOLCHAIN_DIR)/bin") +endef + +define Host/Clean + rm -rf $(TOOLCHAIN_DIR)/bin +endef + +$(eval $(call HostBuild)) diff --git a/toolchain-old/yasm/Makefile b/toolchain-old/yasm/Makefile new file mode 100644 index 000000000..e5cdac6fe --- /dev/null +++ b/toolchain-old/yasm/Makefile @@ -0,0 +1,63 @@ +# +# Copyright (C) 2016 Daniel Golle +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# +include $(TOPDIR)/rules.mk + +PKG_NAME:=yasm +PKG_VERSION:=1.3.0 + +PKG_SOURCE_URL:=http://www.tortall.net/projects/yasm/releases/ +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz + +PKG_HASH:=3dce6601b495f5b3d45b59f7d2492a340ee7e84b5beca17e48f862502bd5603f + +HOST_BUILD_PARALLEL:=1 + +include $(INCLUDE_DIR)/toolchain-build.mk + +YASM_CONFIGURE:= \ + ./configure \ + --prefix=$(TOOLCHAIN_DIR) \ + --build=$(GNU_HOST_NAME) \ + --host=$(GNU_HOST_NAME) \ + --target=$(REAL_GNU_TARGET_NAME) \ + --with-sysroot=$(TOOLCHAIN_DIR) \ + --disable-multilib \ + --disable-werror \ + --disable-nls \ + --disable-sim \ + --disable-gdb \ + $(SOFT_FLOAT_CONFIG_OPTION) \ + +define Host/Prepare + $(call Host/Prepare/Default) + ln -snf $(notdir $(HOST_BUILD_DIR)) $(BUILD_DIR_TOOLCHAIN)/$(PKG_NAME) + $(CP) $(SCRIPT_DIR)/config.{guess,sub} $(HOST_BUILD_DIR)/ +endef + +define Host/Configure + (cd $(HOST_BUILD_DIR); \ + $(YASM_CONFIGURE) \ + ); +endef + +define Host/Compile + +$(MAKE) $(HOST_JOBS) -C $(HOST_BUILD_DIR) all +endef + +define Host/Install + $(MAKE) -C $(HOST_BUILD_DIR) \ + prefix=$(TOOLCHAIN_DIR) \ + install +endef + +define Host/Clean + rm -rf \ + $(HOST_BUILD_DIR) \ + $(BUILD_DIR_TOOLCHAIN)/$(PKG_NAME) +endef + +$(eval $(call HostBuild)) diff --git a/toolchain/Config.in b/toolchain/Config.in index f6753ad8b..bf7b9c33d 100644 --- a/toolchain/Config.in +++ b/toolchain/Config.in @@ -168,7 +168,6 @@ menuconfig EXTRA_TARGET_ARCH bool prompt "Enable an extra toolchain target architecture" if TOOLCHAINOPTS depends on !sparc - default y if powerpc64 default n help Some builds may require a 'biarch' toolchain. This option @@ -178,7 +177,6 @@ menuconfig EXTRA_TARGET_ARCH config EXTRA_TARGET_ARCH_NAME string - default "powerpc64" if powerpc64 prompt "Extra architecture name" if EXTRA_TARGET_ARCH help Specify the cpu name (eg powerpc64 or x86_64) of the @@ -186,7 +184,6 @@ menuconfig EXTRA_TARGET_ARCH config EXTRA_TARGET_ARCH_OPTS string - default "-m64" if powerpc64 prompt "Extra architecture compiler options" if EXTRA_TARGET_ARCH help If you're specifying an addition target architecture, @@ -241,6 +238,7 @@ comment "C Library" choice prompt "C Library implementation" if TOOLCHAINOPTS default LIBC_USE_UCLIBC if arc + default LIBC_USE_GLIBC if powerpc64 default LIBC_USE_MUSL help Select the C library implementation. @@ -253,13 +251,13 @@ choice config LIBC_USE_UCLIBC select USE_UCLIBC bool "Use uClibc" - depends on !(aarch64 || aarch64_be) + depends on !(aarch64 || aarch64_be || powerpc64) depends on BROKEN || !(arm || armeb || i386 || x86_64 || mips || mipsel || mips64 || mips64el || powerpc) config LIBC_USE_MUSL select USE_MUSL bool "Use musl" - depends on !(arc) + depends on !(arc || powerpc64) endchoice @@ -277,6 +275,7 @@ config GDB Enable if you want to build the gdb. config USE_GLIBC + default y if !TOOLCHAINOPTS && !EXTERNAL_TOOLCHAIN && !NATIVE_TOOLCHAIN && (powerpc64) bool config USE_UCLIBC @@ -284,7 +283,7 @@ config USE_UCLIBC bool config USE_MUSL - default y if !TOOLCHAINOPTS && !EXTERNAL_TOOLCHAIN && !NATIVE_TOOLCHAIN && !(arc) + default y if !TOOLCHAINOPTS && !EXTERNAL_TOOLCHAIN && !NATIVE_TOOLCHAIN && !(arc || powerpc64) bool config USE_EXTERNAL_LIBC diff --git a/toolchain/binutils/Config.in b/toolchain/binutils/Config.in index 8fe33fb6b..25f721a6b 100644 --- a/toolchain/binutils/Config.in +++ b/toolchain/binutils/Config.in @@ -22,6 +22,11 @@ choice bool "ARC binutils 2.28" select BINUTILS_VERSION_2_28_ARC + config BINUTILS_USE_VERSION_2_29_1 + depends on !arc + bool "Binutils 2.29.1" + select BINUTILS_VERSION_2_29_1 + endchoice config EXTRA_BINUTILS_CONFIG_OPTIONS diff --git a/toolchain/binutils/Config.version b/toolchain/binutils/Config.version index 1b223e410..54df1730c 100644 --- a/toolchain/binutils/Config.version +++ b/toolchain/binutils/Config.version @@ -9,8 +9,12 @@ config BINUTILS_VERSION_2_28_ARC default y if (!TOOLCHAINOPTS && arc) bool +config BINUTILS_VERSION_2_29_1 + bool + config BINUTILS_VERSION string default "2.27" if BINUTILS_VERSION_2_27 default "2.28" if BINUTILS_VERSION_2_28 + default "2.29.1" if BINUTILS_VERSION_2_29_1 default "arc-2017.03" if BINUTILS_VERSION_2_28_ARC diff --git a/toolchain/binutils/Makefile b/toolchain/binutils/Makefile index 6df11fbd3..fd4af5c25 100644 --- a/toolchain/binutils/Makefile +++ b/toolchain/binutils/Makefile @@ -21,6 +21,10 @@ ifeq ($(PKG_VERSION),2.28) PKG_HASH:=6297433ee120b11b4b0a1c8f3512d7d73501753142ab9e2daa13c5a3edd32a72 endif +ifeq ($(PKG_VERSION),2.29.1) + PKG_HASH:=1509dff41369fb70aed23682351b663b56db894034773e6dbf7d5d6071fc55cc +endif + ifneq ($(CONFIG_BINUTILS_VERSION_2_28_ARC),) PKG_REV:=arc-2017.03-release PKG_SOURCE_URL:=https://github.com/foss-for-synopsys-dwc-arc-processors/binutils-gdb/archive/$(PKG_REV)/ diff --git a/toolchain/binutils/patches/2.29.1/300-001_ld_makefile_patch.patch b/toolchain/binutils/patches/2.29.1/300-001_ld_makefile_patch.patch new file mode 100644 index 000000000..4365197f7 --- /dev/null +++ b/toolchain/binutils/patches/2.29.1/300-001_ld_makefile_patch.patch @@ -0,0 +1,22 @@ +--- 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 +@@ -446,7 +446,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.29.1/300-012_check_ldrunpath_length.patch b/toolchain/binutils/patches/2.29.1/300-012_check_ldrunpath_length.patch new file mode 100644 index 000000000..0b02c5597 --- /dev/null +++ b/toolchain/binutils/patches/2.29.1/300-012_check_ldrunpath_length.patch @@ -0,0 +1,20 @@ +--- a/ld/emultempl/elf32.em ++++ b/ld/emultempl/elf32.em +@@ -1463,6 +1463,8 @@ fragment <link.next) + if (bfd_get_flavour (abfd) == bfd_target_elf_flavour) diff --git a/toolchain/binutils/patches/2.29.1/400-mips_no_dynamic_linking_sym.patch b/toolchain/binutils/patches/2.29.1/400-mips_no_dynamic_linking_sym.patch new file mode 100644 index 000000000..a28e9348a --- /dev/null +++ b/toolchain/binutils/patches/2.29.1/400-mips_no_dynamic_linking_sym.patch @@ -0,0 +1,18 @@ +--- a/bfd/elfxx-mips.c ++++ b/bfd/elfxx-mips.c +@@ -7871,6 +7871,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))) +@@ -7883,6 +7884,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.29.1/500-Change-default-emulation-for-mips64-linux.patch b/toolchain/binutils/patches/2.29.1/500-Change-default-emulation-for-mips64-linux.patch new file mode 100644 index 000000000..53d5b5ac5 --- /dev/null +++ b/toolchain/binutils/patches/2.29.1/500-Change-default-emulation-for-mips64-linux.patch @@ -0,0 +1,37 @@ +--- a/bfd/config.bfd ++++ b/bfd/config.bfd +@@ -1186,12 +1186,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 +@@ -530,11 +530,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/fortify-headers/Makefile b/toolchain/fortify-headers/Makefile index 8caf8c84c..8550a999c 100644 --- a/toolchain/fortify-headers/Makefile +++ b/toolchain/fortify-headers/Makefile @@ -8,12 +8,12 @@ include $(TOPDIR)/rules.mk include $(INCLUDE_DIR)/target.mk PKG_NAME:=fortify-headers -PKG_VERSION:=0.8 +PKG_VERSION:=0.9 PKG_RELEASE=1 PKG_SOURCE_URL:=http://dl.2f30.org/releases PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz -PKG_HASH:=afcd073d6d8d175eede2a28a7dd71b7150cb03290f99102261892c793f6b4cb1 +PKG_HASH:=cf75f1c27a95da8ebf124293e8dc534ff6a4625d703ff169998292e1a53aa1fc include $(INCLUDE_DIR)/toolchain-build.mk diff --git a/toolchain/gcc/Config.in b/toolchain/gcc/Config.in index ea33ac29c..a54c8d12d 100644 --- a/toolchain/gcc/Config.in +++ b/toolchain/gcc/Config.in @@ -54,14 +54,6 @@ config SJLJ_EXCEPTIONS frame unwinding exceptions handling routines. Warning: increases code size and runtime memory usage. -config INSTALL_LIBGCJ - bool - prompt "Build/install java compiler and GNU classpath ?" if TOOLCHAINOPTS - default n - help - Build/install java compiler and GNU classpath ? - - config INSTALL_GFORTRAN bool prompt "Build/install fortran compiler?" if TOOLCHAINOPTS diff --git a/toolchain/gcc/Config.version b/toolchain/gcc/Config.version index 86c723dc9..4edf8a87a 100644 --- a/toolchain/gcc/Config.version +++ b/toolchain/gcc/Config.version @@ -6,8 +6,8 @@ config GCC_VERSION string default "arc-2017.03-release" if GCC_VERSION_6_3_ARC default "6.3.0" if GCC_USE_VERSION_6 - default "7.1.0" if GCC_USE_VERSION_7 - default "5.4.0" + default "7.2.0" if GCC_USE_VERSION_7 + default "5.5.0" config GCC_VERSION_6_3 bool diff --git a/toolchain/gcc/common.mk b/toolchain/gcc/common.mk index abf69bfdc..69214aca0 100644 --- a/toolchain/gcc/common.mk +++ b/toolchain/gcc/common.mk @@ -26,18 +26,19 @@ PKG_VERSION:=$(firstword $(subst +, ,$(GCC_VERSION))) GCC_DIR:=$(PKG_NAME)-$(PKG_VERSION) PKG_SOURCE_URL:=@GNU/gcc/gcc-$(PKG_VERSION) -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2 +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz -ifeq ($(PKG_VERSION),5.4.0) - PKG_HASH:=608df76dec2d34de6558249d8af4cbee21eceddbcb580d666f7a5a583ca3303a +ifeq ($(PKG_VERSION),5.5.0) + PKG_HASH:=530cea139d82fe542b358961130c69cfde8b3d14556370b65823d2f91f0ced87 endif ifeq ($(PKG_VERSION),6.3.0) PKG_HASH:=f06ae7f3f790fbf0f018f6d40e844451e6bc3b7bc96e128e63b09825c1f8b29f + PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2 endif -ifeq ($(PKG_VERSION),7.1.0) - PKG_HASH:=8a8136c235f64c6fef69cac0d73a46a1a09bb250776a050aec8f9fc880bebc17 +ifeq ($(PKG_VERSION),7.2.0) + PKG_HASH:=1cf7adf8ff4b5aa49041c8734bbcf1ad18cc4c94d0029aae0f4e48841088479a endif ifneq ($(CONFIG_GCC_VERSION_6_3_ARC),) @@ -73,14 +74,11 @@ HOST_STAMP_CONFIGURED:=$(GCC_BUILD_DIR)/.configured HOST_STAMP_INSTALLED:=$(HOST_BUILD_PREFIX)/stamp/.gcc_$(GCC_VARIANT)_installed SEP:=, -TARGET_LANGUAGES:="c,c++$(if $(CONFIG_INSTALL_LIBGCJ),$(SEP)java)$(if $(CONFIG_INSTALL_GFORTRAN),$(SEP)fortran)$(if $(CONFIG_INSTALL_GCCGO),$(SEP)go)" +TARGET_LANGUAGES:="c,c++$(if $(CONFIG_INSTALL_GFORTRAN),$(SEP)fortran)$(if $(CONFIG_INSTALL_GCCGO),$(SEP)go)" TAR_OPTIONS += \ --exclude-from='$(CURDIR)/../exclude-testsuite' --exclude=gcc/ada/*.ad* \ - -ifndef CONFIG_INSTALL_LIBGCJ - TAR_OPTIONS += --exclude=libjava -endif + --exclude=libjava export libgcc_cv_fixed_point=no ifdef CONFIG_USE_UCLIBC diff --git a/toolchain/gcc/patches/5.5.0/001-revert_register_mode_search.patch b/toolchain/gcc/patches/5.5.0/001-revert_register_mode_search.patch new file mode 100644 index 000000000..06373eb6a --- /dev/null +++ b/toolchain/gcc/patches/5.5.0/001-revert_register_mode_search.patch @@ -0,0 +1,65 @@ +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 +@@ -665,35 +665,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/5.5.0/002-case_insensitive.patch b/toolchain/gcc/patches/5.5.0/002-case_insensitive.patch new file mode 100644 index 000000000..b3d2dbe29 --- /dev/null +++ b/toolchain/gcc/patches/5.5.0/002-case_insensitive.patch @@ -0,0 +1,14 @@ +--- 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/5.5.0/010-documentation.patch b/toolchain/gcc/patches/5.5.0/010-documentation.patch new file mode 100644 index 000000000..d7166b24e --- /dev/null +++ b/toolchain/gcc/patches/5.5.0/010-documentation.patch @@ -0,0 +1,23 @@ +--- a/gcc/Makefile.in ++++ b/gcc/Makefile.in +@@ -2943,18 +2943,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/5.5.0/020-no-plt-backport.patch b/toolchain/gcc/patches/5.5.0/020-no-plt-backport.patch new file mode 100644 index 000000000..b9702c952 --- /dev/null +++ b/toolchain/gcc/patches/5.5.0/020-no-plt-backport.patch @@ -0,0 +1,28 @@ +--- a/gcc/calls.c ++++ b/gcc/calls.c +@@ -225,6 +225,12 @@ prepare_call_address (tree fndecl_or_typ + && targetm.small_register_classes_for_mode_p (FUNCTION_MODE)) + ? force_not_mem (memory_address (FUNCTION_MODE, funexp)) + : memory_address (FUNCTION_MODE, funexp)); ++ else if (flag_pic && !flag_plt && fndecl_or_type ++ && TREE_CODE (fndecl_or_type) == FUNCTION_DECL ++ && !targetm.binds_local_p (fndecl_or_type)) ++ { ++ funexp = force_reg (Pmode, funexp); ++ } + else if (! sibcallp) + { + #ifndef NO_FUNCTION_CSE +--- a/gcc/common.opt ++++ b/gcc/common.opt +@@ -1779,6 +1779,10 @@ fpie + Common Report Var(flag_pie,1) Negative(fPIC) + Generate position-independent code for executables if possible (small mode) + ++fplt ++Common Report Var(flag_plt) Init(1) ++Use PLT for PIC calls (-fno-plt: load the address from GOT at call site) ++ + fplugin= + Common Joined RejectNegative Var(common_deferred_options) Defer + Specify a plugin to load diff --git a/toolchain/gcc/patches/5.5.0/040-fix-mips-ICE-PR-68400.patch b/toolchain/gcc/patches/5.5.0/040-fix-mips-ICE-PR-68400.patch new file mode 100644 index 000000000..e88af3403 --- /dev/null +++ b/toolchain/gcc/patches/5.5.0/040-fix-mips-ICE-PR-68400.patch @@ -0,0 +1,23 @@ +--- a/gcc/config/mips/mips.c ++++ b/gcc/config/mips/mips.c +@@ -8001,9 +8001,17 @@ mask_low_and_shift_p (machine_mode mode, + bool + and_operands_ok (machine_mode mode, rtx op1, rtx op2) + { +- return (memory_operand (op1, mode) +- ? and_load_operand (op2, mode) +- : and_reg_operand (op2, mode)); ++ if (!memory_operand (op1, mode)) ++ return and_reg_operand (op2, mode); ++ ++ if (!and_load_operand (op2, mode)) ++ return false; ++ ++ if (!TARGET_MIPS16 || si_mask_operand(op2, mode)) ++ return true; ++ ++ op1 = XEXP (op1, 0); ++ return !(REG_P (op1) && REGNO (op1) == STACK_POINTER_REGNUM); + } + + /* The canonical form of a mask-low-and-shift-left operation is diff --git a/toolchain/gcc/patches/5.5.0/200-musl_config.patch b/toolchain/gcc/patches/5.5.0/200-musl_config.patch new file mode 100644 index 000000000..178c25ce3 --- /dev/null +++ b/toolchain/gcc/patches/5.5.0/200-musl_config.patch @@ -0,0 +1,309 @@ +From: ktkachov +Date: Fri, 8 May 2015 08:25:47 +0000 (+0000) +Subject: [PATCH 2/13] musl libc config +X-Git-Url: https://gcc.gnu.org/git/?p=gcc.git;a=commitdiff_plain;h=a9173ceabaf29c16f8ef226fbf98af373a4b2ceb + +[PATCH 2/13] musl libc config + +2015-05-08 Gregor Richards + Szabolcs Nagy + + * config.gcc (LIBC_MUSL): New tm_defines macro. + * config/linux.h (OPTION_MUSL): Define. + (MUSL_DYNAMIC_LINKER, MUSL_DYNAMIC_LINKER32,) + (MUSL_DYNAMIC_LINKER64, MUSL_DYNAMIC_LINKERX32,) + (INCLUDE_DEFAULTS_MUSL_GPP, INCLUDE_DEFAULTS_MUSL_LOCAL,) + (INCLUDE_DEFAULTS_MUSL_PREFIX, INCLUDE_DEFAULTS_MUSL_CROSS,) + (INCLUDE_DEFAULTS_MUSL_TOOL, INCLUDE_DEFAULTS_MUSL_NATIVE): Define. + * config/linux.opt (mmusl): New option. + * doc/invoke.texi (GNU/Linux Options): Document -mmusl. + * configure.ac (gcc_cv_libc_provides_ssp): Add *-*-musl*. + (gcc_cv_target_dl_iterate_phdr): Add *-linux-musl*. + * configure: Regenerate. + + +git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@222904 138bc75d-0d04-0410-961f-82ee72b054a4 +--- + +--- a/gcc/config.gcc ++++ b/gcc/config.gcc +@@ -575,7 +575,7 @@ case ${target} in + esac + + # Common C libraries. +-tm_defines="$tm_defines LIBC_GLIBC=1 LIBC_UCLIBC=2 LIBC_BIONIC=3" ++tm_defines="$tm_defines LIBC_GLIBC=1 LIBC_UCLIBC=2 LIBC_BIONIC=3 LIBC_MUSL=4" + + # 32-bit x86 processors supported by --with-arch=. Each processor + # MUST be separated by exactly one space. +@@ -720,6 +720,9 @@ case ${target} in + *-*-*uclibc*) + tm_defines="$tm_defines DEFAULT_LIBC=LIBC_UCLIBC" + ;; ++ *-*-*musl*) ++ tm_defines="$tm_defines DEFAULT_LIBC=LIBC_MUSL" ++ ;; + *) + tm_defines="$tm_defines DEFAULT_LIBC=LIBC_GLIBC" + ;; +--- a/gcc/config/linux.h ++++ b/gcc/config/linux.h +@@ -32,10 +32,12 @@ see the files COPYING3 and COPYING.RUNTI + #define OPTION_GLIBC (DEFAULT_LIBC == LIBC_GLIBC) + #define OPTION_UCLIBC (DEFAULT_LIBC == LIBC_UCLIBC) + #define OPTION_BIONIC (DEFAULT_LIBC == LIBC_BIONIC) ++#define OPTION_MUSL (DEFAULT_LIBC == LIBC_MUSL) + #else + #define OPTION_GLIBC (linux_libc == LIBC_GLIBC) + #define OPTION_UCLIBC (linux_libc == LIBC_UCLIBC) + #define OPTION_BIONIC (linux_libc == LIBC_BIONIC) ++#define OPTION_MUSL (linux_libc == LIBC_MUSL) + #endif + + #define GNU_USER_TARGET_OS_CPP_BUILTINS() \ +@@ -50,21 +52,25 @@ see the files COPYING3 and COPYING.RUNTI + } while (0) + + /* Determine which dynamic linker to use depending on whether GLIBC or +- uClibc or Bionic is the default C library and whether +- -muclibc or -mglibc or -mbionic has been passed to change the default. */ ++ uClibc or Bionic or musl is the default C library and whether ++ -muclibc or -mglibc or -mbionic or -mmusl has been passed to change ++ the default. */ + +-#define CHOOSE_DYNAMIC_LINKER1(LIBC1, LIBC2, LIBC3, LD1, LD2, LD3) \ +- "%{" LIBC2 ":" LD2 ";:%{" LIBC3 ":" LD3 ";:" LD1 "}}" ++#define CHOOSE_DYNAMIC_LINKER1(LIBC1, LIBC2, LIBC3, LIBC4, LD1, LD2, LD3, LD4) \ ++ "%{" LIBC2 ":" LD2 ";:%{" LIBC3 ":" LD3 ";:%{" LIBC4 ":" LD4 ";:" LD1 "}}}" + + #if DEFAULT_LIBC == LIBC_GLIBC +-#define CHOOSE_DYNAMIC_LINKER(G, U, B) \ +- CHOOSE_DYNAMIC_LINKER1 ("mglibc", "muclibc", "mbionic", G, U, B) ++#define CHOOSE_DYNAMIC_LINKER(G, U, B, M) \ ++ CHOOSE_DYNAMIC_LINKER1 ("mglibc", "muclibc", "mbionic", "mmusl", G, U, B, M) + #elif DEFAULT_LIBC == LIBC_UCLIBC +-#define CHOOSE_DYNAMIC_LINKER(G, U, B) \ +- CHOOSE_DYNAMIC_LINKER1 ("muclibc", "mglibc", "mbionic", U, G, B) ++#define CHOOSE_DYNAMIC_LINKER(G, U, B, M) \ ++ CHOOSE_DYNAMIC_LINKER1 ("muclibc", "mglibc", "mbionic", "mmusl", U, G, B, M) + #elif DEFAULT_LIBC == LIBC_BIONIC +-#define CHOOSE_DYNAMIC_LINKER(G, U, B) \ +- CHOOSE_DYNAMIC_LINKER1 ("mbionic", "mglibc", "muclibc", B, G, U) ++#define CHOOSE_DYNAMIC_LINKER(G, U, B, M) \ ++ CHOOSE_DYNAMIC_LINKER1 ("mbionic", "mglibc", "muclibc", "mmusl", B, G, U, M) ++#elif DEFAULT_LIBC == LIBC_MUSL ++#define CHOOSE_DYNAMIC_LINKER(G, U, B, M) \ ++ CHOOSE_DYNAMIC_LINKER1 ("mmusl", "mglibc", "muclibc", "mbionic", M, G, U, B) + #else + #error "Unsupported DEFAULT_LIBC" + #endif /* DEFAULT_LIBC */ +@@ -81,24 +87,100 @@ see the files COPYING3 and COPYING.RUNTI + #define BIONIC_DYNAMIC_LINKER32 "/system/bin/linker" + #define BIONIC_DYNAMIC_LINKER64 "/system/bin/linker64" + #define BIONIC_DYNAMIC_LINKERX32 "/system/bin/linkerx32" ++/* Should be redefined for each target that supports musl. */ ++#define MUSL_DYNAMIC_LINKER "/dev/null" ++#define MUSL_DYNAMIC_LINKER32 "/dev/null" ++#define MUSL_DYNAMIC_LINKER64 "/dev/null" ++#define MUSL_DYNAMIC_LINKERX32 "/dev/null" + + #define GNU_USER_DYNAMIC_LINKER \ + CHOOSE_DYNAMIC_LINKER (GLIBC_DYNAMIC_LINKER, UCLIBC_DYNAMIC_LINKER, \ +- BIONIC_DYNAMIC_LINKER) ++ BIONIC_DYNAMIC_LINKER, MUSL_DYNAMIC_LINKER) + #define GNU_USER_DYNAMIC_LINKER32 \ + CHOOSE_DYNAMIC_LINKER (GLIBC_DYNAMIC_LINKER32, UCLIBC_DYNAMIC_LINKER32, \ +- BIONIC_DYNAMIC_LINKER32) ++ BIONIC_DYNAMIC_LINKER32, MUSL_DYNAMIC_LINKER32) + #define GNU_USER_DYNAMIC_LINKER64 \ + CHOOSE_DYNAMIC_LINKER (GLIBC_DYNAMIC_LINKER64, UCLIBC_DYNAMIC_LINKER64, \ +- BIONIC_DYNAMIC_LINKER64) ++ BIONIC_DYNAMIC_LINKER64, MUSL_DYNAMIC_LINKER64) + #define GNU_USER_DYNAMIC_LINKERX32 \ + CHOOSE_DYNAMIC_LINKER (GLIBC_DYNAMIC_LINKERX32, UCLIBC_DYNAMIC_LINKERX32, \ +- BIONIC_DYNAMIC_LINKERX32) ++ BIONIC_DYNAMIC_LINKERX32, MUSL_DYNAMIC_LINKERX32) + + /* Whether we have Bionic libc runtime */ + #undef TARGET_HAS_BIONIC + #define TARGET_HAS_BIONIC (OPTION_BIONIC) + ++/* musl avoids problematic includes by rearranging the include directories. ++ * Unfortunately, this is mostly duplicated from cppdefault.c */ ++#if DEFAULT_LIBC == LIBC_MUSL ++#define INCLUDE_DEFAULTS_MUSL_GPP \ ++ { GPLUSPLUS_INCLUDE_DIR, "G++", 1, 1, \ ++ GPLUSPLUS_INCLUDE_DIR_ADD_SYSROOT, 0 }, \ ++ { GPLUSPLUS_TOOL_INCLUDE_DIR, "G++", 1, 1, \ ++ GPLUSPLUS_INCLUDE_DIR_ADD_SYSROOT, 1 }, \ ++ { GPLUSPLUS_BACKWARD_INCLUDE_DIR, "G++", 1, 1, \ ++ GPLUSPLUS_INCLUDE_DIR_ADD_SYSROOT, 0 }, ++ ++#ifdef LOCAL_INCLUDE_DIR ++#define INCLUDE_DEFAULTS_MUSL_LOCAL \ ++ { LOCAL_INCLUDE_DIR, 0, 0, 1, 1, 2 }, \ ++ { LOCAL_INCLUDE_DIR, 0, 0, 1, 1, 0 }, ++#else ++#define INCLUDE_DEFAULTS_MUSL_LOCAL ++#endif ++ ++#ifdef PREFIX_INCLUDE_DIR ++#define INCLUDE_DEFAULTS_MUSL_PREFIX \ ++ { PREFIX_INCLUDE_DIR, 0, 0, 1, 0, 0}, ++#else ++#define INCLUDE_DEFAULTS_MUSL_PREFIX ++#endif ++ ++#ifdef CROSS_INCLUDE_DIR ++#define INCLUDE_DEFAULTS_MUSL_CROSS \ ++ { CROSS_INCLUDE_DIR, "GCC", 0, 0, 0, 0}, ++#else ++#define INCLUDE_DEFAULTS_MUSL_CROSS ++#endif ++ ++#ifdef TOOL_INCLUDE_DIR ++#define INCLUDE_DEFAULTS_MUSL_TOOL \ ++ { TOOL_INCLUDE_DIR, "BINUTILS", 0, 1, 0, 0}, ++#else ++#define INCLUDE_DEFAULTS_MUSL_TOOL ++#endif ++ ++#ifdef NATIVE_SYSTEM_HEADER_DIR ++#define INCLUDE_DEFAULTS_MUSL_NATIVE \ ++ { NATIVE_SYSTEM_HEADER_DIR, 0, 0, 0, 1, 2 }, \ ++ { NATIVE_SYSTEM_HEADER_DIR, 0, 0, 0, 1, 0 }, ++#else ++#define INCLUDE_DEFAULTS_MUSL_NATIVE ++#endif ++ ++#if defined (CROSS_DIRECTORY_STRUCTURE) && !defined (TARGET_SYSTEM_ROOT) ++# undef INCLUDE_DEFAULTS_MUSL_LOCAL ++# define INCLUDE_DEFAULTS_MUSL_LOCAL ++# undef INCLUDE_DEFAULTS_MUSL_NATIVE ++# define INCLUDE_DEFAULTS_MUSL_NATIVE ++#else ++# undef INCLUDE_DEFAULTS_MUSL_CROSS ++# define INCLUDE_DEFAULTS_MUSL_CROSS ++#endif ++ ++#undef INCLUDE_DEFAULTS ++#define INCLUDE_DEFAULTS \ ++ { \ ++ INCLUDE_DEFAULTS_MUSL_GPP \ ++ INCLUDE_DEFAULTS_MUSL_PREFIX \ ++ INCLUDE_DEFAULTS_MUSL_CROSS \ ++ INCLUDE_DEFAULTS_MUSL_TOOL \ ++ INCLUDE_DEFAULTS_MUSL_NATIVE \ ++ { GCC_INCLUDE_DIR, "GCC", 0, 1, 0, 0 }, \ ++ { 0, 0, 0, 0, 0, 0 } \ ++ } ++#endif ++ + #if (DEFAULT_LIBC == LIBC_UCLIBC) && defined (SINGLE_LIBC) /* uClinux */ + /* This is a *uclinux* target. We don't define below macros to normal linux + versions, because doing so would require *uclinux* targets to include +--- a/gcc/config/linux.opt ++++ b/gcc/config/linux.opt +@@ -28,5 +28,9 @@ Target Report RejectNegative Var(linux_l + Use GNU C library + + muclibc +-Target Report RejectNegative Var(linux_libc,LIBC_UCLIBC) Negative(mbionic) ++Target Report RejectNegative Var(linux_libc,LIBC_UCLIBC) Negative(mmusl) + Use uClibc C library ++ ++mmusl ++Target Report RejectNegative Var(linux_libc,LIBC_MUSL) Negative(mbionic) ++Use musl C library +--- a/gcc/configure ++++ b/gcc/configure +@@ -27833,6 +27833,9 @@ if test "${gcc_cv_libc_provides_ssp+set} + else + gcc_cv_libc_provides_ssp=no + case "$target" in ++ *-*-musl*) ++ # All versions of musl provide stack protector ++ gcc_cv_libc_provides_ssp=yes;; + *-*-linux* | *-*-kfreebsd*-gnu | *-*-knetbsd*-gnu) + # glibc 2.4 and later provides __stack_chk_fail and + # either __stack_chk_guard, or TLS access to stack guard canary. +@@ -27865,6 +27868,7 @@ fi + # ) and for now + # simply assert that glibc does provide this, which is true for all + # realistically usable GNU/Hurd configurations. ++ # All supported versions of musl provide it as well + gcc_cv_libc_provides_ssp=yes;; + *-*-darwin* | *-*-freebsd*) + ac_fn_c_check_func "$LINENO" "__stack_chk_fail" "ac_cv_func___stack_chk_fail" +@@ -27961,6 +27965,9 @@ case "$target" in + gcc_cv_target_dl_iterate_phdr=no + fi + ;; ++ *-linux-musl*) ++ gcc_cv_target_dl_iterate_phdr=yes ++ ;; + esac + + if test x$gcc_cv_target_dl_iterate_phdr = xyes; then +--- a/gcc/configure.ac ++++ b/gcc/configure.ac +@@ -5287,6 +5287,9 @@ AC_CACHE_CHECK(__stack_chk_fail in targe + gcc_cv_libc_provides_ssp, + [gcc_cv_libc_provides_ssp=no + case "$target" in ++ *-*-musl*) ++ # All versions of musl provide stack protector ++ gcc_cv_libc_provides_ssp=yes;; + *-*-linux* | *-*-kfreebsd*-gnu | *-*-knetbsd*-gnu) + # glibc 2.4 and later provides __stack_chk_fail and + # either __stack_chk_guard, or TLS access to stack guard canary. +@@ -5313,6 +5316,7 @@ AC_CACHE_CHECK(__stack_chk_fail in targe + # ) and for now + # simply assert that glibc does provide this, which is true for all + # realistically usable GNU/Hurd configurations. ++ # All supported versions of musl provide it as well + gcc_cv_libc_provides_ssp=yes;; + *-*-darwin* | *-*-freebsd*) + AC_CHECK_FUNC(__stack_chk_fail,[gcc_cv_libc_provides_ssp=yes], +@@ -5386,6 +5390,9 @@ case "$target" in + gcc_cv_target_dl_iterate_phdr=no + fi + ;; ++ *-linux-musl*) ++ gcc_cv_target_dl_iterate_phdr=yes ++ ;; + esac + GCC_TARGET_TEMPLATE([TARGET_DL_ITERATE_PHDR]) + if test x$gcc_cv_target_dl_iterate_phdr = xyes; then +--- a/gcc/doc/invoke.texi ++++ b/gcc/doc/invoke.texi +@@ -668,7 +668,7 @@ Objective-C and Objective-C++ Dialects}. + -mcpu=@var{cpu}} + + @emph{GNU/Linux Options} +-@gccoptlist{-mglibc -muclibc -mbionic -mandroid @gol ++@gccoptlist{-mglibc -muclibc -mmusl -mbionic -mandroid @gol + -tno-android-cc -tno-android-ld} + + @emph{H8/300 Options} +@@ -15351,13 +15351,19 @@ These @samp{-m} options are defined for + @item -mglibc + @opindex mglibc + Use the GNU C library. This is the default except +-on @samp{*-*-linux-*uclibc*} and @samp{*-*-linux-*android*} targets. ++on @samp{*-*-linux-*uclibc*}, @samp{*-*-linux-*musl*} and ++@samp{*-*-linux-*android*} targets. + + @item -muclibc + @opindex muclibc + Use uClibc C library. This is the default on + @samp{*-*-linux-*uclibc*} targets. + ++@item -mmusl ++@opindex mmusl ++Use the musl C library. This is the default on ++@samp{*-*-linux-*musl*} targets. ++ + @item -mbionic + @opindex mbionic + Use Bionic C library. This is the default on diff --git a/toolchain/gcc/patches/5.5.0/201-musl_arm.patch b/toolchain/gcc/patches/5.5.0/201-musl_arm.patch new file mode 100644 index 000000000..27a26afc0 --- /dev/null +++ b/toolchain/gcc/patches/5.5.0/201-musl_arm.patch @@ -0,0 +1,43 @@ +From: ktkachov +Date: Wed, 27 May 2015 13:17:11 +0000 (+0000) +Subject: [PATCH 4/13] arm musl support +X-Git-Url: https://gcc.gnu.org/git/?p=gcc.git;a=commitdiff_plain;h=de799bd087ab9a179768fea75bd195a31d3432a4 + +[PATCH 4/13] arm musl support + +On behalf of szabolcs.nagy@arm.com + +2015-05-27 Gregor Richards + + * config/arm/linux-eabi.h (MUSL_DYNAMIC_LINKER): Define. + + +git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@223749 138bc75d-0d04-0410-961f-82ee72b054a4 +--- + +--- a/gcc/config/arm/linux-eabi.h ++++ b/gcc/config/arm/linux-eabi.h +@@ -77,6 +77,23 @@ + %{mfloat-abi=soft*:" GLIBC_DYNAMIC_LINKER_SOFT_FLOAT "} \ + %{!mfloat-abi=*:" GLIBC_DYNAMIC_LINKER_DEFAULT "}" + ++/* For ARM musl currently supports four dynamic linkers: ++ - ld-musl-arm.so.1 - for the EABI-derived soft-float ABI ++ - ld-musl-armhf.so.1 - for the EABI-derived hard-float ABI ++ - ld-musl-armeb.so.1 - for the EABI-derived soft-float ABI, EB ++ - ld-musl-armebhf.so.1 - for the EABI-derived hard-float ABI, EB ++ musl does not support the legacy OABI mode. ++ All the dynamic linkers live in /lib. ++ We default to soft-float, EL. */ ++#undef MUSL_DYNAMIC_LINKER ++#if TARGET_BIG_ENDIAN_DEFAULT ++#define MUSL_DYNAMIC_LINKER_E "%{mlittle-endian:;:eb}" ++#else ++#define MUSL_DYNAMIC_LINKER_E "%{mbig-endian:eb}" ++#endif ++#define MUSL_DYNAMIC_LINKER \ ++ "/lib/ld-musl-arm" MUSL_DYNAMIC_LINKER_E "%{mfloat-abi=hard:hf}.so.1" ++ + /* 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 diff --git a/toolchain/gcc/patches/5.5.0/202-musl_mips.patch b/toolchain/gcc/patches/5.5.0/202-musl_mips.patch new file mode 100644 index 000000000..816dd8d10 --- /dev/null +++ b/toolchain/gcc/patches/5.5.0/202-musl_mips.patch @@ -0,0 +1,35 @@ +From: ktkachov +Date: Fri, 8 May 2015 15:16:50 +0000 (+0000) +Subject: [PATCH 6/13] mips musl support +X-Git-Url: https://gcc.gnu.org/git/?p=gcc.git;a=commitdiff_plain;h=2550b6a866c887472b587bef87d433c51cf1ebc8 + +[PATCH 6/13] mips musl support + +2015-05-08 Gregor Richards + Szabolcs Nagy + + * config/mips/linux.h (MUSL_DYNAMIC_LINKER32): Define. + (MUSL_DYNAMIC_LINKER64, MUSL_DYNAMIC_LINKERN32): Define. + (GNU_USER_DYNAMIC_LINKERN32): Update. + + +git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@222915 138bc75d-0d04-0410-961f-82ee72b054a4 +--- + +--- a/gcc/config/mips/linux.h ++++ b/gcc/config/mips/linux.h +@@ -37,7 +37,13 @@ along with GCC; see the file COPYING3. + #define UCLIBC_DYNAMIC_LINKERN32 \ + "%{mnan=2008:/lib32/ld-uClibc-mipsn8.so.0;:/lib32/ld-uClibc.so.0}" + ++#undef MUSL_DYNAMIC_LINKER32 ++#define MUSL_DYNAMIC_LINKER32 "/lib/ld-musl-mips%{EL:el}%{msoft-float:-sf}.so.1" ++#undef MUSL_DYNAMIC_LINKER64 ++#define MUSL_DYNAMIC_LINKER64 "/lib/ld-musl-mips64%{EL:el}%{msoft-float:-sf}.so.1" ++#define MUSL_DYNAMIC_LINKERN32 "/lib/ld-musl-mipsn32%{EL:el}%{msoft-float:-sf}.so.1" ++ + #define BIONIC_DYNAMIC_LINKERN32 "/system/bin/linker32" + #define GNU_USER_DYNAMIC_LINKERN32 \ + CHOOSE_DYNAMIC_LINKER (GLIBC_DYNAMIC_LINKERN32, UCLIBC_DYNAMIC_LINKERN32, \ +- BIONIC_DYNAMIC_LINKERN32) ++ BIONIC_DYNAMIC_LINKERN32, MUSL_DYNAMIC_LINKERN32) diff --git a/toolchain/gcc/patches/5.5.0/203-musl_powerpc.patch b/toolchain/gcc/patches/5.5.0/203-musl_powerpc.patch new file mode 100644 index 000000000..073c834ce --- /dev/null +++ b/toolchain/gcc/patches/5.5.0/203-musl_powerpc.patch @@ -0,0 +1,209 @@ + +gcc/Changelog: + +2015-04-24 Gregor Richards + Szabolcs Nagy + + * config.gcc (secure_plt): Add *-linux*-musl*. + * config/rs6000/linux64.h (MUSL_DYNAMIC_LINKER32): Define. + (MUSL_DYNAMIC_LINKER64): Define. + (GNU_USER_DYNAMIC_LINKER32): Update. + (GNU_USER_DYNAMIC_LINKER64): Update. + (CHOOSE_DYNAMIC_LINKER): Update. + + * config/rs6000/secureplt.h (LINK_SECURE_PLT_DEFAULT_SPEC): Define. + * config/rs6000/sysv4.h (GNU_USER_DYNAMIC_LINKER): Update. + (MUSL_DYNAMIC_LINKER, MUSL_DYNAMIC_LINKER_E,) + (INCLUDE_DEFAULTS_MUSL_GPP, INCLUDE_DEFAULTS_MUSL_LOCAL,) + (INCLUDE_DEFAULTS_MUSL_PREFIX, INCLUDE_DEFAULTS_MUSL_CROSS,) + (INCLUDE_DEFAULTS_MUSL_TOOL, INCLUDE_DEFAULTS_MUSL_NATIVE): Define. + (LINK_SECURE_PLT_DEFAULT_SPEC): Define. + (CHOOSE_DYNAMIC_LINKER, LINK_TARGET_SPEC, LINK_OS_LINUX_SPEC): Update. + + * config/rs6000/sysv4le.h (MUSL_DYNAMIC_LINKER_E): Define. + +--- a/gcc/config/rs6000/linux64.h ++++ b/gcc/config/rs6000/linux64.h +@@ -365,17 +365,21 @@ extern int dot_symbols; + #endif + #define UCLIBC_DYNAMIC_LINKER32 "/lib/ld-uClibc.so.0" + #define UCLIBC_DYNAMIC_LINKER64 "/lib/ld64-uClibc.so.0" ++#define MUSL_DYNAMIC_LINKER32 "/lib/ld-musl-powerpc" MUSL_DYNAMIC_LINKER_E ".so.1" ++#define MUSL_DYNAMIC_LINKER64 "/lib/ld-musl-powerpc64" MUSL_DYNAMIC_LINKER_E ".so.1" + #if DEFAULT_LIBC == LIBC_UCLIBC +-#define CHOOSE_DYNAMIC_LINKER(G, U) "%{mglibc:" G ";:" U "}" ++#define CHOOSE_DYNAMIC_LINKER(G, U, M) "%{mglibc:" G ";:%{mmusl:" M ";:" U "}}" + #elif DEFAULT_LIBC == LIBC_GLIBC +-#define CHOOSE_DYNAMIC_LINKER(G, U) "%{muclibc:" U ";:" G "}" ++#define CHOOSE_DYNAMIC_LINKER(G, U, M) "%{muclibc:" U ";:%{mmusl:" M ";:" G "}}" ++#elif DEFAULT_LIBC == LIBC_MUSL ++#define CHOOSE_DYNAMIC_LINKER(G, U, M) "%{mglibc:" G ";:%{muclibc:" U ";:" M "}}" + #else + #error "Unsupported DEFAULT_LIBC" + #endif + #define GNU_USER_DYNAMIC_LINKER32 \ +- CHOOSE_DYNAMIC_LINKER (GLIBC_DYNAMIC_LINKER32, UCLIBC_DYNAMIC_LINKER32) ++ CHOOSE_DYNAMIC_LINKER (GLIBC_DYNAMIC_LINKER32, UCLIBC_DYNAMIC_LINKER32, MUSL_DYNAMIC_LINKER32) + #define GNU_USER_DYNAMIC_LINKER64 \ +- CHOOSE_DYNAMIC_LINKER (GLIBC_DYNAMIC_LINKER64, UCLIBC_DYNAMIC_LINKER64) ++ CHOOSE_DYNAMIC_LINKER (GLIBC_DYNAMIC_LINKER64, UCLIBC_DYNAMIC_LINKER64, MUSL_DYNAMIC_LINKER64) + + #undef DEFAULT_ASM_ENDIAN + #if (TARGET_DEFAULT & MASK_LITTLE_ENDIAN) +--- a/gcc/config/rs6000/secureplt.h ++++ b/gcc/config/rs6000/secureplt.h +@@ -18,3 +18,4 @@ along with GCC; see the file COPYING3. + . */ + + #define CC1_SECURE_PLT_DEFAULT_SPEC "-msecure-plt" ++#define LINK_SECURE_PLT_DEFAULT_SPEC "--secure-plt" +--- a/gcc/config/rs6000/sysv4.h ++++ b/gcc/config/rs6000/sysv4.h +@@ -537,6 +537,9 @@ ENDIAN_SELECT(" -mbig", " -mlittle", DEF + #ifndef CC1_SECURE_PLT_DEFAULT_SPEC + #define CC1_SECURE_PLT_DEFAULT_SPEC "" + #endif ++#ifndef LINK_SECURE_PLT_DEFAULT_SPEC ++#define LINK_SECURE_PLT_DEFAULT_SPEC "" ++#endif + + /* Pass -G xxx to the compiler. */ + #undef CC1_SPEC +@@ -574,7 +577,8 @@ ENDIAN_SELECT(" -mbig", " -mlittle", DEF + %{R*} \ + %(link_shlib) \ + %{!T*: %(link_start) } \ +-%(link_os)" ++%(link_os)" \ ++"%{!mbss-plt: %{!msecure-plt: %(link_secure_plt_default)}}" + + /* Shared libraries are not default. */ + #define LINK_SHLIB_SPEC "\ +@@ -757,17 +761,22 @@ ENDIAN_SELECT(" -mbig", " -mlittle", DEF + + #define LINK_START_LINUX_SPEC "" + ++#define MUSL_DYNAMIC_LINKER_E ENDIAN_SELECT("","le","") ++ + #define GLIBC_DYNAMIC_LINKER "/lib/ld.so.1" + #define UCLIBC_DYNAMIC_LINKER "/lib/ld-uClibc.so.0" ++#define MUSL_DYNAMIC_LINKER "/lib/ld-musl-powerpc" MUSL_DYNAMIC_LINKER_E ".so.1" + #if DEFAULT_LIBC == LIBC_UCLIBC +-#define CHOOSE_DYNAMIC_LINKER(G, U) "%{mglibc:" G ";:" U "}" ++#define CHOOSE_DYNAMIC_LINKER(G, U, M) "%{mglibc:" G ";:%{mmusl:" M ";:" U "}}" ++#elif DEFAULT_LIBC == LIBC_MUSL ++#define CHOOSE_DYNAMIC_LINKER(G, U, M) "%{mglibc:" G ";:%{muclibc:" U ";:" M "}}" + #elif !defined (DEFAULT_LIBC) || DEFAULT_LIBC == LIBC_GLIBC +-#define CHOOSE_DYNAMIC_LINKER(G, U) "%{muclibc:" U ";:" G "}" ++#define CHOOSE_DYNAMIC_LINKER(G, U, M) "%{muclibc:" U ";:%{mmusl:" M ";:" G "}}" + #else + #error "Unsupported DEFAULT_LIBC" + #endif + #define GNU_USER_DYNAMIC_LINKER \ +- CHOOSE_DYNAMIC_LINKER (GLIBC_DYNAMIC_LINKER, UCLIBC_DYNAMIC_LINKER) ++ CHOOSE_DYNAMIC_LINKER (GLIBC_DYNAMIC_LINKER, UCLIBC_DYNAMIC_LINKER, MUSL_DYNAMIC_LINKER) + + #define LINK_OS_LINUX_SPEC "-m elf32ppclinux %{!shared: %{!static: \ + %{rdynamic:-export-dynamic} \ +@@ -889,6 +898,7 @@ ncrtn.o%s" + { "link_os_openbsd", LINK_OS_OPENBSD_SPEC }, \ + { "link_os_default", LINK_OS_DEFAULT_SPEC }, \ + { "cc1_secure_plt_default", CC1_SECURE_PLT_DEFAULT_SPEC }, \ ++ { "link_secure_plt_default", LINK_SECURE_PLT_DEFAULT_SPEC }, \ + { "cpp_os_ads", CPP_OS_ADS_SPEC }, \ + { "cpp_os_yellowknife", CPP_OS_YELLOWKNIFE_SPEC }, \ + { "cpp_os_mvme", CPP_OS_MVME_SPEC }, \ +@@ -943,3 +953,72 @@ ncrtn.o%s" + /* This target uses the sysv4.opt file. */ + #define TARGET_USES_SYSV4_OPT 1 + ++/* Include order changes for musl, same as in generic linux.h. */ ++#if DEFAULT_LIBC == LIBC_MUSL ++#define INCLUDE_DEFAULTS_MUSL_GPP \ ++ { GPLUSPLUS_INCLUDE_DIR, "G++", 1, 1, \ ++ GPLUSPLUS_INCLUDE_DIR_ADD_SYSROOT, 0 }, \ ++ { GPLUSPLUS_TOOL_INCLUDE_DIR, "G++", 1, 1, \ ++ GPLUSPLUS_INCLUDE_DIR_ADD_SYSROOT, 1 }, \ ++ { GPLUSPLUS_BACKWARD_INCLUDE_DIR, "G++", 1, 1, \ ++ GPLUSPLUS_INCLUDE_DIR_ADD_SYSROOT, 0 }, ++ ++#ifdef LOCAL_INCLUDE_DIR ++#define INCLUDE_DEFAULTS_MUSL_LOCAL \ ++ { LOCAL_INCLUDE_DIR, 0, 0, 1, 1, 2 }, \ ++ { LOCAL_INCLUDE_DIR, 0, 0, 1, 1, 0 }, ++#else ++#define INCLUDE_DEFAULTS_MUSL_LOCAL ++#endif ++ ++#ifdef PREFIX_INCLUDE_DIR ++#define INCLUDE_DEFAULTS_MUSL_PREFIX \ ++ { PREFIX_INCLUDE_DIR, 0, 0, 1, 0, 0}, ++#else ++#define INCLUDE_DEFAULTS_MUSL_PREFIX ++#endif ++ ++#ifdef CROSS_INCLUDE_DIR ++#define INCLUDE_DEFAULTS_MUSL_CROSS \ ++ { CROSS_INCLUDE_DIR, "GCC", 0, 0, 0, 0}, ++#else ++#define INCLUDE_DEFAULTS_MUSL_CROSS ++#endif ++ ++#ifdef TOOL_INCLUDE_DIR ++#define INCLUDE_DEFAULTS_MUSL_TOOL \ ++ { TOOL_INCLUDE_DIR, "BINUTILS", 0, 1, 0, 0}, ++#else ++#define INCLUDE_DEFAULTS_MUSL_TOOL ++#endif ++ ++#ifdef NATIVE_SYSTEM_HEADER_DIR ++#define INCLUDE_DEFAULTS_MUSL_NATIVE \ ++ { NATIVE_SYSTEM_HEADER_DIR, 0, 0, 0, 1, 2 }, \ ++ { NATIVE_SYSTEM_HEADER_DIR, 0, 0, 0, 1, 0 }, ++#else ++#define INCLUDE_DEFAULTS_MUSL_NATIVE ++#endif ++ ++#if defined (CROSS_DIRECTORY_STRUCTURE) && !defined (TARGET_SYSTEM_ROOT) ++# undef INCLUDE_DEFAULTS_MUSL_LOCAL ++# define INCLUDE_DEFAULTS_MUSL_LOCAL ++# undef INCLUDE_DEFAULTS_MUSL_NATIVE ++# define INCLUDE_DEFAULTS_MUSL_NATIVE ++#else ++# undef INCLUDE_DEFAULTS_MUSL_CROSS ++# define INCLUDE_DEFAULTS_MUSL_CROSS ++#endif ++ ++#undef INCLUDE_DEFAULTS ++#define INCLUDE_DEFAULTS \ ++ { \ ++ INCLUDE_DEFAULTS_MUSL_GPP \ ++ INCLUDE_DEFAULTS_MUSL_PREFIX \ ++ INCLUDE_DEFAULTS_MUSL_CROSS \ ++ INCLUDE_DEFAULTS_MUSL_TOOL \ ++ INCLUDE_DEFAULTS_MUSL_NATIVE \ ++ { GCC_INCLUDE_DIR, "GCC", 0, 1, 0, 0 }, \ ++ { 0, 0, 0, 0, 0, 0 } \ ++ } ++#endif +--- a/gcc/config/rs6000/sysv4le.h ++++ b/gcc/config/rs6000/sysv4le.h +@@ -31,3 +31,5 @@ + /* Little-endian PowerPC64 Linux uses the ELF v2 ABI by default. */ + #define LINUX64_DEFAULT_ABI_ELFv2 + ++#undef MUSL_DYNAMIC_LINKER_E ++#define MUSL_DYNAMIC_LINKER_E ENDIAN_SELECT("","le","le") +--- a/gcc/config.gcc ++++ b/gcc/config.gcc +@@ -2430,6 +2430,10 @@ powerpc*-*-linux*) + powerpc*-*-linux*paired*) + tm_file="${tm_file} rs6000/750cl.h" ;; + esac ++ case ${target} in ++ *-linux*-musl*) ++ enable_secureplt=yes ;; ++ esac + if test x${enable_secureplt} = xyes; then + tm_file="rs6000/secureplt.h ${tm_file}" + fi diff --git a/toolchain/gcc/patches/5.5.0/204-musl_sh.patch b/toolchain/gcc/patches/5.5.0/204-musl_sh.patch new file mode 100644 index 000000000..8c3753d53 --- /dev/null +++ b/toolchain/gcc/patches/5.5.0/204-musl_sh.patch @@ -0,0 +1,39 @@ +gcc/Changelog: + +2015-04-27 Gregor Richards + Szabolcs Nagy + + * config/sh/linux.h (MUSL_DYNAMIC_LINKER): Define. + (MUSL_DYNAMIC_LINKER_E, MUSL_DYNAMIC_LINKER_FP): Define. + +--- a/gcc/config/sh/linux.h ++++ b/gcc/config/sh/linux.h +@@ -43,6 +43,28 @@ along with GCC; see the file COPYING3. + + #define TARGET_ASM_FILE_END file_end_indicate_exec_stack + ++#if TARGET_ENDIAN_DEFAULT == MASK_LITTLE_ENDIAN ++#define MUSL_DYNAMIC_LINKER_E "%{mb:eb}" ++#else ++#define MUSL_DYNAMIC_LINKER_E "%{!ml:eb}" ++#endif ++ ++#if TARGET_CPU_DEFAULT & ( MASK_HARD_SH2A_DOUBLE | MASK_SH4 ) ++/* "-nofpu" if any nofpu option is specified */ ++#define MUSL_DYNAMIC_LINKER_FP \ ++ "%{m1|m2|m2a-nofpu|m3|m4-nofpu|m4-100-nofpu|m4-200-nofpu|m4-300-nofpu|" \ ++ "m4-340|m4-400|m4-500|m4al|m5-32media-nofpu|m5-64media-nofpu|" \ ++ "m5-compact-nofpu:-nofpu}" ++#else ++/* "-nofpu" if none of the hard fpu options are specified */ ++#define MUSL_DYNAMIC_LINKER_FP \ ++ "%{m2a|m4|m4-100|m4-200|m4-300|m4a|m5-32media|m5-64media|m5-compact:;:-nofpu}" ++#endif ++ ++#undef MUSL_DYNAMIC_LINKER ++#define MUSL_DYNAMIC_LINKER \ ++ "/lib/ld-musl-sh" MUSL_DYNAMIC_LINKER_E MUSL_DYNAMIC_LINKER_FP ".so.1" ++ + #define GLIBC_DYNAMIC_LINKER "/lib/ld-linux.so.2" + + #undef SUBTARGET_LINK_EMUL_SUFFIX diff --git a/toolchain/gcc/patches/5.5.0/205-musl_x86.patch b/toolchain/gcc/patches/5.5.0/205-musl_x86.patch new file mode 100644 index 000000000..8772328d6 --- /dev/null +++ b/toolchain/gcc/patches/5.5.0/205-musl_x86.patch @@ -0,0 +1,41 @@ +From: ktkachov +Date: Fri, 15 May 2015 13:20:01 +0000 (+0000) +Subject: [PATCH 9/13] x86 musl support +X-Git-Url: https://gcc.gnu.org/git/?p=gcc.git;a=commitdiff_plain;h=5551c8d927c17f60837f15f8dfe46f945ba3fa9c + +[PATCH 9/13] x86 musl support + +On behalf of Szabolcs Nagy. + +2015-05-15 Gregor Richards + + * config/i386/linux.h (MUSL_DYNAMIC_LINKER): Define. + * config/i386/linux64.h (MUSL_DYNAMIC_LINKER32): Define. + (MUSL_DYNAMIC_LINKER64, MUSL_DYNAMIC_LINKERX32): Define. + + +git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@223218 138bc75d-0d04-0410-961f-82ee72b054a4 +--- + +--- a/gcc/config/i386/linux.h ++++ b/gcc/config/i386/linux.h +@@ -21,3 +21,6 @@ along with GCC; see the file COPYING3. + + #define GNU_USER_LINK_EMULATION "elf_i386" + #define GLIBC_DYNAMIC_LINKER "/lib/ld-linux.so.2" ++ ++#undef MUSL_DYNAMIC_LINKER ++#define MUSL_DYNAMIC_LINKER "/lib/ld-musl-i386.so.1" +--- a/gcc/config/i386/linux64.h ++++ b/gcc/config/i386/linux64.h +@@ -30,3 +30,10 @@ see the files COPYING3 and COPYING.RUNTI + #define GLIBC_DYNAMIC_LINKER32 "/lib/ld-linux.so.2" + #define GLIBC_DYNAMIC_LINKER64 "/lib64/ld-linux-x86-64.so.2" + #define GLIBC_DYNAMIC_LINKERX32 "/libx32/ld-linux-x32.so.2" ++ ++#undef MUSL_DYNAMIC_LINKER32 ++#define MUSL_DYNAMIC_LINKER32 "/lib/ld-musl-i386.so.1" ++#undef MUSL_DYNAMIC_LINKER64 ++#define MUSL_DYNAMIC_LINKER64 "/lib/ld-musl-x86_64.so.1" ++#undef MUSL_DYNAMIC_LINKERX32 ++#define MUSL_DYNAMIC_LINKERX32 "/lib/ld-musl-x32.so.1" diff --git a/toolchain/gcc/patches/5.5.0/206-musl_aarch64.patch b/toolchain/gcc/patches/5.5.0/206-musl_aarch64.patch new file mode 100644 index 000000000..6925a026e --- /dev/null +++ b/toolchain/gcc/patches/5.5.0/206-musl_aarch64.patch @@ -0,0 +1,31 @@ +From: jgreenhalgh +Date: Wed, 27 May 2015 16:46:39 +0000 (+0000) +Subject: [PATCH 3/13] aarch64 musl support +X-Git-Url: https://gcc.gnu.org/git/?p=gcc.git;a=commitdiff_plain;h=b3ff21cf0531be91bc3fb8200296a7633090ec78 + +[PATCH 3/13] aarch64 musl support + +gcc/Changelog: + +2015-05-27 Gregor Richards + Szabolcs Nagy + + * config/aarch64/aarch64-linux.h (MUSL_DYNAMIC_LINKER): Define. + + + +git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@223766 138bc75d-0d04-0410-961f-82ee72b054a4 +--- + +--- a/gcc/config/aarch64/aarch64-linux.h ++++ b/gcc/config/aarch64/aarch64-linux.h +@@ -23,6 +23,9 @@ + + #define GLIBC_DYNAMIC_LINKER "/lib/ld-linux-aarch64%{mbig-endian:_be}%{mabi=ilp32:_ilp32}.so.1" + ++#undef MUSL_DYNAMIC_LINKER ++#define MUSL_DYNAMIC_LINKER "/lib/ld-musl-aarch64%{mbig-endian:_be}%{mabi=ilp32:_ilp32}.so.1" ++ + #undef ASAN_CC1_SPEC + #define ASAN_CC1_SPEC "%{%:sanitize(address):-funwind-tables}" + diff --git a/toolchain/gcc/patches/5.5.0/207-musl_fixincludes.patch b/toolchain/gcc/patches/5.5.0/207-musl_fixincludes.patch new file mode 100644 index 000000000..0ff33d39d --- /dev/null +++ b/toolchain/gcc/patches/5.5.0/207-musl_fixincludes.patch @@ -0,0 +1,30 @@ +From: ktkachov +Date: Wed, 22 Apr 2015 14:18:16 +0000 (+0000) +Subject: fixincludes update for musl support +X-Git-Url: https://gcc.gnu.org/git/?p=gcc.git;a=commitdiff_plain;h=2dc727de2e87c2756a514cbb43cea23c99deaa3d + +fixincludes update for musl support + +On behalf of Szabolcs.Nagy@arm.com + +2015-04-22 Gregor Richards + + * mkfixinc.sh: Add *-musl* with no fixes. + + + +git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@222327 138bc75d-0d04-0410-961f-82ee72b054a4 +--- + +--- a/fixincludes/mkfixinc.sh ++++ b/fixincludes/mkfixinc.sh +@@ -19,7 +19,8 @@ case $machine in + powerpc-*-eabi* | \ + powerpc-*-rtems* | \ + powerpcle-*-eabisim* | \ +- powerpcle-*-eabi* ) ++ powerpcle-*-eabi* | \ ++ *-musl* ) + # IF there is no include fixing, + # THEN create a no-op fixer and exit + (echo "#! /bin/sh" ; echo "exit 0" ) > ${target} diff --git a/toolchain/gcc/patches/5.5.0/209-musl_libstdc++.patch b/toolchain/gcc/patches/5.5.0/209-musl_libstdc++.patch new file mode 100644 index 000000000..d2414d023 --- /dev/null +++ b/toolchain/gcc/patches/5.5.0/209-musl_libstdc++.patch @@ -0,0 +1,72 @@ +From: ktkachov +Date: Wed, 22 Apr 2015 14:24:11 +0000 (+0000) +Subject: libstdc++, libgfortran gthr workaround for musl +X-Git-Url: https://gcc.gnu.org/git/?p=gcc.git;a=commitdiff_plain;h=1e5f711c11cb80ce609db9e9c1d8b2da0f7b5b61 + +libstdc++, libgfortran gthr workaround for musl + +On behalf of szabolcs.nagy@arm.com + +[libstdc++-v3/] +2015-04-22 Szabolcs Nagy + + * config/os/generic/os_defines.h (_GLIBCXX_GTHREAD_USE_WEAK): Define. + * configure.host (os_include_dir): Set to "os/generic" for linux-musl*. + +[libgfortran/] +2015-04-22 Szabolcs Nagy + + * acinclude.m4 (GTHREAD_USE_WEAK): Define as 0 for *-*-musl*. + * configure: Regenerate. + + + +git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@222329 138bc75d-0d04-0410-961f-82ee72b054a4 +--- + +--- a/libgfortran/acinclude.m4 ++++ b/libgfortran/acinclude.m4 +@@ -100,7 +100,7 @@ void foo (void); + [Define to 1 if the target supports #pragma weak]) + fi + case "$host" in +- *-*-darwin* | *-*-hpux* | *-*-cygwin* | *-*-mingw* ) ++ *-*-darwin* | *-*-hpux* | *-*-cygwin* | *-*-mingw* | *-*-musl* ) + AC_DEFINE(GTHREAD_USE_WEAK, 0, + [Define to 0 if the target shouldn't use #pragma weak]) + ;; +--- a/libgfortran/configure ++++ b/libgfortran/configure +@@ -26456,7 +26456,7 @@ $as_echo "#define SUPPORTS_WEAK 1" >>con + + fi + case "$host" in +- *-*-darwin* | *-*-hpux* | *-*-cygwin* | *-*-mingw* ) ++ *-*-darwin* | *-*-hpux* | *-*-cygwin* | *-*-mingw* | *-*-musl* ) + + $as_echo "#define GTHREAD_USE_WEAK 0" >>confdefs.h + +--- a/libstdc++-v3/config/os/generic/os_defines.h ++++ b/libstdc++-v3/config/os/generic/os_defines.h +@@ -33,4 +33,9 @@ + // System-specific #define, typedefs, corrections, etc, go here. This + // file will come before all others. + ++// Disable the weak reference logic in gthr.h for os/generic because it ++// is broken on every platform unless there is implementation specific ++// workaround in gthr-posix.h and at link-time for static linking. ++#define _GLIBCXX_GTHREAD_USE_WEAK 0 ++ + #endif +--- a/libstdc++-v3/configure.host ++++ b/libstdc++-v3/configure.host +@@ -273,6 +273,9 @@ case "${host_os}" in + freebsd*) + os_include_dir="os/bsd/freebsd" + ;; ++ linux-musl*) ++ os_include_dir="os/generic" ++ ;; + gnu* | linux* | kfreebsd*-gnu | knetbsd*-gnu) + if [ "$uclibc" = "yes" ]; then + os_include_dir="os/uclibc" diff --git a/toolchain/gcc/patches/5.5.0/230-musl_libssp.patch b/toolchain/gcc/patches/5.5.0/230-musl_libssp.patch new file mode 100644 index 000000000..30f42e9f7 --- /dev/null +++ b/toolchain/gcc/patches/5.5.0/230-musl_libssp.patch @@ -0,0 +1,13 @@ +--- a/gcc/gcc.c ++++ b/gcc/gcc.c +@@ -727,7 +727,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/5.5.0/240-musl-libitm-fixes.patch b/toolchain/gcc/patches/5.5.0/240-musl-libitm-fixes.patch new file mode 100644 index 000000000..533cb6849 --- /dev/null +++ b/toolchain/gcc/patches/5.5.0/240-musl-libitm-fixes.patch @@ -0,0 +1,61 @@ +From: ktkachov +Date: Wed, 22 Apr 2015 14:11:25 +0000 (+0000) +Subject: libitm fixes for musl support +X-Git-Url: https://gcc.gnu.org/git/?p=gcc.git;a=commitdiff_plain;h=e53a4d49c3d03ab8eaddb073cf972c1c46d75338 + +libitm fixes for musl support + +On behalf of Szabolcs.Nagy@arm.com + +2015-04-22 Gregor Richards + + * config/arm/hwcap.cc: Use fcntl.h instead of sys/fcntl.h. + * config/linux/x86/tls.h: Only use __GLIBC_PREREQ if defined. + + + +git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@222325 138bc75d-0d04-0410-961f-82ee72b054a4 +--- + +--- a/libitm/config/arm/hwcap.cc ++++ b/libitm/config/arm/hwcap.cc +@@ -40,7 +40,7 @@ int GTM_hwcap HIDDEN = 0 + + #ifdef __linux__ + #include +-#include ++#include + #include + + static void __attribute__((constructor)) +--- a/libitm/config/linux/x86/tls.h ++++ b/libitm/config/linux/x86/tls.h +@@ -25,16 +25,19 @@ + #ifndef LIBITM_X86_TLS_H + #define LIBITM_X86_TLS_H 1 + +-#if defined(__GLIBC_PREREQ) && __GLIBC_PREREQ(2, 10) ++#if defined(__GLIBC_PREREQ) ++#if __GLIBC_PREREQ(2, 10) + /* Use slots in the TCB head rather than __thread lookups. + GLIBC has reserved words 10 through 13 for TM. */ + #define HAVE_ARCH_GTM_THREAD 1 + #define HAVE_ARCH_GTM_THREAD_DISP 1 + #endif ++#endif + + #include "config/generic/tls.h" + +-#if defined(__GLIBC_PREREQ) && __GLIBC_PREREQ(2, 10) ++#if defined(__GLIBC_PREREQ) ++#if __GLIBC_PREREQ(2, 10) + namespace GTM HIDDEN { + + #ifdef __x86_64__ +@@ -101,5 +104,6 @@ static inline void set_abi_disp(struct a + + } // namespace GTM + #endif /* >= GLIBC 2.10 */ ++#endif + + #endif // LIBITM_X86_TLS_H diff --git a/toolchain/gcc/patches/5.5.0/250-add-musl.patch b/toolchain/gcc/patches/5.5.0/250-add-musl.patch new file mode 100644 index 000000000..8cbeddea3 --- /dev/null +++ b/toolchain/gcc/patches/5.5.0/250-add-musl.patch @@ -0,0 +1,120 @@ +From: ktkachov +Date: Fri, 8 May 2015 08:30:40 +0000 (+0000) +Subject: [PATCH 0/13] Add musl support to GCC +X-Git-Url: https://gcc.gnu.org/git/?p=gcc.git;a=commitdiff_plain;h=f2d678afa5b8385d763b93772d73d6bf80a9739e + +[PATCH 0/13] Add musl support to GCC + +2015-05-08 Szabolcs Nagy + + * config/glibc-stdint.h (OPTION_MUSL): Define. + (INT_FAST16_TYPE, INT_FAST32_TYPE, UINT_FAST16_TYPE, UINT_FAST32_TYPE): + Change the definition based on OPTION_MUSL for 64 bit targets. + * config/linux.h (OPTION_MUSL): Redefine. + * config/alpha/linux.h (OPTION_MUSL): Redefine. + * config/rs6000/linux.h (OPTION_MUSL): Redefine. + * config/rs6000/linux64.h (OPTION_MUSL): Redefine. + + +git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@222905 138bc75d-0d04-0410-961f-82ee72b054a4 +--- + +--- a/gcc/config/alpha/linux.h ++++ b/gcc/config/alpha/linux.h +@@ -61,10 +61,14 @@ along with GCC; see the file COPYING3. + #define OPTION_GLIBC (DEFAULT_LIBC == LIBC_GLIBC) + #define OPTION_UCLIBC (DEFAULT_LIBC == LIBC_UCLIBC) + #define OPTION_BIONIC (DEFAULT_LIBC == LIBC_BIONIC) ++#undef OPTION_MUSL ++#define OPTION_MUSL (DEFAULT_LIBC == LIBC_MUSL) + #else + #define OPTION_GLIBC (linux_libc == LIBC_GLIBC) + #define OPTION_UCLIBC (linux_libc == LIBC_UCLIBC) + #define OPTION_BIONIC (linux_libc == LIBC_BIONIC) ++#undef OPTION_MUSL ++#define OPTION_MUSL (linux_libc == LIBC_MUSL) + #endif + + /* Determine what functions are present at the runtime; +--- a/gcc/config/glibc-stdint.h ++++ b/gcc/config/glibc-stdint.h +@@ -22,6 +22,12 @@ a copy of the GCC Runtime Library Except + see the files COPYING3 and COPYING.RUNTIME respectively. If not, see + . */ + ++/* Systems using musl libc should use this header and make sure ++ OPTION_MUSL is defined correctly before using the TYPE macros. */ ++#ifndef OPTION_MUSL ++#define OPTION_MUSL 0 ++#endif ++ + #define SIG_ATOMIC_TYPE "int" + + #define INT8_TYPE "signed char" +@@ -43,12 +49,12 @@ see the files COPYING3 and COPYING.RUNTI + #define UINT_LEAST64_TYPE (LONG_TYPE_SIZE == 64 ? "long unsigned int" : "long long unsigned int") + + #define INT_FAST8_TYPE "signed char" +-#define INT_FAST16_TYPE (LONG_TYPE_SIZE == 64 ? "long int" : "int") +-#define INT_FAST32_TYPE (LONG_TYPE_SIZE == 64 ? "long int" : "int") ++#define INT_FAST16_TYPE (LONG_TYPE_SIZE == 64 && !OPTION_MUSL ? "long int" : "int") ++#define INT_FAST32_TYPE (LONG_TYPE_SIZE == 64 && !OPTION_MUSL ? "long int" : "int") + #define INT_FAST64_TYPE (LONG_TYPE_SIZE == 64 ? "long int" : "long long int") + #define UINT_FAST8_TYPE "unsigned char" +-#define UINT_FAST16_TYPE (LONG_TYPE_SIZE == 64 ? "long unsigned int" : "unsigned int") +-#define UINT_FAST32_TYPE (LONG_TYPE_SIZE == 64 ? "long unsigned int" : "unsigned int") ++#define UINT_FAST16_TYPE (LONG_TYPE_SIZE == 64 && !OPTION_MUSL ? "long unsigned int" : "unsigned int") ++#define UINT_FAST32_TYPE (LONG_TYPE_SIZE == 64 && !OPTION_MUSL ? "long unsigned int" : "unsigned int") + #define UINT_FAST64_TYPE (LONG_TYPE_SIZE == 64 ? "long unsigned int" : "long long unsigned int") + + #define INTPTR_TYPE (LONG_TYPE_SIZE == 64 ? "long int" : "int") +--- a/gcc/config/linux.h ++++ b/gcc/config/linux.h +@@ -32,11 +32,13 @@ see the files COPYING3 and COPYING.RUNTI + #define OPTION_GLIBC (DEFAULT_LIBC == LIBC_GLIBC) + #define OPTION_UCLIBC (DEFAULT_LIBC == LIBC_UCLIBC) + #define OPTION_BIONIC (DEFAULT_LIBC == LIBC_BIONIC) ++#undef OPTION_MUSL + #define OPTION_MUSL (DEFAULT_LIBC == LIBC_MUSL) + #else + #define OPTION_GLIBC (linux_libc == LIBC_GLIBC) + #define OPTION_UCLIBC (linux_libc == LIBC_UCLIBC) + #define OPTION_BIONIC (linux_libc == LIBC_BIONIC) ++#undef OPTION_MUSL + #define OPTION_MUSL (linux_libc == LIBC_MUSL) + #endif + +--- a/gcc/config/rs6000/linux.h ++++ b/gcc/config/rs6000/linux.h +@@ -30,10 +30,14 @@ + #define OPTION_GLIBC (DEFAULT_LIBC == LIBC_GLIBC) + #define OPTION_UCLIBC (DEFAULT_LIBC == LIBC_UCLIBC) + #define OPTION_BIONIC (DEFAULT_LIBC == LIBC_BIONIC) ++#undef OPTION_MUSL ++#define OPTION_MUSL (DEFAULT_LIBC == LIBC_MUSL) + #else + #define OPTION_GLIBC (linux_libc == LIBC_GLIBC) + #define OPTION_UCLIBC (linux_libc == LIBC_UCLIBC) + #define OPTION_BIONIC (linux_libc == LIBC_BIONIC) ++#undef OPTION_MUSL ++#define OPTION_MUSL (linux_libc == LIBC_MUSL) + #endif + + /* Determine what functions are present at the runtime; +--- a/gcc/config/rs6000/linux64.h ++++ b/gcc/config/rs6000/linux64.h +@@ -299,10 +299,14 @@ extern int dot_symbols; + #define OPTION_GLIBC (DEFAULT_LIBC == LIBC_GLIBC) + #define OPTION_UCLIBC (DEFAULT_LIBC == LIBC_UCLIBC) + #define OPTION_BIONIC (DEFAULT_LIBC == LIBC_BIONIC) ++#undef OPTION_MUSL ++#define OPTION_MUSL (DEFAULT_LIBC == LIBC_MUSL) + #else + #define OPTION_GLIBC (linux_libc == LIBC_GLIBC) + #define OPTION_UCLIBC (linux_libc == LIBC_UCLIBC) + #define OPTION_BIONIC (linux_libc == LIBC_BIONIC) ++#undef OPTION_MUSL ++#define OPTION_MUSL (linux_libc == LIBC_MUSL) + #endif + + /* Determine what functions are present at the runtime; diff --git a/toolchain/gcc/patches/5.5.0/260-musl-add-unwind-fix.patch b/toolchain/gcc/patches/5.5.0/260-musl-add-unwind-fix.patch new file mode 100644 index 000000000..a3b83e207 --- /dev/null +++ b/toolchain/gcc/patches/5.5.0/260-musl-add-unwind-fix.patch @@ -0,0 +1,34 @@ +From: ktkachov +Date: Wed, 22 Apr 2015 14:20:01 +0000 (+0000) +Subject: unwind fix for musl +X-Git-Url: https://gcc.gnu.org/git/?p=gcc.git;a=commitdiff_plain;h=a2e31d0681d8a47389b8a3552622fbd9827bcef4 + +unwind fix for musl + +On behalf of szabolcs.nagy@arm.com + +2015-04-22 Gregor Richards + Szabolcs Nagy + + * unwind-dw2-fde-dip.c (USE_PT_GNU_EH_FRAME): Define it on + Linux if target provides dl_iterate_phdr. + + +git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@222328 138bc75d-0d04-0410-961f-82ee72b054a4 +--- + +--- a/libgcc/unwind-dw2-fde-dip.c ++++ b/libgcc/unwind-dw2-fde-dip.c +@@ -59,6 +59,12 @@ + + #if !defined(inhibit_libc) && defined(HAVE_LD_EH_FRAME_HDR) \ + && defined(TARGET_DL_ITERATE_PHDR) \ ++ && defined(__linux__) ++# define USE_PT_GNU_EH_FRAME ++#endif ++ ++#if !defined(inhibit_libc) && defined(HAVE_LD_EH_FRAME_HDR) \ ++ && defined(TARGET_DL_ITERATE_PHDR) \ + && (defined(__DragonFly__) || defined(__FreeBSD__)) + # define ElfW __ElfN + # define USE_PT_GNU_EH_FRAME diff --git a/toolchain/gcc/patches/5.5.0/270-musl-add-powerpc-softfloat-fix.patch b/toolchain/gcc/patches/5.5.0/270-musl-add-powerpc-softfloat-fix.patch new file mode 100644 index 000000000..bdebf6c01 --- /dev/null +++ b/toolchain/gcc/patches/5.5.0/270-musl-add-powerpc-softfloat-fix.patch @@ -0,0 +1,24 @@ +--- a/gcc/config/rs6000/linux64.h ++++ b/gcc/config/rs6000/linux64.h +@@ -369,8 +369,8 @@ extern int dot_symbols; + #endif + #define UCLIBC_DYNAMIC_LINKER32 "/lib/ld-uClibc.so.0" + #define UCLIBC_DYNAMIC_LINKER64 "/lib/ld64-uClibc.so.0" +-#define MUSL_DYNAMIC_LINKER32 "/lib/ld-musl-powerpc" MUSL_DYNAMIC_LINKER_E ".so.1" +-#define MUSL_DYNAMIC_LINKER64 "/lib/ld-musl-powerpc64" MUSL_DYNAMIC_LINKER_E ".so.1" ++#define MUSL_DYNAMIC_LINKER32 "/lib/ld-musl-powerpc" MUSL_DYNAMIC_LINKER_E "%{msoft-float:-sf}.so.1" ++#define MUSL_DYNAMIC_LINKER64 "/lib/ld-musl-powerpc64" MUSL_DYNAMIC_LINKER_E "%{msoft-float:-sf}.so.1" + #if DEFAULT_LIBC == LIBC_UCLIBC + #define CHOOSE_DYNAMIC_LINKER(G, U, M) "%{mglibc:" G ";:%{mmusl:" M ";:" U "}}" + #elif DEFAULT_LIBC == LIBC_GLIBC +--- a/gcc/config/rs6000/sysv4.h ++++ b/gcc/config/rs6000/sysv4.h +@@ -765,7 +765,7 @@ ENDIAN_SELECT(" -mbig", " -mlittle", DEF + + #define GLIBC_DYNAMIC_LINKER "/lib/ld.so.1" + #define UCLIBC_DYNAMIC_LINKER "/lib/ld-uClibc.so.0" +-#define MUSL_DYNAMIC_LINKER "/lib/ld-musl-powerpc" MUSL_DYNAMIC_LINKER_E ".so.1" ++#define MUSL_DYNAMIC_LINKER "/lib/ld-musl-powerpc" MUSL_DYNAMIC_LINKER_E "%{msoft-float:-sf}.so.1" + #if DEFAULT_LIBC == LIBC_UCLIBC + #define CHOOSE_DYNAMIC_LINKER(G, U, M) "%{mglibc:" G ";:%{mmusl:" M ";:" U "}}" + #elif DEFAULT_LIBC == LIBC_MUSL diff --git a/toolchain/gcc/patches/5.5.0/280-musl-disable-ifunc-by-default.patch b/toolchain/gcc/patches/5.5.0/280-musl-disable-ifunc-by-default.patch new file mode 100644 index 000000000..9a043eed3 --- /dev/null +++ b/toolchain/gcc/patches/5.5.0/280-musl-disable-ifunc-by-default.patch @@ -0,0 +1,36 @@ +From 450fb05e2a7510d37744f044009f8237d902f65c Mon Sep 17 00:00:00 2001 +From: nsz +Date: Tue, 30 Aug 2016 10:26:22 +0000 +Subject: [PATCH] disable ifunc on *-musl by default + +gcc/ + * config.gcc (*-*-*musl*): Disable gnu-indirect-function. + + + +git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@239859 138bc75d-0d04-0410-961f-82ee72b054a4 +--- + gcc/ChangeLog | 4 ++++ + gcc/config.gcc | 4 ++-- + 2 files changed, 6 insertions(+), 2 deletions(-) + +--- a/gcc/config.gcc ++++ b/gcc/config.gcc +@@ -1455,7 +1455,7 @@ i[34567]86-*-linux* | i[34567]86-*-kfree + extra_options="${extra_options} linux-android.opt" + # Assume modern glibc if not targeting Android nor uclibc. + case ${target} in +- *-*-*android*|*-*-*uclibc*) ++ *-*-*android*|*-*-*uclibc*|*-*-*musl*) + ;; + *) + default_gnu_indirect_function=yes +@@ -1524,7 +1524,7 @@ x86_64-*-linux* | x86_64-*-kfreebsd*-gnu + extra_options="${extra_options} linux-android.opt" + # Assume modern glibc if not targeting Android nor uclibc. + case ${target} in +- *-*-*android*|*-*-*uclibc*) ++ *-*-*android*|*-*-*uclibc*|*-*-*musl*) + ;; + *) + default_gnu_indirect_function=yes diff --git a/toolchain/gcc/patches/5.5.0/300-mips_Os_cpu_rtx_cost_model.patch b/toolchain/gcc/patches/5.5.0/300-mips_Os_cpu_rtx_cost_model.patch new file mode 100644 index 000000000..1743658ac --- /dev/null +++ b/toolchain/gcc/patches/5.5.0/300-mips_Os_cpu_rtx_cost_model.patch @@ -0,0 +1,14 @@ +Use the proper rtx cost model for the selected CPU, even when optimizing +for size. This generates better code. + +--- a/gcc/config/mips/mips.c ++++ b/gcc/config/mips/mips.c +@@ -17483,7 +17483,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/5.5.0/800-arm_v5te_no_ldrd_strd.patch b/toolchain/gcc/patches/5.5.0/800-arm_v5te_no_ldrd_strd.patch new file mode 100644 index 000000000..0edeb13c7 --- /dev/null +++ b/toolchain/gcc/patches/5.5.0/800-arm_v5te_no_ldrd_strd.patch @@ -0,0 +1,11 @@ +--- a/gcc/config/arm/arm.h ++++ b/gcc/config/arm/arm.h +@@ -285,7 +285,7 @@ extern void (*arm_lang_output_object_att + /* 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/5.5.0/810-arm-softfloat-libgcc.patch b/toolchain/gcc/patches/5.5.0/810-arm-softfloat-libgcc.patch new file mode 100644 index 000000000..1d06f5b2e --- /dev/null +++ b/toolchain/gcc/patches/5.5.0/810-arm-softfloat-libgcc.patch @@ -0,0 +1,25 @@ +--- 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 +@@ -60,8 +60,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/5.5.0/820-libgcc_pic.patch b/toolchain/gcc/patches/5.5.0/820-libgcc_pic.patch new file mode 100644 index 000000000..42bf0c8cc --- /dev/null +++ b/toolchain/gcc/patches/5.5.0/820-libgcc_pic.patch @@ -0,0 +1,36 @@ +--- a/libgcc/Makefile.in ++++ b/libgcc/Makefile.in +@@ -887,11 +887,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)"; \ +@@ -913,7 +914,7 @@ libgcc_s$(SHLIB_EXT): libunwind$(SHLIB_E + 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) + endif +@@ -1108,6 +1109,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/5.5.0/830-arm_unbreak_armv4t.patch b/toolchain/gcc/patches/5.5.0/830-arm_unbreak_armv4t.patch new file mode 100644 index 000000000..37f8f2a54 --- /dev/null +++ b/toolchain/gcc/patches/5.5.0/830-arm_unbreak_armv4t.patch @@ -0,0 +1,13 @@ +http://sourceware.org/ml/crossgcc/2008-05/msg00009.html + +--- a/gcc/config/arm/linux-eabi.h ++++ b/gcc/config/arm/linux-eabi.h +@@ -45,7 +45,7 @@ + The ARM10TDMI core is the default for armv5t, so set + SUBTARGET_CPU_DEFAULT to achieve this. */ + #undef SUBTARGET_CPU_DEFAULT +-#define SUBTARGET_CPU_DEFAULT TARGET_CPU_arm10tdmi ++#define SUBTARGET_CPU_DEFAULT TARGET_CPU_arm9tdmi + + /* TARGET_BIG_ENDIAN_DEFAULT is set in + config.gcc for big endian configurations. */ diff --git a/toolchain/gcc/patches/5.5.0/840-armv4_pass_fix-v4bx_to_ld.patch b/toolchain/gcc/patches/5.5.0/840-armv4_pass_fix-v4bx_to_ld.patch new file mode 100644 index 000000000..cb1fb9823 --- /dev/null +++ b/toolchain/gcc/patches/5.5.0/840-armv4_pass_fix-v4bx_to_ld.patch @@ -0,0 +1,19 @@ +--- a/gcc/config/arm/linux-eabi.h ++++ b/gcc/config/arm/linux-eabi.h +@@ -94,10 +94,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/5.5.0/850-use_shared_libgcc.patch b/toolchain/gcc/patches/5.5.0/850-use_shared_libgcc.patch new file mode 100644 index 000000000..5818cf4da --- /dev/null +++ b/toolchain/gcc/patches/5.5.0/850-use_shared_libgcc.patch @@ -0,0 +1,47 @@ +--- a/gcc/config/arm/linux-eabi.h ++++ b/gcc/config/arm/linux-eabi.h +@@ -131,10 +131,6 @@ + #define ENDFILE_SPEC \ + 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 +@@ -132,5 +132,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/5.5.0/851-libgcc_no_compat.patch b/toolchain/gcc/patches/5.5.0/851-libgcc_no_compat.patch new file mode 100644 index 000000000..80c347684 --- /dev/null +++ b/toolchain/gcc/patches/5.5.0/851-libgcc_no_compat.patch @@ -0,0 +1,12 @@ +--- 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/5.5.0/870-ppc_no_crtsavres.patch b/toolchain/gcc/patches/5.5.0/870-ppc_no_crtsavres.patch new file mode 100644 index 000000000..d06673efc --- /dev/null +++ b/toolchain/gcc/patches/5.5.0/870-ppc_no_crtsavres.patch @@ -0,0 +1,11 @@ +--- a/gcc/config/rs6000/rs6000.c ++++ b/gcc/config/rs6000/rs6000.c +@@ -21528,7 +21528,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/5.5.0/880-no_java_section.patch b/toolchain/gcc/patches/5.5.0/880-no_java_section.patch new file mode 100644 index 000000000..def6c9f4a --- /dev/null +++ b/toolchain/gcc/patches/5.5.0/880-no_java_section.patch @@ -0,0 +1,11 @@ +--- a/gcc/defaults.h ++++ b/gcc/defaults.h +@@ -380,7 +380,7 @@ see the files COPYING3 and COPYING.RUNTI + /* If we have named section and we support weak symbols, then use the + .jcr section for recording java classes which need to be registered + at program start-up time. */ +-#if defined (TARGET_ASM_NAMED_SECTION) && SUPPORTS_WEAK ++#if 0 && defined (TARGET_ASM_NAMED_SECTION) && SUPPORTS_WEAK + #ifndef JCR_SECTION_NAME + #define JCR_SECTION_NAME ".jcr" + #endif diff --git a/toolchain/gcc/patches/5.5.0/881-no_tm_section.patch b/toolchain/gcc/patches/5.5.0/881-no_tm_section.patch new file mode 100644 index 000000000..fab5db3be --- /dev/null +++ b/toolchain/gcc/patches/5.5.0/881-no_tm_section.patch @@ -0,0 +1,11 @@ +--- 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/5.5.0/900-bad-mips16-crt.patch b/toolchain/gcc/patches/5.5.0/900-bad-mips16-crt.patch new file mode 100644 index 000000000..dd6e9dc88 --- /dev/null +++ b/toolchain/gcc/patches/5.5.0/900-bad-mips16-crt.patch @@ -0,0 +1,9 @@ +--- 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/5.5.0/910-mbsd_multi.patch b/toolchain/gcc/patches/5.5.0/910-mbsd_multi.patch new file mode 100644 index 000000000..88905f6f2 --- /dev/null +++ b/toolchain/gcc/patches/5.5.0/910-mbsd_multi.patch @@ -0,0 +1,222 @@ + + This patch brings over a few features 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. + * -Werror-maybe-reset + Has the effect of -Wno-error if GCC_NO_WERROR is + set and not '0', a no-operation otherwise. This is + to be able to use -Werror in "make" but prevent + GNU autoconf generated configure scripts from + freaking out. + + 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 +@@ -122,6 +122,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); +@@ -449,6 +452,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; +@@ -1039,6 +1048,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 +@@ -431,6 +431,10 @@ Wfloat-conversion + C ObjC C++ ObjC++ Var(warn_float_conversion) LangEnabledBy(C ObjC C++ ObjC++,Wconversion) + Warn for implicit type conversions that cause loss of floating point precision + ++Werror-maybe-reset ++C ObjC C++ ObjC++ ++; Documented in common.opt ++ + Wfloat-equal + C ObjC C++ ObjC++ Var(warn_float_equal) Warning + Warn if testing floating point numbers for equality +@@ -1161,6 +1165,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 +@@ -561,6 +561,10 @@ Werror= + Common Joined + Treat specified warning as error + ++Werror-maybe-reset ++Common ++If environment variable GCC_NO_WERROR is set, act as -Wno-error ++ + Wextra + Common Var(extra_warnings) Warning + Print extra (possibly unwanted) warnings +@@ -1360,6 +1364,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 +@@ -1699,6 +1699,17 @@ common_handle_option (struct gcc_options + opts, opts_set, loc, dc); + break; + ++ case OPT_Werror_maybe_reset: ++ { ++ char *ev = getenv ("GCC_NO_WERROR"); ++ if ((ev != NULL) && (*ev != '0')) ++ warnings_are_errors = 0; ++ } ++ 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/cppopts.texi ++++ b/gcc/doc/cppopts.texi +@@ -163,6 +163,11 @@ in older programs. This warning is on b + Make all warnings into hard errors. Source code which triggers warnings + will be rejected. + ++@item -Werror-maybe-reset ++@opindex Werror-maybe-reset ++Act like @samp{-Wno-error} if the @env{GCC_NO_WERROR} environment ++variable is set to anything other than 0 or empty. ++ + @item -Wsystem-headers + @opindex Wsystem-headers + Issue warnings for code in system headers. These are normally unhelpful +--- a/gcc/doc/invoke.texi ++++ b/gcc/doc/invoke.texi +@@ -251,7 +251,7 @@ Objective-C and Objective-C++ Dialects}. + -Wdisabled-optimization @gol + -Wno-discarded-qualifiers -Wno-discarded-array-qualifiers @gol + -Wno-div-by-zero -Wdouble-promotion -Wempty-body -Wenum-compare @gol +--Wno-endif-labels -Werror -Werror=* @gol ++-Wno-endif-labels -Werror -Werror=* -Werror-maybe-reset @gol + -Wfatal-errors -Wfloat-equal -Wformat -Wformat=2 @gol + -Wno-format-contains-nul -Wno-format-extra-args -Wformat-nonliteral @gol + -Wformat-security -Wformat-signedness -Wformat-y2k @gol +@@ -5388,6 +5388,22 @@ This option is only supported for C and + @option{-Wall} and by @option{-Wpedantic}, which can be disabled with + @option{-Wno-pointer-sign}. + ++@item -Werror-maybe-reset ++@opindex Werror-maybe-reset ++Act like @samp{-Wno-error} if the @env{GCC_NO_WERROR} environment ++variable is set to anything other than 0 or empty. ++ ++@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 +@@ -7866,7 +7882,7 @@ so, the first branch is redirected to ei + second branch or a point immediately following it, depending on whether + the condition is known to be true or false. + +-Enabled at levels @option{-O2}, @option{-O3}, @option{-Os}. ++Enabled at levels @option{-O3}. + + @item -fsplit-wide-types + @opindex fsplit-wide-types +--- a/gcc/java/jvspec.c ++++ b/gcc/java/jvspec.c +@@ -629,6 +629,7 @@ lang_specific_pre_link (void) + class name. Append dummy `.c' that can be stripped by set_input so %b + is correct. */ + set_input (concat (main_class_name, "main.c", NULL)); ++ putenv ("GCC_HONOUR_COPTS=s"); /* XXX hack! */ + err = do_spec (jvgenmain_spec); + if (err == 0) + { diff --git a/toolchain/gcc/patches/5.5.0/920-specs_nonfatal_getenv.patch b/toolchain/gcc/patches/5.5.0/920-specs_nonfatal_getenv.patch new file mode 100644 index 000000000..4c705ad86 --- /dev/null +++ b/toolchain/gcc/patches/5.5.0/920-specs_nonfatal_getenv.patch @@ -0,0 +1,15 @@ +--- a/gcc/gcc.c ++++ b/gcc/gcc.c +@@ -8828,8 +8828,10 @@ getenv_spec_function (int argc, const ch + + value = getenv (argv[0]); + if (!value) +- fatal_error (input_location, +- "environment variable %qs not defined", argv[0]); ++ { ++ warning (input_location, "environment variable %qs not defined", argv[0]); ++ 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/5.5.0/930-fix-mips-noexecstack.patch b/toolchain/gcc/patches/5.5.0/930-fix-mips-noexecstack.patch new file mode 100644 index 000000000..c05844d2e --- /dev/null +++ b/toolchain/gcc/patches/5.5.0/930-fix-mips-noexecstack.patch @@ -0,0 +1,111 @@ +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 +@@ -19629,6 +19629,9 @@ mips_lra_p (void) + #undef TARGET_LRA_P + #define TARGET_LRA_P mips_lra_p + ++#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/5.5.0/931-fix-MIPS-softfloat-build-issue.patch b/toolchain/gcc/patches/5.5.0/931-fix-MIPS-softfloat-build-issue.patch new file mode 100644 index 000000000..9ac0939eb --- /dev/null +++ b/toolchain/gcc/patches/5.5.0/931-fix-MIPS-softfloat-build-issue.patch @@ -0,0 +1,167 @@ +From 2b46f9187b6f994fc450628a7cd97fc703dd23e0 Mon Sep 17 00:00:00 2001 +From: BangLang Huang +Date: Wed, 9 Nov 2016 10:36:49 +0800 +Subject: [PATCH] fix MIPS softfloat build issue + + This patch is backport from github/libffi #272 + +Signed-off-by: BangLang Huang +--- + 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</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/5.5.0/950-cpp_file_path_translation.patch b/toolchain/gcc/patches/5.5.0/950-cpp_file_path_translation.patch new file mode 100644 index 000000000..b67940897 --- /dev/null +++ b/toolchain/gcc/patches/5.5.0/950-cpp_file_path_translation.patch @@ -0,0 +1,182 @@ +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 +@@ -581,6 +581,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 +@@ -1528,6 +1528,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 +@@ -4441,6 +4441,7 @@ without notice. + @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{-W}@var{warn}@dots{}] + [@option{-M}|@option{-MM}] [@option{-MG}] [@option{-MF} @var{filename}] + [@option{-MP}] [@option{-MQ} @var{target}@dots{}] +--- a/gcc/doc/cppopts.texi ++++ b/gcc/doc/cppopts.texi +@@ -532,6 +532,12 @@ Search @var{dir} only for header files r + If @var{dir} begins with @code{=}, then the @code{=} will be replaced + by the sysroot prefix; see @option{--sysroot} and @option{-isysroot}. + ++@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 +@@ -494,8 +494,8 @@ Objective-C and Objective-C++ Dialects}. + @item Directory Options + @xref{Directory Options,,Options for Directory Search}. + @gccoptlist{-B@var{prefix} -I@var{dir} -iplugindir=@var{dir} @gol +--iquote@var{dir} -L@var{dir} -specs=@var{file} -I- @gol +---sysroot=@var{dir} --no-sysroot-suffix} ++-iquote@var{dir} -iremap@var{src}:@var{dst} -L@var{dir} -specs=@var{file} @gol ++-I- --sysroot=@var{dir} --no-sysroot-suffix} + + @item Machine Dependent Options + @xref{Submodel Options,,Hardware Models and Configurations}. +@@ -11485,6 +11485,12 @@ be searched for header files only for th + "@var{file}"}; they are not searched for @code{#include <@var{file}>}, + otherwise just like @option{-I}. + ++@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 +@@ -751,6 +751,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 +@@ -224,6 +224,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 * +@@ -286,6 +344,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) +@@ -297,6 +356,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; +@@ -304,6 +364,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/5.5.0/960-go_libm.patch b/toolchain/gcc/patches/5.5.0/960-go_libm.patch new file mode 100644 index 000000000..d16b0200c --- /dev/null +++ b/toolchain/gcc/patches/5.5.0/960-go_libm.patch @@ -0,0 +1,11 @@ +--- a/gcc/go/Make-lang.in ++++ b/gcc/go/Make-lang.in +@@ -74,7 +74,7 @@ go_OBJS = $(GO_OBJS) go/gospec.o + + go1$(exeext): $(GO_OBJS) attribs.o $(BACKEND) $(LIBDEPS) + +$(LLINKER) $(ALL_LINKERFLAGS) $(LDFLAGS) -o $@ \ +- $(GO_OBJS) attribs.o $(BACKEND) $(LIBS) $(BACKENDLIBS) ++ $(GO_OBJS) attribs.o $(BACKEND) $(LIBS) $(BACKENDLIBS) -lm + + # Documentation. + diff --git a/toolchain/gcc/patches/5.5.0/970-warn_bug.patch b/toolchain/gcc/patches/5.5.0/970-warn_bug.patch new file mode 100644 index 000000000..2c5cf9be2 --- /dev/null +++ b/toolchain/gcc/patches/5.5.0/970-warn_bug.patch @@ -0,0 +1,11 @@ +--- a/libgo/runtime/mprof.goc ++++ b/libgo/runtime/mprof.goc +@@ -403,7 +403,7 @@ func ThreadCreateProfile(p Slice) (n int + + func Stack(b Slice, all bool) (n int) { + byte *pc, *sp; +- bool enablegc; ++ bool enablegc = false; /* workaround GCC bug #36550 */ + + sp = runtime_getcallersp(&b); + pc = (byte*)(uintptr)runtime_getcallerpc(&b); diff --git a/toolchain/gcc/patches/7.2.0/001-revert_register_mode_search.patch b/toolchain/gcc/patches/7.2.0/001-revert_register_mode_search.patch new file mode 100644 index 000000000..63e3fee00 --- /dev/null +++ b/toolchain/gcc/patches/7.2.0/001-revert_register_mode_search.patch @@ -0,0 +1,77 @@ +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.2.0/002-case_insensitive.patch b/toolchain/gcc/patches/7.2.0/002-case_insensitive.patch new file mode 100644 index 000000000..3442076d7 --- /dev/null +++ b/toolchain/gcc/patches/7.2.0/002-case_insensitive.patch @@ -0,0 +1,24 @@ +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/7.2.0/010-documentation.patch b/toolchain/gcc/patches/7.2.0/010-documentation.patch new file mode 100644 index 000000000..0106814f4 --- /dev/null +++ b/toolchain/gcc/patches/7.2.0/010-documentation.patch @@ -0,0 +1,35 @@ +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.2.0/230-musl_libssp.patch b/toolchain/gcc/patches/7.2.0/230-musl_libssp.patch new file mode 100644 index 000000000..eebee9175 --- /dev/null +++ b/toolchain/gcc/patches/7.2.0/230-musl_libssp.patch @@ -0,0 +1,28 @@ +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.2.0/300-mips_Os_cpu_rtx_cost_model.patch b/toolchain/gcc/patches/7.2.0/300-mips_Os_cpu_rtx_cost_model.patch new file mode 100644 index 000000000..84c0fdab6 --- /dev/null +++ b/toolchain/gcc/patches/7.2.0/300-mips_Os_cpu_rtx_cost_model.patch @@ -0,0 +1,21 @@ +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 +@@ -19784,7 +19784,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.2.0/800-arm_v5te_no_ldrd_strd.patch b/toolchain/gcc/patches/7.2.0/800-arm_v5te_no_ldrd_strd.patch new file mode 100644 index 000000000..76200a166 --- /dev/null +++ b/toolchain/gcc/patches/7.2.0/800-arm_v5te_no_ldrd_strd.patch @@ -0,0 +1,32 @@ +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.2.0/810-arm-softfloat-libgcc.patch b/toolchain/gcc/patches/7.2.0/810-arm-softfloat-libgcc.patch new file mode 100644 index 000000000..5c9d86aea --- /dev/null +++ b/toolchain/gcc/patches/7.2.0/810-arm-softfloat-libgcc.patch @@ -0,0 +1,33 @@ +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/7.2.0/820-libgcc_pic.patch b/toolchain/gcc/patches/7.2.0/820-libgcc_pic.patch new file mode 100644 index 000000000..0cc1e07e2 --- /dev/null +++ b/toolchain/gcc/patches/7.2.0/820-libgcc_pic.patch @@ -0,0 +1,44 @@ +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.2.0/840-armv4_pass_fix-v4bx_to_ld.patch b/toolchain/gcc/patches/7.2.0/840-armv4_pass_fix-v4bx_to_ld.patch new file mode 100644 index 000000000..b9c9b161a --- /dev/null +++ b/toolchain/gcc/patches/7.2.0/840-armv4_pass_fix-v4bx_to_ld.patch @@ -0,0 +1,28 @@ +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/7.2.0/850-use_shared_libgcc.patch b/toolchain/gcc/patches/7.2.0/850-use_shared_libgcc.patch new file mode 100644 index 000000000..1d07efed8 --- /dev/null +++ b/toolchain/gcc/patches/7.2.0/850-use_shared_libgcc.patch @@ -0,0 +1,54 @@ +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.2.0/851-libgcc_no_compat.patch b/toolchain/gcc/patches/7.2.0/851-libgcc_no_compat.patch new file mode 100644 index 000000000..d710e4071 --- /dev/null +++ b/toolchain/gcc/patches/7.2.0/851-libgcc_no_compat.patch @@ -0,0 +1,22 @@ +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/7.2.0/870-ppc_no_crtsavres.patch b/toolchain/gcc/patches/7.2.0/870-ppc_no_crtsavres.patch new file mode 100644 index 000000000..156468b45 --- /dev/null +++ b/toolchain/gcc/patches/7.2.0/870-ppc_no_crtsavres.patch @@ -0,0 +1,18 @@ +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 +@@ -26936,7 +26936,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.2.0/881-no_tm_section.patch b/toolchain/gcc/patches/7.2.0/881-no_tm_section.patch new file mode 100644 index 000000000..a58dc27e6 --- /dev/null +++ b/toolchain/gcc/patches/7.2.0/881-no_tm_section.patch @@ -0,0 +1,22 @@ +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.2.0/900-bad-mips16-crt.patch b/toolchain/gcc/patches/7.2.0/900-bad-mips16-crt.patch new file mode 100644 index 000000000..f5cc0a74e --- /dev/null +++ b/toolchain/gcc/patches/7.2.0/900-bad-mips16-crt.patch @@ -0,0 +1,30 @@ +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.2.0/910-mbsd_multi.patch b/toolchain/gcc/patches/7.2.0/910-mbsd_multi.patch new file mode 100644 index 000000000..286cfadae --- /dev/null +++ b/toolchain/gcc/patches/7.2.0/910-mbsd_multi.patch @@ -0,0 +1,146 @@ +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 +@@ -1928,6 +1928,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 +@@ -6567,6 +6567,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.2.0/920-specs_nonfatal_getenv.patch b/toolchain/gcc/patches/7.2.0/920-specs_nonfatal_getenv.patch new file mode 100644 index 000000000..69b40621d --- /dev/null +++ b/toolchain/gcc/patches/7.2.0/920-specs_nonfatal_getenv.patch @@ -0,0 +1,22 @@ +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 +@@ -9280,8 +9280,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.2.0/930-fix-mips-noexecstack.patch b/toolchain/gcc/patches/7.2.0/930-fix-mips-noexecstack.patch new file mode 100644 index 000000000..90d10f11e --- /dev/null +++ b/toolchain/gcc/patches/7.2.0/930-fix-mips-noexecstack.patch @@ -0,0 +1,111 @@ +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 +@@ -22561,6 +22561,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.2.0/940-no-clobber-stamp-bits.patch b/toolchain/gcc/patches/7.2.0/940-no-clobber-stamp-bits.patch new file mode 100644 index 000000000..8b88b4066 --- /dev/null +++ b/toolchain/gcc/patches/7.2.0/940-no-clobber-stamp-bits.patch @@ -0,0 +1,33 @@ +commit 548d9a008ff265e9eaa3c7e0e6e301c6bd5645e6 +Author: Felix Fietkau +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 +@@ -1476,7 +1476,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.2.0/950-cpp_file_path_translation.patch b/toolchain/gcc/patches/7.2.0/950-cpp_file_path_translation.patch new file mode 100644 index 000000000..60729dd7f --- /dev/null +++ b/toolchain/gcc/patches/7.2.0/950-cpp_file_path_translation.patch @@ -0,0 +1,181 @@ +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 +@@ -11863,6 +11863,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/gdb/Makefile b/toolchain/gdb/Makefile index 77e24f460..abd6d033c 100644 --- a/toolchain/gdb/Makefile +++ b/toolchain/gdb/Makefile @@ -17,11 +17,11 @@ PKG_HASH:=f47930161e9e99c46ab018dabbf56024739dda29c51f92495eaa0d4d7e3511f6 GDB_DIR:=binutils-$(PKG_NAME)-$(PKG_VERSION) PATCH_DIR:=./patches-arc else -PKG_VERSION:=7.12.1 +PKG_VERSION:=8.0.1 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz PKG_SOURCE_URL:=@GNU/gdb -PKG_HASH:=4607680b973d3ec92c30ad029f1b7dbde3876869e6b3a117d8a7e90081113186 +PKG_HASH:=3dbd5f93e36ba2815ad0efab030dcd0c7b211d7b353a40a53f4c02d7d56295e3 GDB_DIR:=$(PKG_NAME)-$(PKG_VERSION) endif diff --git a/toolchain/gdb/patches/110-no_testsuite.patch b/toolchain/gdb/patches/110-no_testsuite.patch index 68d1c9035..e86ba6d0c 100644 --- a/toolchain/gdb/patches/110-no_testsuite.patch +++ b/toolchain/gdb/patches/110-no_testsuite.patch @@ -1,6 +1,6 @@ --- a/gdb/configure +++ b/gdb/configure -@@ -874,8 +874,7 @@ MAKEINFOFLAGS +@@ -869,8 +869,7 @@ MAKEINFOFLAGS YACC YFLAGS XMKMF' @@ -10,7 +10,7 @@ multi-ice gdbserver' -@@ -5617,7 +5616,7 @@ $as_echo "$with_auto_load_safe_path" >&6 +@@ -6473,7 +6472,7 @@ $as_echo "$with_auto_load_safe_path" >&6 diff --git a/toolchain/gdb/patches/120-fix-compile-flag-mismatch.patch b/toolchain/gdb/patches/120-fix-compile-flag-mismatch.patch index 562902c50..9ce91a024 100644 --- a/toolchain/gdb/patches/120-fix-compile-flag-mismatch.patch +++ b/toolchain/gdb/patches/120-fix-compile-flag-mismatch.patch @@ -1,6 +1,6 @@ --- a/gdb/gdbserver/configure +++ b/gdb/gdbserver/configure -@@ -2476,7 +2476,7 @@ $as_echo "$as_me: error: \`$ac_var' was +@@ -2469,7 +2469,7 @@ $as_echo "$as_me: error: \`$ac_var' was ac_cache_corrupted=: ;; ,);; *) diff --git a/toolchain/glibc/common.mk b/toolchain/glibc/common.mk index 0ea166e77..0ffeef0f6 100644 --- a/toolchain/glibc/common.mk +++ b/toolchain/glibc/common.mk @@ -7,11 +7,11 @@ include $(TOPDIR)/rules.mk PKG_NAME:=glibc -PKG_VERSION:=2.25 +PKG_VERSION:=2.26 PKG_SOURCE_URL:=@GNU/libc PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz -PKG_HASH:=067bd9bb3390e79aa45911537d13c3721f1d9d3769931a30c2681bfee66f23a0 +PKG_HASH:=e54e0a934cd2bc94429be79da5e9385898d2306b9eaf3c92d5a77af96190f6bd PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION) HOST_BUILD_DIR:=$(BUILD_DIR_TOOLCHAIN)/$(PKG_SOURCE_SUBDIR) diff --git a/toolchain/kernel-headers/Makefile b/toolchain/kernel-headers/Makefile index 1bf5598d6..e374e706e 100644 --- a/toolchain/kernel-headers/Makefile +++ b/toolchain/kernel-headers/Makefile @@ -36,13 +36,9 @@ HOST_EXTRACFLAGS= LINUX_HAS_HEADERS_INSTALL:=y KMAKE := $(MAKE) -C $(HOST_BUILD_DIR) \ - HOSTCFLAGS="$(HOST_CFLAGS) -Wall -Wmissing-prototypes -Wstrict-prototypes" \ - ARCH=$(LINUX_KARCH) \ + $(KERNEL_MAKE_FLAGS) \ CC="$(KERNEL_CC)" \ - CFLAGS="$(TARGET_CFLAGS)" \ - CROSS_COMPILE=$(TARGET_CROSS) \ - KBUILD_HAVE_NLS=no \ - CONFIG_SHELL=$(BASH) + CFLAGS="$(TARGET_CFLAGS)" define Host/Configure/all mkdir -p $(BUILD_DIR_TOOLCHAIN)/linux-dev diff --git a/toolchain/musl/common.mk b/toolchain/musl/common.mk index 0a45828f7..a94a47557 100644 --- a/toolchain/musl/common.mk +++ b/toolchain/musl/common.mk @@ -8,13 +8,13 @@ include $(TOPDIR)/rules.mk include $(INCLUDE_DIR)/target.mk PKG_NAME:=musl -PKG_VERSION:=1.1.16 +PKG_VERSION:=1.1.18 PKG_RELEASE=1 PKG_SOURCE_PROTO:=git PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION) -PKG_SOURCE_VERSION:=5f7efb87a28a311ad377dd26adf53715dedb096d -PKG_MIRROR_HASH:=da18ef24f270e5cae6bc4c440479da17bec1949ae5a1bc990352ca04f24c4378 +PKG_SOURCE_VERSION:=72656157f54c47277b01ec85a6ba7c4084fea6c8 +PKG_MIRROR_HASH:=a3d857c23c94aa96a4ad5f442aaf236e5a189a717273c4e4faf425988d98cd32 PKG_SOURCE_URL:=git://git.musl-libc.org/musl PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.xz diff --git a/toolchain/musl/patches/900-iconv_size_hack.patch b/toolchain/musl/patches/900-iconv_size_hack.patch index 343915fb0..41cff5b03 100644 --- a/toolchain/musl/patches/900-iconv_size_hack.patch +++ b/toolchain/musl/patches/900-iconv_size_hack.patch @@ -1,14 +1,14 @@ --- a/src/locale/iconv.c +++ b/src/locale/iconv.c -@@ -39,6 +39,7 @@ static const unsigned char charmaps[] = +@@ -42,6 +42,7 @@ static const unsigned char charmaps[] = "ucs4\0ucs4be\0utf32\0utf32be\0\0\300" "ucs4le\0utf32le\0\0\303" "ascii\0usascii\0iso646\0iso646us\0\0\307" +#ifdef FULL_ICONV "eucjp\0\0\320" "shiftjis\0sjis\0\0\321" - "gb18030\0\0\330" -@@ -46,6 +47,7 @@ static const unsigned char charmaps[] = + "iso2022jp\0\0\322" +@@ -50,6 +51,7 @@ static const unsigned char charmaps[] = "gb2312\0\0\332" "big5\0bigfive\0cp950\0big5hkscs\0\0\340" "euckr\0ksc5601\0ksx1001\0cp949\0\0\350" @@ -16,7 +16,7 @@ #include "codepages.h" ; -@@ -53,6 +55,7 @@ static const unsigned short legacy_chars +@@ -60,6 +62,7 @@ static const unsigned short legacy_chars #include "legacychars.h" }; @@ -24,45 +24,77 @@ static const unsigned short jis0208[84][94] = { #include "jis0208.h" }; -@@ -72,6 +75,7 @@ static const unsigned short hkscs[] = { +@@ -79,6 +82,7 @@ static const unsigned short hkscs[] = { static const unsigned short ksc[93][94] = { #include "ksc.h" }; +#endif - static int fuzzycmp(const unsigned char *a, const unsigned char *b) + static const unsigned short rev_jis[] = { + #include "revjis.h" +@@ -196,6 +200,7 @@ static unsigned legacy_map(const unsigne + return x < 256 ? x : legacy_chars[x-256]; + } + ++#ifdef FULL_ICONV + static unsigned uni_to_jis(unsigned c) + { + unsigned nel = sizeof rev_jis / sizeof *rev_jis; +@@ -214,6 +219,7 @@ static unsigned uni_to_jis(unsigned c) + } + } + } ++#endif + + size_t iconv(iconv_t cd, char **restrict in, size_t *restrict inb, char **restrict out, size_t *restrict outb) { -@@ -216,6 +220,7 @@ size_t iconv(iconv_t cd0, char **restric +@@ -285,6 +291,7 @@ size_t iconv(iconv_t cd, char **restrict c = ((c-0xd7c0)<<10) + (d-0xdc00); } break; +#ifdef FULL_ICONV case SHIFT_JIS: + if (c < 128) break; if (c-0xa1 <= 0xdf-0xa1) { - c += 0xff61-0xa1; -@@ -362,6 +367,7 @@ size_t iconv(iconv_t cd0, char **restric +@@ -476,6 +483,7 @@ size_t iconv(iconv_t cd, char **restrict c = ksc[c][d]; if (!c) goto ilseq; break; +#endif default: - if (c < 128+type) break; - c -= 128+type; + if (!c) break; + c = legacy_map(map, c); +@@ -516,6 +524,7 @@ size_t iconv(iconv_t cd, char **restrict + } + } + goto subst; ++#ifdef FULL_ICONV + case SHIFT_JIS: + if (c < 128) goto revout; + if (c == 0xa5) { +@@ -589,6 +598,7 @@ size_t iconv(iconv_t cd, char **restrict + *(*out)++ = 'B'; + *outb -= 8; + break; ++#endif + case UCS2BE: + case UCS2LE: + case UTF_16BE: --- a/src/locale/codepages.h +++ b/src/locale/codepages.h -@@ -118,6 +118,7 @@ - "\0\0\0\100\15\0\344\0\0\0\0\0\0\0\0\0\0\0\0\0\103\270\1\0\0\0\340\1\200\40" - "\230\0\0\0\0\0\44\341\12\0" +@@ -129,6 +129,7 @@ + "\340\204\43\316\100\344\34\144\316\71\350\244\243\316\72\354\264\343\316\73" + "\21\361\44\317\74\364\30\145\17\124\146\345\243\317\76\374\134\304\327\77" +#ifdef FULL_ICONV "cp1250\0" "windows1250\0" - "\0\0" -@@ -214,6 +215,7 @@ - "\0\0\0\0\0\0\0\0\0\15\0\0\0\0\0\0\0\0\0\0\266\0\0\0\0\102\0\220\13\0" - "\0\234\2\0\0\0\0\0\0\0\0\244\202\13\0\0\0\0\100\15\0\0\0\0\0\0\0\0\0\0" - "\267\0\0\0\0\103\0\240\13\0\0\240\2\0\0\0\0\0\0\0\0\250\62\45\0" + "\0\40" +@@ -239,6 +240,7 @@ + "\20\105\163\330\64\324\324\145\315\65\330\144\243\315\66\334\334\145\330\67" + "\340\204\43\316\100\344\224\143\316\71\350\244\243\316\72\205\265\343\316\73" + "\21\305\203\330\74\364\330\145\317\75\370\344\243\317\76\374\340\65\362\77" +#endif "koi8r\0" - "\0\0" + "\0\40" -- GitLab