Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions make/autoconf/flags-cflags.m4
Original file line number Diff line number Diff line change
Expand Up @@ -546,9 +546,9 @@ AC_DEFUN([FLAGS_SETUP_CFLAGS_HELPER],
# reduce lib size on linux in link step, this needs also special compile flags
# do this on s390x also for libjvm (where serviceability agent is not supported)
if test "x$ENABLE_LINKTIME_GC" = xtrue; then
TOOLCHAIN_CFLAGS_JDK="$TOOLCHAIN_CFLAGS_JDK -ffunction-sections -fdata-sections"
TOOLCHAIN_CFLAGS_JDK="$TOOLCHAIN_CFLAGS_JDK -ffunction-sections -DUSE_FUNCTION_SECTIONS -fdata-sections"
if test "x$OPENJDK_TARGET_CPU" = xs390x && test "x$DEBUG_LEVEL" == xrelease; then
TOOLCHAIN_CFLAGS_JVM="$TOOLCHAIN_CFLAGS_JVM -ffunction-sections -fdata-sections"
TOOLCHAIN_CFLAGS_JVM="$TOOLCHAIN_CFLAGS_JVM -ffunction-sections -DUSE_FUNCTION_SECTIONS -fdata-sections"
fi
fi
# technically NOT for CXX (but since this gives *worse* performance, use
Expand Down Expand Up @@ -579,8 +579,8 @@ AC_DEFUN([FLAGS_SETUP_CFLAGS_HELPER],
fi

if test "x$ENABLE_LINKTIME_GC" = xtrue; then
TOOLCHAIN_CFLAGS_JDK="$TOOLCHAIN_CFLAGS_JDK -ffunction-sections -fdata-sections"
TOOLCHAIN_CFLAGS_JVM="$TOOLCHAIN_CFLAGS_JVM -ffunction-sections -fdata-sections"
TOOLCHAIN_CFLAGS_JDK="$TOOLCHAIN_CFLAGS_JDK -ffunction-sections -DUSE_FUNCTION_SECTIONS -fdata-sections"
TOOLCHAIN_CFLAGS_JVM="$TOOLCHAIN_CFLAGS_JVM -ffunction-sections -DUSE_FUNCTION_SECTIONS -fdata-sections"
fi

if test "x$OPENJDK_TARGET_OS" = xaix; then
Expand Down
2 changes: 2 additions & 0 deletions test/hotspot/gtest/runtime/test_os_linux.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -401,7 +401,9 @@ TEST_VM(os_linux, decoder_get_source_info_valid) {
int line = -1;
address valid_function_pointer = (address)ReportJNIFatalError;
ASSERT_TRUE(Decoder::get_source_info(valid_function_pointer, buf, sizeof(buf), &line));
#if !defined(USE_FUNCTION_SECTIONS)
EXPECT_STREQ(buf, "jniCheck.hpp");
#endif
ASSERT_TRUE(line > 0);
}

Expand Down