Property changes on: . ___________________________________________________________________ Modified: svn:mergeinfo Merged /trunk:r192458 Index: libstdc++-v3/acinclude.m4 =================================================================== --- libstdc++-v3/acinclude.m4 (revision 198863) +++ libstdc++-v3/acinclude.m4 (working copy) @@ -3346,10 +3346,14 @@ dnl namespace are complex and fragile enough as it is). We must also dnl add a relative path so that -I- is supported properly. dnl +dnl Substs: +dnl thread_header +dnl AC_DEFUN([GLIBCXX_ENABLE_THREADS], [ AC_MSG_CHECKING([for thread model used by GCC]) target_thread_file=`$CXX -v 2>&1 | sed -n 's/^Thread model: //p'` AC_MSG_RESULT([$target_thread_file]) + GCC_AC_THREAD_HEADER([$target_thread_file]) ]) @@ -3636,3 +3640,4 @@ # Macros from the top-level gcc directory. m4_include([../config/gc++filt.m4]) m4_include([../config/tls.m4]) +m4_include([../config/gthr.m4]) Index: libstdc++-v3/include/Makefile.am =================================================================== --- libstdc++-v3/include/Makefile.am (revision 198863) +++ libstdc++-v3/include/Makefile.am (working copy) @@ -1142,7 +1142,7 @@ -e 's/\(${uppercase}*USE_WEAK\)/_GLIBCXX_\1/g' \ < $< > $@ -${host_builddir}/gthr-default.h: ${toplevel_builddir}/libgcc/gthr-default.h \ +${host_builddir}/gthr-default.h: ${toplevel_srcdir}/libgcc/${thread_header} \ stamp-${host_alias} sed -e 's/\(UNUSED\)/_GLIBCXX_\1/g' \ -e 's/\(GCC${uppercase}*_H\)/_GLIBCXX_\1/g' \ Index: config/gthr.m4 =================================================================== --- config/gthr.m4 (revision 0) +++ config/gthr.m4 (revision 0) @@ -0,0 +1,27 @@ +dnl Copyright (C) 2012 Free Software Foundation, Inc. +dnl This file is free software, distributed under the terms of the GNU +dnl General Public License. As a special exception to the GNU General +dnl Public License, this file may be distributed as part of a program +dnl that contains a configuration script generated by Autoconf, under +dnl the same distribution terms as the rest of that program. + +dnl Define header location by thread model + +dnl usage: GCC_AC_THREAD_HEADER([thread_model]) +AC_DEFUN([GCC_AC_THREAD_HEADER], +[ +case $1 in + aix) thread_header=config/rs6000/gthr-aix.h ;; + dce) thread_header=config/pa/gthr-dce.h ;; + lynx) thread_header=config/gthr-lynx.h ;; + mipssde) thread_header=config/mips/gthr-mipssde.h ;; + posix) thread_header=gthr-posix.h ;; + rtems) thread_header=config/gthr-rtems.h ;; + single) thread_header=gthr-single.h ;; + tpf) thread_header=config/s390/gthr-tpf.h ;; + vxworks) thread_header=config/gthr-vxworks.h ;; + win32) thread_header=config/i386/gthr-win32.h ;; +esac +AC_SUBST(thread_header) +]) + Index: libgcc/configure.ac =================================================================== --- libgcc/configure.ac (revision 198863) +++ libgcc/configure.ac (working copy) @@ -9,6 +9,7 @@ sinclude(../config/picflag.m4) sinclude(../config/dfp.m4) sinclude(../config/unwind_ipinfo.m4) +sinclude(../config/gthr.m4) AC_PREREQ(2.64) AC_INIT([GNU C Runtime Library], 1.0,,[libgcc]) @@ -366,18 +367,7 @@ AC_SUBST(tm_defines) # Map from thread model to thread header. -case $target_thread_file in - aix) thread_header=config/rs6000/gthr-aix.h ;; - dce) thread_header=config/pa/gthr-dce.h ;; - lynx) thread_header=config/gthr-lynx.h ;; - mipssde) thread_header=config/mips/gthr-mipssde.h ;; - posix) thread_header=gthr-posix.h ;; - rtems) thread_header=config/gthr-rtems.h ;; - single) thread_header=gthr-single.h ;; - tpf) thread_header=config/s390/gthr-tpf.h ;; - vxworks) thread_header=config/gthr-vxworks.h ;; - win32) thread_header=config/i386/gthr-win32.h ;; -esac +GCC_AC_THREAD_HEADER([$target_thread_file]) # Substitute configuration variables AC_SUBST(cpu_type)