From 90f766180219ec3a832612c4f00106e0a3241b38 Mon Sep 17 00:00:00 2001 From: TriForceX Date: Wed, 29 Jul 2020 18:18:19 -0400 Subject: [PATCH] Merge from bittboy/buildroot@71f939e --- .config | 4 +- package/gcc/10.2.0/0006-noPIC-picflagm4.patch | 58 +++++++++++++++++++ .../10.2.0/Disable-abicalls-error-mips.patch | 10 ++++ .../10.2.0/Disable-fPIC-libgcc-Makefile.patch | 11 ++++ .../Force-NoPIC-libgcc-configfile.patch | 6 ++ package/gcc/Config.in.host | 2 +- package/gcc/gcc.hash | 2 +- 7 files changed, 89 insertions(+), 4 deletions(-) create mode 100644 package/gcc/10.2.0/0006-noPIC-picflagm4.patch create mode 100644 package/gcc/10.2.0/Disable-abicalls-error-mips.patch create mode 100644 package/gcc/10.2.0/Disable-fPIC-libgcc-Makefile.patch create mode 100644 package/gcc/10.2.0/Force-NoPIC-libgcc-configfile.patch diff --git a/.config b/.config index 34582030..354aa0c5 100644 --- a/.config +++ b/.config @@ -1,6 +1,6 @@ # # Automatically generated file; DO NOT EDIT. -# Buildroot 2019.08-rc2-gbb4d4ae99f Configuration +# Buildroot 2019.08-rc2-g3849c95cc0-dirty Configuration # BR2_HAVE_DOT_CONFIG=y BR2_HOST_GCC_AT_LEAST_4_5=y @@ -272,7 +272,7 @@ BR2_BINUTILS_EXTRA_CONFIG_OPTIONS="" # BR2_GCC_VERSION_8_X is not set # BR2_GCC_VERSION_9_X is not set BR2_GCC_VERSION_10_X=y -BR2_GCC_VERSION="10.1.0" +BR2_GCC_VERSION="10.2.0" BR2_EXTRA_GCC_CONFIG_OPTIONS="" BR2_TOOLCHAIN_BUILDROOT_CXX=y # BR2_TOOLCHAIN_BUILDROOT_FORTRAN is not set diff --git a/package/gcc/10.2.0/0006-noPIC-picflagm4.patch b/package/gcc/10.2.0/0006-noPIC-picflagm4.patch new file mode 100644 index 00000000..b52088a0 --- /dev/null +++ b/package/gcc/10.2.0/0006-noPIC-picflagm4.patch @@ -0,0 +1,58 @@ +diff --git a/config/picflag.m4 b/config/picflag.m4 +--- a/config/picflag.m4 ++++ b/config/picflag.m4 +@@ -34,7 +22,7 @@ + i[[34567]]86-*-nto-qnx*) + # QNX uses GNU C++, but need to define -shared option too, otherwise + # it will coredump. +- $1='-fPIC -shared' ++ $1='-fno-PIC' + ;; + i[[34567]]86-pc-msdosdjgpp*) + # DJGPP does not support shared libraries at all. +@@ -42,7 +30,7 @@ + ia64*-*-hpux*) + # On IA64 HP-UX, PIC is the default but the pic flag + # sets the default TLS model and affects inlining. +- $1=-fPIC ++ $1=-fno-PIC + ;; + mips-sgi-irix6*) + # PIC is the default. +@@ -54,30 +42,30 @@ + # Some targets support both -fPIC and -fpic, but prefer the latter. + # FIXME: Why? + i[[34567]]86-*-* | x86_64-*-*) +- $1=-fpic ++ $1=-fno-PIC + ;; + # FIXME: Override -fPIC default in libgcc only? + sh-*-linux* | sh[[2346lbe]]*-*-linux*) +- $1=-fpic ++ $1=-fno-PIC + ;; + # FIXME: Simplify to sh*-*-netbsd*? + sh-*-netbsdelf* | shl*-*-netbsdelf* | sh5-*-netbsd* | sh5l*-*-netbsd* | \ + sh64-*-netbsd* | sh64l*-*-netbsd*) +- $1=-fpic ++ $1=-fno-PIC + ;; + # Default to -fPIC unless specified otherwise. + *) +- $1=-fPIC ++ $1=-fno-PIC + ;; + esac + + # If the user explicitly uses -fpic/-fPIC, keep that. + case "${m4_bpatsubsts($1, PICFLAG, CFLAGS)}" in + *-fpic*) +- $1=-fpic ++ $1=-fno-PIC + ;; + *-fPIC*) +- $1=-fPIC ++ $1=-fno-PIC + ;; + esac + ]) diff --git a/package/gcc/10.2.0/Disable-abicalls-error-mips.patch b/package/gcc/10.2.0/Disable-abicalls-error-mips.patch new file mode 100644 index 00000000..3ae36950 --- /dev/null +++ b/package/gcc/10.2.0/Disable-abicalls-error-mips.patch @@ -0,0 +1,10 @@ +--- a/gcc/config/mips/mips.c ++++ b/gcc/config/mips/mips.c +@@ -20007,7 +20007,7 @@ + /* The effect of -mabicalls isn't defined for the EABI. */ + if (mips_abi == ABI_EABI && TARGET_ABICALLS) + { +- error ("unsupported combination: %s", "-mabicalls -mabi=eabi"); ++ /* error ("unsupported combination: %s", "-mabicalls -mabi=eabi");*/ + target_flags &= ~MASK_ABICALLS; + } diff --git a/package/gcc/10.2.0/Disable-fPIC-libgcc-Makefile.patch b/package/gcc/10.2.0/Disable-fPIC-libgcc-Makefile.patch new file mode 100644 index 00000000..8743180f --- /dev/null +++ b/package/gcc/10.2.0/Disable-fPIC-libgcc-Makefile.patch @@ -0,0 +1,11 @@ +--- a/libgcc/Makefile.in ++++ n/libgcc/Makefile.in +@@ -253,7 +253,7 @@ + # Additional target-dependent options for compiling libgcc2.a. + HOST_LIBGCC2_CFLAGS = + +-PICFLAG = @PICFLAG@ ++PICFLAG = + + CET_FLAGS = @CET_FLAGS@ + diff --git a/package/gcc/10.2.0/Force-NoPIC-libgcc-configfile.patch b/package/gcc/10.2.0/Force-NoPIC-libgcc-configfile.patch new file mode 100644 index 00000000..e4f5dae7 --- /dev/null +++ b/package/gcc/10.2.0/Force-NoPIC-libgcc-configfile.patch @@ -0,0 +1,6 @@ +--- a/libgcc/config/t-libgcc-pic ++++ b/libgcc/config/t-libgcc-pic +@@ -1,2 +1,2 @@ + # Compile libgcc2.a with pic. +-HOST_LIBGCC2_CFLAGS += $(PICFLAG) ++HOST_LIBGCC2_CFLAGS += diff --git a/package/gcc/Config.in.host b/package/gcc/Config.in.host index ab66f012..4b4e239f 100644 --- a/package/gcc/Config.in.host +++ b/package/gcc/Config.in.host @@ -103,7 +103,7 @@ config BR2_GCC_VERSION default "7.4.0" if BR2_GCC_VERSION_7_X default "8.3.0" if BR2_GCC_VERSION_8_X default "9.3.0" if BR2_GCC_VERSION_9_X - default "10.1.0" if BR2_GCC_VERSION_10_X + default "10.2.0" if BR2_GCC_VERSION_10_X default "arc-2019.03-release" if BR2_GCC_VERSION_ARC default "or1k-musl-5.4.0-20170218" if BR2_GCC_VERSION_OR1K default "48152afb96c59733d5bc79e3399bb7b3d4b44266" if BR2_GCC_VERSION_CSKY diff --git a/package/gcc/gcc.hash b/package/gcc/gcc.hash index 799a8f83..2228dd7b 100644 --- a/package/gcc/gcc.hash +++ b/package/gcc/gcc.hash @@ -14,4 +14,4 @@ sha512 2de7cf47333a4092b02d3bb98f4206f14966f1d139a724d09cf3b22f8a43ae0c704f33e6 # Locally calculated (fetched from https://github.com/c-sky/gcc) sha512 1c3564fd6573dce13451a73015e7d88fecbb214dc1df96607976255b1d8b9e60318405333f4f218eea8d07e3675a802b66eff6df3921d505c4036481512792c2 gcc-48152afb96c59733d5bc79e3399bb7b3d4b44266.tar.gz -sha512 0cb2a74c793face751f42bc580960b00e2bfea785872a0a2155f1f1dbfaa248f9591b67f4322db0f096f8844aca9243bc02732bda106c3b6e43b02bb67eb3096 gcc-10.1.0.tar.xz +sha512 42ae38928bd2e8183af445da34220964eb690b675b1892bbeb7cd5bb62be499011ec9a93397dba5e2fb681afadfc6f2767d03b9035b44ba9be807187ae6dc65e gcc-10.2.0.tar.xz