summaryrefslogtreecommitdiff
path: root/hints/dec_osf.sh
diff options
context:
space:
mode:
authorJarkko Hietaniemi <jhi@iki.fi>2003-03-29 07:23:00 +0000
committerJarkko Hietaniemi <jhi@iki.fi>2003-03-29 07:23:00 +0000
commit700a71f52a8b687cd8507393838281605745411c (patch)
treebf77bc706b24f1e6a18383628bb3e26c0bc5e17a /hints/dec_osf.sh
parent5c501b37d7fe83b36852f8ad910f17d67e792406 (diff)
downloadperl-700a71f52a8b687cd8507393838281605745411c.tar.gz
It seems that in Tru64 V5 gcc cannot be used to
compile a threaded Perl because <pthread.h> explicitly checks for supported compilers (gcc not being one of them). This is not so bad since the system C compiler is always there. p4raw-id: //depot/perl@19078
Diffstat (limited to 'hints/dec_osf.sh')
-rw-r--r--hints/dec_osf.sh25
1 files changed, 24 insertions, 1 deletions
diff --git a/hints/dec_osf.sh b/hints/dec_osf.sh
index 5b15fade2f..f08c318b89 100644
--- a/hints/dec_osf.sh
+++ b/hints/dec_osf.sh
@@ -303,9 +303,32 @@ cat > UU/usethreads.cbu <<'EOCBU'
# after it has prompted the user for whether to use threads.
case "$usethreads" in
$define|true|[yY]*)
+ # In Tru64 V5 (at least V5.1A, V5.1B) gcc (at least 3.2.2)
+ # cannot be used to compile a threaded Perl.
+ cat > pthread.c <<EOF
+#include <pthread.h>
+extern int foo;
+EOF
+ $cc -c pthread.c 2> pthread.err
+ if grep -q "unrecognized compiler" pthread.err; then
+ cat >&4 <<EOF
+***
+*** I'm sorry but your C compiler ($cc) cannot be used to
+*** compile Perl with threads. The system C compiler should work.
+***
+
+Cannot continue, aborting.
+
+EOF
+ rm -f pthread.*
+ exit 1
+ fi
+ rm -f pthread.*
# Threads interfaces changed with V4.0.
case "$isgcc" in
- gcc) ccflags="-D_REENTRANT $ccflags" ;;
+ gcc)
+ ccflags="-D_REENTRANT $ccflags"
+ ;;
*) case "`uname -r`" in
*[123].*) ccflags="-threads $ccflags" ;;
*) ccflags="-pthread $ccflags" ;;