This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: configure --disable-threads
- To: law at cygnus dot com
- Subject: Re: configure --disable-threads
- From: Steven Parkes <parkes at sierravista dot com>
- Date: Mon, 02 Nov 1998 15:02:37 -0800
- Cc: egcs at cygnus dot com
- Organization: Sierra Vista Research, Inc.
I don't see how that can be happening. Look at the case statement
immediately below the code in question.
enable_threads_flag=$enable_threads
# Check if a valid thread package
case x${enable_threads_flag} in
x | xno)
# No threads
target_thread_file='single'
;;
xyes)
# default
target_thread_file=''
;;
xdecosf1 | xirix | xmach | xos2 | xposix | xpthreads | xsingle | \
xsolaris | xwin32 | xdce | xvxworks)
target_thread_file=$enable_threads_flag
;;
*)
echo "$enable_threads is an unknown thread package" 1>&2
exit 1
;;
esac
It seems to me that without your patch x${enable_threads_flag} will expand
to "x", which should match the No threads clause. If that's not working
correctly, you need to explain why.
It does pass through those lines leaving target_thread_file as 'single'.
However, down in the configuration-specific area, under hppa1.1-*-hpux10*,
$enable_threads gets looked at again:
if test x$enable_threads = x; then
enable_threads=$have_pthread_h
fi
if test x$enable_threads = xyes; then
thread_file='dce'
tmake_file="${tmake_file} pa/t-dce-thr"
fi
The hppa code wants to let the thread package default, depending on the
environment. The configure.in code
if test x$enable_threads = xno; then
enable_threads=''
fi,
throws away the `no' too early. The way it's written, --enable-threads=no
means the same thing as --enable-threads, which I don't think is intended
semantics.
Also, do not send patches to configure, it is a generated file from
configure.in and other files.
It wasn't meant to be an applied patch, since the patch itself is rather
silly. Here it is against comfigure.in, but I'm sure that someone who
understands autoconf better than I can create a more straightfoward version.
*** configure.in.orig Mon Nov 2 14:47:28 1998
--- configure.in Mon Nov 2 15:00:01 1998
***************
*** 235,241 ****
[ --enable-threads enable thread usage for target GCC.
--enable-threads=LIB use LIB thread package for target GCC.],
if test x$enable_threads = xno; then
! enable_threads=''
fi,
enable_threads='')
--- 235,241 ----
[ --enable-threads enable thread usage for target GCC.
--enable-threads=LIB use LIB thread package for target GCC.],
if test x$enable_threads = xno; then
! enable_threads='no'
fi,
enable_threads='')