RFR: 8308585: AC_REQUIRE: `PLATFORM_EXTRACT_TARGET_AND_BUILD' was expanded before it was required
Erik Joelsson
erikj at openjdk.org
Tue Jun 13 21:54:31 UTC 2023
Autoconf is emitting this warning after [JDK-8307573](https://bugs.openjdk.org/browse/JDK-8307573):
stdin:85: warning: AC_REQUIRE: `PLATFORM_EXTRACT_TARGET_AND_BUILD' was expanded before it was required
stdin:85: http://www.gnu.org/software/autoconf/manual/autoconf.html#Expanded-Before-Required
/home/erik/git/jdk/open/make/autoconf/platform.m4:644: PLATFORM_SETUP_OPENJDK_BUILD_AND_TARGET is expanded from...
stdin:85: the top level
This is caused by using `AC_DEFUN_ONCE` and `AC_REQUIRE` in the wrong way. In the OpenJDK configure script, we use a more imperative model of explicitly calling `AC_DEFUN` macros in most situations. This is mostly done due to how easy it is to get the other model wrong, especially when the models are mixed. The simple solution here is to just change `PLATFORM_CHECK_DEPRECATION` to an `AC_DEFUN` macro and remove the `AC_REQUIRE` call.
When verifying the fix, I noticed that the check isn't currently working. At least I am still able to configure windows-x86 with no warning or error. With this fix, the error is printed as expected. This makes me wonder if the original change ever worked.
I'm also adding the deprecation override configure arg to jib-profiles.js to make it possible to still configure windows-x86 using Jib at Oracle. We aren't doing that regularly, but as long as the configuration is there, it should at least work.
-------------
Commit messages:
- Make it work
- JDK-8308585
Changes: https://git.openjdk.org/jdk/pull/14459/files
Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=14459&range=00
Issue: https://bugs.openjdk.org/browse/JDK-8308585
Stats: 4 lines in 2 files changed: 1 ins; 1 del; 2 mod
Patch: https://git.openjdk.org/jdk/pull/14459.diff
Fetch: git fetch https://git.openjdk.org/jdk.git pull/14459/head:pull/14459
PR: https://git.openjdk.org/jdk/pull/14459
More information about the build-dev
mailing list