diff options
author | Paolo Bonzini <bonzini@gnu.org> | 2007-02-09 19:24:42 +0000 |
---|---|---|
committer | Paolo Bonzini <bonzini@gnu.org> | 2007-02-09 19:24:42 +0000 |
commit | a0323144817d7f468e6196af06fabfaae79869c3 (patch) | |
tree | a9e29534fe4149c52eddccf20734e4cff5d2998b /config | |
parent | 534d31192cc13e0a786f5357aed310770bcb1f58 (diff) | |
download | gdb-a0323144817d7f468e6196af06fabfaae79869c3.zip gdb-a0323144817d7f468e6196af06fabfaae79869c3.tar.gz gdb-a0323144817d7f468e6196af06fabfaae79869c3.tar.bz2 |
2007-02-09 Paolo Bonzini <bonzini@gnu.org>
* Makefile.def: Sync with GCC.
* Makefile.tpl: Sync with GCC.
* Makefile.in: Regenerate.
* configure: Regenerate.
* config/acx.m4: Sync with GCC.
* config/depstand.m4: Sync with GCC.
* config/tls.m4: Sync with GCC.
Diffstat (limited to 'config')
-rw-r--r-- | config/ChangeLog | 22 | ||||
-rw-r--r-- | config/acx.m4 | 36 | ||||
-rw-r--r-- | config/depstand.m4 | 5 | ||||
-rw-r--r-- | config/tls.m4 | 59 |
4 files changed, 112 insertions, 10 deletions
diff --git a/config/ChangeLog b/config/ChangeLog index 99107af..aee290a 100644 --- a/config/ChangeLog +++ b/config/ChangeLog @@ -3,9 +3,27 @@ * acx.m4 (ACX_CHECK_INSTALLED_TARGET_TOOL): Avoid AC_PATH_PROG with an empty path. -2007-02-05 Dave Brolley <brolley@redhat.com> +2007-02-07 Bruno Haible <bruno@clisp.org> - * mt-mep: New. + PR libgomp/28468 + * config/tls.m4 (GCC_CHECK_TLS): Also check whether the libc supports + TLS via __thread. + +2007-01-31 Daniel Franke <franke.daniel@gmail.com> + + PR libgomp/30546 + * acx.m4 (ACX_PROG_CHECK_VER): Locate a program and check that its + version is acceptable. + +2007-01-27 Paolo Bonzini <bonzini@gnu.org> + + * depstand.m4 (ZW_CREATE_DEPDIR): Use mkinstalldirs to make + directory. + +2007-01-23 Richard Guenther <rguenther@suse.de> + + PR bootstrap/30541 + * config/acx.m4 (ACX_PROG_GNAT): Check for gnatmake. 2007-01-14 H.J. Lu <hongjiu.lu@intel.com> diff --git a/config/acx.m4 b/config/acx.m4 index 5712ab2..107fd76 100644 --- a/config/acx.m4 +++ b/config/acx.m4 @@ -330,11 +330,12 @@ ac_c_preproc_warn_flag=yes])# AC_PROG_CPP_WERROR # understands Ada. We use the user's CC setting, already found. # # Sets the shell variable have_gnat to yes or no as appropriate, and -# substitutes GNATBIND. +# substitutes GNATBIND and GNATMAKE. AC_DEFUN([ACX_PROG_GNAT], [AC_REQUIRE([AC_CHECK_TOOL_PREFIX]) AC_REQUIRE([AC_PROG_CC]) AC_CHECK_TOOL(GNATBIND, gnatbind, no) +AC_CHECK_TOOL(GNATMAKE, gnatmake, no) AC_CACHE_CHECK([whether compiler driver understands Ada], acx_cv_cc_gcc_supports_ada, [cat >conftest.adb <<EOF @@ -355,7 +356,7 @@ if test x"$errors" = x && test -f conftest.$ac_objext; then fi rm -f conftest.*]) -if test x$GNATBIND != xno && test x$acx_cv_cc_gcc_supports_ada != xno; then +if test x$GNATBIND != xno && test x$GNATMAKE != xno && test x$acx_cv_cc_gcc_supports_ada != xno; then have_gnat=yes else have_gnat=no @@ -490,3 +491,34 @@ else fi fi AC_SUBST($2)]) + + +dnl Locate a program and check that its version is acceptable. +dnl ACX_PROG_CHECK_VER(var, name, version-switch, +dnl version-extract-regexp, version-glob) +AC_DEFUN([ACX_CHECK_PROG_VER],[ + AC_CHECK_PROG([$1], [$2], [$2]) + if test -n "[$]$1"; then + # Found it, now check the version. + AC_CACHE_CHECK([for modern $2], + [gcc_cv_prog_$2_modern], + [ac_prog_version=`eval [$]$1 $3 2>&1 | + sed -n 's/^.*patsubst([[$4]],/,\/).*$/\1/p'` + + [case $ac_prog_version in + '') gcc_cv_prog_$2_modern=no;; + $5) gcc_cv_prog_$2_modern=yes;; + *) gcc_cv_prog_$2_modern=no;; + esac] + + if test $gcc_cv_prog_$2_modern = no; then + $1="${CONFIG_SHELL-/bin/sh} $ac_aux_dir/missing $2" + fi + ]) + else + gcc_cv_prog_$2_modern=no + fi + if test $gcc_cv_prog_$2_modern = no; then + $1="${CONFIG_SHELL-/bin/sh} $ac_aux_dir/missing $2" + fi +]) diff --git a/config/depstand.m4 b/config/depstand.m4 index 8f936e0..beaf2cc 100644 --- a/config/depstand.m4 +++ b/config/depstand.m4 @@ -1,6 +1,6 @@ ## -*- Autoconf -*- -# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005 +# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2007 # Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation @@ -132,5 +132,6 @@ AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl # As AM_SET_DEPDIR, but also create the directory at config.status time. AC_DEFUN([ZW_CREATE_DEPDIR], [AC_REQUIRE([AM_SET_DEPDIR])dnl -AC_CONFIG_COMMANDS([depdir], [mkdir $DEPDIR], [DEPDIR=$DEPDIR]) +AC_CONFIG_COMMANDS([depdir], [$SHELL $ac_aux_dir/mkinstalldirs $DEPDIR], + [ac_aux_dir=$ac_aux_dir DEPDIR=$DEPDIR]) ]) diff --git a/config/tls.m4 b/config/tls.m4 index 41f11ab..c8f3ff0 100644 --- a/config/tls.m4 +++ b/config/tls.m4 @@ -7,16 +7,67 @@ AC_DEFUN([GCC_CHECK_TLS], [ [dnl If the test case passed with dynamic linking, try again with dnl static linking, but only if static linking is supported (not dnl on Solaris 10). This fails with some older Red Hat releases. - save_LDFLAGS="$LDFLAGS" + chktls_save_LDFLAGS="$LDFLAGS" LDFLAGS="-static $LDFLAGS" AC_LINK_IFELSE([int main() { return 0; }], AC_RUN_IFELSE([__thread int a; int b; int main() { return a = b; }], [have_tls=yes], [have_tls=no],[]), [have_tls=yes]) - LDFLAGS="$save_LDFLAGS"], + LDFLAGS="$chktls_save_LDFLAGS" + if test $have_tls = yes; then + dnl So far, the binutils and the compiler support TLS. + dnl Also check whether the libc supports TLS, i.e. whether a variable + dnl with __thread linkage has a different address in different threads. + dnl First, find the thread_CFLAGS necessary for linking a program that + dnl calls pthread_create. + chktls_save_CFLAGS="$CFLAGS" + thread_CFLAGS=failed + for flag in '' '-pthread' '-lpthread'; do + CFLAGS="$flag $chktls_save_CFLAGS" + AC_LINK_IFELSE( + [AC_LANG_PROGRAM( + [#include <pthread.h> + void *g(void *d) { return NULL; }], + [pthread_t t; pthread_create(&t,NULL,g,NULL);])], + [thread_CFLAGS="$flag"]) + if test "X$thread_CFLAGS" != Xfailed; then + break + fi + done + CFLAGS="$chktls_save_CFLAGS" + if test "X$thread_CFLAGS" != Xfailed; then + CFLAGS="$thread_CFLAGS $chktls_save_CFLAGS" + AC_RUN_IFELSE( + [AC_LANG_PROGRAM( + [#include <pthread.h> + __thread int a; + static int *a_in_other_thread; + static void * + thread_func (void *arg) + { + a_in_other_thread = &a; + return (void *)0; + }], + [pthread_t thread; + void *thread_retval; + int *a_in_main_thread; + if (pthread_create (&thread, (pthread_attr_t *)0, + thread_func, (void *)0)) + return 0; + a_in_main_thread = &a; + if (pthread_join (thread, &thread_retval)) + return 0; + return (a_in_other_thread == a_in_main_thread);])], + [have_tls=yes], [have_tls=no], []) + CFLAGS="$chktls_save_CFLAGS" + fi + fi], [have_tls=no], - [AC_LINK_IFELSE([__thread int a; int b; int main() { return a = b; }], - [have_tls=yes], [have_tls=no])] + [dnl This is the cross-compiling case. Assume libc supports TLS if the + dnl binutils and the compiler do. + AC_LINK_IFELSE([__thread int a; int b; int main() { return a = b; }], + [have_tls=yes], [have_tls=no]) + ] )]) if test "$enable_tls $have_tls" = "yes yes"; then AC_DEFINE(HAVE_TLS, 1, |