@@ -37,56 +37,25 @@ AC_DEFUN([FLAGS_SETUP_SHARED_LIBS],
37
37
if test "x$TOOLCHAIN_TYPE" = xgcc; then
38
38
# Default works for linux, might work on other platforms as well.
39
39
SHARED_LIBRARY_FLAGS='-shared'
40
- # --disable-new-dtags forces use of RPATH instead of RUNPATH for rpaths.
41
- # This protects internal library dependencies within the JDK from being
42
- # overridden using LD_LIBRARY_PATH. See JDK-8326891 for more information.
43
- SET_EXECUTABLE_ORIGIN='-Wl,-rpath,\$$ORIGIN[ $] 1 -Wl,--disable-new-dtags'
44
- SET_SHARED_LIBRARY_ORIGIN="-Wl,-z,origin $SET_EXECUTABLE_ORIGIN"
45
- SET_SHARED_LIBRARY_NAME='-Wl,-soname=[ $] 1'
46
40
47
41
elif test "x$TOOLCHAIN_TYPE" = xclang; then
48
42
if test "x$OPENJDK_TARGET_OS" = xmacosx; then
49
43
# Linking is different on MacOSX
50
44
SHARED_LIBRARY_FLAGS="-dynamiclib -compatibility_version 1.0.0 -current_version 1.0.0"
51
- SET_EXECUTABLE_ORIGIN='-Wl,-rpath,@loader_path$(or [ $] 1,/.)'
52
- SET_SHARED_LIBRARY_ORIGIN="$SET_EXECUTABLE_ORIGIN"
53
- SET_SHARED_LIBRARY_NAME='-Wl,-install_name,@rpath/[ $] 1'
54
45
55
46
elif test "x$OPENJDK_TARGET_OS" = xaix; then
56
47
# Linking is different on aix
57
48
SHARED_LIBRARY_FLAGS="-shared -Wl,-bM:SRE -Wl,-bnoentry"
58
- SET_EXECUTABLE_ORIGIN=""
59
- SET_SHARED_LIBRARY_ORIGIN=''
60
- SET_SHARED_LIBRARY_NAME=''
61
49
62
50
else
63
51
# Default works for linux, might work on other platforms as well.
64
52
SHARED_LIBRARY_FLAGS='-shared'
65
- SET_EXECUTABLE_ORIGIN='-Wl,-rpath,\$$ORIGIN[ $] 1'
66
- if test "x$OPENJDK_TARGET_OS" = xlinux; then
67
- SET_EXECUTABLE_ORIGIN="$SET_EXECUTABLE_ORIGIN -Wl,--disable-new-dtags"
68
- fi
69
- SET_SHARED_LIBRARY_NAME='-Wl,-soname=[ $] 1'
70
-
71
- # arm specific settings
72
- if test "x$OPENJDK_TARGET_CPU" = "xarm"; then
73
- # '-Wl,-z,origin' isn't used on arm.
74
- SET_SHARED_LIBRARY_ORIGIN='-Wl,-rpath,\$$$$ORIGIN[ $] 1'
75
- else
76
- SET_SHARED_LIBRARY_ORIGIN="-Wl,-z,origin $SET_EXECUTABLE_ORIGIN"
77
- fi
78
53
fi
79
54
80
55
elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
81
56
SHARED_LIBRARY_FLAGS="-dll"
82
- SET_EXECUTABLE_ORIGIN=''
83
- SET_SHARED_LIBRARY_ORIGIN=''
84
- SET_SHARED_LIBRARY_NAME=''
85
57
fi
86
58
87
- AC_SUBST ( SET_EXECUTABLE_ORIGIN )
88
- AC_SUBST ( SET_SHARED_LIBRARY_ORIGIN )
89
- AC_SUBST ( SET_SHARED_LIBRARY_NAME )
90
59
AC_SUBST ( SHARED_LIBRARY_FLAGS )
91
60
] )
92
61
@@ -934,48 +903,6 @@ AC_DEFUN([FLAGS_SETUP_CFLAGS_CPU_DEP],
934
903
IF_FALSE: [ $2 FDLIBM_CFLAGS=""] )
935
904
fi
936
905
AC_SUBST ( $2 FDLIBM_CFLAGS )
937
-
938
- # Check whether the compiler supports the Arm C Language Extensions (ACLE)
939
- # for SVE. Set SVE_CFLAGS to -march=armv8-a+sve if it does.
940
- # ACLE and this flag are required to build the aarch64 SVE related functions in
941
- # libvectormath. Apple Silicon does not support SVE; use macOS as a proxy for
942
- # that check.
943
- if test "x$OPENJDK_TARGET_CPU" = "xaarch64" && test "x$OPENJDK_TARGET_OS" = "xlinux"; then
944
- if test "x$TOOLCHAIN_TYPE" = xgcc || test "x$TOOLCHAIN_TYPE" = xclang; then
945
- AC_LANG_PUSH ( C )
946
- OLD_CFLAGS="$CFLAGS"
947
- CFLAGS="$CFLAGS -march=armv8-a+sve"
948
- AC_MSG_CHECKING ( [ if Arm SVE ACLE is supported] )
949
- AC_COMPILE_IFELSE ( [ AC_LANG_PROGRAM ( [ #include <arm_sve.h>] ,
950
- [
951
- svint32_t r = svdup_n_s32(1);
952
- return 0;
953
- ] ) ] ,
954
- [
955
- AC_MSG_RESULT ( [ yes] )
956
- $2 SVE_CFLAGS="-march=armv8-a+sve"
957
- # Switching the initialization mode with gcc from 'pattern' to 'zero'
958
- # avoids the use of unsupported `__builtin_clear_padding` for variable
959
- # length aggregates
960
- if test "x$DEBUG_LEVEL" != xrelease && test "x$TOOLCHAIN_TYPE" = xgcc ; then
961
- INIT_ZERO_FLAG="-ftrivial-auto-var-init=zero"
962
- FLAGS_COMPILER_CHECK_ARGUMENTS(ARGUMENT: [ $INIT_ZERO_FLAG] ,
963
- IF_TRUE: [
964
- $2 SVE_CFLAGS="${$2 SVE_CFLAGS} $INIT_ZERO_FLAG"
965
- ]
966
- )
967
- fi
968
- ] ,
969
- [
970
- AC_MSG_RESULT ( [ no] )
971
- $2 SVE_CFLAGS=""
972
- ]
973
- )
974
- CFLAGS="$OLD_CFLAGS"
975
- AC_LANG_POP ( C )
976
- fi
977
- fi
978
- AC_SUBST ( $2 SVE_CFLAGS )
979
906
] )
980
907
981
908
AC_DEFUN_ONCE ( [ FLAGS_SETUP_BRANCH_PROTECTION] ,
0 commit comments