-
Notifications
You must be signed in to change notification settings - Fork 152
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
Conversation
👋 Welcome back andrew! A progress list of the required criteria for merging this PR into |
Webrevs
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good and makes sense. Why not passing LFLAGS to solaris?
Hi @gnu-andrew , It successfully built on jdk8u-dev on AIX. This is a positive sign that the changes are effective. |
@gnu-andrew This pull request has been inactive for more than 4 weeks and will be automatically closed if another 4 weeks passes without any activity. To avoid this, simply add a new comment to the pull request. Feel free to ask for assistance if you need help with progressing this pull request towards integration! |
@gnu-andrew This pull request has been inactive for more than 8 weeks and will now be automatically closed. If you would like to continue working on this pull request in the future, feel free to reopen it! This can be done using the |
/open @deepa181 thanks for the feedback. It's good to know it doesn't break AIX. |
@gnu-andrew This pull request is now open |
@gnu-andrew This pull request has been inactive for more than 4 weeks and will be automatically closed if another 4 weeks passes without any activity. To avoid this, simply add a new comment to the pull request. Feel free to ask for assistance if you need help with progressing this pull request towards integration! |
@gnu-andrew This pull request has been inactive for more than 8 weeks and will now be automatically closed. If you would like to continue working on this pull request in the future, feel free to reopen it! This can be done using the |
/open |
@gnu-andrew This pull request is now open |
c6dbc0b
to
0f50681
Compare
@gnu-andrew Please do not rebase or force-push to an active PR as it invalidates existing review comments. Note for future reference, the bots always squash all changes into a single commit automatically as part of the integration. See OpenJDK Developers’ Guide for more information. |
It seems this matches what Solaris does in |
I think I know what's wrong here now with the cross-compilation builds. The I can fix this, but it's going to make this fix a bit more involved than I initially thought. |
Mailing list message from Thorsten Glaser on jdk8u-dev: On Mon, 19 Feb 2024, Andrew John Hughes wrote:
Ouch. So no clean distinction between CFLAGS and HOSTCFLAGS?
Yocto has an ugly workaround: bye, |
Actually looks like the main build has had |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Mostly good. Weird test errors in GHA, though.
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 |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Thanks for looking over it again. Which ones do you mean? The download issues and cacert failures aren't related to this change. I seem them on other PRs. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@gnu-andrew Okay, if you say the GHA failures are unrelated to this patch, this is okay for me.
|
/approval request Fixes ADLC build with GCC 11+ by passing through compiler flags used for the rest of the HotSpot build. Later versions of OpenJDK are not affected, due to the HotSpot build being integrated into the new build system there. |
@gnu-andrew |
Merged with latest jdk8u-dev to bring in @zzambers ' changes to the Windows & alt-Linux builds. All builds now pass and the only test failure seems unrelated ( |
@gnu-andrew I think remaining failure should get fixed by: #497 |
Ah, thanks for spotting that one and getting it sponsored. |
I have done some additional testing:
Change looks good. (works for me) |
@gnu-andrew This pull request has been inactive for more than 4 weeks and will be automatically closed if another 4 weeks passes without any activity. To avoid this, simply add a new comment to the pull request. Feel free to ask for assistance if you need help with progressing this pull request towards integration! |
Thanks for testing. Can you give me more details on what kind of build failed in |
Thanks for the approval, @jerboaa |
Going to push as commit 4106121.
Your commit was automatically rebased without conflicts. |
@gnu-andrew Pushed as commit 4106121. 💡 You may see a message that your pull request was closed with unmerged commits. This can be safely ignored. |
NP :) Errors look following way (see jdk8-type.cpp-error.log for full configure/make log):
|
@zzambers Looks similar to what I saw with GCC 11.2/aarch64 Based on your earlier comment do we need to re-ignite the other PR which has been closed due to inactivity and try and get that in too? |
@gnu-andrew Actually I have found that that there are backports to fix Issue, I referenced earlier actually seems like duplicate: |
The 8u configure script defines compiler flags in
EXTRA_CFLAGS
,EXTRA_LDFLAGS
andEXTRA_ASFLAGS
. Some are added by configure tests, while others are taken directly from corresponding options passed by the user.8u still use the legacy HotSpot build system which is not fully integrated with the autoconf system. Variables defined by configure thus have to be explicitly passed down to the separate HotSpot build.
ADLC is a tool used at build-time and so the flags it uses don't impact on the end product. So, for a long time, it has been ignoring these flags defined by configure and using just its own minimal set.
However, with newer compilers, this means that the code is compiled to a newer version of the C++ standard, as the default has changed in GCC 6 and later (see JDK-8151841). With the latest versions of GCC (11 and 12), this actually leads to build failures due to the use of 'register' (GCC 11) and the way comments are used (GCC 12) in the code.
We should fix the ADLC build to use the same flags as the rest of the build. The impact should be negligible, given the same flags are already used in the code that is actually shipped.
This does not affect 9+ where HotSpot's build system has been replaced with full integration in the autoconf system.
With this change, 8u can be built with GCC 11 on GNU/Linux. I'd appreciate testing on other platforms, particularly those not covered by GHA (Solaris, AIX - @adamfarley, @sxa & @deepa181 who have provided previous fixes for these platforms)
During testing, we found we could not use the
EXTRA_
prefixed variables as they include flags for the target compiler on cross-compilation builds. To fix this, we split out newHOST_
prefixed variables which include all the flags of theEXTRA_
prefixed variables, bar the--sysroot
options.Progress
Issue
Reviewers
Reviewing
Using
git
Checkout this PR locally:
$ git fetch https://git.openjdk.org/jdk8u-dev.git pull/357/head:pull/357
$ git checkout pull/357
Update a local copy of the PR:
$ git checkout pull/357
$ git pull https://git.openjdk.org/jdk8u-dev.git pull/357/head
Using Skara CLI tools
Checkout this PR locally:
$ git pr checkout 357
View PR using the GUI difftool:
$ git pr show -t 357
Using diff file
Download this PR as a diff file:
https://git.openjdk.org/jdk8u-dev/pull/357.diff
Webrev
Link to Webrev Comment