Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

8281096: Flags introduced by configure script are not passed to ADLC build #357

Closed
wants to merge 9 commits into from
5 changes: 4 additions & 1 deletion .github/workflows/submit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -452,7 +452,10 @@ jobs:
working-directory: jdk

- name: Build
run: make CONF_NAME=linux-${{ matrix.gnu-arch }}-hotspot hotspot
run: |
cat build/linux-${{ matrix.gnu-arch }}-hotspot/spec.gmk
cat build/linux-${{ matrix.gnu-arch }}-hotspot/hotspot-spec.gmk
make CONF_NAME=linux-${{ matrix.gnu-arch }}-hotspot LOG_LEVEL=debug hotspot
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What are the cats for? debug output? If yes, still needed?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

#357 (comment)

Yeah. They are not needed, but I see no harm in leaving them in. The output is small in comparison to the whole log and it's useful to have if the build does fail. We've had similar in the RPM spec files for a long time.

working-directory: jdk

linux_x86_build:
Expand Down
44 changes: 29 additions & 15 deletions common/autoconf/flags.m4
Original file line number Diff line number Diff line change
Expand Up @@ -139,9 +139,12 @@ AC_DEFUN_ONCE([FLAGS_SETUP_INIT_FLAGS],
SYSROOT_LDFLAGS="-isysroot \"$SYSROOT\""
fi
# Propagate the sysroot args to hotspot
LEGACY_EXTRA_CFLAGS="$LEGACY_EXTRA_CFLAGS $SYSROOT_CFLAGS"
LEGACY_EXTRA_CXXFLAGS="$LEGACY_EXTRA_CXXFLAGS $SYSROOT_CFLAGS"
LEGACY_EXTRA_LDFLAGS="$LEGACY_EXTRA_LDFLAGS $SYSROOT_LDFLAGS"
LEGACY_HOST_CFLAGS="$LEGACY_EXTRA_CFLAGS"
LEGACY_HOST_CXXFLAGS="$LEGACY_EXTRA_CXXFLAGS"
LEGACY_HOST_LDFLAGS="$LEGACY_EXTRA_LDFLAGS"
LEGACY_TARGET_CFLAGS="$LEGACY_EXTRA_CFLAGS $SYSROOT_CFLAGS"
LEGACY_TARGET_CXXFLAGS="$LEGACY_EXTRA_CXXFLAGS $SYSROOT_CFLAGS"
LEGACY_TARGET_LDFLAGS="$LEGACY_EXTRA_LDFLAGS $SYSROOT_LDFLAGS"
fi
AC_SUBST(SYSROOT_CFLAGS)
AC_SUBST(SYSROOT_LDFLAGS)
Expand Down Expand Up @@ -431,11 +434,14 @@ AC_DEFUN_ONCE([FLAGS_SETUP_COMPILER_FLAGS_FOR_JDK],
CFLAGS_JDK="${CFLAGS_JDK} -qchars=signed -q64 -qfullpath -qsaveopt"
CXXFLAGS_JDK="${CXXFLAGS_JDK} -qchars=signed -q64 -qfullpath -qsaveopt"
elif test "x$TOOLCHAIN_TYPE" = xgcc; then
LEGACY_EXTRA_CFLAGS="$LEGACY_EXTRA_CFLAGS -fstack-protector"
LEGACY_EXTRA_CXXFLAGS="$LEGACY_EXTRA_CXXFLAGS -fstack-protector"
LEGACY_HOST_CFLAGS="$LEGACY_HOST_CFLAGS -fstack-protector"
LEGACY_TARGET_CFLAGS="$LEGACY_TARGET_CFLAGS -fstack-protector"
LEGACY_HOST_CXXFLAGS="$LEGACY_HOST_CXXFLAGS -fstack-protector"
LEGACY_TARGET_CXXFLAGS="$LEGACY_TARGET_CXXFLAGS -fstack-protector"
if test "x$OPENJDK_TARGET_OS" != xmacosx; then
LDFLAGS_JDK="$LDFLAGS_JDK -Wl,-z,relro"
LEGACY_EXTRA_LDFLAGS="$LEGACY_EXTRA_LDFLAGS -Wl,-z,relro"
LEGACY_HOST_LDFLAGS="$LEGACY_HOST_LDFLAGS -Wl,-z,relro"
LEGACY_TARGET_LDFLAGS="$LEGACY_TARGET_LDFLAGS -Wl,-z,relro"
fi
$2CXXSTD_CXXFLAG="-std=gnu++98"
FLAGS_CXX_COMPILER_CHECK_ARGUMENTS([[$]$2CXXSTD_CXXFLAG -Werror],
Expand Down Expand Up @@ -479,15 +485,23 @@ AC_DEFUN_ONCE([FLAGS_SETUP_COMPILER_FLAGS_FOR_JDK],
LDFLAGS_JDK="${LDFLAGS_JDK} $with_extra_ldflags"

# Hotspot needs these set in their legacy form
LEGACY_EXTRA_CFLAGS="$LEGACY_EXTRA_CFLAGS $with_extra_cflags"
LEGACY_EXTRA_CXXFLAGS="$LEGACY_EXTRA_CXXFLAGS $with_extra_cxxflags"
LEGACY_EXTRA_LDFLAGS="$LEGACY_EXTRA_LDFLAGS $with_extra_ldflags"
LEGACY_EXTRA_ASFLAGS="$with_extra_asflags"

AC_SUBST(LEGACY_EXTRA_CFLAGS)
AC_SUBST(LEGACY_EXTRA_CXXFLAGS)
AC_SUBST(LEGACY_EXTRA_LDFLAGS)
AC_SUBST(LEGACY_EXTRA_ASFLAGS)
LEGACY_HOST_CFLAGS="$LEGACY_HOST_CFLAGS $with_extra_cflags"
LEGACY_TARGET_CFLAGS="$LEGACY_TARGET_CFLAGS $with_extra_cflags"
LEGACY_HOST_CXXFLAGS="$LEGACY_HOST_CXXFLAGS $with_extra_cxxflags"
LEGACY_TARGET_CXXFLAGS="$LEGACY_TARGET_CXXFLAGS $with_extra_cxxflags"
LEGACY_HOST_LDFLAGS="$LEGACY_HOST_LDFLAGS $with_extra_ldflags"
LEGACY_TARGET_LDFLAGS="$LEGACY_TARGET_LDFLAGS $with_extra_ldflags"
LEGACY_HOST_ASFLAGS="$with_extra_asflags"
LEGACY_TARGET_ASFLAGS="$with_extra_asflags"

AC_SUBST(LEGACY_HOST_CFLAGS)
AC_SUBST(LEGACY_HOST_CXXFLAGS)
AC_SUBST(LEGACY_HOST_LDFLAGS)
AC_SUBST(LEGACY_HOST_ASFLAGS)
AC_SUBST(LEGACY_TARGET_CFLAGS)
AC_SUBST(LEGACY_TARGET_CXXFLAGS)
AC_SUBST(LEGACY_TARGET_LDFLAGS)
AC_SUBST(LEGACY_TARGET_ASFLAGS)

###############################################################################
#
Expand Down
Loading