This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

configure forces use of threads under 10.20


Under HP-UX 10.20, if configure finds pthread.h, it enables threads.
It is not possible to disable threads in this situation.  The logic
of the test is wrong.  What should be done is to disable threads if
pthread.h is not found, and to require the user to explicitly enable
threads (i.e., default is disabled).  I have included a small patch
to correct this behaviour under gcc-2.95.2.

Further work on configure is needed if the user wants to use the GNU
pth/pthread implementation in place of the HP DCE implimentation.  I
also believe that there are linking problems (i.e., specs needs to be
fixed) if --enable-shared and --enable-threads are both specified.
I haven't attempted to sort this out.

-  
J. David Anglin                                  dave.anglin@nrc.ca
National Research Council of Canada              (613) 990-0752 (FAX: 952-6605)


--- configure.in.orig	Thu Oct 28 18:23:09 1999
+++ configure.in	Thu Oct 28 18:27:23 1999
@@ -940,7 +940,7 @@
 		then
 			tm_file="${tm_file} pa/pa-gas.h"
 		fi
-		if test x$enable_threads = x; then
+		if test x$have_pthread_h = x; then
 		    enable_threads=$have_pthread_h
 		fi
  		if test x$enable_threads = xyes; then
@@ -959,7 +959,7 @@
 		then
 			tm_file="${tm_file} pa/pa-gas.h"
 		fi
-		if test x$enable_threads = x; then
+		if test x$have_pthread_h = x; then
 		    enable_threads=$have_pthread_h
 		fi
  		if test x$enable_threads = xyes; then


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]