Revise JDK-8141590 backport to install libffi.so* in lib as well as jre/lib

Related: RHEL-74304
This commit is contained in:
Andrew Hughes 2025-01-16 22:51:59 +00:00
parent 07f723da84
commit bed6419789
3 changed files with 42 additions and 27 deletions

View File

@ -2712,7 +2712,9 @@ cjc.mainProgram(args)
- Update to 8u442-b06 (GA) - Update to 8u442-b06 (GA)
- Update release notes for 8u442-b06. - Update release notes for 8u442-b06.
- Switch to GA mode for final release - Switch to GA mode for final release
- Revise JDK-8141590 backport to install libffi.so* in lib as well as jre/lib
- Resolves: RHEL-73540 - Resolves: RHEL-73540
- Related: RHEL-74304
* Thu Jan 16 2025 Andrew Hughes <gnu.andrew@redhat.com> - 1:1.8.0.442.b05-0.3.ea * Thu Jan 16 2025 Andrew Hughes <gnu.andrew@redhat.com> - 1:1.8.0.442.b05-0.3.ea
- Add zero_arches to the portable_build_arches now that the portable build bundles libffi - Add zero_arches to the portable_build_arches now that the portable build bundles libffi

View File

@ -1,18 +1,30 @@
commit 928f3bf4a3017931ecc7012688e62d8a03264e61
Author: Andrew Hughes <gnu.andrew@redhat.com>
AuthorDate: Thu Jan 16 17:40:36 2025 +0000
Commit: Andrew Hughes <gnu.andrew@redhat.com>
CommitDate: Thu Jan 16 22:50:24 2025 +0000
Search /usr/lib64 on architectures other than x86_64
diff --git a/common/autoconf/generated-configure.sh b/common/autoconf/generated-configure.sh diff --git a/common/autoconf/generated-configure.sh b/common/autoconf/generated-configure.sh
index c6144b1968..b9e2471a19 100644 index 587b4c2657..5aeebe49a3 100644
--- a/common/autoconf/generated-configure.sh --- a/common/autoconf/generated-configure.sh
+++ b/common/autoconf/generated-configure.sh +++ b/common/autoconf/generated-configure.sh
@@ -4493,7 +4493,7 @@ VS_TOOLSET_SUPPORTED_2022=true @@ -4493,7 +4493,7 @@ VS_TOOLSET_SUPPORTED_2022=true
#CUSTOM_AUTOCONF_INCLUDE #CUSTOM_AUTOCONF_INCLUDE
# Do not change or remove the following line, it is needed for consistency checks: # Do not change or remove the following line, it is needed for consistency checks:
-DATE_WHEN_GENERATED=1736991241 -DATE_WHEN_GENERATED=1737049912
+DATE_WHEN_GENERATED=1737030662 +DATE_WHEN_GENERATED=1737067804
############################################################################### ###############################################################################
# #
@@ -50593,6 +50593,8 @@ $as_echo_n "checking for libffi lib file location... " >&6; } @@ -50590,9 +50590,11 @@ $as_echo_n "checking for libffi lib file location... " >&6; }
# Fallback on the default /usr/lib dir as_fn_error $? "Could not locate libffi.so.? for bundling" "$LINENO" 5
fi
else
- # Fallback on the default /usr/lib dir
+ # Fallback on the default /usr/lib and /usr/lib64 dirs
if test -e ${SYSROOT}/usr/lib/libffi.so.? ; then if test -e ${SYSROOT}/usr/lib/libffi.so.? ; then
LIBFFI_LIB_FILE="${SYSROOT}/usr/lib/libffi.so.?" LIBFFI_LIB_FILE="${SYSROOT}/usr/lib/libffi.so.?"
+ elif test -e ${SYSROOT}/usr/lib64/libffi.so.? ; then + elif test -e ${SYSROOT}/usr/lib64/libffi.so.? ; then
@ -21,11 +33,15 @@ index c6144b1968..b9e2471a19 100644
as_fn_error $? "Could not locate libffi.so.? for bundling" "$LINENO" 5 as_fn_error $? "Could not locate libffi.so.? for bundling" "$LINENO" 5
fi fi
diff --git a/common/autoconf/libraries.m4 b/common/autoconf/libraries.m4 diff --git a/common/autoconf/libraries.m4 b/common/autoconf/libraries.m4
index 4ed8b4fdd6..1e759a7589 100644 index 4ed8b4fdd6..6ab6dbc075 100644
--- a/common/autoconf/libraries.m4 --- a/common/autoconf/libraries.m4
+++ b/common/autoconf/libraries.m4 +++ b/common/autoconf/libraries.m4
@@ -1124,6 +1124,8 @@ AC_DEFUN_ONCE([LIB_SETUP_STATIC_LINK_LIBSTDCPP], @@ -1121,9 +1121,11 @@ AC_DEFUN_ONCE([LIB_SETUP_STATIC_LINK_LIBSTDCPP],
# Fallback on the default /usr/lib dir AC_MSG_ERROR([Could not locate libffi.so.? for bundling])
fi
else
- # Fallback on the default /usr/lib dir
+ # Fallback on the default /usr/lib and /usr/lib64 dirs
if test -e ${SYSROOT}/usr/lib/libffi.so.? ; then if test -e ${SYSROOT}/usr/lib/libffi.so.? ; then
LIBFFI_LIB_FILE="${SYSROOT}/usr/lib/libffi.so.?" LIBFFI_LIB_FILE="${SYSROOT}/usr/lib/libffi.so.?"
+ elif test -e ${SYSROOT}/usr/lib64/libffi.so.? ; then + elif test -e ${SYSROOT}/usr/lib64/libffi.so.? ; then

View File

@ -1,5 +1,5 @@
diff --git a/common/autoconf/generated-configure.sh b/common/autoconf/generated-configure.sh diff --git a/common/autoconf/generated-configure.sh b/common/autoconf/generated-configure.sh
index ad3f7f232e..c6144b1968 100644 index ad3f7f232e..587b4c2657 100644
--- a/common/autoconf/generated-configure.sh --- a/common/autoconf/generated-configure.sh
+++ b/common/autoconf/generated-configure.sh +++ b/common/autoconf/generated-configure.sh
@@ -649,6 +649,9 @@ LLVM_LIBS @@ -649,6 +649,9 @@ LLVM_LIBS
@ -103,7 +103,7 @@ index ad3f7f232e..c6144b1968 100644
# Do not change or remove the following line, it is needed for consistency checks: # Do not change or remove the following line, it is needed for consistency checks:
-DATE_WHEN_GENERATED=1716396030 -DATE_WHEN_GENERATED=1716396030
+DATE_WHEN_GENERATED=1736991241 +DATE_WHEN_GENERATED=1737049912
############################################################################### ###############################################################################
# #
@ -691,6 +691,20 @@ index 6b36f0e2bc..6f42c7ad37 100644
# Propagate compiler and tools paths from configure to nmake. # Propagate compiler and tools paths from configure to nmake.
# Need to make sure they contain \\ and not /. # Need to make sure they contain \\ and not /.
ifneq ($(SPEC),) ifneq ($(SPEC),)
diff --git a/jdk/make/Images.gmk b/jdk/make/Images.gmk
index 2e378c9134..0edefd7b5c 100644
--- a/jdk/make/Images.gmk
+++ b/jdk/make/Images.gmk
@@ -249,7 +249,8 @@ endif
ifneq ($(findstring $(OPENJDK_TARGET_OS), linux solaris),) # If Linux or Solaris
JDK_LIB_FILES += $(LIBRARY_PREFIX)jli$(SHARED_LIBRARY_SUFFIX) \
- $(LIBRARY_PREFIX)jawt$(SHARED_LIBRARY_SUFFIX)
+ $(LIBRARY_PREFIX)jawt$(SHARED_LIBRARY_SUFFIX) \
+ $(LIBFFI_LIB_FILE)
endif
# Find all files to copy from $(JDK_OUTPUTDIR)/lib
diff --git a/jdk/make/Import.gmk b/jdk/make/Import.gmk diff --git a/jdk/make/Import.gmk b/jdk/make/Import.gmk
index b115fa7f86..29fa2662a6 100644 index b115fa7f86..29fa2662a6 100644
--- a/jdk/make/Import.gmk --- a/jdk/make/Import.gmk
@ -704,23 +718,6 @@ index b115fa7f86..29fa2662a6 100644
Xusage.txt sa-jdi.jar Xusage.txt sa-jdi.jar
ifeq ($(OPENJDK_TARGET_OS), macosx) ifeq ($(OPENJDK_TARGET_OS), macosx)
diff --git a/make/common/MakeBase.gmk b/make/common/MakeBase.gmk
index 892df0a424..1727dd19c7 100644
--- a/make/common/MakeBase.gmk
+++ b/make/common/MakeBase.gmk
@@ -384,6 +384,12 @@ else
endef
endif
+# Variant of install file that does not preserve symlinks
+define install-file-nolink
+ $(MKDIR) -p $(@D)
+ $(CP) -f '$<' '$@'
+endef
+
# Convenience functions for working around make's limitations with $(filter ).
containing = $(foreach v,$2,$(if $(findstring $1,$v),$v))
not-containing = $(foreach v,$2,$(if $(findstring $1,$v),,$v))
diff --git a/make/devkit/Tools.gmk b/make/devkit/Tools.gmk diff --git a/make/devkit/Tools.gmk b/make/devkit/Tools.gmk
index c2460105b7..cf2ef251ac 100644 index c2460105b7..cf2ef251ac 100644
--- a/make/devkit/Tools.gmk --- a/make/devkit/Tools.gmk