Don't set the rpath when linking statically (#4125)

This commit is contained in:
Jouke Witteveen 2024-03-13 16:03:21 +01:00 committed by GitHub
parent ca4db46c5a
commit cfb1c798b9
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 53 additions and 53 deletions

View File

@ -327,27 +327,27 @@ if test "x$do_link" = "xyes"; then
fi
link_args="$link_args -L${libdir}"
case "$kind" in
gcc|linux*)
# MacOS X doesn't support the "-Wl,-rpath -Wl," style of linker flags.
# It appears to want none of them specified.
case "$host_os" in
darwin*) flag="" ;;
*) flag="-Wl,-rpath -Wl," ;;
esac
;;
hpux*) flag="-Wl,+b -Wl," ;;
freebsd*|solaris*) flag="-R" ;;
rs6000*|aix*) flag="-L" ;;
sgi) flag="-rpath " ;;
*) flag="" ;;
esac
if test "x$USE_SHARED_LIB" = "xyes"; then
case "$kind" in
gcc|linux*)
# MacOS X doesn't support the "-Wl,-rpath -Wl," style of linker flags.
# It appears to want none of them specified.
case "$host_os" in
darwin*) flag="" ;;
*) flag="-Wl,-rpath -Wl," ;;
esac
;;
hpux*) flag="-Wl,+b -Wl," ;;
freebsd*|solaris*) flag="-R" ;;
rs6000*|aix*) flag="-L" ;;
sgi) flag="-rpath " ;;
*) flag="" ;;
esac
if test -n "$flag"; then
shared_link="${flag}${libdir}"
fi
if test "x$USE_SHARED_LIB" != "xyes"; then
if test -n "$flag"; then
shared_link="${flag}${libdir}"
fi
else
# The "-lhdf5" & "-lhdf5_hl" flags are in here already...This is a static
# compile though, so change it to the static version (.a) of the library.
new_libraries=""

View File

@ -314,27 +314,27 @@ if test "x$do_link" = "xyes"; then
fi
link_args="$link_args -L${libdir}"
case "$kind" in
gcc|linux*)
# MacOS X doesn't support the "-Wl,-rpath -Wl," style of linker flags.
# It appears to want none of them specified.
case "$host_os" in
darwin*) flag="" ;;
*) flag="-Wl,-rpath -Wl," ;;
esac
;;
hpux*) flag="-Wl,+b -Wl," ;;
freebsd*|solaris*) flag="-R" ;;
rs6000*|aix*) flag="-L" ;;
sgi) flag="-rpath " ;;
*) flag="" ;;
esac
if test "x$USE_SHARED_LIB" = "xyes"; then
case "$kind" in
gcc|linux*)
# MacOS X doesn't support the "-Wl,-rpath -Wl," style of linker flags.
# It appears to want none of them specified.
case "$host_os" in
darwin*) flag="" ;;
*) flag="-Wl,-rpath -Wl," ;;
esac
;;
hpux*) flag="-Wl,+b -Wl," ;;
freebsd*|solaris*) flag="-R" ;;
rs6000*|aix*) flag="-L" ;;
sgi) flag="-rpath " ;;
*) flag="" ;;
esac
if test -n "$flag"; then
shared_link="${flag}${libdir}"
fi
if test "x$USE_SHARED_LIB" != "xyes"; then
if test -n "$flag"; then
shared_link="${flag}${libdir}"
fi
else
# The "-lhdf5" & "-lhdf5_hl" flags are in here already...This is a static
# compile though, so change it to the static version (.a) of the library.
new_libraries=""

View File

@ -308,20 +308,20 @@ if test "x$do_link" = "xyes"; then
fi
link_args="$link_args -L${libdir}"
case "$host_os" in
linux*) flag="@fortran_linux_linker_option@-rpath -Wl," ;;
hpux*) flag="-Wl,+b -Wl," ;;
freebsd*|solaris*) flag="-R" ;;
rs6000*|aix*) flag="-L" ;;
sgi) flag="-rpath " ;;
*) flag="" ;;
esac
if test "x$USE_SHARED_LIB" = "xyes"; then
case "$host_os" in
linux*) flag="@fortran_linux_linker_option@-rpath -Wl," ;;
hpux*) flag="-Wl,+b -Wl," ;;
freebsd*|solaris*) flag="-R" ;;
rs6000*|aix*) flag="-L" ;;
sgi) flag="-rpath " ;;
*) flag="" ;;
esac
if test -n "$flag"; then
shared_link="${flag}${libdir}"
fi
if test "x$USE_SHARED_LIB" != "xyes"; then
if test -n "$flag"; then
shared_link="${flag}${libdir}"
fi
else
# The hdf5 library "-l" flags are in here already. This is a static
# compile though, so change it to the static versions (.a) of the libraries.
new_libraries=""