36 # For any of the variants server, client or minimal, the dir matches the
37 # variant name. The "main" variant should be used for linking. For the
38 # rest, the dir is just server.
39 if HOTSPOT_CHECK_JVM_VARIANT(server) || HOTSPOT_CHECK_JVM_VARIANT(client) \
40 || HOTSPOT_CHECK_JVM_VARIANT(minimal); then
41 TARGET_JVM_VARIANT_PATH=$JVM_VARIANT_MAIN
42 else
43 TARGET_JVM_VARIANT_PATH=server
44 fi
45 FLAGS_SETUP_LDFLAGS_CPU_DEP([TARGET])
46
47 # Setup the build toolchain
48
49 # When building a buildjdk, it's always only the server variant
50 BUILD_JVM_VARIANT_PATH=server
51
52 FLAGS_SETUP_LDFLAGS_CPU_DEP([BUILD], [OPENJDK_BUILD_])
53
54 LDFLAGS_TESTEXE="${TARGET_LDFLAGS_JDK_LIBPATH}"
55 AC_SUBST(LDFLAGS_TESTEXE)
56 ])
57
58 ################################################################################
59
60 # CPU independent LDFLAGS setup, used for both target and build toolchain.
61 AC_DEFUN([FLAGS_SETUP_LDFLAGS_HELPER],
62 [
63 # Setup basic LDFLAGS
64 if test "x$TOOLCHAIN_TYPE" = xgcc; then
65 # If this is a --hash-style=gnu system, use --hash-style=both, why?
66 # We have previously set HAS_GNU_HASH if this is the case
67 if test -n "$HAS_GNU_HASH"; then
68 BASIC_LDFLAGS="-Wl,--hash-style=both"
69 LIBJSIG_HASHSTYLE_LDFLAGS="-Wl,--hash-style=both"
70 fi
71
72 # Add -z,defs, to forbid undefined symbols in object files.
73 # add -z,relro (mark relocations read only) for all libs
74 # add -z,now ("full relro" - more of the Global Offset Table GOT is marked read only)
75 BASIC_LDFLAGS="$BASIC_LDFLAGS -Wl,-z,defs -Wl,-z,relro -Wl,-z,now"
|
36 # For any of the variants server, client or minimal, the dir matches the
37 # variant name. The "main" variant should be used for linking. For the
38 # rest, the dir is just server.
39 if HOTSPOT_CHECK_JVM_VARIANT(server) || HOTSPOT_CHECK_JVM_VARIANT(client) \
40 || HOTSPOT_CHECK_JVM_VARIANT(minimal); then
41 TARGET_JVM_VARIANT_PATH=$JVM_VARIANT_MAIN
42 else
43 TARGET_JVM_VARIANT_PATH=server
44 fi
45 FLAGS_SETUP_LDFLAGS_CPU_DEP([TARGET])
46
47 # Setup the build toolchain
48
49 # When building a buildjdk, it's always only the server variant
50 BUILD_JVM_VARIANT_PATH=server
51
52 FLAGS_SETUP_LDFLAGS_CPU_DEP([BUILD], [OPENJDK_BUILD_])
53
54 LDFLAGS_TESTEXE="${TARGET_LDFLAGS_JDK_LIBPATH}"
55 AC_SUBST(LDFLAGS_TESTEXE)
56 AC_SUBST(ADLC_LDFLAGS)
57 ])
58
59 ################################################################################
60
61 # CPU independent LDFLAGS setup, used for both target and build toolchain.
62 AC_DEFUN([FLAGS_SETUP_LDFLAGS_HELPER],
63 [
64 # Setup basic LDFLAGS
65 if test "x$TOOLCHAIN_TYPE" = xgcc; then
66 # If this is a --hash-style=gnu system, use --hash-style=both, why?
67 # We have previously set HAS_GNU_HASH if this is the case
68 if test -n "$HAS_GNU_HASH"; then
69 BASIC_LDFLAGS="-Wl,--hash-style=both"
70 LIBJSIG_HASHSTYLE_LDFLAGS="-Wl,--hash-style=both"
71 fi
72
73 # Add -z,defs, to forbid undefined symbols in object files.
74 # add -z,relro (mark relocations read only) for all libs
75 # add -z,now ("full relro" - more of the Global Offset Table GOT is marked read only)
76 BASIC_LDFLAGS="$BASIC_LDFLAGS -Wl,-z,defs -Wl,-z,relro -Wl,-z,now"
|