From 1af43b9c239ecfad732635791f3f759155e6f4c3 Mon Sep 17 00:00:00 2001 From: Waldemar Brodkorb Date: Wed, 31 Jan 2018 06:07:18 +0000 Subject: gcc/binutils: update to latest releases, improve riscv support --- mk/buildhlp.mk | 2 + mk/kernel-ver.mk | 6 +++ package/glibc/Makefile | 8 ++-- rules.mk | 1 + target/config/Config.in.abi | 10 +++++ target/config/Config.in.binutils | 6 +-- target/config/Config.in.compiler | 2 +- target/config/Config.in.kernelversion | 14 ++++++- target/config/Config.in.libc | 6 +-- toolchain/binutils/Makefile.inc | 6 +-- toolchain/gcc/7.3.0/add-crtreloc.frv | 12 ++++++ .../gcc/7.3.0/disable-split-stack-nothread.patch | 10 +++++ toolchain/gcc/7.3.0/ia64-fix-libgcc.patch | 17 +++++++++ toolchain/gcc/7.3.0/m68k-coldfire-pr68467.patch | 43 ++++++++++++++++++++++ toolchain/gcc/7.3.0/microblaze.patch | 23 ++++++++++++ toolchain/gcc/7.3.0/musl-s390x.patch | 13 +++++++ toolchain/gcc/7.3.0/nios2-softfp.patch | 14 +++++++ toolchain/gcc/Makefile.inc | 6 +-- toolchain/gcc/patches/7.2.0/add-crtreloc.frv | 12 ------ .../7.2.0/disable-split-stack-nothread.patch | 10 ----- toolchain/gcc/patches/7.2.0/ia64-fix-libgcc.patch | 17 --------- .../gcc/patches/7.2.0/m68k-coldfire-pr68467.patch | 43 ---------------------- toolchain/gcc/patches/7.2.0/microblaze.patch | 23 ------------ toolchain/gcc/patches/7.2.0/musl-s390x.patch | 13 ------- toolchain/gcc/patches/7.2.0/nios2-softfp.patch | 14 ------- toolchain/glibc/Makefile.inc | 10 +---- 26 files changed, 179 insertions(+), 162 deletions(-) create mode 100644 toolchain/gcc/7.3.0/add-crtreloc.frv create mode 100644 toolchain/gcc/7.3.0/disable-split-stack-nothread.patch create mode 100644 toolchain/gcc/7.3.0/ia64-fix-libgcc.patch create mode 100644 toolchain/gcc/7.3.0/m68k-coldfire-pr68467.patch create mode 100644 toolchain/gcc/7.3.0/microblaze.patch create mode 100644 toolchain/gcc/7.3.0/musl-s390x.patch create mode 100644 toolchain/gcc/7.3.0/nios2-softfp.patch delete mode 100644 toolchain/gcc/patches/7.2.0/add-crtreloc.frv delete mode 100644 toolchain/gcc/patches/7.2.0/disable-split-stack-nothread.patch delete mode 100644 toolchain/gcc/patches/7.2.0/ia64-fix-libgcc.patch delete mode 100644 toolchain/gcc/patches/7.2.0/m68k-coldfire-pr68467.patch delete mode 100644 toolchain/gcc/patches/7.2.0/microblaze.patch delete mode 100644 toolchain/gcc/patches/7.2.0/musl-s390x.patch delete mode 100644 toolchain/gcc/patches/7.2.0/nios2-softfp.patch diff --git a/mk/buildhlp.mk b/mk/buildhlp.mk index c2aeb3800..a0ae7ac7f 100644 --- a/mk/buildhlp.mk +++ b/mk/buildhlp.mk @@ -74,6 +74,8 @@ endif ifeq ($(strip ${__use_generic_patch_target}),42) post-patch: ${WRKDIST}/.prepared: ${WRKDIST}/.extract_done + @# find any reject files and delete them + @find $(WRKDIST)/ -name \*.rej -delete [ ! -d ./patches/${PKG_VERSION} ] || ${PREVENT_PATCH} ${PATCH} ${WRKDIST} ./patches/${PKG_VERSION} \ '{patch-!(*.orig),*.patch,*.${ADK_TARGET_ARCH},*.${ADK_TARGET_LIBC}}' $(MAKE_TRACE) [ ! -d ./patches ] || ${PREVENT_PATCH} ${PATCH} ${WRKDIST} ./patches \ diff --git a/mk/kernel-ver.mk b/mk/kernel-ver.mk index 442b2ee8d..1dda5134c 100644 --- a/mk/kernel-ver.mk +++ b/mk/kernel-ver.mk @@ -15,6 +15,12 @@ KERNEL_FILE_VER:= $(ADK_TARGET_KERNEL_GIT) KERNEL_RELEASE:= 1 KERNEL_VERSION:= $(ADK_TARGET_KERNEL_GIT_VER)-$(KERNEL_RELEASE) endif +ifeq ($(ADK_TARGET_KERNEL_VERSION_4_15),y) +KERNEL_FILE_VER:= 4.15 +KERNEL_RELEASE:= 1 +KERNEL_VERSION:= $(KERNEL_FILE_VER)-$(KERNEL_RELEASE) +KERNEL_HASH:= 5a26478906d5005f4f809402e981518d2b8844949199f60c4b6e1f986ca2a769 +endif ifeq ($(ADK_TARGET_KERNEL_VERSION_4_14),y) KERNEL_FILE_VER:= 4.14.8 KERNEL_RELEASE:= 1 diff --git a/package/glibc/Makefile b/package/glibc/Makefile index 1b47117f5..8e3b60020 100644 --- a/package/glibc/Makefile +++ b/package/glibc/Makefile @@ -47,14 +47,14 @@ ifneq ($(ADK_TARGET_USE_STATIC_LIBS_ONLY),y) ${INSTALL_DIR} ${IDIR_GLIBC}/$(ADK_TARGET_LIBC_PATH) $(CP) $(STAGING_TARGET_DIR)/lib/ld*.so* $(IDIR_GLIBC)/$(ADK_TARGET_LIBC_PATH) for file in libc libpthread librt libcrypt libdl libm libanl libnsl libresolv libutil libnss_dns libnss_files; do \ - $(CP) $(STAGING_TARGET_DIR)/lib/$$file.so* $(IDIR_GLIBC)/$(ADK_TARGET_LIBC_PATH); \ - $(CP) $(STAGING_TARGET_DIR)/lib/$$file-$(PKG_GLIBCVER).so $(IDIR_GLIBC)/$(ADK_TARGET_LIBC_PATH); \ + $(CP) $(STAGING_TARGET_DIR)/$(ADK_TARGET_LIBC_ABI_PATH)/$$file.so* $(IDIR_GLIBC)/$(ADK_TARGET_LIBC_PATH); \ + $(CP) $(STAGING_TARGET_DIR)/$(ADK_TARGET_LIBC_ABI_PATH)/$$file-$(PKG_GLIBCVER).so $(IDIR_GLIBC)/$(ADK_TARGET_LIBC_PATH); \ done else ${INSTALL_DIR} ${IDIR_GLIBC}/$(ADK_TARGET_LIBC_PATH) for file in libnss_dns libnss_files; do \ - $(CP) $(STAGING_TARGET_DIR)/lib/$$file.so* $(IDIR_GLIBC)/$(ADK_TARGET_LIBC_PATH); \ - $(CP) $(STAGING_TARGET_DIR)/lib/$$file-$(PKG_GLIBCVER).so $(IDIR_GLIBC)/$(ADK_TARGET_LIBC_PATH); \ + $(CP) $(STAGING_TARGET_DIR)/$(ADK_TARGET_LIBC_ABI_PATH)/$$file.so* $(IDIR_GLIBC)/$(ADK_TARGET_LIBC_PATH); \ + $(CP) $(STAGING_TARGET_DIR)/$(ADK_TARGET_LIBC_ABI_PATH)/$$file-$(PKG_GLIBCVER).so $(IDIR_GLIBC)/$(ADK_TARGET_LIBC_PATH); \ done endif ${INSTALL_DIR} $(IDIR_GLIBC)/usr/bin diff --git a/rules.mk b/rules.mk index e544bd2ea..d3f9a27cb 100644 --- a/rules.mk +++ b/rules.mk @@ -35,6 +35,7 @@ ADK_TARGET_CPU_TYPE:= $(strip $(subst ",, $(ADK_TARGET_CPU_TYPE))) ADK_TARGET_KERNEL:= $(strip $(subst ",, $(ADK_TARGET_KERNEL))) ADK_TARGET_LIBC:= $(strip $(subst ",, $(ADK_TARGET_LIBC))) ADK_TARGET_LIBC_PATH:= $(strip $(subst ",, $(ADK_TARGET_LIBC_PATH))) +ADK_TARGET_LIBC_ABI_PATH:= $(strip $(subst ",, $(ADK_TARGET_LIBC_ABI_PATH))) ADK_TARGET_ENDIAN:= $(strip $(subst ",, $(ADK_TARGET_ENDIAN))) ADK_TARGET_ENDIAN_SUFFIX:= $(strip $(subst ",, $(ADK_TARGET_ENDIAN_SUFFIX))) ADK_TARGET_GCC_CPU:= $(strip $(subst ",, $(ADK_TARGET_GCC_CPU))) diff --git a/target/config/Config.in.abi b/target/config/Config.in.abi index 19a4855e9..1b34ec6e3 100644 --- a/target/config/Config.in.abi +++ b/target/config/Config.in.abi @@ -91,6 +91,16 @@ config ADK_TARGET_LIBC_PATH || ADK_TARGET_ARCH_X86_64 default "lib" +config ADK_TARGET_LIBC_ABI_PATH + string + default "lib/lp64" if ADK_TARGET_ABI_LP64 + default "lib/lp64d" if ADK_TARGET_ABI_LP64D + default "lib/lp64f" if ADK_TARGET_ABI_LP64F + default "lib/ilp32" if ADK_TARGET_ABI_ILP64 + default "lib/ilp32d" if ADK_TARGET_ABI_ILP64D + default "lib/ilp32f" if ADK_TARGET_ABI_ILP64F + default "lib" + config ADK_TARGET_ABI_CFLAGS string default "-mabi=32" if ADK_TARGET_ABI_O32 diff --git a/target/config/Config.in.binutils b/target/config/Config.in.binutils index 92f8b674f..522224b89 100644 --- a/target/config/Config.in.binutils +++ b/target/config/Config.in.binutils @@ -8,7 +8,7 @@ default ADK_TOOLCHAIN_BINUTILS_CSKY if ADK_TARGET_ARCH_CSKY default ADK_TOOLCHAIN_BINUTILS_NDS32 if ADK_TARGET_ARCH_NDS32 default ADK_TOOLCHAIN_BINUTILS_2_28 if ADK_TARGET_ARCH_ARM && ADK_KERNEL_THUMB2_KERNEL && ADK_TARGET_OS_LINUX default ADK_TOOLCHAIN_BINUTILS_2_28 if ADK_TARGET_CPU_SH_J2 -default ADK_TOOLCHAIN_BINUTILS_2_29 +default ADK_TOOLCHAIN_BINUTILS_2_30 config ADK_TOOLCHAIN_BINUTILS_GIT bool "git" @@ -16,8 +16,8 @@ config ADK_TOOLCHAIN_BINUTILS_GIT depends on !ADK_TARGET_ARCH_CSKY depends on !ADK_TARGET_ARCH_NDS32 -config ADK_TOOLCHAIN_BINUTILS_2_29 - bool "2.29.1" +config ADK_TOOLCHAIN_BINUTILS_2_30 + bool "2.30" depends on !ADK_TARGET_ARCH_AVR32 depends on !ADK_TARGET_ARCH_CSKY depends on !ADK_TARGET_ARCH_NDS32 diff --git a/target/config/Config.in.compiler b/target/config/Config.in.compiler index a9155cd92..76741a259 100644 --- a/target/config/Config.in.compiler +++ b/target/config/Config.in.compiler @@ -34,7 +34,7 @@ config ADK_TOOLCHAIN_GCC_GIT depends on !ADK_TARGET_CPU_SH_J2 config ADK_TOOLCHAIN_GCC_7 - bool "7.2.0" + bool "7.3.0" depends on !ADK_TARGET_ARCH_AVR32 depends on !ADK_TARGET_ARCH_CSKY depends on !ADK_TARGET_ARCH_METAG diff --git a/target/config/Config.in.kernelversion b/target/config/Config.in.kernelversion index 4cfbf4a41..ad2ab92e3 100644 --- a/target/config/Config.in.kernelversion +++ b/target/config/Config.in.kernelversion @@ -12,8 +12,6 @@ default ADK_TARGET_KERNEL_VERSION_GIT if ADK_TARGET_SYSTEM_ADSP_BF537 default ADK_TARGET_KERNEL_VERSION_GIT if ADK_TARGET_SYSTEM_PHYTEC_WEGA default ADK_TARGET_KERNEL_VERSION_GIT if ADK_TARGET_ARCH_CSKY default ADK_TARGET_KERNEL_VERSION_GIT if ADK_TARGET_ARCH_LM32 -default ADK_TARGET_KERNEL_VERSION_GIT if ADK_TARGET_ARCH_RISCV32 -default ADK_TARGET_KERNEL_VERSION_GIT if ADK_TARGET_ARCH_RISCV64 default ADK_TARGET_KERNEL_VERSION_4_4 if ADK_TARGET_ARCH_CRIS default ADK_TARGET_KERNEL_VERSION_4_4 if ADK_TARGET_ARCH_H8300 default ADK_TARGET_KERNEL_VERSION_4_4 if ADK_TARGET_ARCH_METAG @@ -21,6 +19,8 @@ default ADK_TARGET_KERNEL_VERSION_4_4 if ADK_TARGET_SYSTEM_QEMU_ARM_VERSATILEPB_ default ADK_TARGET_KERNEL_VERSION_4_4 if ADK_TARGET_SYSTEM_QEMU_ARM_REALVIEW_EB_MPCORE default ADK_TARGET_KERNEL_VERSION_4_14 if ADK_TARGET_SYSTEM_ORANGE_PI0 default ADK_TARGET_KERNEL_VERSION_4_14 if ADK_TARGET_ARCH_OR1K +default ADK_TARGET_KERNEL_VERSION_4_15 if ADK_TARGET_ARCH_RISCV32 +default ADK_TARGET_KERNEL_VERSION_4_15 if ADK_TARGET_ARCH_RISCV64 default ADK_TARGET_KERNEL_VERSION_4_9 config ADK_TARGET_KERNEL_VERSION_GIT @@ -33,6 +33,16 @@ config ADK_TARGET_KERNEL_VERSION_GIT select ADK_TARGET_KERNEL_IMAGE if ADK_TARGET_SYSTEM_SOLIDRUN_IMX6 select ADK_TARGET_KERNEL_IMAGE if ADK_TARGET_SYSTEM_BEAGLEBONE_BLACK +config ADK_TARGET_KERNEL_VERSION_4_15 + bool "4.15" + depends on !ADK_TARGET_ARCH_AVR32 + depends on !ADK_TARGET_ARCH_CRIS + depends on !ADK_TARGET_ARCH_CSKY + depends on !ADK_TARGET_ARCH_METAG + depends on !ADK_TARGET_ARCH_NDS32 + depends on !ADK_TARGET_SYSTEM_QEMU_ARM_VERSATILEPB_NOMMU + depends on !ADK_TARGET_SYSTEM_QEMU_ARM_REALVIEW_EB_MPCORE + config ADK_TARGET_KERNEL_VERSION_4_14 bool "4.14.8" depends on !ADK_TARGET_ARCH_AVR32 diff --git a/target/config/Config.in.libc b/target/config/Config.in.libc index d1d9c2742..391dbdd60 100644 --- a/target/config/Config.in.libc +++ b/target/config/Config.in.libc @@ -152,17 +152,13 @@ config ADK_TARGET_LIB_GLIBC_2_26 bool "2.26" depends on ADK_TARGET_LIB_GLIBC && !ADK_TARGET_ARCH_RISCV32 && !ADK_TARGET_ARCH_RISCV64 && !ADK_TARGET_ARCH_CSKY -config ADK_TARGET_LIB_GLIBC_RISCV - bool "riscv" - depends on ADK_TARGET_LIB_GLIBC && ADK_TARGET_ARCH_RISCV32 || ADK_TARGET_ARCH_RISCV64 - config ADK_TARGET_LIB_GLIBC_CSKY bool "csky" depends on ADK_TARGET_LIB_GLIBC && ADK_TARGET_ARCH_CSKY config ADK_TARGET_LIB_GLIBC_GIT bool "git" - depends on ADK_TARGET_LIB_GLIBC && !ADK_TARGET_ARCH_RISCV32 && !ADK_TARGET_ARCH_RISCV64 && !ADK_TARGET_ARCH_CSKY + depends on ADK_TARGET_LIB_GLIBC && !ADK_TARGET_ARCH_CSKY config ADK_TARGET_LIB_MUSL_1_1_18 bool "1.1.18" diff --git a/toolchain/binutils/Makefile.inc b/toolchain/binutils/Makefile.inc index fe24110d9..80451909d 100644 --- a/toolchain/binutils/Makefile.inc +++ b/toolchain/binutils/Makefile.inc @@ -2,10 +2,10 @@ # material, please see the LICENCE file in the top-level directory. PKG_NAME:= binutils -ifeq ($(ADK_TOOLCHAIN_BINUTILS_2_29),y) -PKG_VERSION:= 2.29.1 +ifeq ($(ADK_TOOLCHAIN_BINUTILS_2_30),y) +PKG_VERSION:= 2.30 PKG_RELEASE:= 1 -PKG_HASH:= e7010a46969f9d3e53b650a518663f98a5dde3c3ae21b7d71e5e6803bc36b577 +PKG_HASH:= 6e46b8aeae2f727a36f0bd9505e405768a72218f1796f0d09757d45209871ae6 PKG_SITES:= ${MASTER_SITE_GNU:=binutils/} DISTFILES:= ${PKG_NAME}-${PKG_VERSION}.tar.xz endif diff --git a/toolchain/gcc/7.3.0/add-crtreloc.frv b/toolchain/gcc/7.3.0/add-crtreloc.frv new file mode 100644 index 000000000..dce4a0ea0 --- /dev/null +++ b/toolchain/gcc/7.3.0/add-crtreloc.frv @@ -0,0 +1,12 @@ +diff -Nur gcc-7.1.0.orig/gcc/config/frv/linux.h gcc-7.1.0/gcc/config/frv/linux.h +--- gcc-7.1.0.orig/gcc/config/frv/linux.h 2017-01-01 13:07:43.000000000 +0100 ++++ gcc-7.1.0/gcc/config/frv/linux.h 2017-06-07 14:52:44.289044131 +0200 +@@ -27,7 +27,7 @@ + + #undef STARTFILE_SPEC + #define STARTFILE_SPEC \ +- "%{!shared: %{pg|p|profile:gcrt1.o%s;pie:Scrt1.o%s;:crt1.o%s}} \ ++ "%{!shared: %{pg|p|profile:gcrt1.o%s;pie:Scrt1.o%s;:crt1.o%s}} crtreloc.o%s \ + crti.o%s %{static:crtbeginT.o%s;shared|pie:crtbeginS.o%s;:crtbegin.o%s}" + + #undef ENDFILE_SPEC diff --git a/toolchain/gcc/7.3.0/disable-split-stack-nothread.patch b/toolchain/gcc/7.3.0/disable-split-stack-nothread.patch new file mode 100644 index 000000000..0038d7573 --- /dev/null +++ b/toolchain/gcc/7.3.0/disable-split-stack-nothread.patch @@ -0,0 +1,10 @@ +diff -Nur gcc-7.1.0.orig/libgcc/config/t-stack gcc-7.1.0/libgcc/config/t-stack +--- gcc-7.1.0.orig/libgcc/config/t-stack 2010-10-01 21:31:49.000000000 +0200 ++++ gcc-7.1.0/libgcc/config/t-stack 2017-06-23 19:55:25.215965555 +0200 +@@ -1,4 +1,6 @@ + # Makefile fragment to provide generic support for -fsplit-stack. + # This should be used in config.host for any host which supports + # -fsplit-stack. ++ifeq ($(enable_threads),yes) + LIB2ADD_ST += $(srcdir)/generic-morestack.c $(srcdir)/generic-morestack-thread.c ++endif diff --git a/toolchain/gcc/7.3.0/ia64-fix-libgcc.patch b/toolchain/gcc/7.3.0/ia64-fix-libgcc.patch new file mode 100644 index 000000000..f1f3c8d2d --- /dev/null +++ b/toolchain/gcc/7.3.0/ia64-fix-libgcc.patch @@ -0,0 +1,17 @@ +diff -Nur gcc-6.3.0.orig/libgcc/config/ia64/fde-glibc.c gcc-6.3.0/libgcc/config/ia64/fde-glibc.c +--- gcc-6.3.0.orig/libgcc/config/ia64/fde-glibc.c 2016-01-04 15:30:50.000000000 +0100 ++++ gcc-6.3.0/libgcc/config/ia64/fde-glibc.c 2017-03-05 13:07:33.316600613 +0100 +@@ -25,6 +25,8 @@ + /* Locate the FDE entry for a given address, using glibc ld.so routines + to avoid register/deregister calls at DSO load/unload. */ + ++#ifndef inhibit_libc ++ + #ifndef _GNU_SOURCE + #define _GNU_SOURCE 1 + #endif +@@ -159,3 +161,4 @@ + + return data.ret; + } ++#endif diff --git a/toolchain/gcc/7.3.0/m68k-coldfire-pr68467.patch b/toolchain/gcc/7.3.0/m68k-coldfire-pr68467.patch new file mode 100644 index 000000000..45e9eb0ba --- /dev/null +++ b/toolchain/gcc/7.3.0/m68k-coldfire-pr68467.patch @@ -0,0 +1,43 @@ +diff -Nur gcc-7.2.0.orig/gcc/config/m68k/m68k.c gcc-7.2.0/gcc/config/m68k/m68k.c +--- gcc-7.2.0.orig/gcc/config/m68k/m68k.c 2017-04-03 22:30:56.274463000 +0000 ++++ gcc-7.2.0/gcc/config/m68k/m68k.c 2018-01-27 02:16:53.779367849 +0000 +@@ -182,6 +182,8 @@ + const_tree, bool); + static bool m68k_cannot_force_const_mem (machine_mode mode, rtx x); + static bool m68k_output_addr_const_extra (FILE *, rtx); ++static machine_mode m68k_promote_function_mode (const_tree, machine_mode, ++ int *, const_tree, int); + static void m68k_init_sync_libfuncs (void) ATTRIBUTE_UNUSED; + static enum flt_eval_method + m68k_excess_precision (enum excess_precision_type); +@@ -332,6 +334,9 @@ + #undef TARGET_ATOMIC_TEST_AND_SET_TRUEVAL + #define TARGET_ATOMIC_TEST_AND_SET_TRUEVAL 128 + ++#undef TARGET_PROMOTE_FUNCTION_MODE ++#define TARGET_PROMOTE_FUNCTION_MODE m68k_promote_function_mode ++ + static const struct attribute_spec m68k_attribute_table[] = + { + /* { name, min_len, max_len, decl_req, type_req, fn_type_req, handler, +@@ -6571,4 +6576,20 @@ + return FLT_EVAL_METHOD_UNPREDICTABLE; + } + ++/* Implement TARGET_PROMOTE_FUNCTION_MODE. */ ++ ++static machine_mode ++m68k_promote_function_mode (const_tree type, machine_mode mode, ++ int *punsignedp ATTRIBUTE_UNUSED, ++ const_tree fntype ATTRIBUTE_UNUSED, ++ int for_return) ++{ ++ /* Promote libcall arguments narrower than int to match the normal C ++ ABI (for which promotions are handled via ++ TARGET_PROMOTE_PROTOTYPES). */ ++ if (type == NULL_TREE && !for_return && (mode == QImode || mode == HImode)) ++ return SImode; ++ return mode; ++} ++ + #include "gt-m68k.h" diff --git a/toolchain/gcc/7.3.0/microblaze.patch b/toolchain/gcc/7.3.0/microblaze.patch new file mode 100644 index 000000000..eb6c08492 --- /dev/null +++ b/toolchain/gcc/7.3.0/microblaze.patch @@ -0,0 +1,23 @@ +revert 6dcad60c0ef48af584395a40feeb256fb82986a8 +as it breaks any userland in qemu + +diff -Nur gcc-6.3.0.orig/gcc/config/microblaze/microblaze.h gcc-6.3.0/gcc/config/microblaze/microblaze.h +--- gcc-6.3.0.orig/gcc/config/microblaze/microblaze.h 2016-01-21 18:10:54.000000000 +0100 ++++ gcc-6.3.0/gcc/config/microblaze/microblaze.h 2017-05-26 18:33:31.297534916 +0200 +@@ -253,14 +253,14 @@ + #define FIXED_REGISTERS \ + { \ + 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, \ +- 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, \ ++ 1, 1, 1, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, \ + 1, 1, 1, 1 \ + } + + #define CALL_USED_REGISTERS \ + { \ + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, \ +- 1, 1, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, \ ++ 1, 1, 1, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, \ + 1, 1, 1, 1 \ + } + #define GP_REG_FIRST 0 diff --git a/toolchain/gcc/7.3.0/musl-s390x.patch b/toolchain/gcc/7.3.0/musl-s390x.patch new file mode 100644 index 000000000..1163bdbf4 --- /dev/null +++ b/toolchain/gcc/7.3.0/musl-s390x.patch @@ -0,0 +1,13 @@ +diff -Nur gcc-7.2.0.orig/gcc/config/s390/linux.h gcc-7.2.0/gcc/config/s390/linux.h +--- gcc-7.2.0.orig/gcc/config/s390/linux.h 2017-02-06 11:25:05.513198000 +0100 ++++ gcc-7.2.0/gcc/config/s390/linux.h 2017-10-30 13:22:45.348170100 +0100 +@@ -76,6 +76,9 @@ + #define GLIBC_DYNAMIC_LINKER32 "/lib/ld.so.1" + #define GLIBC_DYNAMIC_LINKER64 "/lib/ld64.so.1" + ++#define MUSL_DYNAMIC_LINKER32 "/lib/ld-musl-s390.so.1" ++#define MUSL_DYNAMIC_LINKER64 "/lib/ld-musl-s390x.so.1" ++ + #undef LINK_SPEC + #define LINK_SPEC \ + "%{m31:-m elf_s390}%{m64:-m elf64_s390} \ diff --git a/toolchain/gcc/7.3.0/nios2-softfp.patch b/toolchain/gcc/7.3.0/nios2-softfp.patch new file mode 100644 index 000000000..c677c6c2f --- /dev/null +++ b/toolchain/gcc/7.3.0/nios2-softfp.patch @@ -0,0 +1,14 @@ +diff -Nur gcc-6.2.0.orig/libgcc/config.host gcc-6.2.0/libgcc/config.host +--- gcc-6.2.0.orig/libgcc/config.host 2016-05-17 08:15:52.000000000 +0200 ++++ gcc-6.2.0/libgcc/config.host 2016-10-15 14:42:53.971919904 +0200 +@@ -962,6 +962,10 @@ + ;; + esac + ;; ++nios2-*-linux-uclibc*) ++ tmake_file="$tmake_file nios2/t-nios2 nios2/t-linux t-libgcc-pic t-slibgcc-libgcc t-softfp-sfdf t-softfp" ++ md_unwind_header=nios2/linux-unwind.h ++ ;; + nios2-*-linux*) + tmake_file="$tmake_file nios2/t-nios2 nios2/t-linux t-libgcc-pic t-slibgcc-libgcc" + md_unwind_header=nios2/linux-unwind.h diff --git a/toolchain/gcc/Makefile.inc b/toolchain/gcc/Makefile.inc index 8c694cb30..f43b0bb53 100644 --- a/toolchain/gcc/Makefile.inc +++ b/toolchain/gcc/Makefile.inc @@ -3,11 +3,11 @@ PKG_NAME:= gcc ifeq ($(ADK_TOOLCHAIN_GCC_7),y) -PKG_VERSION:= 7.2.0 -PKG_HASH:= 0153a003d3b433459336a91610cca2995ee0fb3d71131bd72555f2231a6efcfc +PKG_VERSION:= 7.3.0 +PKG_HASH:= 832ca6ae04636adbb430e865a1451adf6979ab44ca1c8374f61fba65645ce15c PKG_SITES:= ${MASTER_SITE_GNU:=gcc/gcc-${PKG_VERSION}/} PKG_RELEASE:= 1 -DISTFILES:= ${PKG_NAME}-${PKG_VERSION}.tar.gz +DISTFILES:= ${PKG_NAME}-${PKG_VERSION}.tar.xz LIBSTDCXXVER:= 23 endif ifeq ($(ADK_TOOLCHAIN_GCC_6),y) diff --git a/toolchain/gcc/patches/7.2.0/add-crtreloc.frv b/toolchain/gcc/patches/7.2.0/add-crtreloc.frv deleted file mode 100644 index dce4a0ea0..000000000 --- a/toolchain/gcc/patches/7.2.0/add-crtreloc.frv +++ /dev/null @@ -1,12 +0,0 @@ -diff -Nur gcc-7.1.0.orig/gcc/config/frv/linux.h gcc-7.1.0/gcc/config/frv/linux.h ---- gcc-7.1.0.orig/gcc/config/frv/linux.h 2017-01-01 13:07:43.000000000 +0100 -+++ gcc-7.1.0/gcc/config/frv/linux.h 2017-06-07 14:52:44.289044131 +0200 -@@ -27,7 +27,7 @@ - - #undef STARTFILE_SPEC - #define STARTFILE_SPEC \ -- "%{!shared: %{pg|p|profile:gcrt1.o%s;pie:Scrt1.o%s;:crt1.o%s}} \ -+ "%{!shared: %{pg|p|profile:gcrt1.o%s;pie:Scrt1.o%s;:crt1.o%s}} crtreloc.o%s \ - crti.o%s %{static:crtbeginT.o%s;shared|pie:crtbeginS.o%s;:crtbegin.o%s}" - - #undef ENDFILE_SPEC diff --git a/toolchain/gcc/patches/7.2.0/disable-split-stack-nothread.patch b/toolchain/gcc/patches/7.2.0/disable-split-stack-nothread.patch deleted file mode 100644 index 0038d7573..000000000 --- a/toolchain/gcc/patches/7.2.0/disable-split-stack-nothread.patch +++ /dev/null @@ -1,10 +0,0 @@ -diff -Nur gcc-7.1.0.orig/libgcc/config/t-stack gcc-7.1.0/libgcc/config/t-stack ---- gcc-7.1.0.orig/libgcc/config/t-stack 2010-10-01 21:31:49.000000000 +0200 -+++ gcc-7.1.0/libgcc/config/t-stack 2017-06-23 19:55:25.215965555 +0200 -@@ -1,4 +1,6 @@ - # Makefile fragment to provide generic support for -fsplit-stack. - # This should be used in config.host for any host which supports - # -fsplit-stack. -+ifeq ($(enable_threads),yes) - LIB2ADD_ST += $(srcdir)/generic-morestack.c $(srcdir)/generic-morestack-thread.c -+endif diff --git a/toolchain/gcc/patches/7.2.0/ia64-fix-libgcc.patch b/toolchain/gcc/patches/7.2.0/ia64-fix-libgcc.patch deleted file mode 100644 index f1f3c8d2d..000000000 --- a/toolchain/gcc/patches/7.2.0/ia64-fix-libgcc.patch +++ /dev/null @@ -1,17 +0,0 @@ -diff -Nur gcc-6.3.0.orig/libgcc/config/ia64/fde-glibc.c gcc-6.3.0/libgcc/config/ia64/fde-glibc.c ---- gcc-6.3.0.orig/libgcc/config/ia64/fde-glibc.c 2016-01-04 15:30:50.000000000 +0100 -+++ gcc-6.3.0/libgcc/config/ia64/fde-glibc.c 2017-03-05 13:07:33.316600613 +0100 -@@ -25,6 +25,8 @@ - /* Locate the FDE entry for a given address, using glibc ld.so routines - to avoid register/deregister calls at DSO load/unload. */ - -+#ifndef inhibit_libc -+ - #ifndef _GNU_SOURCE - #define _GNU_SOURCE 1 - #endif -@@ -159,3 +161,4 @@ - - return data.ret; - } -+#endif diff --git a/toolchain/gcc/patches/7.2.0/m68k-coldfire-pr68467.patch b/toolchain/gcc/patches/7.2.0/m68k-coldfire-pr68467.patch deleted file mode 100644 index 45e9eb0ba..000000000 --- a/toolchain/gcc/patches/7.2.0/m68k-coldfire-pr68467.patch +++ /dev/null @@ -1,43 +0,0 @@ -diff -Nur gcc-7.2.0.orig/gcc/config/m68k/m68k.c gcc-7.2.0/gcc/config/m68k/m68k.c ---- gcc-7.2.0.orig/gcc/config/m68k/m68k.c 2017-04-03 22:30:56.274463000 +0000 -+++ gcc-7.2.0/gcc/config/m68k/m68k.c 2018-01-27 02:16:53.779367849 +0000 -@@ -182,6 +182,8 @@ - const_tree, bool); - static bool m68k_cannot_force_const_mem (machine_mode mode, rtx x); - static bool m68k_output_addr_const_extra (FILE *, rtx); -+static machine_mode m68k_promote_function_mode (const_tree, machine_mode, -+ int *, const_tree, int); - static void m68k_init_sync_libfuncs (void) ATTRIBUTE_UNUSED; - static enum flt_eval_method - m68k_excess_precision (enum excess_precision_type); -@@ -332,6 +334,9 @@ - #undef TARGET_ATOMIC_TEST_AND_SET_TRUEVAL - #define TARGET_ATOMIC_TEST_AND_SET_TRUEVAL 128 - -+#undef TARGET_PROMOTE_FUNCTION_MODE -+#define TARGET_PROMOTE_FUNCTION_MODE m68k_promote_function_mode -+ - static const struct attribute_spec m68k_attribute_table[] = - { - /* { name, min_len, max_len, decl_req, type_req, fn_type_req, handler, -@@ -6571,4 +6576,20 @@ - return FLT_EVAL_METHOD_UNPREDICTABLE; - } - -+/* Implement TARGET_PROMOTE_FUNCTION_MODE. */ -+ -+static machine_mode -+m68k_promote_function_mode (const_tree type, machine_mode mode, -+ int *punsignedp ATTRIBUTE_UNUSED, -+ const_tree fntype ATTRIBUTE_UNUSED, -+ int for_return) -+{ -+ /* Promote libcall arguments narrower than int to match the normal C -+ ABI (for which promotions are handled via -+ TARGET_PROMOTE_PROTOTYPES). */ -+ if (type == NULL_TREE && !for_return && (mode == QImode || mode == HImode)) -+ return SImode; -+ return mode; -+} -+ - #include "gt-m68k.h" diff --git a/toolchain/gcc/patches/7.2.0/microblaze.patch b/toolchain/gcc/patches/7.2.0/microblaze.patch deleted file mode 100644 index eb6c08492..000000000 --- a/toolchain/gcc/patches/7.2.0/microblaze.patch +++ /dev/null @@ -1,23 +0,0 @@ -revert 6dcad60c0ef48af584395a40feeb256fb82986a8 -as it breaks any userland in qemu - -diff -Nur gcc-6.3.0.orig/gcc/config/microblaze/microblaze.h gcc-6.3.0/gcc/config/microblaze/microblaze.h ---- gcc-6.3.0.orig/gcc/config/microblaze/microblaze.h 2016-01-21 18:10:54.000000000 +0100 -+++ gcc-6.3.0/gcc/config/microblaze/microblaze.h 2017-05-26 18:33:31.297534916 +0200 -@@ -253,14 +253,14 @@ - #define FIXED_REGISTERS \ - { \ - 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, \ -- 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, \ -+ 1, 1, 1, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, \ - 1, 1, 1, 1 \ - } - - #define CALL_USED_REGISTERS \ - { \ - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, \ -- 1, 1, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, \ -+ 1, 1, 1, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, \ - 1, 1, 1, 1 \ - } - #define GP_REG_FIRST 0 diff --git a/toolchain/gcc/patches/7.2.0/musl-s390x.patch b/toolchain/gcc/patches/7.2.0/musl-s390x.patch deleted file mode 100644 index 1163bdbf4..000000000 --- a/toolchain/gcc/patches/7.2.0/musl-s390x.patch +++ /dev/null @@ -1,13 +0,0 @@ -diff -Nur gcc-7.2.0.orig/gcc/config/s390/linux.h gcc-7.2.0/gcc/config/s390/linux.h ---- gcc-7.2.0.orig/gcc/config/s390/linux.h 2017-02-06 11:25:05.513198000 +0100 -+++ gcc-7.2.0/gcc/config/s390/linux.h 2017-10-30 13:22:45.348170100 +0100 -@@ -76,6 +76,9 @@ - #define GLIBC_DYNAMIC_LINKER32 "/lib/ld.so.1" - #define GLIBC_DYNAMIC_LINKER64 "/lib/ld64.so.1" - -+#define MUSL_DYNAMIC_LINKER32 "/lib/ld-musl-s390.so.1" -+#define MUSL_DYNAMIC_LINKER64 "/lib/ld-musl-s390x.so.1" -+ - #undef LINK_SPEC - #define LINK_SPEC \ - "%{m31:-m elf_s390}%{m64:-m elf64_s390} \ diff --git a/toolchain/gcc/patches/7.2.0/nios2-softfp.patch b/toolchain/gcc/patches/7.2.0/nios2-softfp.patch deleted file mode 100644 index c677c6c2f..000000000 --- a/toolchain/gcc/patches/7.2.0/nios2-softfp.patch +++ /dev/null @@ -1,14 +0,0 @@ -diff -Nur gcc-6.2.0.orig/libgcc/config.host gcc-6.2.0/libgcc/config.host ---- gcc-6.2.0.orig/libgcc/config.host 2016-05-17 08:15:52.000000000 +0200 -+++ gcc-6.2.0/libgcc/config.host 2016-10-15 14:42:53.971919904 +0200 -@@ -962,6 +962,10 @@ - ;; - esac - ;; -+nios2-*-linux-uclibc*) -+ tmake_file="$tmake_file nios2/t-nios2 nios2/t-linux t-libgcc-pic t-slibgcc-libgcc t-softfp-sfdf t-softfp" -+ md_unwind_header=nios2/linux-unwind.h -+ ;; - nios2-*-linux*) - tmake_file="$tmake_file nios2/t-nios2 nios2/t-linux t-libgcc-pic t-slibgcc-libgcc" - md_unwind_header=nios2/linux-unwind.h diff --git a/toolchain/glibc/Makefile.inc b/toolchain/glibc/Makefile.inc index 6585d5e3f..134953c4c 100644 --- a/toolchain/glibc/Makefile.inc +++ b/toolchain/glibc/Makefile.inc @@ -4,7 +4,7 @@ PKG_NAME:= glibc ifeq ($(ADK_LIBC_VERSION),git) PKG_VERSION:= 2.26.90 -PKG_GLIBCVER:= 2.26.90 +PKG_GLIBCVER:= 2.26.9000 PKG_SITES:= git://sourceware.org/git/glibc.git PKG_RELEASE:= 1 endif @@ -21,13 +21,5 @@ PKG_GLIBCVER:= 2.25 PKG_GIT:= branch PKG_SITES:= https://github.com/c-sky/glibc.git PKG_RELEASE:= 1 -DISTFILES:= ${PKG_NAME}-${PKG_VERSION}.tar.xz -endif -ifeq ($(ADK_TARGET_LIB_GLIBC_RISCV),y) -PKG_VERSION:= riscv-glibc-2.26 -PKG_GLIBCVER:= 2.26 -PKG_RELEASE:= 1 -PKG_GIT:= branch -PKG_SITES:= https://github.com/riscv/riscv-glibc.git endif DISTFILES:= $(PKG_NAME)-$(PKG_VERSION).tar.xz -- cgit v1.2.3