From a03af7fb678cfbbfb14c3500c80edeaa0aff08fd Mon Sep 17 00:00:00 2001 From: JoKern65 Date: Mon, 27 Jan 2025 11:48:43 +0100 Subject: [PATCH 1/7] JDK-8348663 --- make/autoconf/flags-ldflags.m4 | 2 +- make/scripts/aix/ld.sh | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) create mode 100755 make/scripts/aix/ld.sh diff --git a/make/autoconf/flags-ldflags.m4 b/make/autoconf/flags-ldflags.m4 index 2e060a71d4d05..a3952b8f57e6d 100644 --- a/make/autoconf/flags-ldflags.m4 +++ b/make/autoconf/flags-ldflags.m4 @@ -79,7 +79,7 @@ AC_DEFUN([FLAGS_SETUP_LDFLAGS_HELPER], fi if test "x$OPENJDK_TARGET_OS" = xaix; then BASIC_LDFLAGS="-Wl,-b64 -Wl,-brtl -Wl,-bnorwexec -Wl,-bnolibpath -Wl,-bnoexpall \ - -Wl,-bernotok -Wl,-bdatapsize:64k -Wl,-btextpsize:64k -Wl,-bstackpsize:64k" + -Wl,-bernotok -Wl,-bdatapsize:64k -Wl,-btextpsize:64k -Wl,-bstackpsize:64k -fuse-ld=${TOPDIR}/make/scripts/aix/ld.sh" BASIC_LDFLAGS_JVM_ONLY="$BASIC_LDFLAGS_JVM_ONLY -Wl,-lC_r -Wl,-bbigtoc" fi diff --git a/make/scripts/aix/ld.sh b/make/scripts/aix/ld.sh new file mode 100755 index 0000000000000..984e5230eabb1 --- /dev/null +++ b/make/scripts/aix/ld.sh @@ -0,0 +1,4 @@ +#!/bin/bash +unset LIBPATH +exec /usr/bin/ld "$@" +return $? From d63cdb8e1e91c74ba8cb453df9874ca491947484 Mon Sep 17 00:00:00 2001 From: JoKern65 Date: Wed, 29 Jan 2025 10:46:12 +0100 Subject: [PATCH 2/7] check in script without x-Bit but copy it to build directory with x-Bit --- make/autoconf/flags-ldflags.m4 | 4 +++- make/scripts/aix/ld.sh | 0 2 files changed, 3 insertions(+), 1 deletion(-) mode change 100755 => 100644 make/scripts/aix/ld.sh diff --git a/make/autoconf/flags-ldflags.m4 b/make/autoconf/flags-ldflags.m4 index a3952b8f57e6d..3c87afea177bf 100644 --- a/make/autoconf/flags-ldflags.m4 +++ b/make/autoconf/flags-ldflags.m4 @@ -78,8 +78,10 @@ AC_DEFUN([FLAGS_SETUP_LDFLAGS_HELPER], fi fi if test "x$OPENJDK_TARGET_OS" = xaix; then + cp ${TOPDIR}/make/scripts/aix/ld.sh ${TOPDIR}/build/${CONF_NAME}/ld.sh + chmod 755 ${TOPDIR}/build/${CONF_NAME}/ld.sh BASIC_LDFLAGS="-Wl,-b64 -Wl,-brtl -Wl,-bnorwexec -Wl,-bnolibpath -Wl,-bnoexpall \ - -Wl,-bernotok -Wl,-bdatapsize:64k -Wl,-btextpsize:64k -Wl,-bstackpsize:64k -fuse-ld=${TOPDIR}/make/scripts/aix/ld.sh" + -Wl,-bernotok -Wl,-bdatapsize:64k -Wl,-btextpsize:64k -Wl,-bstackpsize:64k -fuse-ld=${TOPDIR}/build/${CONF_NAME}/ld.sh" BASIC_LDFLAGS_JVM_ONLY="$BASIC_LDFLAGS_JVM_ONLY -Wl,-lC_r -Wl,-bbigtoc" fi diff --git a/make/scripts/aix/ld.sh b/make/scripts/aix/ld.sh old mode 100755 new mode 100644 From b5d402ff81205111eb9556e261f095993af9a2ae Mon Sep 17 00:00:00 2001 From: JoKern65 Date: Wed, 29 Jan 2025 12:39:41 +0100 Subject: [PATCH 3/7] following Magnus proposals --- make/autoconf/basic.m4 | 7 +++++++ make/autoconf/flags-ldflags.m4 | 4 +--- make/scripts/aix/ld.sh | 1 - 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/make/autoconf/basic.m4 b/make/autoconf/basic.m4 index 35eb63bea0c84..ac4a0be55f279 100644 --- a/make/autoconf/basic.m4 +++ b/make/autoconf/basic.m4 @@ -624,4 +624,11 @@ AC_DEFUN_ONCE([BASIC_POST_CONFIG_OUTPUT], # Make the compare script executable $CHMOD +x $OUTPUTDIR/compare.sh + + # Copy the linker wrapper script for AIX' clang and make it executable + if test "x$TOOLCHAIN_TYPE" = xclang && test "x$OPENJDK_TARGET_OS" = xaix && + test -e "${TOPDIR}/make/scripts/aix/ld.sh"; then + $CP -f "${TOPDIR}/make/scripts/aix/ld.sh" "$OUTPUTDIR/ld.sh" + $CHMOD +x "$OUTPUTDIR/ld.sh" + fi ]) diff --git a/make/autoconf/flags-ldflags.m4 b/make/autoconf/flags-ldflags.m4 index 3c87afea177bf..e74edcbe9cc32 100644 --- a/make/autoconf/flags-ldflags.m4 +++ b/make/autoconf/flags-ldflags.m4 @@ -78,10 +78,8 @@ AC_DEFUN([FLAGS_SETUP_LDFLAGS_HELPER], fi fi if test "x$OPENJDK_TARGET_OS" = xaix; then - cp ${TOPDIR}/make/scripts/aix/ld.sh ${TOPDIR}/build/${CONF_NAME}/ld.sh - chmod 755 ${TOPDIR}/build/${CONF_NAME}/ld.sh BASIC_LDFLAGS="-Wl,-b64 -Wl,-brtl -Wl,-bnorwexec -Wl,-bnolibpath -Wl,-bnoexpall \ - -Wl,-bernotok -Wl,-bdatapsize:64k -Wl,-btextpsize:64k -Wl,-bstackpsize:64k -fuse-ld=${TOPDIR}/build/${CONF_NAME}/ld.sh" + -Wl,-bernotok -Wl,-bdatapsize:64k -Wl,-btextpsize:64k -Wl,-bstackpsize:64k -fuse-ld=$OUTPUTDIR/ld.sh" BASIC_LDFLAGS_JVM_ONLY="$BASIC_LDFLAGS_JVM_ONLY -Wl,-lC_r -Wl,-bbigtoc" fi diff --git a/make/scripts/aix/ld.sh b/make/scripts/aix/ld.sh index 984e5230eabb1..7ee72136b9a96 100644 --- a/make/scripts/aix/ld.sh +++ b/make/scripts/aix/ld.sh @@ -1,4 +1,3 @@ #!/bin/bash unset LIBPATH exec /usr/bin/ld "$@" -return $? From d8f067c6b8c1630bc6de25dfc5544668497eb978 Mon Sep 17 00:00:00 2001 From: JoKern65 Date: Wed, 29 Jan 2025 13:17:27 +0100 Subject: [PATCH 4/7] cosmetic changes --- make/autoconf/basic.m4 | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/make/autoconf/basic.m4 b/make/autoconf/basic.m4 index ac4a0be55f279..42a49afd64c44 100644 --- a/make/autoconf/basic.m4 +++ b/make/autoconf/basic.m4 @@ -626,9 +626,8 @@ AC_DEFUN_ONCE([BASIC_POST_CONFIG_OUTPUT], $CHMOD +x $OUTPUTDIR/compare.sh # Copy the linker wrapper script for AIX' clang and make it executable - if test "x$TOOLCHAIN_TYPE" = xclang && test "x$OPENJDK_TARGET_OS" = xaix && - test -e "${TOPDIR}/make/scripts/aix/ld.sh"; then - $CP -f "${TOPDIR}/make/scripts/aix/ld.sh" "$OUTPUTDIR/ld.sh" + if test "x$TOOLCHAIN_TYPE" = xclang && test "x$OPENJDK_TARGET_OS" = xaix; then + $CP -f "$TOPDIR/make/scripts/aix/ld.sh" "$OUTPUTDIR/ld.sh" $CHMOD +x "$OUTPUTDIR/ld.sh" fi ]) From 8d424cc0ae6e22cc101165f544f7199a2a8d0135 Mon Sep 17 00:00:00 2001 From: JoKern65 Date: Wed, 29 Jan 2025 13:47:54 +0100 Subject: [PATCH 5/7] cosmetic changes 2 --- make/autoconf/basic.m4 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/make/autoconf/basic.m4 b/make/autoconf/basic.m4 index 42a49afd64c44..54eccd44b0ed7 100644 --- a/make/autoconf/basic.m4 +++ b/make/autoconf/basic.m4 @@ -625,7 +625,7 @@ AC_DEFUN_ONCE([BASIC_POST_CONFIG_OUTPUT], # Make the compare script executable $CHMOD +x $OUTPUTDIR/compare.sh - # Copy the linker wrapper script for AIX' clang and make it executable + # Copy the linker wrapper script for clang on AIX and make it executable if test "x$TOOLCHAIN_TYPE" = xclang && test "x$OPENJDK_TARGET_OS" = xaix; then $CP -f "$TOPDIR/make/scripts/aix/ld.sh" "$OUTPUTDIR/ld.sh" $CHMOD +x "$OUTPUTDIR/ld.sh" From 46a2e67ead54ed98da56e2e8ecb1e39af8f98951 Mon Sep 17 00:00:00 2001 From: JoKern65 Date: Wed, 29 Jan 2025 15:40:10 +0100 Subject: [PATCH 6/7] modified/added copyright headers --- make/autoconf/basic.m4 | 2 +- make/autoconf/flags-ldflags.m4 | 2 +- make/scripts/aix/ld.sh | 25 +++++++++++++++++++++++++ 3 files changed, 27 insertions(+), 2 deletions(-) diff --git a/make/autoconf/basic.m4 b/make/autoconf/basic.m4 index 54eccd44b0ed7..d897cbafba79f 100644 --- a/make/autoconf/basic.m4 +++ b/make/autoconf/basic.m4 @@ -1,5 +1,5 @@ # -# Copyright (c) 2011, 2024, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2011, 2025, Oracle and/or its affiliates. All rights reserved. # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # # This code is free software; you can redistribute it and/or modify it diff --git a/make/autoconf/flags-ldflags.m4 b/make/autoconf/flags-ldflags.m4 index e74edcbe9cc32..90947494ec8af 100644 --- a/make/autoconf/flags-ldflags.m4 +++ b/make/autoconf/flags-ldflags.m4 @@ -1,5 +1,5 @@ # -# Copyright (c) 2011, 2024, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2011, 2025, Oracle and/or its affiliates. All rights reserved. # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # # This code is free software; you can redistribute it and/or modify it diff --git a/make/scripts/aix/ld.sh b/make/scripts/aix/ld.sh index 7ee72136b9a96..1bf9ec5e6e752 100644 --- a/make/scripts/aix/ld.sh +++ b/make/scripts/aix/ld.sh @@ -1,3 +1,28 @@ #!/bin/bash +# +# Copyright (c) 2025, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2025 SAP SE. All rights reserved. +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +# +# This code is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License version 2 only, as +# published by the Free Software Foundation. Oracle designates this +# particular file as subject to the "Classpath" exception as provided +# by Oracle in the LICENSE file that accompanied this code. +# +# This code is distributed in the hope that it will be useful, but WITHOUT +# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or +# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License +# version 2 for more details (a copy is included in the LICENSE file that +# accompanied this code). +# +# You should have received a copy of the GNU General Public License version +# 2 along with this work; if not, write to the Free Software Foundation, +# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. +# +# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA +# or visit www.oracle.com if you need additional information or have any +# questions. +# unset LIBPATH exec /usr/bin/ld "$@" From 5e6f4c0dba9f52f505f016011daa582c7bf5f85e Mon Sep 17 00:00:00 2001 From: JoKern65 Date: Wed, 29 Jan 2025 16:21:30 +0100 Subject: [PATCH 7/7] modified/added copyright headers again --- make/scripts/aix/ld.sh | 1 - 1 file changed, 1 deletion(-) diff --git a/make/scripts/aix/ld.sh b/make/scripts/aix/ld.sh index 1bf9ec5e6e752..faa77ce4ba5a8 100644 --- a/make/scripts/aix/ld.sh +++ b/make/scripts/aix/ld.sh @@ -1,6 +1,5 @@ #!/bin/bash # -# Copyright (c) 2025, Oracle and/or its affiliates. All rights reserved. # Copyright (c) 2025 SAP SE. All rights reserved. # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. #