--- a/make/autoconf/flags-ldflags.m4~ Mon Apr 13 14:19:55 2020 +++ b/make/autoconf/flags-ldflags.m4 Mon Apr 13 14:34:10 2020 @@ -81,7 +81,11 @@ BASIC_LDFLAGS="$BASIC_LDFLAGS -Wl,--gc-sections" fi - BASIC_LDFLAGS_JVM_ONLY="-Wl,-O1" + if test "x$OPENJDK_TARGET_OS" = xsolaris; then + BASIC_LDFLAGS_JVM_ONLY="" + else + BASIC_LDFLAGS_JVM_ONLY="-Wl,-O1" + fi elif test "x$TOOLCHAIN_TYPE" = xclang; then BASIC_LDFLAGS_JVM_ONLY="-mno-omit-leaf-frame-pointer -mstack-alignment=16 \