RFR: 8310129: SetupNativeCompilation LIBS should match the order of the other parameters
Erik Joelsson
erikj at openjdk.org
Thu Jun 15 13:08:58 UTC 2023
On Thu, 15 Jun 2023 10:41:29 GMT, Julian Waters <jwaters at openjdk.org> wrote:
> I made the mistake of complicating the target pairs of LIBS and reversing the order they're specified in SetupNativeCompilation. They should match the sequence used in the other arguments, and since they're not used yet I'll take the opportunity to clean this up
make/common/NativeCompilation.gmk line 1038:
> 1036: $$($1_LDFLAGS_$(TOOLCHAIN_TYPE)) $$($1_LDFLAGS_$(TOOLCHAIN_TYPE)_$(OPENJDK_TARGET_OS))
> 1037: $1_EXTRA_LIBS += $$($1_LIBS_$(OPENJDK_TARGET_OS_TYPE)) $$($1_LIBS_$(OPENJDK_TARGET_OS)) \
> 1038: $$($1_LIBS_$(TOOLCHAIN_TYPE)_$(OPENJDK_TARGET_OS)) $$($1_LIBS_$(TOOLCHAIN_TYPE))
You should also change the order these are added together to match LDFLAGS. We need the most specific parameter to be added last. Later arguments override earlier arguments if there is a conflict between them.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/14489#discussion_r1230981619
More information about the build-dev
mailing list