RFR: JDK-8282700: Properly handle several --without options during configure [v2]

Erik Joelsson erikj at openjdk.java.net
Mon Mar 7 14:08:08 UTC 2022


On Mon, 7 Mar 2022 08:07:30 GMT, Julian Waters <jwaters at openjdk.org> wrote:

>> Some of the --without options are not properly handled and will crash when processed (For example, --without-version-string), in other cases the --without-* option will actually silently produce incorrect results instead of actually doing what --without-* implies (For example, --without-build-user and all the --with-vendor-* options). The most elegant way to solve this would simply be to handle such cases and display warnings when they're encountered (or if the option is critical to the build process, throwing an error)
>> 
>> Even if it doesn't make sense to pass said option however, it should display a warning instead of letting configure exit with a confusing error when it's run
>
> Julian Waters has updated the pull request incrementally with one additional commit since the last revision:
> 
>   Handle remaining options and change critical options to error when --without is passed

I think it's good to error out when incorrectly using --without-foo options. I don't think we need warnings in cases where --without-foo is equivalent to --with-foo="".

make/autoconf/jdk-version.m4 line 113:

> 111:     AC_MSG_ERROR([--with-vendor-name must have a value])
> 112:   elif test "x$with_vendor_name" = xno; then
> 113:     AC_MSG_WARN([--without-vendor-name is the same as not passing --with-vendor-name to begin with])

I don't think this warrants a warning. The user is just trying to be explicit. It's good to handle the "no" case though.

make/autoconf/jdk-version.m4 line 129:

> 127:     AC_MSG_ERROR([--with-vendor-url must have a value])
> 128:   elif test "x$with_vendor_url" = xno; then
> 129:     AC_MSG_WARN([--without-vendor-url is the same as not passing --with-vendor-url to begin with])

Same as with vendor.

make/autoconf/jdk-version.m4 line 145:

> 143:     AC_MSG_ERROR([--with-vendor-bug-url must have a value])
> 144:   elif test "x$with_vendor_bug_url" = xno; then
> 145:     AC_MSG_WARN([--without-vendor-bug-url is the same as not passing --with-vendor-bug-url to begin with])

Same as with vendor.

make/autoconf/jdk-version.m4 line 161:

> 159:     AC_MSG_ERROR([--with-vendor-vm-bug-url must have a value])
> 160:   elif test "x$with_vendor_vm_bug_url" = xno; then
> 161:     AC_MSG_WARN([--without-vendor-vm-bug-url is the same as not passing --with-vendor-vm-bug-url to begin with])

Same as with vendor.

make/autoconf/jdk-version.m4 line 180:

> 178:     AC_MSG_ERROR([--with-version-string must have a value])
> 179:   elif test "x$with_version_string" = xno; then
> 180:     AC_MSG_WARN([--without-version-string is the same as not passing --with-version-string to begin with])

Same as with vendor.

-------------

PR: https://git.openjdk.java.net/jdk/pull/7713



More information about the build-dev mailing list