diff --git a/make/autoconf/lib-hsdis.m4 b/make/autoconf/lib-hsdis.m4 index bd78768d03e..a4d2c5f81f3 100644 --- a/make/autoconf/lib-hsdis.m4 +++ b/make/autoconf/lib-hsdis.m4 @@ -266,8 +266,10 @@ AC_DEFUN([LIB_SETUP_HSDIS_BINUTILS], HSDIS_CFLAGS="-DLIBARCH_$OPENJDK_TARGET_CPU_LEGACY_LIB" elif test "x$BINUTILS_INSTALL_DIR" != x; then disasm_header="\"$BINUTILS_INSTALL_DIR/include/dis-asm.h\"" - if test -e $BINUTILS_INSTALL_DIR/lib/libbfd.a && \ - test -e $BINUTILS_INSTALL_DIR/lib/libopcodes.a && \ + if (test -e $BINUTILS_INSTALL_DIR/lib/libbfd.a || \ + test -e $BINUTILS_INSTALL_DIR/lib64/libbfd.a) && \ + (test -e $BINUTILS_INSTALL_DIR/lib/libopcodes.a || \ + test -e $BINUTILS_INSTALL_DIR/lib64/libopcodes.a) && \ (test -e $BINUTILS_INSTALL_DIR/lib/libiberty.a || \ test -e $BINUTILS_INSTALL_DIR/lib64/libiberty.a || \ test -e $BINUTILS_INSTALL_DIR/lib32/libiberty.a); then @@ -275,7 +277,19 @@ AC_DEFUN([LIB_SETUP_HSDIS_BINUTILS], # libiberty ignores --libdir and may be installed in $BINUTILS_INSTALL_DIR/lib, $BINUTILS_INSTALL_DIR/lib32 # or $BINUTILS_INSTALL_DIR/lib64, depending on system setup + LIBOPCODES_LIB="" + LIBBFD_LIB="" LIBIBERTY_LIB="" + if test -e $BINUTILS_INSTALL_DIR/lib/libbfd.a; then + LIBBFD_LIB="$BINUTILS_INSTALL_DIR/lib/libbfd.a" + else + LIBBFD_LIB="$BINUTILS_INSTALL_DIR/lib64/libbfd.a" + fi + if test -e $BINUTILS_INSTALL_DIR/lib/libopcodes.a; then + LIBOPCODES_LIB="$BINUTILS_INSTALL_DIR/lib/libopcodes.a" + else + LIBOPCODES_LIB="$BINUTILS_INSTALL_DIR/lib64/libopcodes.a" + fi if test -e $BINUTILS_INSTALL_DIR/lib/libiberty.a; then LIBIBERTY_LIB="$BINUTILS_INSTALL_DIR/lib/libiberty.a" elif test -e $BINUTILS_INSTALL_DIR/lib32/libiberty.a; then @@ -283,7 +297,7 @@ AC_DEFUN([LIB_SETUP_HSDIS_BINUTILS], else LIBIBERTY_LIB="$BINUTILS_INSTALL_DIR/lib64/libiberty.a" fi - HSDIS_LIBS="$BINUTILS_INSTALL_DIR/lib/libbfd.a $BINUTILS_INSTALL_DIR/lib/libopcodes.a $LIBIBERTY_LIB" + HSDIS_LIBS="$LIBBFD_LIB $LIBOPCODES_LIB $LIBIBERTY_LIB" # If we have libsframe add it. if test -e $BINUTILS_INSTALL_DIR/lib/libsframe.a; then HSDIS_LIBS="$HSDIS_LIBS $BINUTILS_INSTALL_DIR/lib/libsframe.a"