[m-dev.] for review: add threads options to ml
Simon Taylor
stayl at cs.mu.OZ.AU
Fri Apr 7 11:22:34 AEST 2000
> So it looks like (a) my change to scripts/ml.in was not correct
> and (b) there is a problem with the static pthread libraries on murlibobo.
>
> I suggest you fix (a) by undoing my change to scripts/ml.in.
> (b) is not our fault, and for now we can probably just ignore it.
I've just committed this change.
Simon.
Index: ml.in
===================================================================
RCS file: /home/mercury1/repository/mercury/scripts/ml.in,v
retrieving revision 1.76
diff -u -u -r1.76 ml.in
--- ml.in 2000/02/07 07:40:15 1.76
+++ ml.in 2000/04/07 01:16:03
@@ -74,6 +74,7 @@
make_shared_lib=false
leave_shlib_dirs_relative=false
user_shlib_dirs=""
+use_thread_libs=false
# include the file `init_grade_options.sh-subr'
@INIT_GRADE_OPTIONS@
@@ -148,6 +149,12 @@
-g, --c-debug, --no-strip
Do not strip C debugging information.
+Threads options:
+ --use-thread-libs
+ Link with the POSIX thread libraries. This option is useful
+ if a C library being linked with uses threads, but the
+ Mercury code being linked doesn't.
+
$grade_usage"
while : ; do
@@ -270,6 +277,13 @@
user_shlib_dirs="$user_shlib_dirs $dir"
;;
+ --use-thread-libs)
+ use_thread_libs=true
+ ;;
+ --no-use-thread-libs)
+ use_thread_libs=false
+ ;;
+
# include the file `parse_grade_options.sh-subr'
@PARSE_GRADE_OPTIONS@
@@ -464,14 +478,14 @@
false) STRIP_OPTS="" ;;
esac
-case $thread_safe in
+case $thread_safe in true)
+ use_thread_libs=true ;;
+esac
+
+case $use_thread_libs in
true)
case "$FULLARCH" in
- *-osf*) # Older versions of OSF may require
- # "-lpthreads -lc_r" (?), but at least
- # for OSF 3.2, no special libraries are
- # needed.
- THREAD_LIBS="" ;;
+ *-osf*) THREAD_LIBS="-lpthreads -lmach -lc_r" ;;
*-linux*) THREAD_LIBS="-lpthread" ;;
*-solaris*) THREAD_LIBS="-lpthread -ldl" ;;
*) echo "$0: warning: don't know which" \
--------------------------------------------------------------------------
mercury-developers mailing list
Post messages to: mercury-developers at cs.mu.oz.au
Administrative Queries: owner-mercury-developers at cs.mu.oz.au
Subscriptions: mercury-developers-request at cs.mu.oz.au
--------------------------------------------------------------------------
More information about the developers
mailing list