Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Don't set the rpath when linking statically #4125

Merged
merged 1 commit into from
Mar 13, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
42 changes: 21 additions & 21 deletions bin/h5cc.in
Original file line number Diff line number Diff line change
Expand Up @@ -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 -n "$flag"; then
shared_link="${flag}${libdir}"
fi

if test "x$USE_SHARED_LIB" != "xyes"; then
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
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=""
Expand Down
42 changes: 21 additions & 21 deletions c++/src/h5c++.in
Original file line number Diff line number Diff line change
Expand Up @@ -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 -n "$flag"; then
shared_link="${flag}${libdir}"
fi

if test "x$USE_SHARED_LIB" != "xyes"; then
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
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=""
Expand Down
28 changes: 14 additions & 14 deletions fortran/src/h5fc.in
Original file line number Diff line number Diff line change
Expand Up @@ -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 -n "$flag"; then
shared_link="${flag}${libdir}"
fi

if test "x$USE_SHARED_LIB" != "xyes"; then
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
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=""
Expand Down
Loading