On Tue, 11 Oct 2022 10:09:02 GMT, Aleksey Shipilev <sh...@openjdk.org> wrote:
> I think checking it like this would be more robust? > > ``` > if test "x$conf_openjdk_target" != "x"; then > binutils_target="--host=$conf_openjdk_target" > else > binutils_target="" > fi > ``` > > This allows me to produce AArch64 hsdis: > > ``` > $ file ./build/linux-aarch64-server-fastdebug/support/hsdis/libhsdis.so > ./build/linux-aarch64-server-fastdebug/support/hsdis/libhsdis.so: ELF 64-bit > LSB shared object, ARM aarch64, version 1 (SYSV), dynamically linked, > BuildID[sha1]=c709135f1f2ef2bee329550044fabea35e33ebb3, not stripped > ``` Yeah, you're onto something. We should not check the autoconf variables. I'd even recommend testing for cross compilation like this: if test "x$COMPILE_TYPE" = xcross; then # ... We also have a `CROSS_COMPILE_ARCH` which is set to `$OPENJDK_$1_CPU_LEGACY`, but right now I can't say how it relates to `$conf_openjdk_target`. But I'd rather not use the `$conf_...` variables outside the option testing code. If we do need it, and it is not already available, we should "export" it by giving it a separate, uppercase variable name. ------------- PR: https://git.openjdk.org/jdk/pull/10628