8262501: jdk17 libjvm link failure with --as-needed and clock_gettime in librt
Co-authored-by: Matthias Klose <doko@openjdk.org> Reviewed-by: erikj
This commit is contained in:
parent
b23dbdbdb3
commit
81877f7df2
@ -108,13 +108,6 @@ AC_DEFUN([FLAGS_SETUP_LDFLAGS_HELPER],
|
|||||||
OS_LDFLAGS_JVM_ONLY="-Wl,-rpath,@loader_path/. -Wl,-rpath,@loader_path/.."
|
OS_LDFLAGS_JVM_ONLY="-Wl,-rpath,@loader_path/. -Wl,-rpath,@loader_path/.."
|
||||||
OS_LDFLAGS="-mmacosx-version-min=$MACOSX_VERSION_MIN"
|
OS_LDFLAGS="-mmacosx-version-min=$MACOSX_VERSION_MIN"
|
||||||
fi
|
fi
|
||||||
if test "x$OPENJDK_TARGET_OS" = xlinux; then
|
|
||||||
# Hotspot needs to link librt to get the clock_* functions.
|
|
||||||
# But once our supported minimum build and runtime platform
|
|
||||||
# has glibc 2.17, this can be removed as the functions are
|
|
||||||
# in libc.
|
|
||||||
OS_LDFLAGS_JVM_ONLY="-lrt"
|
|
||||||
fi
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Setup debug level-dependent LDFLAGS
|
# Setup debug level-dependent LDFLAGS
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
#
|
#
|
||||||
# Copyright (c) 2011, 2020, Oracle and/or its affiliates. All rights reserved.
|
# Copyright (c) 2011, 2021, Oracle and/or its affiliates. All rights reserved.
|
||||||
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||||
#
|
#
|
||||||
# This code is free software; you can redistribute it and/or modify it
|
# This code is free software; you can redistribute it and/or modify it
|
||||||
@ -124,6 +124,15 @@ AC_DEFUN_ONCE([LIB_SETUP_LIBRARIES],
|
|||||||
BASIC_JVM_LIBS="$BASIC_JVM_LIBS -lpthread"
|
BASIC_JVM_LIBS="$BASIC_JVM_LIBS -lpthread"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# librt for legacy clock_gettime
|
||||||
|
if test "x$OPENJDK_TARGET_OS" = xlinux; then
|
||||||
|
# Hotspot needs to link librt to get the clock_* functions.
|
||||||
|
# But once our supported minimum build and runtime platform
|
||||||
|
# has glibc 2.17, this can be removed as the functions are
|
||||||
|
# in libc.
|
||||||
|
BASIC_JVM_LIBS="$BASIC_JVM_LIBS -lrt"
|
||||||
|
fi
|
||||||
|
|
||||||
# Atomic library
|
# Atomic library
|
||||||
# 32-bit platforms needs fallback library for 8-byte atomic ops on Zero
|
# 32-bit platforms needs fallback library for 8-byte atomic ops on Zero
|
||||||
if HOTSPOT_CHECK_JVM_VARIANT(zero); then
|
if HOTSPOT_CHECK_JVM_VARIANT(zero); then
|
||||||
|
Loading…
x
Reference in New Issue
Block a user