This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
PATCH: Update --enable-threads (early configuration-time checking)
- To: gcc-patches at gcc dot gnu dot org
- Subject: PATCH: Update --enable-threads (early configuration-time checking)
- From: Loren James Rittle <rittle at latour dot rsch dot comm dot mot dot com>
- Date: Fri, 15 Jun 2001 18:37:31 -0500 (CDT)
- Reply-to: rittle at labs dot mot dot com
First of all, we remove the alias from --enable-threads=pthreads to
--enable-threads=posix. It is confusing when only 3 platforms support
the alias in an ad hoc fashion. The early configuration check and
halt ensures that our user base will not waste a lot of time on this
deprecation (and it will catch more cases for people that wouldn't
find out about a bad configuration until libgcc2 was being built).
This first change means that there is now a one-to-one correspondence
between the optional parameter to --enable-threads and gthr-*.h
configuration files. Since it appears that we were somewhat lax in
updating config.gcc, I propose: second, we make the check dynamic
against the actual files found to exist.
This patch improves handling of --enable-threads before config.gcc is
parsed. A related patch will address improvements available after
target-specific process has occurred. Another incremental patch will
tidy up config.gcc (in particular remove support for pthread alias).
Rebuilt and tested by checking various configurations by hand. In
particular, on both solaris2.7 and freebsd4.2: --enable-threads,
--enable-threads=pthreads, --enable-threads=XXX,
--enable-threads=posix
Documentation change tested by running install.texi2html and
inspecting HTML.
This one needs approval or rejection since I am beginning to attempt
to improve the situation instead of merely documenting the status quo.
Regards,
Loren
2001-06-15 Loren J. Rittle <ljrittle@acm.org>
* configure.in (enable_threads_flag case statement): Deprecate
pthreads alias to posix with fatal configuration-time error
which explains the situation and what to do.
Use dynamic check for the existence of a gthr-*.h file.
* configure: Rebuilt.
* doc/install.texi: Update --enable-threads to match post-3.0 reality.
Index: configure.in
===================================================================
RCS file: /cvs/gcc/egcs/gcc/configure.in,v
retrieving revision 1.531
diff -c -r1.531 configure.in
*** configure.in 2001/06/13 03:10:43 1.531
--- configure.in 2001/06/15 23:09:51
***************
*** 288,300 ****
# default
target_thread_file=''
;;
! xdecosf1 | xirix | xmach | xos2 | xposix | xpthreads | xsingle | \
! xsolaris | xwin32 | xdce | xvxworks | xaix)
! target_thread_file=$enable_threads_flag
;;
*)
! echo "$enable_threads is an unknown thread package" 1>&2
! exit 1
;;
esac
--- 288,309 ----
# default
target_thread_file=''
;;
! xpthreads)
! echo "pthreads used to be an alias for posix on selected" 1>&2
! echo "platforms. In support of option regularization" 1>&2
! echo "across platforms, please use --enable-threads=posix" 1>&2
! exit 1
;;
*)
! # Since the list of valid threading configurations must
! # match the actual gthr-*.h files shipped with gcc,
! # we now do the check dynamically.
! if test -f ${srcdir}/gthr-${enable_threads_flag}.h; then
! target_thread_file=$enable_threads_flag
! else
! echo "$enable_threads is an unknown thread package" 1>&2
! exit 1
! fi
;;
esac
Index: doc/install.texi
===================================================================
RCS file: /cvs/gcc/egcs/gcc/doc/install.texi,v
retrieving revision 1.29
diff -c -r1.29 install.texi
*** install.texi 2001/06/15 22:25:18 1.29
--- install.texi 2001/06/15 23:28:01
***************
*** 476,493 ****
AIX thread support.
@item dce
DCE thread support.
- @item mach
- Generic MACH thread support, known to work on NEXTSTEP. (Please note
- that the file needed to support this configuration, @file{gthr-mach.h}, is
- missing and thus this setting will cause a known bootstrap failure.)
@item no
This is an alias for @samp{single}.
@item posix
Generic POSIX thread support.
- @item pthreads
- Same as @samp{posix} on arm*-*-linux*, *-*-chorusos* and *-*-freebsd*
- only. A future release of gcc might remove this alias or extend it
- to all platforms.
@item rtems
RTEMS thread support.
@item single
--- 476,485 ----