diff options
author | Daniel Bermond | 2021-10-31 15:35:51 -0300 |
---|---|---|
committer | Daniel Bermond | 2021-10-31 15:35:51 -0300 |
commit | e16b235a42788a53dd6e77cce02fd4784ae8db98 (patch) | |
tree | d5650e79cb32d5c3802e6019558db1597400f8a1 | |
parent | db26ff768975997df4b915a7e49a0202464bb80b (diff) | |
download | aur-e16b235a42788a53dd6e77cce02fd4784ae8db98.tar.gz |
Update to version 11.2.0
-rw-r--r-- | .SRCINFO | 47 | ||||
-rw-r--r-- | 010-gcc-fix-build.patch | 383 | ||||
-rw-r--r-- | 020-gcc11-Wno-format-security.patch | 27 | ||||
-rw-r--r-- | 030-gcc-config-mips-multilib.patch | 22 | ||||
-rw-r--r-- | 040-gcc-gdc-phobos-path.patch | 11 | ||||
-rw-r--r-- | PKGBUILD | 228 |
6 files changed, 626 insertions, 92 deletions
@@ -1,25 +1,48 @@ pkgbase = mips64-linux-gnu-gcc - pkgdesc = The GNU Compiler Collection - cross compiler for MIPS64 target (Big Endian) - pkgver = 7.1.0 + pkgdesc = The GNU Compiler Collection - cross compiler for the MIPS64 target (for the toolchain with GNU C library and with multilib ABI) + pkgver = 11.2.0 pkgrel = 1 - url = http://gcc.gnu.org/ - arch = i686 + url = https://gcc.gnu.org/ arch = x86_64 license = GPL license = LGPL license = FDL - makedepends = gmp - makedepends = mpfr + license = custom + makedepends = mips64-linux-gnu-linux-api-headers + depends = gmp + depends = libmpc depends = mips64-linux-gnu-binutils depends = mips64-linux-gnu-glibc - depends = libmpc + depends = mpfr + depends = sh depends = zlib + depends = zstd + provides = mips64-linux-gnuabi64-gcc + provides = mips64-linux-gnuabi32-gcc + provides = mips64-linux-gnuabin32-gcc + provides = mips64-linux-gnu-gcc-bootstrap + conflicts = mips64-linux-gnuabi64-gcc + conflicts = mips64-linux-gnuabi32-gcc + conflicts = mips64-linux-gnuabin32-gcc + conflicts = mips64-linux-gnu-gcc-bootstrap options = !emptydirs options = !strip - source = ftp://gcc.gnu.org/pub/gcc/snapshots/7-20170504/gcc-7-20170504.tar.bz2 - source = http://isl.gforge.inria.fr/isl-0.18.tar.bz2 - sha256sums = 0a179b9fe8e90215d7b2385c40a2e36ba7f823193531847eb7fcff866df556ba - sha256sums = 6b8b0fd7f81d0a957beb3679c81bbb34ccc7568d5682844d8924424a0dadcb1b + options = staticlibs + source = https://sourceware.org/pub/gcc/releases/gcc-11.2.0/gcc-11.2.0.tar.xz + source = https://sourceware.org/pub/gcc/releases/gcc-11.2.0/gcc-11.2.0.tar.xz.sig + source = https://sourceforge.net/projects/libisl/files/isl-0.24.tar.xz + source = 010-gcc-fix-build.patch + source = 020-gcc11-Wno-format-security.patch + source = 030-gcc-config-mips-multilib.patch + source = 040-gcc-gdc-phobos-path.patch + validpgpkeys = 13975A70E63C361C73AE69EF6EEB81F8981C74C7 + validpgpkeys = 33C235A34C46AA3FFB293709A328C3A2C3C45C06 + sha256sums = d08edc536b54c372a1010ff6619dd274c0f1603aa49212ba20f7aa2cda36fa8b + sha256sums = SKIP + sha256sums = 043105cc544f416b48736fff8caf077fb0663a717d06b1113f16e391ac99ebad + sha256sums = 6b3a5608bcb7bba042b25aab518c7f8dc50180174d53d5f4bbe381c9b0132e27 + sha256sums = 504e4b5a08eb25b6c35f19fdbe0c743ae4e9015d0af4759e74150006c283585e + sha256sums = 1e3184b9ddacf7ba6a1621f7e1f0aace76d76f791fca8fd3bdd855dc7a43356e + sha256sums = aaee7a90b07184740198a9a6fe16115743c3836a7f54ce7e09fd48ae8e0222ba pkgname = mips64-linux-gnu-gcc - diff --git a/010-gcc-fix-build.patch b/010-gcc-fix-build.patch new file mode 100644 index 000000000000..a2a07179df85 --- /dev/null +++ b/010-gcc-fix-build.patch @@ -0,0 +1,383 @@ +--- a/gcc/configure ++++ b/gcc/configure +@@ -3318,7 +3318,7 @@ fi + ## -------------------- ## + + ac_ext=c +-ac_cpp='$CPP $CPPFLAGS' ++ac_cpp='$CPP $CPPFLAGS -O2' + ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' + ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' + ac_compiler_gnu=$ac_cv_c_compiler_gnu +@@ -3949,7 +3949,7 @@ rm -f a.out a.exe b.out + + # Find the native compiler + ac_ext=c +-ac_cpp='$CPP $CPPFLAGS' ++ac_cpp='$CPP $CPPFLAGS -O2' + ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' + ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' + ac_compiler_gnu=$ac_cv_c_compiler_gnu +@@ -4732,13 +4732,13 @@ if test "x$ac_cv_prog_cc_c89" != xno; th + fi + + ac_ext=c +-ac_cpp='$CPP $CPPFLAGS' ++ac_cpp='$CPP $CPPFLAGS -O2' + ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' + ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' + ac_compiler_gnu=$ac_cv_c_compiler_gnu + + ac_ext=cpp +-ac_cpp='$CXXCPP $CPPFLAGS' ++ac_cpp='$CXXCPP $CPPFLAGS -O2' + ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' + ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' + ac_compiler_gnu=$ac_cv_cxx_compiler_gnu +@@ -4989,7 +4989,7 @@ else + fi + fi + ac_ext=c +-ac_cpp='$CPP $CPPFLAGS' ++ac_cpp='$CPP $CPPFLAGS -O2' + ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' + ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' + ac_compiler_gnu=$ac_cv_c_compiler_gnu +@@ -5216,7 +5216,7 @@ fi + + # Do configure tests with the C++ compiler, since that's what we build with. + ac_ext=cpp +-ac_cpp='$CXXCPP $CPPFLAGS' ++ac_cpp='$CXXCPP $CPPFLAGS -O2' + ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' + ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' + ac_compiler_gnu=$ac_cv_cxx_compiler_gnu +@@ -5322,7 +5322,7 @@ esac + + + ac_ext=cpp +-ac_cpp='$CXXCPP $CPPFLAGS' ++ac_cpp='$CXXCPP $CPPFLAGS -O2' + ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' + ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' + ac_compiler_gnu=$ac_cv_cxx_compiler_gnu +@@ -5449,7 +5449,7 @@ See \`config.log' for more details" "$LI + fi + + ac_ext=cpp +-ac_cpp='$CXXCPP $CPPFLAGS' ++ac_cpp='$CXXCPP $CPPFLAGS -O2' + ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' + ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' + ac_compiler_gnu=$ac_cv_cxx_compiler_gnu +@@ -5777,7 +5777,7 @@ $as_echo "$ac_cv_safe_to_define___extens + + + ac_ext=c +-ac_cpp='$CPP $CPPFLAGS' ++ac_cpp='$CPP $CPPFLAGS -O2' + ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' + ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' + ac_compiler_gnu=$ac_cv_c_compiler_gnu +@@ -5908,7 +5908,7 @@ See \`config.log' for more details" "$LI + fi + + ac_ext=cpp +-ac_cpp='$CXXCPP $CPPFLAGS' ++ac_cpp='$CXXCPP $CPPFLAGS -O2' + ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' + ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' + ac_compiler_gnu=$ac_cv_cxx_compiler_gnu +@@ -6838,7 +6838,7 @@ else + wf_opt= + fi + ac_ext=cpp +-ac_cpp='$CXXCPP $CPPFLAGS' ++ac_cpp='$CXXCPP $CPPFLAGS -O2' + ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' + ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' + ac_compiler_gnu=$ac_cv_cxx_compiler_gnu +@@ -6888,7 +6888,7 @@ fi + done + CXXFLAGS="$save_CXXFLAGS" + ac_ext=cpp +-ac_cpp='$CXXCPP $CPPFLAGS' ++ac_cpp='$CXXCPP $CPPFLAGS -O2' + ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' + ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' + ac_compiler_gnu=$ac_cv_cxx_compiler_gnu +@@ -6896,7 +6896,7 @@ ac_compiler_gnu=$ac_cv_cxx_compiler_gnu + + + ac_ext=c +-ac_cpp='$CPP $CPPFLAGS' ++ac_cpp='$CPP $CPPFLAGS -O2' + ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' + ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' + ac_compiler_gnu=$ac_cv_c_compiler_gnu +@@ -6946,14 +6946,14 @@ fi + done + CFLAGS="$save_CFLAGS" + ac_ext=cpp +-ac_cpp='$CXXCPP $CPPFLAGS' ++ac_cpp='$CXXCPP $CPPFLAGS -O2' + ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' + ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' + ac_compiler_gnu=$ac_cv_cxx_compiler_gnu + + + ac_ext=cpp +-ac_cpp='$CXXCPP $CPPFLAGS' ++ac_cpp='$CXXCPP $CPPFLAGS -O2' + ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' + ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' + ac_compiler_gnu=$ac_cv_cxx_compiler_gnu +@@ -7003,14 +7003,14 @@ fi + done + CXXFLAGS="$save_CXXFLAGS" + ac_ext=cpp +-ac_cpp='$CXXCPP $CPPFLAGS' ++ac_cpp='$CXXCPP $CPPFLAGS -O2' + ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' + ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' + ac_compiler_gnu=$ac_cv_cxx_compiler_gnu + + + ac_ext=c +-ac_cpp='$CPP $CPPFLAGS' ++ac_cpp='$CPP $CPPFLAGS -O2' + ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' + ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' + ac_compiler_gnu=$ac_cv_c_compiler_gnu +@@ -7060,14 +7060,14 @@ fi + done + CFLAGS="$save_CFLAGS" + ac_ext=cpp +-ac_cpp='$CXXCPP $CPPFLAGS' ++ac_cpp='$CXXCPP $CPPFLAGS -O2' + ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' + ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' + ac_compiler_gnu=$ac_cv_cxx_compiler_gnu + + + ac_ext=cpp +-ac_cpp='$CXXCPP $CPPFLAGS' ++ac_cpp='$CXXCPP $CPPFLAGS -O2' + ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' + ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' + ac_compiler_gnu=$ac_cv_cxx_compiler_gnu +@@ -7109,14 +7109,14 @@ fi + + fi + ac_ext=cpp +-ac_cpp='$CXXCPP $CPPFLAGS' ++ac_cpp='$CXXCPP $CPPFLAGS -O2' + ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' + ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' + ac_compiler_gnu=$ac_cv_cxx_compiler_gnu + + + ac_ext=cpp +-ac_cpp='$CXXCPP $CPPFLAGS' ++ac_cpp='$CXXCPP $CPPFLAGS -O2' + ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' + ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' + ac_compiler_gnu=$ac_cv_cxx_compiler_gnu +@@ -7133,7 +7133,7 @@ if test $enable_werror_always = yes; the + fi + + ac_ext=cpp +-ac_cpp='$CXXCPP $CPPFLAGS' ++ac_cpp='$CXXCPP $CPPFLAGS -O2' + ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' + ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' + ac_compiler_gnu=$ac_cv_cxx_compiler_gnu +@@ -7154,7 +7154,7 @@ fi + + # Disable exceptions and RTTI if building with g++ + ac_ext=c +-ac_cpp='$CPP $CPPFLAGS' ++ac_cpp='$CPP $CPPFLAGS -O2' + ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' + ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' + ac_compiler_gnu=$ac_cv_c_compiler_gnu +@@ -7204,7 +7204,7 @@ fi + done + CFLAGS="$save_CFLAGS" + ac_ext=cpp +-ac_cpp='$CXXCPP $CPPFLAGS' ++ac_cpp='$CXXCPP $CPPFLAGS -O2' + ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' + ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' + ac_compiler_gnu=$ac_cv_cxx_compiler_gnu +@@ -9400,7 +9400,7 @@ $as_echo "#define AC_APPLE_UNIVERSAL_BUI + # ---------------------- + + ac_ext=cpp +-ac_cpp='$CXXCPP $CPPFLAGS' ++ac_cpp='$CXXCPP $CPPFLAGS -O2' + ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' + ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' + ac_compiler_gnu=$ac_cv_cxx_compiler_gnu +@@ -9529,7 +9529,7 @@ See \`config.log' for more details" >&2; + fi + + ac_ext=cpp +-ac_cpp='$CXXCPP $CPPFLAGS' ++ac_cpp='$CXXCPP $CPPFLAGS -O2' + ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' + ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' + ac_compiler_gnu=$ac_cv_cxx_compiler_gnu +@@ -15226,7 +15226,7 @@ if ${lt_cv_cc_needs_belf+:} false; then + $as_echo_n "(cached) " >&6 + else + ac_ext=c +-ac_cpp='$CPP $CPPFLAGS' ++ac_cpp='$CPP $CPPFLAGS -O2' + ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' + ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' + ac_compiler_gnu=$ac_cv_c_compiler_gnu +@@ -15250,7 +15250,7 @@ fi + rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + ac_ext=c +-ac_cpp='$CPP $CPPFLAGS' ++ac_cpp='$CPP $CPPFLAGS -O2' + ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' + ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' + ac_compiler_gnu=$ac_cv_c_compiler_gnu +@@ -16313,7 +16313,7 @@ esac + + lt_save_CC="$CC" + ac_ext=c +-ac_cpp='$CPP $CPPFLAGS' ++ac_cpp='$CPP $CPPFLAGS -O2' + ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' + ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' + ac_compiler_gnu=$ac_cv_c_compiler_gnu +@@ -19708,7 +19708,7 @@ $as_echo "$enable_static" >&6; } + + fi + ac_ext=cpp +-ac_cpp='$CXXCPP $CPPFLAGS' ++ac_cpp='$CXXCPP $CPPFLAGS -O2' + ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' + ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' + ac_compiler_gnu=$ac_cv_cxx_compiler_gnu +@@ -19719,7 +19719,7 @@ CC="$lt_save_CC" + ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) || + (test "X$CXX" != "Xg++"))) ; then + ac_ext=cpp +-ac_cpp='$CXXCPP $CPPFLAGS' ++ac_cpp='$CXXCPP $CPPFLAGS -O2' + ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' + ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' + ac_compiler_gnu=$ac_cv_cxx_compiler_gnu +@@ -19846,7 +19846,7 @@ See \`config.log' for more details" "$LI + fi + + ac_ext=cpp +-ac_cpp='$CXXCPP $CPPFLAGS' ++ac_cpp='$CXXCPP $CPPFLAGS -O2' + ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' + ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' + ac_compiler_gnu=$ac_cv_cxx_compiler_gnu +@@ -19856,7 +19856,7 @@ else + fi + + ac_ext=cpp +-ac_cpp='$CXXCPP $CPPFLAGS' ++ac_cpp='$CXXCPP $CPPFLAGS -O2' + ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' + ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' + ac_compiler_gnu=$ac_cv_cxx_compiler_gnu +@@ -22721,7 +22721,7 @@ fi + fi # test "$_lt_caught_CXX_error" != yes + + ac_ext=cpp +-ac_cpp='$CXXCPP $CPPFLAGS' ++ac_cpp='$CXXCPP $CPPFLAGS -O2' + ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' + ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' + ac_compiler_gnu=$ac_cv_cxx_compiler_gnu +--- a/libiberty/configure ++++ b/libiberty/configure +@@ -2450,7 +2450,7 @@ fi + ## -------------------- ## + + ac_ext=c +-ac_cpp='$CPP $CPPFLAGS' ++ac_cpp='$CPP $CPPFLAGS -O2' + ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' + ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' + ac_compiler_gnu=$ac_cv_c_compiler_gnu +@@ -2981,7 +2981,7 @@ $as_echo "$as_me: target_header_dir = $t + + + ac_ext=c +-ac_cpp='$CPP $CPPFLAGS' ++ac_cpp='$CPP $CPPFLAGS -O2' + ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' + ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' + ac_compiler_gnu=$ac_cv_c_compiler_gnu +@@ -3793,14 +3793,14 @@ if test "x$ac_cv_prog_cc_c89" != xno; th + fi + + ac_ext=c +-ac_cpp='$CPP $CPPFLAGS' ++ac_cpp='$CPP $CPPFLAGS -O2' + ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' + ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' + ac_compiler_gnu=$ac_cv_c_compiler_gnu + + + ac_ext=c +-ac_cpp='$CPP $CPPFLAGS' ++ac_cpp='$CPP $CPPFLAGS -O2' + ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' + ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' + ac_compiler_gnu=$ac_cv_c_compiler_gnu +@@ -3931,7 +3931,7 @@ See \`config.log' for more details" "$LI + fi + + ac_ext=c +-ac_cpp='$CPP $CPPFLAGS' ++ac_cpp='$CPP $CPPFLAGS -O2' + ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' + ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' + ac_compiler_gnu=$ac_cv_c_compiler_gnu +@@ -4462,7 +4462,7 @@ fi + ac_c_preproc_warn_flag=yes + + ac_ext=c +-ac_cpp='$CPP $CPPFLAGS' ++ac_cpp='$CPP $CPPFLAGS -O2' + ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' + ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' + ac_compiler_gnu=$ac_cv_c_compiler_gnu +@@ -4514,14 +4514,14 @@ fi + done + CFLAGS="$save_CFLAGS" + ac_ext=c +-ac_cpp='$CPP $CPPFLAGS' ++ac_cpp='$CPP $CPPFLAGS -O2' + ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' + ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' + ac_compiler_gnu=$ac_cv_c_compiler_gnu + + + ac_ext=c +-ac_cpp='$CPP $CPPFLAGS' ++ac_cpp='$CPP $CPPFLAGS -O2' + ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' + ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' + ac_compiler_gnu=$ac_cv_c_compiler_gnu +@@ -4563,7 +4563,7 @@ fi + + fi + ac_ext=c +-ac_cpp='$CPP $CPPFLAGS' ++ac_cpp='$CPP $CPPFLAGS -O2' + ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' + ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' + ac_compiler_gnu=$ac_cv_c_compiler_gnu diff --git a/020-gcc11-Wno-format-security.patch b/020-gcc11-Wno-format-security.patch new file mode 100644 index 000000000000..974ea44d0f85 --- /dev/null +++ b/020-gcc11-Wno-format-security.patch @@ -0,0 +1,27 @@ +2017-02-25 Jakub Jelinek <jakub@redhat.com> + + * configure.ac: When adding -Wno-format, also add -Wno-format-security. + * configure: Regenerated. + +--- gcc/configure.ac.jj 2017-02-13 12:20:53.000000000 +0100 ++++ gcc/configure.ac 2017-02-25 12:42:32.859175403 +0100 +@@ -480,7 +480,7 @@ AC_ARG_ENABLE(build-format-warnings, + AS_HELP_STRING([--disable-build-format-warnings],[don't use -Wformat while building GCC]), + [],[enable_build_format_warnings=yes]) + AS_IF([test $enable_build_format_warnings = no], +- [wf_opt=-Wno-format],[wf_opt=]) ++ [wf_opt="-Wno-format -Wno-format-security"],[wf_opt=]) + ACX_PROG_CXX_WARNING_OPTS( + m4_quote(m4_do([-W -Wall -Wno-narrowing -Wwrite-strings ], + [-Wcast-qual -Wno-error=format-diag $wf_opt])), +--- gcc/configure.jj 2017-02-13 12:20:52.000000000 +0100 ++++ gcc/configure 2017-02-25 12:42:50.041946391 +0100 +@@ -6647,7 +6647,7 @@ else + fi + + if test $enable_build_format_warnings = no; then : +- wf_opt=-Wno-format ++ wf_opt="-Wno-format -Wno-format-security" + else + wf_opt= + fi diff --git a/030-gcc-config-mips-multilib.patch b/030-gcc-config-mips-multilib.patch new file mode 100644 index 000000000000..22c727deadf7 --- /dev/null +++ b/030-gcc-config-mips-multilib.patch @@ -0,0 +1,22 @@ +--- a/gcc/config/mips/linux.h ++++ b/gcc/config/mips/linux.h +@@ -58,3 +58,8 @@ along with GCC; see the file COPYING3. + #else + #define NEED_INDICATE_EXEC_STACK TARGET_SOFT_FLOAT + #endif ++ ++#define STARTFILE_PREFIX_SPEC \ ++ "%{mabi=n32: /lib/glibc/abi-n32/} \ ++ %{mabi=32: /lib/glibc/abi-32/} \ ++ %{mabi=64: /lib/glibc/abi-64/}" +--- a/gcc/config/mips/t-linux64 ++++ b/gcc/config/mips/t-linux64 +@@ -20,7 +20,4 @@ MULTILIB_OPTIONS = mabi=n32/mabi=32/mabi + MULTILIB_DIRNAMES = n32 32 64 + MIPS_EL = $(if $(filter %el, $(firstword $(subst -, ,$(target)))),el) + MIPS_SOFT = $(if $(strip $(filter MASK_SOFT_FLOAT_ABI, $(target_cpu_default)) $(filter soft, $(with_float))),soft) +-MULTILIB_OSDIRNAMES = \ +- ../lib32$(call if_multiarch,:mips64$(MIPS_EL)-linux-gnuabin32$(MIPS_SOFT)) \ +- ../lib$(call if_multiarch,:mips$(MIPS_EL)-linux-gnu$(MIPS_SOFT)) \ +- ../lib64$(call if_multiarch,:mips64$(MIPS_EL)-linux-gnuabi64$(MIPS_SOFT)) ++MULTILIB_OSDIRNAMES = n32=../lib/glibc/abi-n32 32=../lib/glibc/abi-32 64=../lib/glibc/abi-64 diff --git a/040-gcc-gdc-phobos-path.patch b/040-gcc-gdc-phobos-path.patch new file mode 100644 index 000000000000..e87bd281b29b --- /dev/null +++ b/040-gcc-gdc-phobos-path.patch @@ -0,0 +1,11 @@ +--- a/gcc/d/d-incpath.cc ++++ b/gcc/d/d-incpath.cc +@@ -140,7 +140,7 @@ + path = xstrdup (p->fname); + + /* Add D-specific suffix. */ +- path = concat (path, "/d", NULL); ++ path = concat (path, "/dlang/gdc", NULL); + + /* Ignore duplicate entries. */ + bool found = false; @@ -1,93 +1,161 @@ -# Maintainer: Anatol Pomozov <anatol.pomozov@gmail.com> -# Updated for MIPS64: Valentín Kivachuk <vk18496@gmail.com> +# Maintainer : Daniel Bermond <dbermond@archlinux.org> +# Contributor: Valentín Kivachuk <vk18496@gmail.com> _target=mips64-linux-gnu -pkgname=$_target-gcc -pkgver=7.1.0 -_islver=0.18 +pkgname="${_target}-gcc" +pkgver=11.2.0 +_islver=0.24 +_majorver="${pkgver%%.*}" pkgrel=1 -_snapshot=7-20170504 -pkgdesc='The GNU Compiler Collection - cross compiler for MIPS64 target (Big Endian)' -arch=(i686 x86_64) -url='http://gcc.gnu.org/' -license=(GPL LGPL FDL) -depends=($_target-binutils $_target-glibc libmpc zlib) -makedepends=(gmp mpfr) -options=(!emptydirs !strip) -source=(#ftp://gcc.gnu.org/pub/gcc/releases/gcc-$pkgver/gcc-$pkgver.tar.bz2 - ftp://gcc.gnu.org/pub/gcc/snapshots/$_snapshot/gcc-$_snapshot.tar.bz2 - http://isl.gforge.inria.fr/isl-$_islver.tar.bz2) -sha256sums=('0a179b9fe8e90215d7b2385c40a2e36ba7f823193531847eb7fcff866df556ba' - '6b8b0fd7f81d0a957beb3679c81bbb34ccc7568d5682844d8924424a0dadcb1b') - -if [ -n "$_snapshot" ]; then - _basedir=gcc-$_snapshot -else - _basedir=gcc-$pkgver -fi +pkgdesc='The GNU Compiler Collection - cross compiler for the MIPS64 target (for the toolchain with GNU C library and with multilib ABI)' +arch=('x86_64') +url='https://gcc.gnu.org/' +license=('GPL' 'LGPL' 'FDL' 'custom') +depends=('gmp' 'libmpc' "${_target}-binutils" "${_target}-glibc" 'mpfr' 'sh' 'zlib' 'zstd') +makedepends=("${_target}-linux-api-headers") +provides=('mips64-linux-gnuabi64-gcc' 'mips64-linux-gnuabi32-gcc' + 'mips64-linux-gnuabin32-gcc' "${pkgname}-bootstrap") +conflicts=('mips64-linux-gnuabi64-gcc' 'mips64-linux-gnuabi32-gcc' + 'mips64-linux-gnuabin32-gcc' "${pkgname}-bootstrap") +options=('!emptydirs' '!strip' 'staticlibs') +source=("https://sourceware.org/pub/gcc/releases/gcc-${pkgver}/gcc-${pkgver}.tar.xz"{,.sig} + #"http://isl.gforge.inria.fr/isl-${_islver}.tar.xz" + "https://sourceforge.net/projects/libisl/files/isl-${_islver}.tar.xz" + '010-gcc-fix-build.patch' + '020-gcc11-Wno-format-security.patch' + '030-gcc-config-mips-multilib.patch' + '040-gcc-gdc-phobos-path.patch') +sha256sums=('d08edc536b54c372a1010ff6619dd274c0f1603aa49212ba20f7aa2cda36fa8b' + 'SKIP' + '043105cc544f416b48736fff8caf077fb0663a717d06b1113f16e391ac99ebad' + '6b3a5608bcb7bba042b25aab518c7f8dc50180174d53d5f4bbe381c9b0132e27' + '504e4b5a08eb25b6c35f19fdbe0c743ae4e9015d0af4759e74150006c283585e' + '1e3184b9ddacf7ba6a1621f7e1f0aace76d76f791fca8fd3bdd855dc7a43356e' + 'aaee7a90b07184740198a9a6fe16115743c3836a7f54ce7e09fd48ae8e0222ba') +validpgpkeys=('13975A70E63C361C73AE69EF6EEB81F8981C74C7' # Richard Guenther <richard.guenther@gmail.com> + '33C235A34C46AA3FFB293709A328C3A2C3C45C06') # Jakub Jelinek <jakub@redhat.com> + +_ABIS=('64' 'n32' '32') +_DEFAULT_ABI='64' # gcc defaults to 'n32' ABI for MIPS64 prepare() { - cd $_basedir - - # link isl for in-tree builds - ln -sf ../isl-$_islver isl - - echo $pkgver > gcc/BASE-VER - - # Do not run fixincludes - sed -i 's@\./fixinc\.sh@-c true@' gcc/Makefile.in - - # hack! - some configure tests for header files using "$CPP $CPPFLAGS" - sed -i "/ac_cpp=/s/\$CPPFLAGS/\$CPPFLAGS -O2/" "$srcdir"/$_basedir/{libiberty,gcc}/configure - - rm -rf $srcdir/gcc-build - mkdir $srcdir/gcc-build + mkdir -p build + + # link isl for in-tree build + ln -s "../isl-${_islver}" "gcc-${pkgver}/isl" + + patch -d "gcc-${pkgver}" -Np1 -i "${srcdir}/010-gcc-fix-build.patch" + patch -d "gcc-${pkgver}" -Np0 -i "${srcdir}/020-gcc11-Wno-format-security.patch" + patch -d "gcc-${pkgver}" -Np1 -i "${srcdir}/030-gcc-config-mips-multilib.patch" + patch -d "gcc-${pkgver}" -Np1 -i "${srcdir}/040-gcc-gdc-phobos-path.patch" } build() { - cd gcc-build - - # using -pipe causes spurious test-suite failures - # http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48565 - CFLAGS=${CFLAGS/-pipe/} - CXXFLAGS=${CXXFLAGS/-pipe/} - - $srcdir/$_basedir/configure \ - --prefix=/usr \ - --program-prefix=$_target- \ - --with-local-prefix=/usr/$_target \ - --with-sysroot=/usr/$_target \ - --with-build-sysroot=/usr/$_target \ - --libdir=/usr/lib --libexecdir=/usr/lib \ - --target=$_target --host=$CHOST --build=$CHOST \ - --disable-nls \ - --enable-languages=c,c++ \ - --enable-shared --enable-threads=posix \ - --with-system-zlib --with-isl --enable-__cxa_atexit \ - --disable-libunwind-exceptions --enable-clocale=gnu \ - --disable-libstdcxx-pch --disable-libssp \ - --enable-gnu-unique-object --enable-linker-build-id \ - --enable-lto --enable-plugin --enable-install-libiberty \ - --with-linker-hash-style=gnu --enable-gnu-indirect-function \ - --disable-multilib --disable-werror \ - --enable-checking=release + cd build + + # using -pipe causes spurious test-suite failures + # http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48565 + export CFLAGS="${CFLAGS/-pipe/}" + export CXXFLAGS="${CXXFLAGS/-pipe/}" + + # position independent code (PIE) is troublesome in MIPS, as + # it can cause this error when building software with gcc: + # cc1: error: position-independent code requires ‘-mabicalls’ + # (this error is not always solved when using '-mabicalls') + # https://github.com/crosstool-ng/crosstool-ng/issues/948 + # https://gcc.gnu.org/legacy-ml/gcc-patches/2012-08/msg00237.html + + "${srcdir}/gcc-${pkgver}/configure" \ + --build="$CHOST" \ + --host="$CHOST" \ + --target="$_target" \ + --prefix='/usr' \ + --libdir='/usr/lib' \ + --libexecdir='/usr/lib' \ + --mandir='/usr/share/man' \ + --with-sysroot="/usr/${_target}" \ + --with-build-sysroot="/usr/${_target}" \ + --with-native-system-header-dir='/include' \ + --with-abi="$_DEFAULT_ABI" \ + --with-gnu-as \ + --with-gnu-ld \ + --enable-languages='c,c++,fortran' \ + --with-isl \ + --with-linker-hash-style='gnu' \ + --with-system-zlib \ + --enable-__cxa_atexit \ + --enable-cet='auto' \ + --enable-checking='release' \ + --enable-clocale='gnu' \ + --disable-default-pie \ + --enable-default-ssp \ + --enable-gnu-indirect-function \ + --enable-gnu-unique-object \ + --enable-install-libiberty \ + --enable-linker-build-id \ + --enable-lto \ + --enable-multilib \ + --enable-plugin \ + --enable-shared \ + --enable-threads='posix' \ + --disable-libssp \ + --disable-libstdcxx-pch \ + --disable-libunwind-exceptions \ + --disable-werror + make +} - make +check() { + # disable libphobos test to avoid segfaults and other possible problems + sed -i '/maybe-check-target-libphobos \\/d' build/Makefile + + # do not abort on error as some are "expected" + make -C build -k check || true + "gcc-${pkgver}/contrib/test_summary" } package() { - cd gcc-build - - make DESTDIR="$pkgdir" install-gcc install-target-libgcc install-target-libstdc++-v3 - - # strip target binaries - find "$pkgdir"/usr/lib/gcc/$_target/ "$pkgdir"/usr/$_target/lib -type f -and \( -name \*.a -or -name \*.o \) -exec $_target-objcopy -R .comment -R .note -R .debug_info -R .debug_aranges -R .debug_pubnames -R .debug_pubtypes -R .debug_abbrev -R .debug_line -R .debug_str -R .debug_ranges -R .debug_loc '{}' \; - - # strip host binaries - find "$pkgdir"/usr/bin/ "$pkgdir"/usr/lib/gcc/$_target/ -type f -and \( -executable \) -exec strip '{}' \; - - # Remove files that conflict with host gcc package - rm -r "$pkgdir"/usr/share/man/man7 - rm -r "$pkgdir"/usr/share/info - rm -r "$pkgdir"/usr/share/gcc-$pkgver + make -C build DESTDIR="$pkgdir" install-gcc install-target-{libgcc,libstdc++-v3,libgomp,libgfortran,libquadmath} + + # allow using gnuabi${_abi} executables + local _abi + local _bin + for _abi in "${_ABIS[@]}" + do + for _bin in c++ cpp g++ gcc "gcc-${pkgver}" + do + if [ "$_abi" = "$_DEFAULT_ABI" ] + then + ln -s "${_target}-${_bin}" "${pkgdir}/usr/bin/${_target/gnu/"gnuabi${_abi}"}-${_bin}" + else + cat <<- __EOF__ | install -D -m755 /dev/stdin "${pkgdir}/usr/bin/${_target/gnu/"gnuabi${_abi}"}-${_bin}" + #!/bin/sh + + exec ${_target}-${_bin} -mabi='${_abi}' "\$@" +__EOF__ + fi + + case "$_bin" in + cpp|g++|gcc) + ln -s "${_target}-${_bin}.1.gz" "${pkgdir}/usr/share/man/man1/${_target/gnu/"gnuabi${_abi}"}-${_bin}.1.gz" + ;; + esac + done + done + + install -D -m644 "gcc-${pkgver}/COPYING.RUNTIME" \ + "${pkgdir}/usr/share/licenses/${pkgname}/RUNTIME.LIBRARY.EXCEPTION" + + # remove conflicting files + rm -r "${pkgdir}/usr/share"/{"gcc-${pkgver}",info,locale,man/man7} + + # strip target binaries + find "${pkgdir}/usr/lib/gcc/${_target}" "${pkgdir}/usr/${_target}/lib" \ + -type f -and \( -name \*.a -or -name \*.o \) \ + -exec "${_target}-objcopy" -R .comment -R .note -R .debug_info -R .debug_aranges \ + -R .debug_pubnames -R .debug_pubtypes -R .debug_abbrev -R .debug_line \ + -R .debug_str -R .debug_ranges -R .debug_loc '{}' \; + + # strip host binaries + find "${pkgdir}/usr/bin" "${pkgdir}/usr/lib/gcc/${_target}" -type f -and \( -executable \) -exec strip '{}' \; } |