RFR: JDK-8282532: Allow explicitly setting build platform alongside --openjdk-target [v4]

Magnus Ihse Bursie ihse at openjdk.java.net
Thu Mar 3 15:58:04 UTC 2022


On Thu, 3 Mar 2022 13:32:33 GMT, Julian Waters <jwaters at openjdk.org> wrote:

>> make/autoconf/configure line 298:
>> 
>>> 296:     exit 1
>>> 297:   else
>>> 298:     echo "Warning: You are using unsafe autoconf cross-compilation flags."
>> 
>> The autoconf flags are not really unsafe, they are just misleadingly named. I'd rather see that you restore "legacy" in this output, and the conf_legacy_crosscompile variable name.
>
> Would it be better if I changed that to say the flags are misleading, or if I reverted it back to legacy in that case? (Since that seems to be the primary concern with using them)

As the build documentation says, the standard autoconf tripled was created for building Canadian cross compilers (i.e. cross-compiling a cross-compiler). This means that they use "host" for what we call "target", and they use "target" for something that is not relevant for us. This caused a lot of confusion early on when OpenJDK started using autoconf.

If you know what you are doing, there's nothing inherently *wrong* with using the autoconf triplet. It's just confusing, due to the name clash of "target".

If you think this is not clear enough from the documenation and need to add something to the warnings printed by the configure wrapper, sure, go ahead and add a line about how this can be confusing. 

But it is not unsafe.

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

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



More information about the build-dev mailing list