Skip to content

Commit

Permalink
JDK-8343186
Browse files Browse the repository at this point in the history
  • Loading branch information
MBaesken committed Oct 29, 2024
1 parent 79a07ad commit 4f356e0
Showing 1 changed file with 15 additions and 3 deletions.
18 changes: 15 additions & 3 deletions make/autoconf/lib-hsdis.m4
Original file line number Diff line number Diff line change
Expand Up @@ -266,24 +266,36 @@ 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
HSDIS_CFLAGS="-DLIBARCH_$OPENJDK_TARGET_CPU_LEGACY_LIB -I$BINUTILS_INSTALL_DIR/include"
# 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
LIBIBERTY_LIB="$BINUTILS_INSTALL_DIR/lib32/libiberty.a"
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"
Expand Down

0 comments on commit 4f356e0

Please sign in to comment.