8310129: SetupNativeCompilation LIBS should match the order of the other parameters

Reviewed-by: erikj
This commit is contained in:
Julian Waters 2023-06-15 16:29:31 +00:00
parent 947f14977a
commit 653a8d0cce

View File

@ -500,7 +500,7 @@ endef
# used both for C and C++. # used both for C and C++.
# LIBS_<toolchain> the libraries to link to for the specified toolchain, # LIBS_<toolchain> the libraries to link to for the specified toolchain,
# used both for C and C++. # used both for C and C++.
# LIBS_<OS>_<toolchain> the libraries to link to for the specified target # LIBS_<toolchain>_<OS> the libraries to link to for the specified target
# OS and toolchain, used both for C and C++. # OS and toolchain, used both for C and C++.
# ARFLAGS the archiver flags to be used # ARFLAGS the archiver flags to be used
# OBJECT_DIR the directory where we store the object files # OBJECT_DIR the directory where we store the object files
@ -1031,12 +1031,11 @@ define SetupNativeCompilationBody
# Pickup extra OPENJDK_TARGET_OS_TYPE, OPENJDK_TARGET_OS and TOOLCHAIN_TYPE # Pickup extra OPENJDK_TARGET_OS_TYPE, OPENJDK_TARGET_OS and TOOLCHAIN_TYPE
# dependent variables for LDFLAGS and LIBS, and additionally the pair dependent # dependent variables for LDFLAGS and LIBS, and additionally the pair dependent
# TOOLCHAIN_TYPE plus OPENJDK_TARGET_OS for LDFLAGS, or OPENJDK_TARGET_OS plus # TOOLCHAIN_TYPE plus OPENJDK_TARGET_OS
# TOOLCHAIN_TYPE for LIBS
$1_EXTRA_LDFLAGS += $$($1_LDFLAGS_$(OPENJDK_TARGET_OS_TYPE)) $$($1_LDFLAGS_$(OPENJDK_TARGET_OS)) \ $1_EXTRA_LDFLAGS += $$($1_LDFLAGS_$(OPENJDK_TARGET_OS_TYPE)) $$($1_LDFLAGS_$(OPENJDK_TARGET_OS)) \
$$($1_LDFLAGS_$(TOOLCHAIN_TYPE)) $$($1_LDFLAGS_$(TOOLCHAIN_TYPE)_$(OPENJDK_TARGET_OS)) $$($1_LDFLAGS_$(TOOLCHAIN_TYPE)) $$($1_LDFLAGS_$(TOOLCHAIN_TYPE)_$(OPENJDK_TARGET_OS))
$1_EXTRA_LIBS += $$($1_LIBS_$(OPENJDK_TARGET_OS_TYPE)) $$($1_LIBS_$(OPENJDK_TARGET_OS)) \ $1_EXTRA_LIBS += $$($1_LIBS_$(OPENJDK_TARGET_OS_TYPE)) $$($1_LIBS_$(OPENJDK_TARGET_OS)) \
$$($1_LIBS_$(OPENJDK_TARGET_OS)_$(TOOLCHAIN_TYPE)) $$($1_LIBS_$(TOOLCHAIN_TYPE)) $$($1_LIBS_$(TOOLCHAIN_TYPE)) $$($1_LIBS_$(TOOLCHAIN_TYPE)_$(OPENJDK_TARGET_OS))
ifneq ($$($1_REAL_MAPFILE), ) ifneq ($$($1_REAL_MAPFILE), )
$1_EXTRA_LDFLAGS += $(call SET_SHARED_LIBRARY_MAPFILE,$$($1_REAL_MAPFILE)) $1_EXTRA_LDFLAGS += $(call SET_SHARED_LIBRARY_MAPFILE,$$($1_REAL_MAPFILE))