re PR libgcj/25816 (Configure detects TLS, but glibc does not support it.)

PR java/25816
	* configure.ac (enable_tls): New enable option.
	(HAVE_AS_TLS): Don't do assembler check if enable_tls set.
	* configure: Regenerate.
	* doc/install.texi (--enable-tls): Document new option.
	(--disable-tls): Ditto.

From-SVN: r110199
This commit is contained in:
David Daney 2006-01-25 00:42:17 +00:00 committed by David Daney
parent 4c8d4cf065
commit 8dea1ccafe
4 changed files with 293 additions and 132 deletions

View File

@ -1,3 +1,12 @@
2006-01-24 David Daney <ddaney@avtrex.com>
PR java/25816
* configure.ac (enable_tls): New enable option.
(HAVE_AS_TLS): Don't do assembler check if enable_tls set.
* configure: Regenerate.
* doc/install.texi (--enable-tls): Document new option.
(--disable-tls): Ditto.
2006-01-24 Richard Henderson <rth@redehat.com>
* alias.h (ALIAS_SET_MEMORY_BARRIER): New.

379
gcc/configure vendored

File diff suppressed because it is too large Load Diff

View File

@ -679,6 +679,17 @@ AC_ARG_ENABLE(threads,
--enable-threads=LIB use LIB thread package for target GCC],,
[enable_threads=''])
AC_ARG_ENABLE(tls,
[ --enable-tls enable or disable generation of tls code
overriding the assembler check for tls support],
[
case $enable_tls in
yes | no) ;;
*) AC_MSG_ERROR(['$enable_tls' is an invalid value for --enable-tls.
Valid choices are 'yes' and 'no'.]) ;;
esac
], [enable_tls=''])
AC_ARG_ENABLE(objc-gc,
[ --enable-objc-gc enable the use of Boehm's garbage collector with
the GNU Objective-C runtime],
@ -2531,13 +2542,21 @@ foo: .long 25
;;
changequote([,])dnl
esac
if test -z "$tls_first_major"; then
set_have_as_tls=no
if test "x$enable_tls" = xno ; then
: # TLS explicitly disabled.
elif test "x$enable_tls" = xyes ; then
set_have_as_tls=yes # TLS explicitly enabled.
elif test -z "$tls_first_major"; then
: # If we don't have a check, assume no support.
else
gcc_GAS_CHECK_FEATURE(thread-local storage support, gcc_cv_as_tls,
[$tls_first_major,$tls_first_minor,0], [$tls_as_opt], [$conftest_s],,
[AC_DEFINE(HAVE_AS_TLS, 1,
[Define if your assembler supports thread-local storage.])])
[set_have_as_tls=yes])
fi
if test $set_have_as_tls = yes ; then
AC_DEFINE(HAVE_AS_TLS, 1,
[Define if your assembler supports thread-local storage.])
fi
# Target-specific assembler checks.

View File

@ -945,6 +945,18 @@ Microsoft Win32 API thread support.
Novell Kernel Services thread support.
@end table
@item --enable-tls
Specify that the target supports TLS (Thread Local Storage). Usually
configure can correctly determine if TLS is supported. In cases where
it guesses incorrectly, TLS can be explicitly enabled or disabled with
@option{--enable-tls} or @option{--disable-tls}. This can happen if
the assembler supports TLS but the C library does not, or if the
assumptions made by the configure test are incorrect.
@item --disable-tls
Specify that the target does not support TLS.
This is an alias for @option{--enable-tls=no}.
@item --with-cpu=@var{cpu}
Specify which cpu variant the compiler should generate code for by default.
@var{cpu} will be used as the default value of the @option{-mcpu=} switch.