1.1 --- a/common/autoconf/toolchain.m4 Wed Nov 28 13:40:17 2012 +0100 1.2 +++ b/common/autoconf/toolchain.m4 Wed Nov 28 13:48:36 2012 +0100 1.3 @@ -941,9 +941,11 @@ 1.4 -L${JDK_OUTPUTDIR}/lib${OPENJDK_TARGET_CPU_LIBDIR}" 1.5 1.6 # On some platforms (mac) the linker warns about non existing -L dirs. 1.7 - # Only add client dir if client is being built. Otherwise server should 1.8 - # be enough 1.9 - if test "x$JVM_VARIANT_CLIENT" = xtrue; then 1.10 + # Add server first if available. Linking aginst client does not always produce the same results. 1.11 + # Only add client dir if client is being built. Default to server for other variants. 1.12 + if test "x$JVM_VARIANT_SERVER" = xtrue; then 1.13 + LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${JDK_OUTPUTDIR}/lib${OPENJDK_TARGET_CPU_LIBDIR}/server" 1.14 + elif test "x$JVM_VARIANT_CLIENT" = xtrue; then 1.15 LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${JDK_OUTPUTDIR}/lib${OPENJDK_TARGET_CPU_LIBDIR}/client" 1.16 else 1.17 LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${JDK_OUTPUTDIR}/lib${OPENJDK_TARGET_CPU_LIBDIR}/server"