public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* Re: [PATCH, libstdc++] Fix missing gthr-default.h issue on libstdc++ configure
@ 2012-10-11 14:51 David Edelsohn
  2012-10-11 15:03 ` Pavel Chupin
  0 siblings, 1 reply; 23+ messages in thread
From: David Edelsohn @ 2012-10-11 14:51 UTC (permalink / raw)
  To: Kirill Yukhin
  Cc: Olivier Hainque, Benjamin Kosnik, Pavel Chupin, Andrew Pinski,
	gcc-patches, libstdc++,
	Igor Zamyatin

AIX bootstrap is broken after this change.

This patch also should not have been approved for GCC 4.7 branch
without wider testing on trunk.

Would you please revert this patch while you figure out how to provide
the previous libstdc++ build behavior?

Thanks, David

^ permalink raw reply	[flat|nested] 23+ messages in thread

* Re: [PATCH, libstdc++] Fix missing gthr-default.h issue on libstdc++ configure
  2012-10-11 14:51 [PATCH, libstdc++] Fix missing gthr-default.h issue on libstdc++ configure David Edelsohn
@ 2012-10-11 15:03 ` Pavel Chupin
  2012-10-11 15:12   ` Rainer Orth
  0 siblings, 1 reply; 23+ messages in thread
From: Pavel Chupin @ 2012-10-11 15:03 UTC (permalink / raw)
  To: David Edelsohn
  Cc: Kirill Yukhin, Olivier Hainque, Benjamin Kosnik, Andrew Pinski,
	gcc-patches, libstdc++,
	Igor Zamyatin

[-- Attachment #1: Type: text/plain, Size: 60 bytes --]

Could you try this fix?

-- 
Pavel Chupin
Intel Corporation

[-- Attachment #2: Fix-missing-gthr-aix.h.patch --]
[-- Type: application/octet-stream, Size: 3732 bytes --]

diff --git a/libstdc++-v3/acinclude.m4 b/libstdc++-v3/acinclude.m4
index c4cde86..c1f712a 100644
--- a/libstdc++-v3/acinclude.m4
+++ b/libstdc++-v3/acinclude.m4
@@ -3313,7 +3313,19 @@ AC_DEFUN([GLIBCXX_ENABLE_THREADS], [
   target_thread_file=`$CXX -v 2>&1 | sed -n 's/^Thread model: //p'`
   AC_MSG_RESULT([$target_thread_file])
 
-  glibcxx_thread_h=gthr-$target_thread_file.h
+  case $target_thread_file in
+    aix)        glibcxx_thread_h=config/rs6000/gthr-aix.h ;;
+    dce)        glibcxx_thread_h=config/pa/gthr-dce.h ;;
+    lynx)       glibcxx_thread_h=config/gthr-lynx.h ;;
+    mipssde)    glibcxx_thread_h=config/mips/gthr-mipssde.h ;;
+    posix)      glibcxx_thread_h=gthr-posix.h ;;
+    rtems)      glibcxx_thread_h=config/gthr-rtems.h ;;
+    single)     glibcxx_thread_h=gthr-single.h ;;
+    tpf)        glibcxx_thread_h=config/s390/gthr-tpf.h ;;
+    vxworks)    glibcxx_thread_h=config/gthr-vxworks.h ;;
+    win32)      glibcxx_thread_h=config/i386/gthr-win32.h ;;
+  esac
+
   AC_SUBST(glibcxx_thread_h)
 ])
 
diff --git a/libstdc++-v3/configure b/libstdc++-v3/configure
index 912c034..e6666fa 100755
--- a/libstdc++-v3/configure
+++ b/libstdc++-v3/configure
@@ -15161,7 +15161,19 @@ $as_echo_n "checking for thread model used by GCC... " >&6; }
   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $target_thread_file" >&5
 $as_echo "$target_thread_file" >&6; }
 
-  glibcxx_thread_h=gthr-$target_thread_file.h
+  case $target_thread_file in
+    aix)        glibcxx_thread_h=config/rs6000/gthr-aix.h ;;
+    dce)        glibcxx_thread_h=config/pa/gthr-dce.h ;;
+    lynx)       glibcxx_thread_h=config/gthr-lynx.h ;;
+    mipssde)    glibcxx_thread_h=config/mips/gthr-mipssde.h ;;
+    posix)      glibcxx_thread_h=gthr-posix.h ;;
+    rtems)      glibcxx_thread_h=config/gthr-rtems.h ;;
+    single)     glibcxx_thread_h=gthr-single.h ;;
+    tpf)        glibcxx_thread_h=config/s390/gthr-tpf.h ;;
+    vxworks)    glibcxx_thread_h=config/gthr-vxworks.h ;;
+    win32)      glibcxx_thread_h=config/i386/gthr-win32.h ;;
+  esac
+
 
 
 
@@ -15371,7 +15383,7 @@ $as_echo "$glibcxx_cv_atomic_long_long" >&6; }
   # Fake what AC_TRY_COMPILE does.
 
     cat > conftest.$ac_ext << EOF
-#line 15374 "configure"
+#line 15386 "configure"
 int main()
 {
   typedef bool atomic_type;
@@ -15406,7 +15418,7 @@ $as_echo "$glibcxx_cv_atomic_bool" >&6; }
     rm -f conftest*
 
     cat > conftest.$ac_ext << EOF
-#line 15409 "configure"
+#line 15421 "configure"
 int main()
 {
   typedef short atomic_type;
@@ -15441,7 +15453,7 @@ $as_echo "$glibcxx_cv_atomic_short" >&6; }
     rm -f conftest*
 
     cat > conftest.$ac_ext << EOF
-#line 15444 "configure"
+#line 15456 "configure"
 int main()
 {
   // NB: _Atomic_word not necessarily int.
@@ -15477,7 +15489,7 @@ $as_echo "$glibcxx_cv_atomic_int" >&6; }
     rm -f conftest*
 
     cat > conftest.$ac_ext << EOF
-#line 15480 "configure"
+#line 15492 "configure"
 int main()
 {
   typedef long long atomic_type;
@@ -15556,7 +15568,7 @@ $as_echo "$as_me: WARNING: Performance of certain classes will degrade as a resu
   # unnecessary for this test.
 
     cat > conftest.$ac_ext << EOF
-#line 15559 "configure"
+#line 15571 "configure"
 int main()
 {
   _Decimal32 d1;
@@ -15598,7 +15610,7 @@ ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
   # unnecessary for this test.
 
     cat > conftest.$ac_ext << EOF
-#line 15601 "configure"
+#line 15613 "configure"
 template<typename T1, typename T2>
   struct same
   { typedef T2 type; };
@@ -15632,7 +15644,7 @@ $as_echo "$enable_int128" >&6; }
     rm -f conftest*
 
     cat > conftest.$ac_ext << EOF
-#line 15635 "configure"
+#line 15647 "configure"
 template<typename T1, typename T2>
   struct same
   { typedef T2 type; };

^ permalink raw reply	[flat|nested] 23+ messages in thread

* Re: [PATCH, libstdc++] Fix missing gthr-default.h issue on libstdc++ configure
  2012-10-11 15:03 ` Pavel Chupin
@ 2012-10-11 15:12   ` Rainer Orth
  2012-10-11 18:24     ` Pavel Chupin
  0 siblings, 1 reply; 23+ messages in thread
From: Rainer Orth @ 2012-10-11 15:12 UTC (permalink / raw)
  To: Pavel Chupin
  Cc: David Edelsohn, Kirill Yukhin, Olivier Hainque, Benjamin Kosnik,
	Andrew Pinski, gcc-patches, libstdc++,
	Igor Zamyatin

Pavel Chupin <pavel.v.chupin@gmail.com> writes:

> Could you try this fix?

Duplicating this much info from libgcc is certainly the wrong (read:
unmaintainable) approach.

	Rainer

-- 
-----------------------------------------------------------------------------
Rainer Orth, Center for Biotechnology, Bielefeld University

^ permalink raw reply	[flat|nested] 23+ messages in thread

* Re: [PATCH, libstdc++] Fix missing gthr-default.h issue on libstdc++ configure
  2012-10-11 15:12   ` Rainer Orth
@ 2012-10-11 18:24     ` Pavel Chupin
  2012-10-12 11:31       ` Kirill Yukhin
  2012-10-12 12:51       ` David Edelsohn
  0 siblings, 2 replies; 23+ messages in thread
From: Pavel Chupin @ 2012-10-11 18:24 UTC (permalink / raw)
  To: Rainer Orth
  Cc: David Edelsohn, Kirill Yukhin, Olivier Hainque, Benjamin Kosnik,
	Andrew Pinski, gcc-patches, libstdc++,
	Igor Zamyatin

[-- Attachment #1: Type: text/plain, Size: 481 bytes --]

How about this patch?

2012/10/11 Rainer Orth <ro@cebitec.uni-bielefeld.de>:
> Pavel Chupin <pavel.v.chupin@gmail.com> writes:
>
>> Could you try this fix?
>
> Duplicating this much info from libgcc is certainly the wrong (read:
> unmaintainable) approach.
>
>         Rainer
>
> --
> -----------------------------------------------------------------------------
> Rainer Orth, Center for Biotechnology, Bielefeld University



-- 
Pavel Chupin
Software Engineer
Intel Corporation

[-- Attachment #2: Fix-missing-gthr-aix.h.2.patch --]
[-- Type: application/octet-stream, Size: 22693 bytes --]

2012-10-11  Pavel Chupin  <pavel.v.chupin@intel.com>

	* config/gthr.m4: New. Define GCC_AC_THREAD_HEADER.
	* libgcc/configure: Regenerate.
	* libgcc/configure.ac: Replace code with GCC_AC_THREAD_HEADER use.
	* libstdc++-v3/Makefile.in: Regenerate.
	* libstdc++-v3/acinclude.m4: Replace code with GCC_AC_THREAD_HEADER use.
	* libstdc++-v3/configure: Regenerate.
	* libstdc++-v3/doc/Makefile.in: Regenerate.
	* libstdc++-v3/include/Makefile.am: Regenerate.
	* libstdc++-v3/include/Makefile.in: Rename variable.
	* libstdc++-v3/libsupc++/Makefile.in: Regenerate.
	* libstdc++-v3/po/Makefile.in: Regenerate.
	* libstdc++-v3/python/Makefile.in: Regenerate.
	* libstdc++-v3/src/Makefile.in: Regenerate.
	* libstdc++-v3/src/c++11/Makefile.in: Regenerate.
	* libstdc++-v3/src/c++98/Makefile.in: Regenerate.
	* libstdc++-v3/testsuite/Makefile.in: Regenerate.

diff --git a/config/gthr.m4 b/config/gthr.m4
new file mode 100644
index 0000000..7b29f1f
--- /dev/null
+++ b/config/gthr.m4
@@ -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)
+])
+
diff --git a/libgcc/configure b/libgcc/configure
old mode 100644
new mode 100755
index a226f81..1b9f443
--- a/libgcc/configure
+++ b/libgcc/configure
@@ -4503,6 +4503,8 @@ tm_file="${tm_file_}"
 
 
 # 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 ;;
@@ -4516,6 +4518,8 @@ case $target_thread_file in
     win32)	thread_header=config/i386/gthr-win32.h ;;
 esac
 
+
+
 # Substitute configuration variables
 
 
diff --git a/libgcc/configure.ac b/libgcc/configure.ac
index 24b15f0..8b7aba5 100644
--- a/libgcc/configure.ac
+++ b/libgcc/configure.ac
@@ -9,6 +9,7 @@ sinclude(../config/override.m4)
 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])
@@ -376,18 +377,7 @@ AC_SUBST(tm_file)
 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)
diff --git a/libstdc++-v3/Makefile.in b/libstdc++-v3/Makefile.in
index 921f4ed..ab7caaf 100644
--- a/libstdc++-v3/Makefile.in
+++ b/libstdc++-v3/Makefile.in
@@ -62,7 +62,8 @@ am__aclocal_m4_deps = $(top_srcdir)/../config/acx.m4 \
 	$(top_srcdir)/../lt~obsolete.m4 $(top_srcdir)/crossconfig.m4 \
 	$(top_srcdir)/linkage.m4 $(top_srcdir)/acinclude.m4 \
 	$(top_srcdir)/../config/gc++filt.m4 \
-	$(top_srcdir)/../config/tls.m4 $(top_srcdir)/configure.ac
+	$(top_srcdir)/../config/tls.m4 $(top_srcdir)/../config/gthr.m4 \
+	$(top_srcdir)/configure.ac
 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
 	$(ACLOCAL_M4)
 am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \
@@ -244,7 +245,6 @@ glibcxx_localedir = @glibcxx_localedir@
 glibcxx_lt_pic_flag = @glibcxx_lt_pic_flag@
 glibcxx_prefixdir = @glibcxx_prefixdir@
 glibcxx_srcdir = @glibcxx_srcdir@
-glibcxx_thread_h = @glibcxx_thread_h@
 glibcxx_toolexecdir = @glibcxx_toolexecdir@
 glibcxx_toolexeclibdir = @glibcxx_toolexeclibdir@
 gxx_include_dir = @gxx_include_dir@
@@ -282,6 +282,7 @@ target_alias = @target_alias@
 target_cpu = @target_cpu@
 target_os = @target_os@
 target_vendor = @target_vendor@
+thread_header = @thread_header@
 top_build_prefix = @top_build_prefix@
 top_builddir = @top_builddir@
 top_srcdir = @top_srcdir@
diff --git a/libstdc++-v3/acinclude.m4 b/libstdc++-v3/acinclude.m4
index c4cde86..db8a5fe 100644
--- a/libstdc++-v3/acinclude.m4
+++ b/libstdc++-v3/acinclude.m4
@@ -3306,15 +3306,16 @@ 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  glibcxx_thread_h
+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])
 
-  glibcxx_thread_h=gthr-$target_thread_file.h
-  AC_SUBST(glibcxx_thread_h)
+  GCC_AC_THREAD_HEADER([$target_thread_file])
+
+  AC_SUBST(thread_header)
 ])
 
 
@@ -3621,3 +3622,4 @@ AC_DEFUN([GLIBCXX_ENABLE_WERROR], [
 # Macros from the top-level gcc directory.
 m4_include([../config/gc++filt.m4])
 m4_include([../config/tls.m4])
+m4_include([../config/gthr.m4])
diff --git a/libstdc++-v3/configure b/libstdc++-v3/configure
index 912c034..400888a 100755
--- a/libstdc++-v3/configure
+++ b/libstdc++-v3/configure
@@ -708,7 +708,7 @@ BASIC_FILE_H
 CSTDIO_H
 SECTION_FLAGS
 WERROR
-glibcxx_thread_h
+thread_header
 glibcxx_PCHFLAGS
 GLIBCXX_BUILD_PCH_FALSE
 GLIBCXX_BUILD_PCH_TRUE
@@ -15161,7 +15161,22 @@ $as_echo_n "checking for thread model used by GCC... " >&6; }
   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $target_thread_file" >&5
 $as_echo "$target_thread_file" >&6; }
 
-  glibcxx_thread_h=gthr-$target_thread_file.h
+
+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
+
+
+
 
 
 
@@ -15371,7 +15386,7 @@ $as_echo "$glibcxx_cv_atomic_long_long" >&6; }
   # Fake what AC_TRY_COMPILE does.
 
     cat > conftest.$ac_ext << EOF
-#line 15374 "configure"
+#line 15389 "configure"
 int main()
 {
   typedef bool atomic_type;
@@ -15406,7 +15421,7 @@ $as_echo "$glibcxx_cv_atomic_bool" >&6; }
     rm -f conftest*
 
     cat > conftest.$ac_ext << EOF
-#line 15409 "configure"
+#line 15424 "configure"
 int main()
 {
   typedef short atomic_type;
@@ -15441,7 +15456,7 @@ $as_echo "$glibcxx_cv_atomic_short" >&6; }
     rm -f conftest*
 
     cat > conftest.$ac_ext << EOF
-#line 15444 "configure"
+#line 15459 "configure"
 int main()
 {
   // NB: _Atomic_word not necessarily int.
@@ -15477,7 +15492,7 @@ $as_echo "$glibcxx_cv_atomic_int" >&6; }
     rm -f conftest*
 
     cat > conftest.$ac_ext << EOF
-#line 15480 "configure"
+#line 15495 "configure"
 int main()
 {
   typedef long long atomic_type;
@@ -15556,7 +15571,7 @@ $as_echo "$as_me: WARNING: Performance of certain classes will degrade as a resu
   # unnecessary for this test.
 
     cat > conftest.$ac_ext << EOF
-#line 15559 "configure"
+#line 15574 "configure"
 int main()
 {
   _Decimal32 d1;
@@ -15598,7 +15613,7 @@ ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
   # unnecessary for this test.
 
     cat > conftest.$ac_ext << EOF
-#line 15601 "configure"
+#line 15616 "configure"
 template<typename T1, typename T2>
   struct same
   { typedef T2 type; };
@@ -15632,7 +15647,7 @@ $as_echo "$enable_int128" >&6; }
     rm -f conftest*
 
     cat > conftest.$ac_ext << EOF
-#line 15635 "configure"
+#line 15650 "configure"
 template<typename T1, typename T2>
   struct same
   { typedef T2 type; };
diff --git a/libstdc++-v3/doc/Makefile.in b/libstdc++-v3/doc/Makefile.in
index f7aa484..3c1a0d5 100644
--- a/libstdc++-v3/doc/Makefile.in
+++ b/libstdc++-v3/doc/Makefile.in
@@ -57,7 +57,8 @@ am__aclocal_m4_deps = $(top_srcdir)/../config/acx.m4 \
 	$(top_srcdir)/../lt~obsolete.m4 $(top_srcdir)/crossconfig.m4 \
 	$(top_srcdir)/linkage.m4 $(top_srcdir)/acinclude.m4 \
 	$(top_srcdir)/../config/gc++filt.m4 \
-	$(top_srcdir)/../config/tls.m4 $(top_srcdir)/configure.ac
+	$(top_srcdir)/../config/tls.m4 $(top_srcdir)/../config/gthr.m4 \
+	$(top_srcdir)/configure.ac
 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
 	$(ACLOCAL_M4)
 CONFIG_HEADER = $(top_builddir)/config.h
@@ -218,7 +219,6 @@ glibcxx_localedir = @glibcxx_localedir@
 glibcxx_lt_pic_flag = @glibcxx_lt_pic_flag@
 glibcxx_prefixdir = @glibcxx_prefixdir@
 glibcxx_srcdir = @glibcxx_srcdir@
-glibcxx_thread_h = @glibcxx_thread_h@
 glibcxx_toolexecdir = @glibcxx_toolexecdir@
 glibcxx_toolexeclibdir = @glibcxx_toolexeclibdir@
 gxx_include_dir = @gxx_include_dir@
@@ -264,6 +264,7 @@ target_alias = @target_alias@
 target_cpu = @target_cpu@
 target_os = @target_os@
 target_vendor = @target_vendor@
+thread_header = @thread_header@
 top_build_prefix = @top_build_prefix@
 top_builddir = @top_builddir@
 top_srcdir = @top_srcdir@
diff --git a/libstdc++-v3/include/Makefile.am b/libstdc++-v3/include/Makefile.am
index aecc9a7..c2487d3 100644
--- a/libstdc++-v3/include/Makefile.am
+++ b/libstdc++-v3/include/Makefile.am
@@ -1148,7 +1148,7 @@ ${host_builddir}/gthr-posix.h: ${toplevel_srcdir}/libgcc/gthr-posix.h \
 	    -e 's/\(${uppercase}*USE_WEAK\)/_GLIBCXX_\1/g' \
 	    < $< > $@
 
-${host_builddir}/gthr-default.h: ${toplevel_srcdir}/libgcc/${glibcxx_thread_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' \
diff --git a/libstdc++-v3/include/Makefile.in b/libstdc++-v3/include/Makefile.in
index fa52fd7..666ed19 100644
--- a/libstdc++-v3/include/Makefile.in
+++ b/libstdc++-v3/include/Makefile.in
@@ -57,7 +57,8 @@ am__aclocal_m4_deps = $(top_srcdir)/../config/acx.m4 \
 	$(top_srcdir)/../lt~obsolete.m4 $(top_srcdir)/crossconfig.m4 \
 	$(top_srcdir)/linkage.m4 $(top_srcdir)/acinclude.m4 \
 	$(top_srcdir)/../config/gc++filt.m4 \
-	$(top_srcdir)/../config/tls.m4 $(top_srcdir)/configure.ac
+	$(top_srcdir)/../config/tls.m4 $(top_srcdir)/../config/gthr.m4 \
+	$(top_srcdir)/configure.ac
 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
 	$(ACLOCAL_M4)
 CONFIG_HEADER = $(top_builddir)/config.h
@@ -216,7 +217,6 @@ glibcxx_localedir = @glibcxx_localedir@
 glibcxx_lt_pic_flag = @glibcxx_lt_pic_flag@
 glibcxx_prefixdir = @glibcxx_prefixdir@
 glibcxx_srcdir = @glibcxx_srcdir@
-glibcxx_thread_h = @glibcxx_thread_h@
 glibcxx_toolexecdir = @glibcxx_toolexecdir@
 glibcxx_toolexeclibdir = @glibcxx_toolexeclibdir@
 gxx_include_dir = @gxx_include_dir@
@@ -254,6 +254,7 @@ target_alias = @target_alias@
 target_cpu = @target_cpu@
 target_os = @target_os@
 target_vendor = @target_vendor@
+thread_header = @thread_header@
 top_build_prefix = @top_build_prefix@
 top_builddir = @top_builddir@
 top_srcdir = @top_srcdir@
@@ -1546,7 +1547,7 @@ ${host_builddir}/gthr-posix.h: ${toplevel_srcdir}/libgcc/gthr-posix.h \
 	    -e 's/\(${uppercase}*USE_WEAK\)/_GLIBCXX_\1/g' \
 	    < $< > $@
 
-${host_builddir}/gthr-default.h: ${toplevel_srcdir}/libgcc/${glibcxx_thread_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' \
diff --git a/libstdc++-v3/libsupc++/Makefile.in b/libstdc++-v3/libsupc++/Makefile.in
index 8422d40..8bf86f3 100644
--- a/libstdc++-v3/libsupc++/Makefile.in
+++ b/libstdc++-v3/libsupc++/Makefile.in
@@ -59,7 +59,8 @@ am__aclocal_m4_deps = $(top_srcdir)/../config/acx.m4 \
 	$(top_srcdir)/../lt~obsolete.m4 $(top_srcdir)/crossconfig.m4 \
 	$(top_srcdir)/linkage.m4 $(top_srcdir)/acinclude.m4 \
 	$(top_srcdir)/../config/gc++filt.m4 \
-	$(top_srcdir)/../config/tls.m4 $(top_srcdir)/configure.ac
+	$(top_srcdir)/../config/tls.m4 $(top_srcdir)/../config/gthr.m4 \
+	$(top_srcdir)/configure.ac
 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
 	$(ACLOCAL_M4)
 CONFIG_HEADER = $(top_builddir)/config.h
@@ -90,10 +91,10 @@ am__installdirs = "$(DESTDIR)$(toolexeclibdir)" "$(DESTDIR)$(bitsdir)" \
 	"$(DESTDIR)$(stddir)"
 LTLIBRARIES = $(noinst_LTLIBRARIES) $(toolexeclib_LTLIBRARIES)
 libsupc___la_LIBADD =
-am__objects_1 = array_type_info.lo atexit_arm.lo atexit_thread.lo bad_alloc.lo \
-	bad_cast.lo bad_typeid.lo class_type_info.lo del_op.lo \
-	del_opnt.lo del_opv.lo del_opvnt.lo dyncast.lo eh_alloc.lo \
-	eh_arm.lo eh_aux_runtime.lo eh_call.lo eh_catch.lo \
+am__objects_1 = array_type_info.lo atexit_arm.lo atexit_thread.lo \
+	bad_alloc.lo bad_cast.lo bad_typeid.lo class_type_info.lo \
+	del_op.lo del_opnt.lo del_opv.lo del_opvnt.lo dyncast.lo \
+	eh_alloc.lo eh_arm.lo eh_aux_runtime.lo eh_call.lo eh_catch.lo \
 	eh_exception.lo eh_globals.lo eh_personality.lo eh_ptr.lo \
 	eh_term_handler.lo eh_terminate.lo eh_tm.lo eh_throw.lo \
 	eh_type.lo eh_unex_handler.lo enum_type_info.lo \
@@ -276,7 +277,6 @@ glibcxx_localedir = @glibcxx_localedir@
 glibcxx_lt_pic_flag = @glibcxx_lt_pic_flag@
 glibcxx_prefixdir = @glibcxx_prefixdir@
 glibcxx_srcdir = @glibcxx_srcdir@
-glibcxx_thread_h = @glibcxx_thread_h@
 glibcxx_toolexecdir = @glibcxx_toolexecdir@
 glibcxx_toolexeclibdir = @glibcxx_toolexeclibdir@
 gxx_include_dir = @gxx_include_dir@
@@ -314,6 +314,7 @@ target_alias = @target_alias@
 target_cpu = @target_cpu@
 target_os = @target_os@
 target_vendor = @target_vendor@
+thread_header = @thread_header@
 top_build_prefix = @top_build_prefix@
 top_builddir = @top_builddir@
 top_srcdir = @top_srcdir@
diff --git a/libstdc++-v3/po/Makefile.in b/libstdc++-v3/po/Makefile.in
index ad583c3..bb0f590 100644
--- a/libstdc++-v3/po/Makefile.in
+++ b/libstdc++-v3/po/Makefile.in
@@ -57,7 +57,8 @@ am__aclocal_m4_deps = $(top_srcdir)/../config/acx.m4 \
 	$(top_srcdir)/../lt~obsolete.m4 $(top_srcdir)/crossconfig.m4 \
 	$(top_srcdir)/linkage.m4 $(top_srcdir)/acinclude.m4 \
 	$(top_srcdir)/../config/gc++filt.m4 \
-	$(top_srcdir)/../config/tls.m4 $(top_srcdir)/configure.ac
+	$(top_srcdir)/../config/tls.m4 $(top_srcdir)/../config/gthr.m4 \
+	$(top_srcdir)/configure.ac
 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
 	$(ACLOCAL_M4)
 CONFIG_HEADER = $(top_builddir)/config.h
@@ -216,7 +217,6 @@ glibcxx_localedir = @glibcxx_localedir@
 glibcxx_lt_pic_flag = @glibcxx_lt_pic_flag@
 glibcxx_prefixdir = @glibcxx_prefixdir@
 glibcxx_srcdir = @glibcxx_srcdir@
-glibcxx_thread_h = @glibcxx_thread_h@
 glibcxx_toolexecdir = @glibcxx_toolexecdir@
 glibcxx_toolexeclibdir = @glibcxx_toolexeclibdir@
 gxx_include_dir = @gxx_include_dir@
@@ -254,6 +254,7 @@ target_alias = @target_alias@
 target_cpu = @target_cpu@
 target_os = @target_os@
 target_vendor = @target_vendor@
+thread_header = @thread_header@
 top_build_prefix = @top_build_prefix@
 top_builddir = @top_builddir@
 top_srcdir = @top_srcdir@
diff --git a/libstdc++-v3/python/Makefile.in b/libstdc++-v3/python/Makefile.in
index fa0e99d..49f71a1 100644
--- a/libstdc++-v3/python/Makefile.in
+++ b/libstdc++-v3/python/Makefile.in
@@ -58,7 +58,8 @@ am__aclocal_m4_deps = $(top_srcdir)/../config/acx.m4 \
 	$(top_srcdir)/../lt~obsolete.m4 $(top_srcdir)/crossconfig.m4 \
 	$(top_srcdir)/linkage.m4 $(top_srcdir)/acinclude.m4 \
 	$(top_srcdir)/../config/gc++filt.m4 \
-	$(top_srcdir)/../config/tls.m4 $(top_srcdir)/configure.ac
+	$(top_srcdir)/../config/tls.m4 $(top_srcdir)/../config/gthr.m4 \
+	$(top_srcdir)/configure.ac
 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
 	$(ACLOCAL_M4)
 CONFIG_HEADER = $(top_builddir)/config.h
@@ -240,7 +241,6 @@ glibcxx_localedir = @glibcxx_localedir@
 glibcxx_lt_pic_flag = @glibcxx_lt_pic_flag@
 glibcxx_prefixdir = @glibcxx_prefixdir@
 glibcxx_srcdir = @glibcxx_srcdir@
-glibcxx_thread_h = @glibcxx_thread_h@
 glibcxx_toolexecdir = @glibcxx_toolexecdir@
 glibcxx_toolexeclibdir = @glibcxx_toolexeclibdir@
 gxx_include_dir = @gxx_include_dir@
@@ -278,6 +278,7 @@ target_alias = @target_alias@
 target_cpu = @target_cpu@
 target_os = @target_os@
 target_vendor = @target_vendor@
+thread_header = @thread_header@
 top_build_prefix = @top_build_prefix@
 top_builddir = @top_builddir@
 top_srcdir = @top_srcdir@
diff --git a/libstdc++-v3/src/Makefile.in b/libstdc++-v3/src/Makefile.in
index 6cd16c3..f9ff319 100644
--- a/libstdc++-v3/src/Makefile.in
+++ b/libstdc++-v3/src/Makefile.in
@@ -58,7 +58,8 @@ am__aclocal_m4_deps = $(top_srcdir)/../config/acx.m4 \
 	$(top_srcdir)/../lt~obsolete.m4 $(top_srcdir)/crossconfig.m4 \
 	$(top_srcdir)/linkage.m4 $(top_srcdir)/acinclude.m4 \
 	$(top_srcdir)/../config/gc++filt.m4 \
-	$(top_srcdir)/../config/tls.m4 $(top_srcdir)/configure.ac
+	$(top_srcdir)/../config/tls.m4 $(top_srcdir)/../config/gthr.m4 \
+	$(top_srcdir)/configure.ac
 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
 	$(ACLOCAL_M4)
 CONFIG_HEADER = $(top_builddir)/config.h
@@ -266,7 +267,6 @@ glibcxx_localedir = @glibcxx_localedir@
 glibcxx_lt_pic_flag = @glibcxx_lt_pic_flag@
 glibcxx_prefixdir = @glibcxx_prefixdir@
 glibcxx_srcdir = @glibcxx_srcdir@
-glibcxx_thread_h = @glibcxx_thread_h@
 glibcxx_toolexecdir = @glibcxx_toolexecdir@
 glibcxx_toolexeclibdir = @glibcxx_toolexeclibdir@
 gxx_include_dir = @gxx_include_dir@
@@ -304,6 +304,7 @@ target_alias = @target_alias@
 target_cpu = @target_cpu@
 target_os = @target_os@
 target_vendor = @target_vendor@
+thread_header = @thread_header@
 top_build_prefix = @top_build_prefix@
 top_builddir = @top_builddir@
 top_srcdir = @top_srcdir@
diff --git a/libstdc++-v3/src/c++11/Makefile.in b/libstdc++-v3/src/c++11/Makefile.in
index dc46f29..793bbae 100644
--- a/libstdc++-v3/src/c++11/Makefile.in
+++ b/libstdc++-v3/src/c++11/Makefile.in
@@ -58,7 +58,8 @@ am__aclocal_m4_deps = $(top_srcdir)/../config/acx.m4 \
 	$(top_srcdir)/../lt~obsolete.m4 $(top_srcdir)/crossconfig.m4 \
 	$(top_srcdir)/linkage.m4 $(top_srcdir)/acinclude.m4 \
 	$(top_srcdir)/../config/gc++filt.m4 \
-	$(top_srcdir)/../config/tls.m4 $(top_srcdir)/configure.ac
+	$(top_srcdir)/../config/tls.m4 $(top_srcdir)/../config/gthr.m4 \
+	$(top_srcdir)/configure.ac
 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
 	$(ACLOCAL_M4)
 CONFIG_HEADER = $(top_builddir)/config.h
@@ -233,7 +234,6 @@ glibcxx_localedir = @glibcxx_localedir@
 glibcxx_lt_pic_flag = @glibcxx_lt_pic_flag@
 glibcxx_prefixdir = @glibcxx_prefixdir@
 glibcxx_srcdir = @glibcxx_srcdir@
-glibcxx_thread_h = @glibcxx_thread_h@
 glibcxx_toolexecdir = @glibcxx_toolexecdir@
 glibcxx_toolexeclibdir = @glibcxx_toolexeclibdir@
 gxx_include_dir = @gxx_include_dir@
@@ -271,6 +271,7 @@ target_alias = @target_alias@
 target_cpu = @target_cpu@
 target_os = @target_os@
 target_vendor = @target_vendor@
+thread_header = @thread_header@
 top_build_prefix = @top_build_prefix@
 top_builddir = @top_builddir@
 top_srcdir = @top_srcdir@
diff --git a/libstdc++-v3/src/c++98/Makefile.in b/libstdc++-v3/src/c++98/Makefile.in
index d897274..d154b98 100644
--- a/libstdc++-v3/src/c++98/Makefile.in
+++ b/libstdc++-v3/src/c++98/Makefile.in
@@ -58,7 +58,8 @@ am__aclocal_m4_deps = $(top_srcdir)/../config/acx.m4 \
 	$(top_srcdir)/../lt~obsolete.m4 $(top_srcdir)/crossconfig.m4 \
 	$(top_srcdir)/linkage.m4 $(top_srcdir)/acinclude.m4 \
 	$(top_srcdir)/../config/gc++filt.m4 \
-	$(top_srcdir)/../config/tls.m4 $(top_srcdir)/configure.ac
+	$(top_srcdir)/../config/tls.m4 $(top_srcdir)/../config/gthr.m4 \
+	$(top_srcdir)/configure.ac
 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
 	$(ACLOCAL_M4)
 CONFIG_HEADER = $(top_builddir)/config.h
@@ -249,7 +250,6 @@ glibcxx_localedir = @glibcxx_localedir@
 glibcxx_lt_pic_flag = @glibcxx_lt_pic_flag@
 glibcxx_prefixdir = @glibcxx_prefixdir@
 glibcxx_srcdir = @glibcxx_srcdir@
-glibcxx_thread_h = @glibcxx_thread_h@
 glibcxx_toolexecdir = @glibcxx_toolexecdir@
 glibcxx_toolexeclibdir = @glibcxx_toolexeclibdir@
 gxx_include_dir = @gxx_include_dir@
@@ -287,6 +287,7 @@ target_alias = @target_alias@
 target_cpu = @target_cpu@
 target_os = @target_os@
 target_vendor = @target_vendor@
+thread_header = @thread_header@
 top_build_prefix = @top_build_prefix@
 top_builddir = @top_builddir@
 top_srcdir = @top_srcdir@
diff --git a/libstdc++-v3/testsuite/Makefile.in b/libstdc++-v3/testsuite/Makefile.in
index 9169956..96b3f9f 100644
--- a/libstdc++-v3/testsuite/Makefile.in
+++ b/libstdc++-v3/testsuite/Makefile.in
@@ -57,7 +57,8 @@ am__aclocal_m4_deps = $(top_srcdir)/../config/acx.m4 \
 	$(top_srcdir)/../lt~obsolete.m4 $(top_srcdir)/crossconfig.m4 \
 	$(top_srcdir)/linkage.m4 $(top_srcdir)/acinclude.m4 \
 	$(top_srcdir)/../config/gc++filt.m4 \
-	$(top_srcdir)/../config/tls.m4 $(top_srcdir)/configure.ac
+	$(top_srcdir)/../config/tls.m4 $(top_srcdir)/../config/gthr.m4 \
+	$(top_srcdir)/configure.ac
 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
 	$(ACLOCAL_M4)
 CONFIG_HEADER = $(top_builddir)/config.h
@@ -216,7 +217,6 @@ glibcxx_localedir = @glibcxx_localedir@
 glibcxx_lt_pic_flag = @glibcxx_lt_pic_flag@
 glibcxx_prefixdir = @glibcxx_prefixdir@
 glibcxx_srcdir = @glibcxx_srcdir@
-glibcxx_thread_h = @glibcxx_thread_h@
 glibcxx_toolexecdir = @glibcxx_toolexecdir@
 glibcxx_toolexeclibdir = @glibcxx_toolexeclibdir@
 gxx_include_dir = @gxx_include_dir@
@@ -254,6 +254,7 @@ target_alias = @target_alias@
 target_cpu = @target_cpu@
 target_os = @target_os@
 target_vendor = @target_vendor@
+thread_header = @thread_header@
 top_build_prefix = @top_build_prefix@
 top_builddir = @top_builddir@
 top_srcdir = @top_srcdir@

^ permalink raw reply	[flat|nested] 23+ messages in thread

* Re: [PATCH, libstdc++] Fix missing gthr-default.h issue on libstdc++ configure
  2012-10-11 18:24     ` Pavel Chupin
@ 2012-10-12 11:31       ` Kirill Yukhin
  2012-10-12 12:51       ` David Edelsohn
  1 sibling, 0 replies; 23+ messages in thread
From: Kirill Yukhin @ 2012-10-12 11:31 UTC (permalink / raw)
  To: Pavel Chupin
  Cc: Rainer Orth, David Edelsohn, Olivier Hainque, Benjamin Kosnik,
	Andrew Pinski, gcc-patches, libstdc++,
	Igor Zamyatin

Reverted.
Trunk: http://gcc.gnu.org/ml/gcc-cvs/2012-10/msg00516.html
4.7: http://gcc.gnu.org/ml/gcc-cvs/2012-10/msg00517.html

K

^ permalink raw reply	[flat|nested] 23+ messages in thread

* Re: [PATCH, libstdc++] Fix missing gthr-default.h issue on libstdc++ configure
  2012-10-11 18:24     ` Pavel Chupin
  2012-10-12 11:31       ` Kirill Yukhin
@ 2012-10-12 12:51       ` David Edelsohn
  2012-10-12 14:21         ` Pavel Chupin
  1 sibling, 1 reply; 23+ messages in thread
From: David Edelsohn @ 2012-10-12 12:51 UTC (permalink / raw)
  To: Pavel Chupin
  Cc: Rainer Orth, Kirill Yukhin, Olivier Hainque, Benjamin Kosnik,
	Andrew Pinski, gcc-patches, libstdc++,
	Igor Zamyatin

On Thu, Oct 11, 2012 at 2:17 PM, Pavel Chupin <pavel.v.chupin@gmail.com> wrote:
> How about this patch?
>
> 2012/10/11 Rainer Orth <ro@cebitec.uni-bielefeld.de>:
>> Pavel Chupin <pavel.v.chupin@gmail.com> writes:
>>
>>> Could you try this fix?
>>
>> Duplicating this much info from libgcc is certainly the wrong (read:
>> unmaintainable) approach.

The patch allows AIX to bootstrap, but I don't know how the
maintainers want to solve this in the long-run.

Thanks, David

^ permalink raw reply	[flat|nested] 23+ messages in thread

* Re: [PATCH, libstdc++] Fix missing gthr-default.h issue on libstdc++ configure
  2012-10-12 12:51       ` David Edelsohn
@ 2012-10-12 14:21         ` Pavel Chupin
  2012-10-12 15:01           ` Paolo Carlini
  0 siblings, 1 reply; 23+ messages in thread
From: Pavel Chupin @ 2012-10-12 14:21 UTC (permalink / raw)
  To: David Edelsohn
  Cc: Rainer Orth, Kirill Yukhin, Olivier Hainque, Benjamin Kosnik,
	Andrew Pinski, gcc-patches, libstdc++,
	Igor Zamyatin

[-- Attachment #1: Type: text/plain, Size: 242 bytes --]

Please see attached patch (applicable after revert).
I've moved libgcc libstdc++ common configure thread header chunk into
separate gthr.m4.
Could you please try it on AIX?

Is it OK for trunk?
Is it OK for 4.7 after a week testing in trunk?

[-- Attachment #2: Fix-missing-gthr-default.h.2.patch --]
[-- Type: application/octet-stream, Size: 19876 bytes --]

2012-10-12  Pavel Chupin  <pavel.v.chupin@intel.com>

	* config/gthr.m4: New. Define GCC_AC_THREAD_HEADER.
	* libgcc/configure: Regenerate.
	* libgcc/configure.ac: Replace code with GCC_AC_THREAD_HEADER use.
	* libstdc++-v3/Makefile.in: Regenerate.
	* libstdc++-v3/acinclude.m4: Replace code with GCC_AC_THREAD_HEADER use.
	* libstdc++-v3/configure: Regenerate.
	* libstdc++-v3/doc/Makefile.in: Regenerate.
	* libstdc++-v3/include/Makefile.am: Regenerate.
	* libstdc++-v3/include/Makefile.in: Rename variable.
	* libstdc++-v3/libsupc++/Makefile.in: Regenerate.
	* libstdc++-v3/po/Makefile.in: Regenerate.
	* libstdc++-v3/python/Makefile.in: Regenerate.
	* libstdc++-v3/src/Makefile.in: Regenerate.
	* libstdc++-v3/src/c++11/Makefile.in: Regenerate.
	* libstdc++-v3/src/c++98/Makefile.in: Regenerate.
	* libstdc++-v3/testsuite/Makefile.in: Regenerate.

diff --git a/config/gthr.m4 b/config/gthr.m4
new file mode 100644
index 0000000..7b29f1f
--- /dev/null
+++ b/config/gthr.m4
@@ -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)
+])
+
diff --git a/libgcc/configure b/libgcc/configure
old mode 100644
new mode 100755
index a226f81..ed6eabf
--- a/libgcc/configure
+++ b/libgcc/configure
@@ -558,6 +558,7 @@ LIBOBJS
 asm_hidden_op
 extra_parts
 cpu_type
+thread_header
 tm_defines
 tm_file
 tmake_file
@@ -4503,6 +4504,7 @@ tm_file="${tm_file_}"
 
 
 # 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 ;;
@@ -4516,6 +4518,8 @@ case $target_thread_file in
     win32)	thread_header=config/i386/gthr-win32.h ;;
 esac
 
+
+
 # Substitute configuration variables
 
 
diff --git a/libgcc/configure.ac b/libgcc/configure.ac
index 24b15f0..8b7aba5 100644
--- a/libgcc/configure.ac
+++ b/libgcc/configure.ac
@@ -9,6 +9,7 @@ sinclude(../config/override.m4)
 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])
@@ -376,18 +377,7 @@ AC_SUBST(tm_file)
 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)
diff --git a/libstdc++-v3/Makefile.in b/libstdc++-v3/Makefile.in
index 34d0e02..ab7caaf 100644
--- a/libstdc++-v3/Makefile.in
+++ b/libstdc++-v3/Makefile.in
@@ -62,7 +62,8 @@ am__aclocal_m4_deps = $(top_srcdir)/../config/acx.m4 \
 	$(top_srcdir)/../lt~obsolete.m4 $(top_srcdir)/crossconfig.m4 \
 	$(top_srcdir)/linkage.m4 $(top_srcdir)/acinclude.m4 \
 	$(top_srcdir)/../config/gc++filt.m4 \
-	$(top_srcdir)/../config/tls.m4 $(top_srcdir)/configure.ac
+	$(top_srcdir)/../config/tls.m4 $(top_srcdir)/../config/gthr.m4 \
+	$(top_srcdir)/configure.ac
 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
 	$(ACLOCAL_M4)
 am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \
@@ -281,6 +282,7 @@ target_alias = @target_alias@
 target_cpu = @target_cpu@
 target_os = @target_os@
 target_vendor = @target_vendor@
+thread_header = @thread_header@
 top_build_prefix = @top_build_prefix@
 top_builddir = @top_builddir@
 top_srcdir = @top_srcdir@
diff --git a/libstdc++-v3/acinclude.m4 b/libstdc++-v3/acinclude.m4
index f876597..10dac63 100644
--- a/libstdc++-v3/acinclude.m4
+++ b/libstdc++-v3/acinclude.m4
@@ -3305,10 +3305,14 @@ dnl having to write complex code (the sed commands to clean the macro
 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])
 ])
 
 
@@ -3615,3 +3619,4 @@ AC_DEFUN([GLIBCXX_ENABLE_WERROR], [
 # Macros from the top-level gcc directory.
 m4_include([../config/gc++filt.m4])
 m4_include([../config/tls.m4])
+m4_include([../config/gthr.m4])
diff --git a/libstdc++-v3/configure b/libstdc++-v3/configure
index 09a06c1..0c939ed 100755
--- a/libstdc++-v3/configure
+++ b/libstdc++-v3/configure
@@ -708,6 +708,7 @@ BASIC_FILE_H
 CSTDIO_H
 SECTION_FLAGS
 WERROR
+thread_header
 glibcxx_PCHFLAGS
 GLIBCXX_BUILD_PCH_FALSE
 GLIBCXX_BUILD_PCH_TRUE
@@ -11512,7 +11513,7 @@ else
   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
   lt_status=$lt_dlunknown
   cat > conftest.$ac_ext <<_LT_EOF
-#line 11515 "configure"
+#line 11516 "configure"
 #include "confdefs.h"
 
 #if HAVE_DLFCN_H
@@ -11618,7 +11619,7 @@ else
   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
   lt_status=$lt_dlunknown
   cat > conftest.$ac_ext <<_LT_EOF
-#line 11621 "configure"
+#line 11622 "configure"
 #include "confdefs.h"
 
 #if HAVE_DLFCN_H
@@ -15032,7 +15033,7 @@ fi
     #
     # Fake what AC_TRY_COMPILE does.  XXX Look at redoing this new-style.
     cat > conftest.$ac_ext << EOF
-#line 15035 "configure"
+#line 15036 "configure"
 struct S { ~S(); };
 void bar();
 void foo()
@@ -15160,6 +15161,21 @@ $as_echo_n "checking for thread model used by GCC... " >&6; }
   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $target_thread_file" >&5
 $as_echo "$target_thread_file" >&6; }
 
+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
+
+
+
 
 
   ac_ext=cpp
@@ -15367,7 +15383,7 @@ $as_echo "$glibcxx_cv_atomic_long_long" >&6; }
   # Fake what AC_TRY_COMPILE does.
 
     cat > conftest.$ac_ext << EOF
-#line 15370 "configure"
+#line 15386 "configure"
 int main()
 {
   typedef bool atomic_type;
@@ -15402,7 +15418,7 @@ $as_echo "$glibcxx_cv_atomic_bool" >&6; }
     rm -f conftest*
 
     cat > conftest.$ac_ext << EOF
-#line 15405 "configure"
+#line 15421 "configure"
 int main()
 {
   typedef short atomic_type;
@@ -15437,7 +15453,7 @@ $as_echo "$glibcxx_cv_atomic_short" >&6; }
     rm -f conftest*
 
     cat > conftest.$ac_ext << EOF
-#line 15440 "configure"
+#line 15456 "configure"
 int main()
 {
   // NB: _Atomic_word not necessarily int.
@@ -15473,7 +15489,7 @@ $as_echo "$glibcxx_cv_atomic_int" >&6; }
     rm -f conftest*
 
     cat > conftest.$ac_ext << EOF
-#line 15476 "configure"
+#line 15492 "configure"
 int main()
 {
   typedef long long atomic_type;
@@ -15552,7 +15568,7 @@ $as_echo "$as_me: WARNING: Performance of certain classes will degrade as a resu
   # unnecessary for this test.
 
     cat > conftest.$ac_ext << EOF
-#line 15555 "configure"
+#line 15571 "configure"
 int main()
 {
   _Decimal32 d1;
@@ -15594,7 +15610,7 @@ ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
   # unnecessary for this test.
 
     cat > conftest.$ac_ext << EOF
-#line 15597 "configure"
+#line 15613 "configure"
 template<typename T1, typename T2>
   struct same
   { typedef T2 type; };
@@ -15628,7 +15644,7 @@ $as_echo "$enable_int128" >&6; }
     rm -f conftest*
 
     cat > conftest.$ac_ext << EOF
-#line 15631 "configure"
+#line 15647 "configure"
 template<typename T1, typename T2>
   struct same
   { typedef T2 type; };
diff --git a/libstdc++-v3/doc/Makefile.in b/libstdc++-v3/doc/Makefile.in
index 240a68c..3c1a0d5 100644
--- a/libstdc++-v3/doc/Makefile.in
+++ b/libstdc++-v3/doc/Makefile.in
@@ -57,7 +57,8 @@ am__aclocal_m4_deps = $(top_srcdir)/../config/acx.m4 \
 	$(top_srcdir)/../lt~obsolete.m4 $(top_srcdir)/crossconfig.m4 \
 	$(top_srcdir)/linkage.m4 $(top_srcdir)/acinclude.m4 \
 	$(top_srcdir)/../config/gc++filt.m4 \
-	$(top_srcdir)/../config/tls.m4 $(top_srcdir)/configure.ac
+	$(top_srcdir)/../config/tls.m4 $(top_srcdir)/../config/gthr.m4 \
+	$(top_srcdir)/configure.ac
 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
 	$(ACLOCAL_M4)
 CONFIG_HEADER = $(top_builddir)/config.h
@@ -263,6 +264,7 @@ target_alias = @target_alias@
 target_cpu = @target_cpu@
 target_os = @target_os@
 target_vendor = @target_vendor@
+thread_header = @thread_header@
 top_build_prefix = @top_build_prefix@
 top_builddir = @top_builddir@
 top_srcdir = @top_srcdir@
diff --git a/libstdc++-v3/include/Makefile.am b/libstdc++-v3/include/Makefile.am
index 09925d5..c2487d3 100644
--- a/libstdc++-v3/include/Makefile.am
+++ b/libstdc++-v3/include/Makefile.am
@@ -1148,7 +1148,7 @@ ${host_builddir}/gthr-posix.h: ${toplevel_srcdir}/libgcc/gthr-posix.h \
 	    -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' \
diff --git a/libstdc++-v3/include/Makefile.in b/libstdc++-v3/include/Makefile.in
index a253690..666ed19 100644
--- a/libstdc++-v3/include/Makefile.in
+++ b/libstdc++-v3/include/Makefile.in
@@ -57,7 +57,8 @@ am__aclocal_m4_deps = $(top_srcdir)/../config/acx.m4 \
 	$(top_srcdir)/../lt~obsolete.m4 $(top_srcdir)/crossconfig.m4 \
 	$(top_srcdir)/linkage.m4 $(top_srcdir)/acinclude.m4 \
 	$(top_srcdir)/../config/gc++filt.m4 \
-	$(top_srcdir)/../config/tls.m4 $(top_srcdir)/configure.ac
+	$(top_srcdir)/../config/tls.m4 $(top_srcdir)/../config/gthr.m4 \
+	$(top_srcdir)/configure.ac
 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
 	$(ACLOCAL_M4)
 CONFIG_HEADER = $(top_builddir)/config.h
@@ -253,6 +254,7 @@ target_alias = @target_alias@
 target_cpu = @target_cpu@
 target_os = @target_os@
 target_vendor = @target_vendor@
+thread_header = @thread_header@
 top_build_prefix = @top_build_prefix@
 top_builddir = @top_builddir@
 top_srcdir = @top_srcdir@
@@ -1545,7 +1547,7 @@ ${host_builddir}/gthr-posix.h: ${toplevel_srcdir}/libgcc/gthr-posix.h \
 	    -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' \
diff --git a/libstdc++-v3/libsupc++/Makefile.in b/libstdc++-v3/libsupc++/Makefile.in
index e745179..8bf86f3 100644
--- a/libstdc++-v3/libsupc++/Makefile.in
+++ b/libstdc++-v3/libsupc++/Makefile.in
@@ -59,7 +59,8 @@ am__aclocal_m4_deps = $(top_srcdir)/../config/acx.m4 \
 	$(top_srcdir)/../lt~obsolete.m4 $(top_srcdir)/crossconfig.m4 \
 	$(top_srcdir)/linkage.m4 $(top_srcdir)/acinclude.m4 \
 	$(top_srcdir)/../config/gc++filt.m4 \
-	$(top_srcdir)/../config/tls.m4 $(top_srcdir)/configure.ac
+	$(top_srcdir)/../config/tls.m4 $(top_srcdir)/../config/gthr.m4 \
+	$(top_srcdir)/configure.ac
 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
 	$(ACLOCAL_M4)
 CONFIG_HEADER = $(top_builddir)/config.h
@@ -90,10 +91,10 @@ am__installdirs = "$(DESTDIR)$(toolexeclibdir)" "$(DESTDIR)$(bitsdir)" \
 	"$(DESTDIR)$(stddir)"
 LTLIBRARIES = $(noinst_LTLIBRARIES) $(toolexeclib_LTLIBRARIES)
 libsupc___la_LIBADD =
-am__objects_1 = array_type_info.lo atexit_arm.lo atexit_thread.lo bad_alloc.lo \
-	bad_cast.lo bad_typeid.lo class_type_info.lo del_op.lo \
-	del_opnt.lo del_opv.lo del_opvnt.lo dyncast.lo eh_alloc.lo \
-	eh_arm.lo eh_aux_runtime.lo eh_call.lo eh_catch.lo \
+am__objects_1 = array_type_info.lo atexit_arm.lo atexit_thread.lo \
+	bad_alloc.lo bad_cast.lo bad_typeid.lo class_type_info.lo \
+	del_op.lo del_opnt.lo del_opv.lo del_opvnt.lo dyncast.lo \
+	eh_alloc.lo eh_arm.lo eh_aux_runtime.lo eh_call.lo eh_catch.lo \
 	eh_exception.lo eh_globals.lo eh_personality.lo eh_ptr.lo \
 	eh_term_handler.lo eh_terminate.lo eh_tm.lo eh_throw.lo \
 	eh_type.lo eh_unex_handler.lo enum_type_info.lo \
@@ -313,6 +314,7 @@ target_alias = @target_alias@
 target_cpu = @target_cpu@
 target_os = @target_os@
 target_vendor = @target_vendor@
+thread_header = @thread_header@
 top_build_prefix = @top_build_prefix@
 top_builddir = @top_builddir@
 top_srcdir = @top_srcdir@
diff --git a/libstdc++-v3/po/Makefile.in b/libstdc++-v3/po/Makefile.in
index b6e9def..bb0f590 100644
--- a/libstdc++-v3/po/Makefile.in
+++ b/libstdc++-v3/po/Makefile.in
@@ -57,7 +57,8 @@ am__aclocal_m4_deps = $(top_srcdir)/../config/acx.m4 \
 	$(top_srcdir)/../lt~obsolete.m4 $(top_srcdir)/crossconfig.m4 \
 	$(top_srcdir)/linkage.m4 $(top_srcdir)/acinclude.m4 \
 	$(top_srcdir)/../config/gc++filt.m4 \
-	$(top_srcdir)/../config/tls.m4 $(top_srcdir)/configure.ac
+	$(top_srcdir)/../config/tls.m4 $(top_srcdir)/../config/gthr.m4 \
+	$(top_srcdir)/configure.ac
 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
 	$(ACLOCAL_M4)
 CONFIG_HEADER = $(top_builddir)/config.h
@@ -253,6 +254,7 @@ target_alias = @target_alias@
 target_cpu = @target_cpu@
 target_os = @target_os@
 target_vendor = @target_vendor@
+thread_header = @thread_header@
 top_build_prefix = @top_build_prefix@
 top_builddir = @top_builddir@
 top_srcdir = @top_srcdir@
diff --git a/libstdc++-v3/python/Makefile.in b/libstdc++-v3/python/Makefile.in
index d0fd51d..49f71a1 100644
--- a/libstdc++-v3/python/Makefile.in
+++ b/libstdc++-v3/python/Makefile.in
@@ -58,7 +58,8 @@ am__aclocal_m4_deps = $(top_srcdir)/../config/acx.m4 \
 	$(top_srcdir)/../lt~obsolete.m4 $(top_srcdir)/crossconfig.m4 \
 	$(top_srcdir)/linkage.m4 $(top_srcdir)/acinclude.m4 \
 	$(top_srcdir)/../config/gc++filt.m4 \
-	$(top_srcdir)/../config/tls.m4 $(top_srcdir)/configure.ac
+	$(top_srcdir)/../config/tls.m4 $(top_srcdir)/../config/gthr.m4 \
+	$(top_srcdir)/configure.ac
 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
 	$(ACLOCAL_M4)
 CONFIG_HEADER = $(top_builddir)/config.h
@@ -277,6 +278,7 @@ target_alias = @target_alias@
 target_cpu = @target_cpu@
 target_os = @target_os@
 target_vendor = @target_vendor@
+thread_header = @thread_header@
 top_build_prefix = @top_build_prefix@
 top_builddir = @top_builddir@
 top_srcdir = @top_srcdir@
diff --git a/libstdc++-v3/src/Makefile.in b/libstdc++-v3/src/Makefile.in
index 56eb09a..f9ff319 100644
--- a/libstdc++-v3/src/Makefile.in
+++ b/libstdc++-v3/src/Makefile.in
@@ -58,7 +58,8 @@ am__aclocal_m4_deps = $(top_srcdir)/../config/acx.m4 \
 	$(top_srcdir)/../lt~obsolete.m4 $(top_srcdir)/crossconfig.m4 \
 	$(top_srcdir)/linkage.m4 $(top_srcdir)/acinclude.m4 \
 	$(top_srcdir)/../config/gc++filt.m4 \
-	$(top_srcdir)/../config/tls.m4 $(top_srcdir)/configure.ac
+	$(top_srcdir)/../config/tls.m4 $(top_srcdir)/../config/gthr.m4 \
+	$(top_srcdir)/configure.ac
 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
 	$(ACLOCAL_M4)
 CONFIG_HEADER = $(top_builddir)/config.h
@@ -303,6 +304,7 @@ target_alias = @target_alias@
 target_cpu = @target_cpu@
 target_os = @target_os@
 target_vendor = @target_vendor@
+thread_header = @thread_header@
 top_build_prefix = @top_build_prefix@
 top_builddir = @top_builddir@
 top_srcdir = @top_srcdir@
diff --git a/libstdc++-v3/src/c++11/Makefile.in b/libstdc++-v3/src/c++11/Makefile.in
index 22a8c53..793bbae 100644
--- a/libstdc++-v3/src/c++11/Makefile.in
+++ b/libstdc++-v3/src/c++11/Makefile.in
@@ -58,7 +58,8 @@ am__aclocal_m4_deps = $(top_srcdir)/../config/acx.m4 \
 	$(top_srcdir)/../lt~obsolete.m4 $(top_srcdir)/crossconfig.m4 \
 	$(top_srcdir)/linkage.m4 $(top_srcdir)/acinclude.m4 \
 	$(top_srcdir)/../config/gc++filt.m4 \
-	$(top_srcdir)/../config/tls.m4 $(top_srcdir)/configure.ac
+	$(top_srcdir)/../config/tls.m4 $(top_srcdir)/../config/gthr.m4 \
+	$(top_srcdir)/configure.ac
 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
 	$(ACLOCAL_M4)
 CONFIG_HEADER = $(top_builddir)/config.h
@@ -270,6 +271,7 @@ target_alias = @target_alias@
 target_cpu = @target_cpu@
 target_os = @target_os@
 target_vendor = @target_vendor@
+thread_header = @thread_header@
 top_build_prefix = @top_build_prefix@
 top_builddir = @top_builddir@
 top_srcdir = @top_srcdir@
diff --git a/libstdc++-v3/src/c++98/Makefile.in b/libstdc++-v3/src/c++98/Makefile.in
index 26608c5..d154b98 100644
--- a/libstdc++-v3/src/c++98/Makefile.in
+++ b/libstdc++-v3/src/c++98/Makefile.in
@@ -58,7 +58,8 @@ am__aclocal_m4_deps = $(top_srcdir)/../config/acx.m4 \
 	$(top_srcdir)/../lt~obsolete.m4 $(top_srcdir)/crossconfig.m4 \
 	$(top_srcdir)/linkage.m4 $(top_srcdir)/acinclude.m4 \
 	$(top_srcdir)/../config/gc++filt.m4 \
-	$(top_srcdir)/../config/tls.m4 $(top_srcdir)/configure.ac
+	$(top_srcdir)/../config/tls.m4 $(top_srcdir)/../config/gthr.m4 \
+	$(top_srcdir)/configure.ac
 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
 	$(ACLOCAL_M4)
 CONFIG_HEADER = $(top_builddir)/config.h
@@ -286,6 +287,7 @@ target_alias = @target_alias@
 target_cpu = @target_cpu@
 target_os = @target_os@
 target_vendor = @target_vendor@
+thread_header = @thread_header@
 top_build_prefix = @top_build_prefix@
 top_builddir = @top_builddir@
 top_srcdir = @top_srcdir@
diff --git a/libstdc++-v3/testsuite/Makefile.in b/libstdc++-v3/testsuite/Makefile.in
index d286ce2..96b3f9f 100644
--- a/libstdc++-v3/testsuite/Makefile.in
+++ b/libstdc++-v3/testsuite/Makefile.in
@@ -57,7 +57,8 @@ am__aclocal_m4_deps = $(top_srcdir)/../config/acx.m4 \
 	$(top_srcdir)/../lt~obsolete.m4 $(top_srcdir)/crossconfig.m4 \
 	$(top_srcdir)/linkage.m4 $(top_srcdir)/acinclude.m4 \
 	$(top_srcdir)/../config/gc++filt.m4 \
-	$(top_srcdir)/../config/tls.m4 $(top_srcdir)/configure.ac
+	$(top_srcdir)/../config/tls.m4 $(top_srcdir)/../config/gthr.m4 \
+	$(top_srcdir)/configure.ac
 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
 	$(ACLOCAL_M4)
 CONFIG_HEADER = $(top_builddir)/config.h
@@ -253,6 +254,7 @@ target_alias = @target_alias@
 target_cpu = @target_cpu@
 target_os = @target_os@
 target_vendor = @target_vendor@
+thread_header = @thread_header@
 top_build_prefix = @top_build_prefix@
 top_builddir = @top_builddir@
 top_srcdir = @top_srcdir@

^ permalink raw reply	[flat|nested] 23+ messages in thread

* Re: [PATCH, libstdc++] Fix missing gthr-default.h issue on libstdc++ configure
  2012-10-12 14:21         ` Pavel Chupin
@ 2012-10-12 15:01           ` Paolo Carlini
  2012-10-13 19:42             ` David Edelsohn
  0 siblings, 1 reply; 23+ messages in thread
From: Paolo Carlini @ 2012-10-12 15:01 UTC (permalink / raw)
  To: Pavel Chupin
  Cc: David Edelsohn, Rainer Orth, Kirill Yukhin, Olivier Hainque,
	Benjamin Kosnik, Andrew Pinski, gcc-patches, libstdc++,
	Igor Zamyatin

On 10/12/2012 04:20 PM, Pavel Chupin wrote:
> Please see attached patch (applicable after revert).
> I've moved libgcc libstdc++ common configure thread header chunk into
> separate gthr.m4.
> Could you please try it on AIX?
>
> Is it OK for trunk?
Looks Ok. If David can test is successfully on AIX I can approve it.
> Is it OK for 4.7 after a week testing in trunk?
Frankly, I'm not sure. I don't think is fixing a regression? Let's say 
at least two weeks anyway.

Thanks,
Paolo.

^ permalink raw reply	[flat|nested] 23+ messages in thread

* Re: [PATCH, libstdc++] Fix missing gthr-default.h issue on libstdc++ configure
  2012-10-12 15:01           ` Paolo Carlini
@ 2012-10-13 19:42             ` David Edelsohn
  2012-10-15 13:21               ` Kirill Yukhin
  0 siblings, 1 reply; 23+ messages in thread
From: David Edelsohn @ 2012-10-13 19:42 UTC (permalink / raw)
  To: Paolo Carlini
  Cc: Pavel Chupin, Rainer Orth, Kirill Yukhin, Olivier Hainque,
	Benjamin Kosnik, Andrew Pinski, gcc-patches, libstdc++,
	Igor Zamyatin

On Fri, Oct 12, 2012 at 10:59 AM, Paolo Carlini
<paolo.carlini@oracle.com> wrote:
> On 10/12/2012 04:20 PM, Pavel Chupin wrote:
>>
>> Please see attached patch (applicable after revert).
>> I've moved libgcc libstdc++ common configure thread header chunk into
>> separate gthr.m4.
>> Could you please try it on AIX?
>>
>> Is it OK for trunk?
>
> Looks Ok. If David can test is successfully on AIX I can approve it.

I was able to bootstrap successfully with the patch.

Thanks, David

^ permalink raw reply	[flat|nested] 23+ messages in thread

* Re: [PATCH, libstdc++] Fix missing gthr-default.h issue on libstdc++ configure
  2012-10-13 19:42             ` David Edelsohn
@ 2012-10-15 13:21               ` Kirill Yukhin
  2012-10-15 14:01                 ` Olivier Hainque
  0 siblings, 1 reply; 23+ messages in thread
From: Kirill Yukhin @ 2012-10-15 13:21 UTC (permalink / raw)
  To: David Edelsohn
  Cc: Paolo Carlini, Pavel Chupin, Rainer Orth, Olivier Hainque,
	Benjamin Kosnik, Andrew Pinski, gcc-patches, libstdc++,
	Igor Zamyatin

>> Looks Ok. If David can test is successfully on AIX I can approve it.
>
> I was able to bootstrap successfully with the patch.

Checked in: http://gcc.gnu.org/ml/gcc-cvs/2012-10/msg00581.html

Thanks, K

^ permalink raw reply	[flat|nested] 23+ messages in thread

* Re: [PATCH, libstdc++] Fix missing gthr-default.h issue on libstdc++ configure
  2012-10-15 13:21               ` Kirill Yukhin
@ 2012-10-15 14:01                 ` Olivier Hainque
  0 siblings, 0 replies; 23+ messages in thread
From: Olivier Hainque @ 2012-10-15 14:01 UTC (permalink / raw)
  To: Kirill Yukhin
  Cc: Olivier Hainque, David Edelsohn, Paolo Carlini, Pavel Chupin,
	Rainer Orth, Benjamin Kosnik, Andrew Pinski, gcc-patches,
	libstdc++,
	Igor Zamyatin


On Oct 15, 2012, at 15:12 , Kirill Yukhin <kirill.yukhin@gmail.com> wrote:
>> I was able to bootstrap successfully with the patch.
> 
> Checked in: http://gcc.gnu.org/ml/gcc-cvs/2012-10/msg00581.html

 Thanks :)

^ permalink raw reply	[flat|nested] 23+ messages in thread

* Re: [PATCH, libstdc++] Fix missing gthr-default.h issue on libstdc++ configure
  2012-10-10 12:06             ` Kirill Yukhin
@ 2012-10-11 13:16               ` Olivier Hainque
  0 siblings, 0 replies; 23+ messages in thread
From: Olivier Hainque @ 2012-10-11 13:16 UTC (permalink / raw)
  To: Kirill Yukhin
  Cc: Olivier Hainque, Benjamin Kosnik, Pavel Chupin, Andrew Pinski,
	gcc-patches, libstdc++,
	Igor Zamyatin

Hello,

The change apparently broke targets that have their gthr- header not
in libgcc/ directly, quite a few.

We are seeing failure on ppc-aix for example, which has 

  ./libgcc/config/rs6000/gthr-aix.h

We are also seeing failures while building a win32 canadian
from linux, where we have

  ./libgcc/config/i386/gthr-win32.h

This one is really problematic.

The failures we are seeing are all of the form:

<<
make[5]: Entering directory `<bla>/obj/powerpc-ibm-aix5.2.0.0/libstdc++-v3/include'
make[5]: *** No rule to make target `<bla>/src/libstdc++-v3/../libgcc/gthr-aix.h', needed by `powerpc-ibm-aix5.2.0.0/bits/gthr-default.h'.  Stop.
>>

This, in particular:

+  glibcxx_thread_h=gthr-$target_thread_file.h

-${host_builddir}/gthr-default.h: ${toplevel_builddir}/libgcc/gthr-default.h \
+${host_builddir}/gthr-default.h: ${toplevel_srcdir}/libgcc/${glibcxx_thread_h} \

looks very suspicious wrt gthr headers buried in libgcc
target subdirs.

Can you please have a look ?

Thanks in advance,

Olivier

^ permalink raw reply	[flat|nested] 23+ messages in thread

* Re: [PATCH, libstdc++] Fix missing gthr-default.h issue on libstdc++ configure
  2012-10-09 17:47           ` Benjamin Kosnik
@ 2012-10-10 12:06             ` Kirill Yukhin
  2012-10-11 13:16               ` Olivier Hainque
  0 siblings, 1 reply; 23+ messages in thread
From: Kirill Yukhin @ 2012-10-10 12:06 UTC (permalink / raw)
  To: Benjamin Kosnik
  Cc: Pavel Chupin, Andrew Pinski, gcc-patches, libstdc++, Igor Zamyatin

Hi guys,

>> Is it ok for release it into trunk and 4.7?
>
> Yes, please do so.

Checked into trunk: http://gcc.gnu.org/ml/gcc-cvs/2012-10/msg00419.html
and 4.7: http://gcc.gnu.org/ml/gcc-cvs/2012-10/msg00431.html

Thanks, K

^ permalink raw reply	[flat|nested] 23+ messages in thread

* Re: [PATCH, libstdc++] Fix missing gthr-default.h issue on libstdc++ configure
  2012-10-09  9:59         ` Pavel Chupin
@ 2012-10-09 17:47           ` Benjamin Kosnik
  2012-10-10 12:06             ` Kirill Yukhin
  0 siblings, 1 reply; 23+ messages in thread
From: Benjamin Kosnik @ 2012-10-09 17:47 UTC (permalink / raw)
  To: Pavel Chupin; +Cc: Andrew Pinski, gcc-patches, libstdc++, Igor Zamyatin


> I'd like to know if my direction is ok. I can look into other issues
> releated to this and fix them, but it doesn't make much sense if
> separate build is not supported and can be easily broken in the
> future.

I like your direction here.

> This patch is enough for 4.7 to have build working (at least in
> Android environment).

Confirmed.

> Is it ok for release it into trunk and 4.7?

Yes, please do so.

> I'll take care of remaining trunk issues with other patches if
> necessary.

Great. I just tested your patch on trunk, and despite what I said
yesterday, it seems to work.

-benjamin

^ permalink raw reply	[flat|nested] 23+ messages in thread

* Re: [PATCH, libstdc++] Fix missing gthr-default.h issue on libstdc++ configure
  2012-10-09  0:50       ` Benjamin De Kosnik
@ 2012-10-09  9:59         ` Pavel Chupin
  2012-10-09 17:47           ` Benjamin Kosnik
  0 siblings, 1 reply; 23+ messages in thread
From: Pavel Chupin @ 2012-10-09  9:59 UTC (permalink / raw)
  To: Benjamin De Kosnik; +Cc: Andrew Pinski, gcc-patches, libstdc++, Igor Zamyatin

I'd like to know if my direction is ok. I can look into other issues
releated to this and fix them, but it doesn't make much sense if
separate build is not supported and can be easily broken in the
future.
This patch is enough for 4.7 to have build working (at least in
Android environment).

Is it ok for release it into trunk and 4.7?
I'll take care of remaining trunk issues with other patches if necessary.

2012/10/9 Benjamin De Kosnik <bkoz@redhat.com>:
>
>> On Android NDK libstdc++ is configured, built and packaged separately.
>> The problem is not dependency on libgcc sources but rather dependency
>> on the symlink which is generated during libgcc build and cannot be
>> found if libstdc++ is configured and built separately.
>> It was working fine for 4.4 and 4.6. This issue has been introduced
>> in 4.7.
>
> I can verify that building this way works for 4.6.
>
> This style of build, building separately, has not been known to work
> before. In fact, it was explicitly broken for years. I am quite
> surprised (but delighted) to see it working in 4.6.
>
> Separate builds not mentioned here:
> http://gcc.gnu.org/onlinedocs/libstdc++/manual/configure.html
>
> This patch is fine. Alone, it's not enough to get you were you want to
> go, as the build then dies in AC_OUTPUT, and libtool is not generated.
>
>
> -benjamin



-- 
Pavel Chupin
Software Engineer
Intel Corporation

^ permalink raw reply	[flat|nested] 23+ messages in thread

* Re: [PATCH, libstdc++] Fix missing gthr-default.h issue on libstdc++ configure
  2012-10-08 13:44     ` Pavel Chupin
  2012-10-08 14:05       ` Paolo Carlini
@ 2012-10-09  0:50       ` Benjamin De Kosnik
  2012-10-09  9:59         ` Pavel Chupin
  1 sibling, 1 reply; 23+ messages in thread
From: Benjamin De Kosnik @ 2012-10-09  0:50 UTC (permalink / raw)
  To: Pavel Chupin; +Cc: Andrew Pinski, gcc-patches, libstdc++, Igor Zamyatin


> On Android NDK libstdc++ is configured, built and packaged separately.
> The problem is not dependency on libgcc sources but rather dependency
> on the symlink which is generated during libgcc build and cannot be
> found if libstdc++ is configured and built separately.
> It was working fine for 4.4 and 4.6. This issue has been introduced
> in 4.7.

I can verify that building this way works for 4.6. 

This style of build, building separately, has not been known to work
before. In fact, it was explicitly broken for years. I am quite
surprised (but delighted) to see it working in 4.6.

Separate builds not mentioned here:
http://gcc.gnu.org/onlinedocs/libstdc++/manual/configure.html

This patch is fine. Alone, it's not enough to get you were you want to
go, as the build then dies in AC_OUTPUT, and libtool is not generated.


-benjamin

^ permalink raw reply	[flat|nested] 23+ messages in thread

* Re: [PATCH, libstdc++] Fix missing gthr-default.h issue on libstdc++ configure
  2012-10-08 14:26         ` Pavel Chupin
@ 2012-10-08 14:51           ` Paolo Carlini
  0 siblings, 0 replies; 23+ messages in thread
From: Paolo Carlini @ 2012-10-08 14:51 UTC (permalink / raw)
  To: Pavel Chupin; +Cc: Andrew Pinski, gcc-patches, libstdc++, Igor Zamyatin, ro

Hi,

Pavel Chupin <pavel.v.chupin@gmail.com> ha scritto:

>It has been changed here:
>http://gcc.gnu.org/git/?p=gcc.git;a=commit;h=630d52ca0a88d173f89634a5d7dd8aee07d04d80
>
>subj:"Move gthr to toplevel libgcc"

I see, thanks. Let's add Rainer in CC, see if he expected this to happen or not.

Paolo

^ permalink raw reply	[flat|nested] 23+ messages in thread

* Re: [PATCH, libstdc++] Fix missing gthr-default.h issue on libstdc++ configure
  2012-10-08 14:05       ` Paolo Carlini
@ 2012-10-08 14:26         ` Pavel Chupin
  2012-10-08 14:51           ` Paolo Carlini
  0 siblings, 1 reply; 23+ messages in thread
From: Pavel Chupin @ 2012-10-08 14:26 UTC (permalink / raw)
  To: Paolo Carlini; +Cc: Andrew Pinski, gcc-patches, libstdc++, Igor Zamyatin

It has been changed here:
http://gcc.gnu.org/git/?p=gcc.git;a=commit;h=630d52ca0a88d173f89634a5d7dd8aee07d04d80

subj:"Move gthr to toplevel libgcc"

Here is the change (builddir is used as the directory for gthr_default.h):
-${host_builddir}/gthr-default.h: ${toplevel_srcdir}/gcc/${glibcxx_thread_h} \
+${host_builddir}/gthr-default.h: ${toplevel_builddir}/libgcc/gthr-default.h \

All other changes are fine since continue to look into srcdir:
-${host_builddir}/gthr-posix.h: ${toplevel_srcdir}/gcc/gthr-posix.h \
+${host_builddir}/gthr-posix.h: ${toplevel_srcdir}/libgcc/config/gthr-posix.h \

2012/10/8 Paolo Carlini <paolo.carlini@oracle.com>:
> On 10/08/2012 03:43 PM, Pavel Chupin wrote:
>>
>> This issue has been introduced in 4.7.
>
> Irrespective of what we are eventually going to do from a practical point of
> view, I think it would be important to understand when/what introduced the
> issue: did you analyze that in any detail?
>
> Thanks,
> Paolo.



-- 
Pavel Chupin
Software Engineer
Intel Corporation

^ permalink raw reply	[flat|nested] 23+ messages in thread

* Re: [PATCH, libstdc++] Fix missing gthr-default.h issue on libstdc++ configure
  2012-10-08 13:44     ` Pavel Chupin
@ 2012-10-08 14:05       ` Paolo Carlini
  2012-10-08 14:26         ` Pavel Chupin
  2012-10-09  0:50       ` Benjamin De Kosnik
  1 sibling, 1 reply; 23+ messages in thread
From: Paolo Carlini @ 2012-10-08 14:05 UTC (permalink / raw)
  To: Pavel Chupin; +Cc: Andrew Pinski, gcc-patches, libstdc++, Igor Zamyatin

On 10/08/2012 03:43 PM, Pavel Chupin wrote:
> This issue has been introduced in 4.7.
Irrespective of what we are eventually going to do from a practical 
point of view, I think it would be important to understand when/what 
introduced the issue: did you analyze that in any detail?

Thanks,
Paolo.

^ permalink raw reply	[flat|nested] 23+ messages in thread

* Re: [PATCH, libstdc++] Fix missing gthr-default.h issue on libstdc++ configure
  2012-10-05 23:47   ` Andrew Pinski
@ 2012-10-08 13:44     ` Pavel Chupin
  2012-10-08 14:05       ` Paolo Carlini
  2012-10-09  0:50       ` Benjamin De Kosnik
  0 siblings, 2 replies; 23+ messages in thread
From: Pavel Chupin @ 2012-10-08 13:44 UTC (permalink / raw)
  To: Andrew Pinski; +Cc: gcc-patches, libstdc++, Igor Zamyatin

On Android NDK libstdc++ is configured, built and packaged separately.
The problem is not dependency on libgcc sources but rather dependency
on the symlink which is generated during libgcc build and cannot be
found if libstdc++ is configured and built separately.
It was working fine for 4.4 and 4.6. This issue has been introduced in 4.7.

Do you think libstdc++ should not be built separately?

2012/10/6 Andrew Pinski <pinskia@gmail.com>:
> On Fri, Oct 5, 2012 at 12:13 PM, Andrew Pinski <pinskia@gmail.com> wrote:
>> On Fri, Oct 5, 2012 at 7:32 AM, Pavel Chupin <pavel.v.chupin@gmail.com> wrote:
>>> I can't configure libstdc++ separately. To reproduce:
>>>
>>> mkdir BUILD
>>> cd BUILD
>>> ../libstdc++-v3/configure
>>>
>>> Error:
>>> make: *** No rule to make target
>>> `/users/pvchupin/android/toolchain/gcc/gcc-4.8/BUILD/../libgcc/gthr-default.h',
>>> needed by `bits/gthr-default.h'.  Stop.
>>>
>>> See fix attached.
>>>
>>> Ok for trunk and 4.7?
>>
>> Why do you want to compile libstdc++ separately from GCC?  I think you
>> need to explain why you want to do that.  In fact libstdc++ depends on
>> libgcc internals is not a bug but rather a feature.
>
> One more thing is that for cases where target==host!=build, you can
> just use the libraries which are produced by the cross compiler and
> use "make all-host" and "make install-host" for the programs.
>
> This should simplify how Yocto builds the "native" GCC and not
> worrying about building libstdc++ separately.
>
> Thanks,
> Andrew Pinski
>
>>
>> Thanks,
>> Andrew Pinski
>>
>>
>>
>>>
>>> 2012-10-05  Pavel Chupin  <pavel.v.chupin@intel.com>
>>>
>>>         Fix missing gthr-default.h issue on separate libstdc++ configure
>>>         * libstdc++-v3/acinclude.m4: Define glibcxx_thread_h.
>>>         * libstdc++-v3/include/Makefile.am: Use glibcxx_thread_h.
>>>         * libstdc++-v3/Makefile.in: Regenerate.
>>>         * libstdc++-v3/configure: Regenerate.
>>>         * libstdc++-v3/doc/Makefile.in: Regenerate.
>>>         * libstdc++-v3/include/Makefile.in: Regenerate.
>>>         * libstdc++-v3/libsupc++/Makefile.in: Regenerate.
>>>         * libstdc++-v3/po/Makefile.in: Regenerate.
>>>         * libstdc++-v3/python/Makefile.in: Regenerate.
>>>         * libstdc++-v3/src/Makefile.in: Regenerate.
>>>         * libstdc++-v3/src/c++11/Makefile.in: Regenerate.
>>>         * libstdc++-v3/src/c++98/Makefile.in: Regenerate.
>>>         * libstdc++-v3/testsuite/Makefile.in: Regenerate.
>>>
>>> --
>>> Pavel Chupin
>>> Intel Corporation



-- 
Pavel Chupin
Software Engineer
Intel Corporation

^ permalink raw reply	[flat|nested] 23+ messages in thread

* Re: [PATCH, libstdc++] Fix missing gthr-default.h issue on libstdc++ configure
  2012-10-05 19:13 ` Andrew Pinski
@ 2012-10-05 23:47   ` Andrew Pinski
  2012-10-08 13:44     ` Pavel Chupin
  0 siblings, 1 reply; 23+ messages in thread
From: Andrew Pinski @ 2012-10-05 23:47 UTC (permalink / raw)
  To: Pavel Chupin; +Cc: gcc-patches, libstdc++, Igor Zamyatin

On Fri, Oct 5, 2012 at 12:13 PM, Andrew Pinski <pinskia@gmail.com> wrote:
> On Fri, Oct 5, 2012 at 7:32 AM, Pavel Chupin <pavel.v.chupin@gmail.com> wrote:
>> I can't configure libstdc++ separately. To reproduce:
>>
>> mkdir BUILD
>> cd BUILD
>> ../libstdc++-v3/configure
>>
>> Error:
>> make: *** No rule to make target
>> `/users/pvchupin/android/toolchain/gcc/gcc-4.8/BUILD/../libgcc/gthr-default.h',
>> needed by `bits/gthr-default.h'.  Stop.
>>
>> See fix attached.
>>
>> Ok for trunk and 4.7?
>
> Why do you want to compile libstdc++ separately from GCC?  I think you
> need to explain why you want to do that.  In fact libstdc++ depends on
> libgcc internals is not a bug but rather a feature.

One more thing is that for cases where target==host!=build, you can
just use the libraries which are produced by the cross compiler and
use "make all-host" and "make install-host" for the programs.

This should simplify how Yocto builds the "native" GCC and not
worrying about building libstdc++ separately.

Thanks,
Andrew Pinski

>
> Thanks,
> Andrew Pinski
>
>
>
>>
>> 2012-10-05  Pavel Chupin  <pavel.v.chupin@intel.com>
>>
>>         Fix missing gthr-default.h issue on separate libstdc++ configure
>>         * libstdc++-v3/acinclude.m4: Define glibcxx_thread_h.
>>         * libstdc++-v3/include/Makefile.am: Use glibcxx_thread_h.
>>         * libstdc++-v3/Makefile.in: Regenerate.
>>         * libstdc++-v3/configure: Regenerate.
>>         * libstdc++-v3/doc/Makefile.in: Regenerate.
>>         * libstdc++-v3/include/Makefile.in: Regenerate.
>>         * libstdc++-v3/libsupc++/Makefile.in: Regenerate.
>>         * libstdc++-v3/po/Makefile.in: Regenerate.
>>         * libstdc++-v3/python/Makefile.in: Regenerate.
>>         * libstdc++-v3/src/Makefile.in: Regenerate.
>>         * libstdc++-v3/src/c++11/Makefile.in: Regenerate.
>>         * libstdc++-v3/src/c++98/Makefile.in: Regenerate.
>>         * libstdc++-v3/testsuite/Makefile.in: Regenerate.
>>
>> --
>> Pavel Chupin
>> Intel Corporation

^ permalink raw reply	[flat|nested] 23+ messages in thread

* Re: [PATCH, libstdc++] Fix missing gthr-default.h issue on libstdc++ configure
  2012-10-05 14:32 Pavel Chupin
@ 2012-10-05 19:13 ` Andrew Pinski
  2012-10-05 23:47   ` Andrew Pinski
  0 siblings, 1 reply; 23+ messages in thread
From: Andrew Pinski @ 2012-10-05 19:13 UTC (permalink / raw)
  To: Pavel Chupin; +Cc: gcc-patches, libstdc++, Igor Zamyatin

On Fri, Oct 5, 2012 at 7:32 AM, Pavel Chupin <pavel.v.chupin@gmail.com> wrote:
> I can't configure libstdc++ separately. To reproduce:
>
> mkdir BUILD
> cd BUILD
> ../libstdc++-v3/configure
>
> Error:
> make: *** No rule to make target
> `/users/pvchupin/android/toolchain/gcc/gcc-4.8/BUILD/../libgcc/gthr-default.h',
> needed by `bits/gthr-default.h'.  Stop.
>
> See fix attached.
>
> Ok for trunk and 4.7?

Why do you want to compile libstdc++ separately from GCC?  I think you
need to explain why you want to do that.  In fact libstdc++ depends on
libgcc internals is not a bug but rather a feature.

Thanks,
Andrew Pinski



>
> 2012-10-05  Pavel Chupin  <pavel.v.chupin@intel.com>
>
>         Fix missing gthr-default.h issue on separate libstdc++ configure
>         * libstdc++-v3/acinclude.m4: Define glibcxx_thread_h.
>         * libstdc++-v3/include/Makefile.am: Use glibcxx_thread_h.
>         * libstdc++-v3/Makefile.in: Regenerate.
>         * libstdc++-v3/configure: Regenerate.
>         * libstdc++-v3/doc/Makefile.in: Regenerate.
>         * libstdc++-v3/include/Makefile.in: Regenerate.
>         * libstdc++-v3/libsupc++/Makefile.in: Regenerate.
>         * libstdc++-v3/po/Makefile.in: Regenerate.
>         * libstdc++-v3/python/Makefile.in: Regenerate.
>         * libstdc++-v3/src/Makefile.in: Regenerate.
>         * libstdc++-v3/src/c++11/Makefile.in: Regenerate.
>         * libstdc++-v3/src/c++98/Makefile.in: Regenerate.
>         * libstdc++-v3/testsuite/Makefile.in: Regenerate.
>
> --
> Pavel Chupin
> Intel Corporation

^ permalink raw reply	[flat|nested] 23+ messages in thread

* [PATCH, libstdc++] Fix missing gthr-default.h issue on libstdc++ configure
@ 2012-10-05 14:32 Pavel Chupin
  2012-10-05 19:13 ` Andrew Pinski
  0 siblings, 1 reply; 23+ messages in thread
From: Pavel Chupin @ 2012-10-05 14:32 UTC (permalink / raw)
  To: gcc-patches; +Cc: libstdc++, Igor Zamyatin

[-- Attachment #1: Type: text/plain, Size: 1189 bytes --]

I can't configure libstdc++ separately. To reproduce:

mkdir BUILD
cd BUILD
../libstdc++-v3/configure

Error:
make: *** No rule to make target
`/users/pvchupin/android/toolchain/gcc/gcc-4.8/BUILD/../libgcc/gthr-default.h',
needed by `bits/gthr-default.h'.  Stop.

See fix attached.

Ok for trunk and 4.7?

2012-10-05  Pavel Chupin  <pavel.v.chupin@intel.com>

        Fix missing gthr-default.h issue on separate libstdc++ configure
        * libstdc++-v3/acinclude.m4: Define glibcxx_thread_h.
        * libstdc++-v3/include/Makefile.am: Use glibcxx_thread_h.
        * libstdc++-v3/Makefile.in: Regenerate.
        * libstdc++-v3/configure: Regenerate.
        * libstdc++-v3/doc/Makefile.in: Regenerate.
        * libstdc++-v3/include/Makefile.in: Regenerate.
        * libstdc++-v3/libsupc++/Makefile.in: Regenerate.
        * libstdc++-v3/po/Makefile.in: Regenerate.
        * libstdc++-v3/python/Makefile.in: Regenerate.
        * libstdc++-v3/src/Makefile.in: Regenerate.
        * libstdc++-v3/src/c++11/Makefile.in: Regenerate.
        * libstdc++-v3/src/c++98/Makefile.in: Regenerate.
        * libstdc++-v3/testsuite/Makefile.in: Regenerate.

-- 
Pavel Chupin
Intel Corporation

[-- Attachment #2: Fix-missing-gthr-default.h.patch --]
[-- Type: application/octet-stream, Size: 10145 bytes --]

diff --git a/libstdc++-v3/Makefile.in b/libstdc++-v3/Makefile.in
index 34d0e02..921f4ed 100644
--- a/libstdc++-v3/Makefile.in
+++ b/libstdc++-v3/Makefile.in
@@ -244,6 +244,7 @@ glibcxx_localedir = @glibcxx_localedir@
 glibcxx_lt_pic_flag = @glibcxx_lt_pic_flag@
 glibcxx_prefixdir = @glibcxx_prefixdir@
 glibcxx_srcdir = @glibcxx_srcdir@
+glibcxx_thread_h = @glibcxx_thread_h@
 glibcxx_toolexecdir = @glibcxx_toolexecdir@
 glibcxx_toolexeclibdir = @glibcxx_toolexeclibdir@
 gxx_include_dir = @gxx_include_dir@
diff --git a/libstdc++-v3/acinclude.m4 b/libstdc++-v3/acinclude.m4
index b9aa5c7..bf0edb8 100644
--- a/libstdc++-v3/acinclude.m4
+++ b/libstdc++-v3/acinclude.m4
@@ -3297,10 +3297,16 @@ dnl having to write complex code (the sed commands to clean the macro
 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  glibcxx_thread_h
+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])
+
+  glibcxx_thread_h=gthr-$target_thread_file.h
+  AC_SUBST(glibcxx_thread_h)
 ])
 
 
diff --git a/libstdc++-v3/configure b/libstdc++-v3/configure
index 6ff7148..e828643 100755
--- a/libstdc++-v3/configure
+++ b/libstdc++-v3/configure
@@ -708,6 +708,7 @@ BASIC_FILE_H
 CSTDIO_H
 SECTION_FLAGS
 WERROR
+glibcxx_thread_h
 glibcxx_PCHFLAGS
 GLIBCXX_BUILD_PCH_FALSE
 GLIBCXX_BUILD_PCH_TRUE
@@ -11512,7 +11513,7 @@ else
   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
   lt_status=$lt_dlunknown
   cat > conftest.$ac_ext <<_LT_EOF
-#line 11515 "configure"
+#line 11516 "configure"
 #include "confdefs.h"
 
 #if HAVE_DLFCN_H
@@ -11618,7 +11619,7 @@ else
   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
   lt_status=$lt_dlunknown
   cat > conftest.$ac_ext <<_LT_EOF
-#line 11621 "configure"
+#line 11622 "configure"
 #include "confdefs.h"
 
 #if HAVE_DLFCN_H
@@ -15032,7 +15033,7 @@ fi
     #
     # Fake what AC_TRY_COMPILE does.  XXX Look at redoing this new-style.
     cat > conftest.$ac_ext << EOF
-#line 15035 "configure"
+#line 15036 "configure"
 struct S { ~S(); };
 void bar();
 void foo()
@@ -15160,6 +15161,9 @@ $as_echo_n "checking for thread model used by GCC... " >&6; }
   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $target_thread_file" >&5
 $as_echo "$target_thread_file" >&6; }
 
+  glibcxx_thread_h=gthr-$target_thread_file.h
+
+
 
 
   ac_ext=cpp
@@ -15367,7 +15371,7 @@ $as_echo "$glibcxx_cv_atomic_long_long" >&6; }
   # Fake what AC_TRY_COMPILE does.
 
     cat > conftest.$ac_ext << EOF
-#line 15370 "configure"
+#line 15374 "configure"
 int main()
 {
   typedef bool atomic_type;
@@ -15402,7 +15406,7 @@ $as_echo "$glibcxx_cv_atomic_bool" >&6; }
     rm -f conftest*
 
     cat > conftest.$ac_ext << EOF
-#line 15405 "configure"
+#line 15409 "configure"
 int main()
 {
   typedef short atomic_type;
@@ -15437,7 +15441,7 @@ $as_echo "$glibcxx_cv_atomic_short" >&6; }
     rm -f conftest*
 
     cat > conftest.$ac_ext << EOF
-#line 15440 "configure"
+#line 15444 "configure"
 int main()
 {
   // NB: _Atomic_word not necessarily int.
@@ -15473,7 +15477,7 @@ $as_echo "$glibcxx_cv_atomic_int" >&6; }
     rm -f conftest*
 
     cat > conftest.$ac_ext << EOF
-#line 15476 "configure"
+#line 15480 "configure"
 int main()
 {
   typedef long long atomic_type;
@@ -15552,7 +15556,7 @@ $as_echo "$as_me: WARNING: Performance of certain classes will degrade as a resu
   # unnecessary for this test.
 
     cat > conftest.$ac_ext << EOF
-#line 15555 "configure"
+#line 15559 "configure"
 int main()
 {
   _Decimal32 d1;
@@ -15594,7 +15598,7 @@ ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
   # unnecessary for this test.
 
     cat > conftest.$ac_ext << EOF
-#line 15597 "configure"
+#line 15601 "configure"
 template<typename T1, typename T2>
   struct same
   { typedef T2 type; };
@@ -15628,7 +15632,7 @@ $as_echo "$enable_int128" >&6; }
     rm -f conftest*
 
     cat > conftest.$ac_ext << EOF
-#line 15631 "configure"
+#line 15635 "configure"
 template<typename T1, typename T2>
   struct same
   { typedef T2 type; };
diff --git a/libstdc++-v3/doc/Makefile.in b/libstdc++-v3/doc/Makefile.in
index 240a68c..f7aa484 100644
--- a/libstdc++-v3/doc/Makefile.in
+++ b/libstdc++-v3/doc/Makefile.in
@@ -218,6 +218,7 @@ glibcxx_localedir = @glibcxx_localedir@
 glibcxx_lt_pic_flag = @glibcxx_lt_pic_flag@
 glibcxx_prefixdir = @glibcxx_prefixdir@
 glibcxx_srcdir = @glibcxx_srcdir@
+glibcxx_thread_h = @glibcxx_thread_h@
 glibcxx_toolexecdir = @glibcxx_toolexecdir@
 glibcxx_toolexeclibdir = @glibcxx_toolexeclibdir@
 gxx_include_dir = @gxx_include_dir@
diff --git a/libstdc++-v3/include/Makefile.am b/libstdc++-v3/include/Makefile.am
index 09925d5..aecc9a7 100644
--- a/libstdc++-v3/include/Makefile.am
+++ b/libstdc++-v3/include/Makefile.am
@@ -1148,7 +1148,7 @@ ${host_builddir}/gthr-posix.h: ${toplevel_srcdir}/libgcc/gthr-posix.h \
 	    -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/${glibcxx_thread_h} \
 				   stamp-${host_alias}
 	sed -e 's/\(UNUSED\)/_GLIBCXX_\1/g' \
 	    -e 's/\(GCC${uppercase}*_H\)/_GLIBCXX_\1/g' \
diff --git a/libstdc++-v3/include/Makefile.in b/libstdc++-v3/include/Makefile.in
index a253690..fa52fd7 100644
--- a/libstdc++-v3/include/Makefile.in
+++ b/libstdc++-v3/include/Makefile.in
@@ -216,6 +216,7 @@ glibcxx_localedir = @glibcxx_localedir@
 glibcxx_lt_pic_flag = @glibcxx_lt_pic_flag@
 glibcxx_prefixdir = @glibcxx_prefixdir@
 glibcxx_srcdir = @glibcxx_srcdir@
+glibcxx_thread_h = @glibcxx_thread_h@
 glibcxx_toolexecdir = @glibcxx_toolexecdir@
 glibcxx_toolexeclibdir = @glibcxx_toolexeclibdir@
 gxx_include_dir = @gxx_include_dir@
@@ -1545,7 +1546,7 @@ ${host_builddir}/gthr-posix.h: ${toplevel_srcdir}/libgcc/gthr-posix.h \
 	    -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/${glibcxx_thread_h} \
 				   stamp-${host_alias}
 	sed -e 's/\(UNUSED\)/_GLIBCXX_\1/g' \
 	    -e 's/\(GCC${uppercase}*_H\)/_GLIBCXX_\1/g' \
diff --git a/libstdc++-v3/libsupc++/Makefile.in b/libstdc++-v3/libsupc++/Makefile.in
index b2af9ba..79deb5d 100644
--- a/libstdc++-v3/libsupc++/Makefile.in
+++ b/libstdc++-v3/libsupc++/Makefile.in
@@ -276,6 +276,7 @@ glibcxx_localedir = @glibcxx_localedir@
 glibcxx_lt_pic_flag = @glibcxx_lt_pic_flag@
 glibcxx_prefixdir = @glibcxx_prefixdir@
 glibcxx_srcdir = @glibcxx_srcdir@
+glibcxx_thread_h = @glibcxx_thread_h@
 glibcxx_toolexecdir = @glibcxx_toolexecdir@
 glibcxx_toolexeclibdir = @glibcxx_toolexeclibdir@
 gxx_include_dir = @gxx_include_dir@
diff --git a/libstdc++-v3/po/Makefile.in b/libstdc++-v3/po/Makefile.in
index b6e9def..ad583c3 100644
--- a/libstdc++-v3/po/Makefile.in
+++ b/libstdc++-v3/po/Makefile.in
@@ -216,6 +216,7 @@ glibcxx_localedir = @glibcxx_localedir@
 glibcxx_lt_pic_flag = @glibcxx_lt_pic_flag@
 glibcxx_prefixdir = @glibcxx_prefixdir@
 glibcxx_srcdir = @glibcxx_srcdir@
+glibcxx_thread_h = @glibcxx_thread_h@
 glibcxx_toolexecdir = @glibcxx_toolexecdir@
 glibcxx_toolexeclibdir = @glibcxx_toolexeclibdir@
 gxx_include_dir = @gxx_include_dir@
diff --git a/libstdc++-v3/python/Makefile.in b/libstdc++-v3/python/Makefile.in
index d0fd51d..fa0e99d 100644
--- a/libstdc++-v3/python/Makefile.in
+++ b/libstdc++-v3/python/Makefile.in
@@ -240,6 +240,7 @@ glibcxx_localedir = @glibcxx_localedir@
 glibcxx_lt_pic_flag = @glibcxx_lt_pic_flag@
 glibcxx_prefixdir = @glibcxx_prefixdir@
 glibcxx_srcdir = @glibcxx_srcdir@
+glibcxx_thread_h = @glibcxx_thread_h@
 glibcxx_toolexecdir = @glibcxx_toolexecdir@
 glibcxx_toolexeclibdir = @glibcxx_toolexeclibdir@
 gxx_include_dir = @gxx_include_dir@
diff --git a/libstdc++-v3/src/Makefile.in b/libstdc++-v3/src/Makefile.in
index 56eb09a..6cd16c3 100644
--- a/libstdc++-v3/src/Makefile.in
+++ b/libstdc++-v3/src/Makefile.in
@@ -266,6 +266,7 @@ glibcxx_localedir = @glibcxx_localedir@
 glibcxx_lt_pic_flag = @glibcxx_lt_pic_flag@
 glibcxx_prefixdir = @glibcxx_prefixdir@
 glibcxx_srcdir = @glibcxx_srcdir@
+glibcxx_thread_h = @glibcxx_thread_h@
 glibcxx_toolexecdir = @glibcxx_toolexecdir@
 glibcxx_toolexeclibdir = @glibcxx_toolexeclibdir@
 gxx_include_dir = @gxx_include_dir@
diff --git a/libstdc++-v3/src/c++11/Makefile.in b/libstdc++-v3/src/c++11/Makefile.in
index 22a8c53..dc46f29 100644
--- a/libstdc++-v3/src/c++11/Makefile.in
+++ b/libstdc++-v3/src/c++11/Makefile.in
@@ -233,6 +233,7 @@ glibcxx_localedir = @glibcxx_localedir@
 glibcxx_lt_pic_flag = @glibcxx_lt_pic_flag@
 glibcxx_prefixdir = @glibcxx_prefixdir@
 glibcxx_srcdir = @glibcxx_srcdir@
+glibcxx_thread_h = @glibcxx_thread_h@
 glibcxx_toolexecdir = @glibcxx_toolexecdir@
 glibcxx_toolexeclibdir = @glibcxx_toolexeclibdir@
 gxx_include_dir = @gxx_include_dir@
diff --git a/libstdc++-v3/src/c++98/Makefile.in b/libstdc++-v3/src/c++98/Makefile.in
index 26608c5..d897274 100644
--- a/libstdc++-v3/src/c++98/Makefile.in
+++ b/libstdc++-v3/src/c++98/Makefile.in
@@ -249,6 +249,7 @@ glibcxx_localedir = @glibcxx_localedir@
 glibcxx_lt_pic_flag = @glibcxx_lt_pic_flag@
 glibcxx_prefixdir = @glibcxx_prefixdir@
 glibcxx_srcdir = @glibcxx_srcdir@
+glibcxx_thread_h = @glibcxx_thread_h@
 glibcxx_toolexecdir = @glibcxx_toolexecdir@
 glibcxx_toolexeclibdir = @glibcxx_toolexeclibdir@
 gxx_include_dir = @gxx_include_dir@
diff --git a/libstdc++-v3/testsuite/Makefile.in b/libstdc++-v3/testsuite/Makefile.in
index d286ce2..9169956 100644
--- a/libstdc++-v3/testsuite/Makefile.in
+++ b/libstdc++-v3/testsuite/Makefile.in
@@ -216,6 +216,7 @@ glibcxx_localedir = @glibcxx_localedir@
 glibcxx_lt_pic_flag = @glibcxx_lt_pic_flag@
 glibcxx_prefixdir = @glibcxx_prefixdir@
 glibcxx_srcdir = @glibcxx_srcdir@
+glibcxx_thread_h = @glibcxx_thread_h@
 glibcxx_toolexecdir = @glibcxx_toolexecdir@
 glibcxx_toolexeclibdir = @glibcxx_toolexeclibdir@
 gxx_include_dir = @gxx_include_dir@
-- 
1.7.11.4


^ permalink raw reply	[flat|nested] 23+ messages in thread

end of thread, other threads:[~2012-10-15 13:49 UTC | newest]

Thread overview: 23+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-10-11 14:51 [PATCH, libstdc++] Fix missing gthr-default.h issue on libstdc++ configure David Edelsohn
2012-10-11 15:03 ` Pavel Chupin
2012-10-11 15:12   ` Rainer Orth
2012-10-11 18:24     ` Pavel Chupin
2012-10-12 11:31       ` Kirill Yukhin
2012-10-12 12:51       ` David Edelsohn
2012-10-12 14:21         ` Pavel Chupin
2012-10-12 15:01           ` Paolo Carlini
2012-10-13 19:42             ` David Edelsohn
2012-10-15 13:21               ` Kirill Yukhin
2012-10-15 14:01                 ` Olivier Hainque
  -- strict thread matches above, loose matches on Subject: below --
2012-10-05 14:32 Pavel Chupin
2012-10-05 19:13 ` Andrew Pinski
2012-10-05 23:47   ` Andrew Pinski
2012-10-08 13:44     ` Pavel Chupin
2012-10-08 14:05       ` Paolo Carlini
2012-10-08 14:26         ` Pavel Chupin
2012-10-08 14:51           ` Paolo Carlini
2012-10-09  0:50       ` Benjamin De Kosnik
2012-10-09  9:59         ` Pavel Chupin
2012-10-09 17:47           ` Benjamin Kosnik
2012-10-10 12:06             ` Kirill Yukhin
2012-10-11 13:16               ` Olivier Hainque

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).