From 2a3b720c3017d806fac9bc14b169cc2223180d00 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=BCrgen=20Buchm=C3=BCller?= Date: Wed, 19 Aug 2020 00:21:18 +0200 Subject: [PATCH] openjdk10-bootstrap: add -fcommon for gcc10 Also add patch to detect compiler versions with major greater than 9. [ci skip] --- .../patches/fix-compiler-version-10+.patch | 31 +++++++++++++++++++ srcpkgs/openjdk10-bootstrap/template | 2 ++ 2 files changed, 33 insertions(+) create mode 100644 srcpkgs/openjdk10-bootstrap/patches/fix-compiler-version-10+.patch diff --git a/srcpkgs/openjdk10-bootstrap/patches/fix-compiler-version-10+.patch b/srcpkgs/openjdk10-bootstrap/patches/fix-compiler-version-10+.patch new file mode 100644 index 0000000000..88d2784869 --- /dev/null +++ b/srcpkgs/openjdk10-bootstrap/patches/fix-compiler-version-10+.patch @@ -0,0 +1,31 @@ +--- a/make/autoconf/generated-configure.sh 2018-06-24 16:07:06.000000000 +0200 ++++ b/make/autoconf/generated-configure.sh 2020-08-18 23:58:41.459262000 +0200 +@@ -34373,7 +34373,7 @@ + COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \ + $SED -e 's/ *[Uu]sage:.*//'` + COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \ +- $SED -e "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/"` ++ $SED -e "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9][0-9]*\.[0-9][0-9]*\).*/\1/"` + elif test "x$TOOLCHAIN_TYPE" = xxlc; then + # xlc -qversion output typically looks like + # IBM XL C/C++ for AIX, V11.1 (5724-X13) +@@ -34434,7 +34434,7 @@ + COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \ + $SED -e 's/ *Copyright .*//'` + COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \ +- $SED -e 's/^.* \([1-9]\.[0-9.]*\)[^0-9.].*$/\1/'` ++ $SED -e 's/^.* \([1-9][0-9]*\.[0-9.]*\)[^0-9.].*$/\1/'` + elif test "x$TOOLCHAIN_TYPE" = xclang; then + # clang --version output typically looks like + # Apple LLVM version 5.0 (clang-500.2.79) (based on LLVM 3.3svn) +--- a/make/autoconf/toolchain.m4 2018-06-24 16:07:06.000000000 +0200 ++++ b/make/autoconf/toolchain.m4 2020-08-19 00:01:30.294255268 +0200 +@@ -424,7 +424,7 @@ + # Collapse compiler output into a single line + COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT` + COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \ +- $SED -e 's/^.* version \(@<:@1-9@:>@@<:@0-9.@:>@*\).*$/\1/'` ++ $SED -e 's/^.* version \(@<:@1-9@:>@@<:@0-9@:>@*\.@<:@0-9.@:>@*\).*$/\1/'` + else + AC_MSG_ERROR([Unknown toolchain type $TOOLCHAIN_TYPE.]) + fi diff --git a/srcpkgs/openjdk10-bootstrap/template b/srcpkgs/openjdk10-bootstrap/template index 10c691273b..9695f1f1f4 100644 --- a/srcpkgs/openjdk10-bootstrap/template +++ b/srcpkgs/openjdk10-bootstrap/template @@ -89,6 +89,8 @@ do_configure() { CXXFLAGS+=" -DABI_ELFv2" ;; esac + CFLAGS+=" -fcommon" + CXXFLAGS+=" -fcommon" configure_args=${configure_args/--with-libtool-sysroot=\/usr\/[a-z0-9]*-linux-[a-z]*/}