[m-rev.] diff: Fix static linking with hwloc.
Paul Bone
pbone at csse.unimelb.edu.au
Fri Oct 14 11:24:43 AEDT 2011
Make sure hwloc works with static linking.
configure.in:
scripts/ml.in:
Determine and use the static linking options for hwloc when ml is invoked
with --static.
More robust detection of when to use the hwloc linking options is now used.
Index: configure.in
===================================================================
RCS file: /home/mercury1/repository/mercury/configure.in,v
retrieving revision 1.598
diff -u -p -b -r1.598 configure.in
--- configure.in 13 Oct 2011 02:42:20 -0000 1.598
+++ configure.in 13 Oct 2011 11:54:13 -0000
@@ -5114,6 +5114,7 @@ PKG_PROG_PKG_CONFIG
PKG_CHECK_MODULES(libhwloc, hwloc >= 1.0,
[
AC_DEFINE(MR_HAVE_HWLOC)
+ hwloc_static_libs="`pkg-config --libs --static hwloc`"
],
[
case "$LIBGRADES" in
@@ -5124,11 +5125,14 @@ PKG_CHECK_MODULES(libhwloc, hwloc >= 1.0
*)
;;
esac
+ hwloc_static_libs=""
])
HWLOC_LIBS="$libhwloc_LIBS"
HWLOC_CFLAGS="$libhwloc_CFLAGS"
+HWLOC_STATIC_LIBS="$hwloc_static_libs"
AC_SUBST(HWLOC_LIBS)
AC_SUBST(HWLOC_CFLAGS)
+AC_SUBST(HWLOC_STATIC_LIBS)
#-----------------------------------------------------------------------------#
#
Index: scripts/ml.in
===================================================================
RCS file: /home/mercury1/repository/mercury/scripts/ml.in,v
retrieving revision 1.128
diff -u -p -b -r1.128 ml.in
--- scripts/ml.in 13 Oct 2011 02:42:21 -0000 1.128
+++ scripts/ml.in 13 Oct 2011 11:54:13 -0000
@@ -51,6 +51,7 @@ LDFLAGS_FOR_TRACE="@LDFLAGS_FOR_TRACE@"
LD_LIBFLAGS_FOR_THREADS="@LD_LIBFLAGS_FOR_THREADS@"
THREAD_LIBS="@THREAD_LIBS@"
HWLOC_LIBS="@HWLOC_LIBS@"
+HWLOC_STATIC_LIBS="@HWLOC_STATIC_LIBS@"
TRACE_BASE_LIBS_SYSTEM="@TRACE_BASE_LIBS_SYSTEM@"
TMPDIR=${TMPDIR=/tmp}
@@ -371,10 +372,11 @@ case $use_thread_libs.$make_shared_lib i
THREAD_LIBS=""
;;
esac
-case "$GRADE" in
- hlc.*.par*)
+case "$thread_safe,$highlevel_code,$all_libs" in
+ true,false,static)
+ THREAD_LIBS="$THREAD_LIBS $HWLOC_STATIC_LIBS"
;;
- *.par*)
+ true,false,shared)
THREAD_LIBS="$THREAD_LIBS $HWLOC_LIBS"
;;
esac
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 490 bytes
Desc: Digital signature
URL: <http://lists.mercurylang.org/archives/reviews/attachments/20111014/20af08af/attachment.sig>
More information about the reviews
mailing list