From 5792e2a9df8894daf0b95dc65a4fa6c43e19b96c Mon Sep 17 00:00:00 2001 From: Andreas Baumann Date: Wed, 19 May 2021 20:17:59 +0200 Subject: java13-openjdk: flags are in the wrong place --- build-support/java13-openjdk/PKGBUILD | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) (limited to 'build-support/java13-openjdk') diff --git a/build-support/java13-openjdk/PKGBUILD b/build-support/java13-openjdk/PKGBUILD index 28c8e22f..89554850 100644 --- a/build-support/java13-openjdk/PKGBUILD +++ b/build-support/java13-openjdk/PKGBUILD @@ -73,6 +73,17 @@ build() { export MAKEFLAGS=${MAKEFLAGS/-j${MAKEFLAG_J}/} NUM_PROC_OPT="--with-num-cores=${MAKEFLAG_J}" fi + + # Avoid optimization of HotSpot to be lowered from O3 to O2 + local _CFLAGS="${CFLAGS//-O2/-O3} ${CPPFLAGS}" + local _CXXFLAGS="${CXXFLAGS//-O2/-O3} ${CPPFLAGS}" + local _LDFLAGS=${LDFLAGS} + if [[ $CARCH = i486 || $CARCH = i686 || $CARCH = pentium4 ]]; then + echo "Removing '-fno-plt' from CFLAGS and CXXFLAGS to prevent build fail with this architecture" + _CFLAGS=${CFLAGS/-fno-plt/} + _CXXFLAGS=${CXXFLAGS/-fno-plt/} + fi + # i486-specific if [ "${CARCH}" = "i486" ]; then _JARCH=i386 @@ -86,16 +97,6 @@ build() { _CXXFLAGS+=" -mincoming-stack-boundary=2" fi - # Avoid optimization of HotSpot to be lowered from O3 to O2 - local _CFLAGS="${CFLAGS//-O2/-O3} ${CPPFLAGS}" - local _CXXFLAGS="${CXXFLAGS//-O2/-O3} ${CPPFLAGS}" - local _LDFLAGS=${LDFLAGS} - if [[ $CARCH = i486 || $CARCH = i686 || $CARCH = pentium4 ]]; then - echo "Removing '-fno-plt' from CFLAGS and CXXFLAGS to prevent build fail with this architecture" - _CFLAGS=${CFLAGS/-fno-plt/} - _CXXFLAGS=${CXXFLAGS/-fno-plt/} - fi - # CFLAGS, CXXFLAGS and LDFLAGS are ignored as shown by a warning # in the output of ./configure unless used like such: # --with-extra-cflags="${CFLAGS}" -- cgit v1.2.3-70-g09d2