]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
2007-09-17 Benjamin Kosnik <bkoz@redhat.com>
authorbkoz <bkoz@138bc75d-0d04-0410-961f-82ee72b054a4>
Tue, 18 Sep 2007 15:25:39 +0000 (15:25 +0000)
committerbkoz <bkoz@138bc75d-0d04-0410-961f-82ee72b054a4>
Tue, 18 Sep 2007 15:25:39 +0000 (15:25 +0000)
* configure.host: Set atomic_flags on i486.

* include/Makefile.am: Remove parallel-mode pch.
* include/Makefile.in: Regenerate.

* testsuite/lib/libstdc++.exp: Set ld_library_flags for libgomp if
present.

* acinclude.m4 (GLIBCXX_ENABLE_PARALLEL): Comment.
* configure: Regenerate.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@128579 138bc75d-0d04-0410-961f-82ee72b054a4

libstdc++-v3/ChangeLog
libstdc++-v3/acinclude.m4
libstdc++-v3/configure
libstdc++-v3/configure.host
libstdc++-v3/include/Makefile.am
libstdc++-v3/include/Makefile.in
libstdc++-v3/testsuite/lib/libstdc++.exp

index a5ac39f13b8c5b3c8805d0093239ba8e34347160..d8e8666d7f47f9ae42582d9cb06c8f0a1e479ba1 100644 (file)
@@ -1,3 +1,16 @@
+2007-09-17  Benjamin Kosnik  <bkoz@redhat.com>
+
+       * configure.host: Set atomic_flags on i486.
+
+       * include/Makefile.am: Remove parallel-mode pch.        
+       * include/Makefile.in: Regenerate.
+
+       * testsuite/lib/libstdc++.exp: Set ld_library_flags for libgomp if
+       present.
+
+       * acinclude.m4 (GLIBCXX_ENABLE_PARALLEL): Comment.
+       * configure: Regenerate.
+
 2007-09-17  Johannes Singler  <singler@ira.uka.de>
 
         * include/parallel/for_each.h: Fixed comment/doxygen markup typos.
index a6343edb4e3067138ad0b73cd63eff61362b5d38..c26225ee27ca3f7cb17f9f853b3d2d1cf478d248 100644 (file)
@@ -1732,11 +1732,23 @@ dnl  +  Usage:  GLIBCXX_ENABLE_PARALLEL
 dnl
 AC_DEFUN([GLIBCXX_ENABLE_PARALLEL], [
 
+  # NB: libstdc++ may be configured before libgomp: can't check for the actual
+  # dependencies (omp.h and libgomp). 
   enable_parallel=no;
-  if test -f "${glibcxx_builddir}/../libgomp/omp.h"; then
+  if test -f $glibcxx_builddir/../libgomp/omp.h; then
     enable_parallel=yes;
+  else
+    AC_MSG_NOTICE([$glibcxx_builddir/../libgomp/omp.h not found])
   fi
 
+  # Check to see if it's explicitly disabled.
+#  GLIBCXX_ENABLE(libgomp,$1,,[enable code depending on libgomp],
+#      [permit yes|no])
+
+#  if test x$enable_libgomp = xno; then
+#    enable_parallel=no
+#  fi
+
   AC_MSG_CHECKING([for parallel mode support])
   AC_MSG_RESULT([$enable_parallel])
   GLIBCXX_CONDITIONAL(ENABLE_PARALLEL, test $enable_parallel = yes)
index 1ced987ba5554d6354c42b3634c6636d390db2c6..e42e1bbaf4f9de72d80dd3844ff3c08cbb7b822b 100755 (executable)
@@ -16470,11 +16470,24 @@ echo "${ECHO_T}$enable_libstdcxx_debug" >&6
 
 
 
+  # NB: libstdc++ may be configured before libgomp: can't check for the actual
+  # dependencies (omp.h and libgomp).
   enable_parallel=no;
-  if test -f "${glibcxx_builddir}/../libgomp/omp.h"; then
+  if test -f $glibcxx_builddir/../libgomp/omp.h; then
     enable_parallel=yes;
+  else
+    { echo "$as_me:$LINENO: $glibcxx_builddir/../libgomp/omp.h not found" >&5
+echo "$as_me: $glibcxx_builddir/../libgomp/omp.h not found" >&6;}
   fi
 
+  # Check to see if it's explicitly disabled.
+#  GLIBCXX_ENABLE(libgomp,,,[enable code depending on libgomp],
+#      [permit yes|no])
+
+#  if test x$enable_libgomp = xno; then
+#    enable_parallel=no
+#  fi
+
   echo "$as_me:$LINENO: checking for parallel mode support" >&5
 echo $ECHO_N "checking for parallel mode support... $ECHO_C" >&6
   echo "$as_me:$LINENO: result: $enable_parallel" >&5
@@ -17292,7 +17305,7 @@ ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
 
   # Fake what AC_TRY_COMPILE does.  XXX Look at redoing this new-style.
     cat > conftest.$ac_ext << EOF
-#line 17295 "configure"
+#line 17308 "configure"
 int main()
 {
   // NB: _Atomic_word not necessarily int.
index 4031b4e1e257c4fb9690827986e2610ba1685fc4..17421286f06a2e851faf051c3862b1c848b6b50f 100644 (file)
@@ -147,7 +147,7 @@ case "${host_cpu}" in
   ia64)
     atomic_word_dir=cpu/ia64
     ;;
-  i[567]86 | x86_64)
+  i[4567]86 | x86_64)
     atomic_flags="-march=native"
     ;;
   powerpc* | rs6000)
index 3dd11b480e7303cc311f5a4b2a806cd5e6c74d6d..017ffcb3901001ba71013774f90ef89cc13fda2c 100644 (file)
@@ -844,8 +844,7 @@ pch1_output_anchor = ${host_builddir}/stdc++.h
 pch1_output_installdir = ${host_installdir}/stdc++.h.gch
 pch1a_output = ${pch1_output_builddir}/O0g.gch
 pch1b_output = ${pch1_output_builddir}/O2g.gch
-pch1c_output = ${pch1_output_builddir}/O2gp.gch
-pch1_output = ${pch1a_output} ${pch1b_output} ${pch1c_output}
+pch1_output = ${pch1a_output} ${pch1b_output}
 
 pch2_source = ${glibcxx_srcdir}/include/precompiled/stdtr1c++.h
 pch2_output_builddir = ${host_builddir}/stdtr1c++.h.gch
@@ -1154,7 +1153,7 @@ ${host_builddir}/gthr-default.h: ${toplevel_srcdir}/gcc/${glibcxx_thread_h} \
            -e 's,^#include "\(.*\)",#include <bits/\1>,g' \
            < ${toplevel_srcdir}/gcc/${glibcxx_thread_h} > $@
 
-# Build three precompiled C++ includes, stdc++.h.gch/*.gch
+# Build two precompiled C++ includes, stdc++.h.gch/*.gch
 ${pch1a_output}: ${allstamped} ${host_builddir}/c++config.h ${pch1_source}
        if [ ! -d "${pch1_output_builddir}" ]; then \
          mkdir -p ${pch1_output_builddir}; \
@@ -1169,14 +1168,6 @@ ${pch1b_output}: ${allstamped} ${host_builddir}/c++config.h ${pch1_source}
        $(CXX) $(PCHFLAGS) $(AM_CPPFLAGS) -O2 -g ${pch1_source} -o $@
        touch ${pch1_output_anchor}
 
-${pch1c_output}: ${allstamped} ${host_builddir}/c++config.h ${pch1_source}
-       if [ ! -d "${pch1_output_builddir}" ]; then \
-         mkdir -p ${pch1_output_builddir}; \
-       fi; \
-       CXX_PARALLEL_FLAGS="-fgomp -march=native";
-       $(CXX) $(PCHFLAGS) $(AM_CPPFLAGS) -O2 -g $(CXX_PARALLEL_FLAGS) ${pch1_source} -o $@
-       touch ${pch1_output_anchor}
-
 # Build a precompiled TR1 include, stdtr1c++.h.gch/O2.gch
 ${pch2_output}: ${pch2_source} ${pch1_output}
        if [ ! -d "${pch2_output_builddir}" ]; then \
index 80a7c2409dde718496a74f2505867c4b238fe887..0558c6658e96af251fa2e9365066d340d21a6dcb 100644 (file)
@@ -1076,8 +1076,7 @@ pch1_output_anchor = ${host_builddir}/stdc++.h
 pch1_output_installdir = ${host_installdir}/stdc++.h.gch
 pch1a_output = ${pch1_output_builddir}/O0g.gch
 pch1b_output = ${pch1_output_builddir}/O2g.gch
-pch1c_output = ${pch1_output_builddir}/O2gp.gch
-pch1_output = ${pch1a_output} ${pch1b_output} ${pch1c_output}
+pch1_output = ${pch1a_output} ${pch1b_output}
 pch2_source = ${glibcxx_srcdir}/include/precompiled/stdtr1c++.h
 pch2_output_builddir = ${host_builddir}/stdtr1c++.h.gch
 pch2_output_anchor = ${host_builddir}/stdtr1c++.h
@@ -1542,7 +1541,7 @@ ${host_builddir}/gthr-default.h: ${toplevel_srcdir}/gcc/${glibcxx_thread_h} \
            -e 's,^#include "\(.*\)",#include <bits/\1>,g' \
            < ${toplevel_srcdir}/gcc/${glibcxx_thread_h} > $@
 
-# Build three precompiled C++ includes, stdc++.h.gch/*.gch
+# Build two precompiled C++ includes, stdc++.h.gch/*.gch
 ${pch1a_output}: ${allstamped} ${host_builddir}/c++config.h ${pch1_source}
        if [ ! -d "${pch1_output_builddir}" ]; then \
          mkdir -p ${pch1_output_builddir}; \
@@ -1557,14 +1556,6 @@ ${pch1b_output}: ${allstamped} ${host_builddir}/c++config.h ${pch1_source}
        $(CXX) $(PCHFLAGS) $(AM_CPPFLAGS) -O2 -g ${pch1_source} -o $@
        touch ${pch1_output_anchor}
 
-${pch1c_output}: ${allstamped} ${host_builddir}/c++config.h ${pch1_source}
-       if [ ! -d "${pch1_output_builddir}" ]; then \
-         mkdir -p ${pch1_output_builddir}; \
-       fi; \
-       CXX_PARALLEL_FLAGS="-fgomp -march=native";
-       $(CXX) $(PCHFLAGS) $(AM_CPPFLAGS) -O2 -g $(CXX_PARALLEL_FLAGS) ${pch1_source} -o $@
-       touch ${pch1_output_anchor}
-
 # Build a precompiled TR1 include, stdtr1c++.h.gch/O2.gch
 ${pch2_output}: ${pch2_source} ${pch1_output}
        if [ ! -d "${pch2_output_builddir}" ]; then \
index 136c2f7e7cb699f6619f0f6f10f85fb9900c4577..4ba9dc57ef3e6ccfbfed77b2e3dbd2b7e05696ed 100644 (file)
@@ -123,15 +123,26 @@ proc libstdc++_init { testfile } {
     v3-copy-files [glob -nocomplain "$srcdir/data/*.tst"]
     v3-copy-files [glob -nocomplain "$srcdir/data/*.txt"]
 
+    set ld_library_path_tmp ""
+
     # Locate libgcc.a so we don't need to account for different values of
     # SHLIB_EXT on different platforms
     set gccdir [lookfor_file $tool_root_dir gcc/libgcc.a]
     if {$gccdir != ""} {
         set gccdir [file dirname $gccdir]
+       append ld_library_path_tmp ":${gccdir}"
     }
     v3track gccdir 3
 
-    # Look for shared library. (ie libstdc++.so.)
+    # Locate libgomp. This is only required for parallel mode.
+    set libgompdir [lookfor_file $blddir/../libgomp .libs/libgomp.so]
+    if {$libgompdir != ""} {
+        set libgompdir [file dirname $libgompdir]
+       append ld_library_path_tmp ":${libgompdir}"
+    }
+    v3track libgompdir 3
+
+    # Locate libstdc++ shared library. (ie libstdc++.so.)
     set v3-sharedlib 0
     set sharedlibdir [lookfor_file $blddir src/.libs/libstdc++.so]
     if {$sharedlibdir != ""} {
@@ -144,9 +155,8 @@ proc libstdc++_init { testfile } {
 
     # Compute what needs to be added to the existing LD_LIBRARY_PATH.
     if {$gccdir != ""} {
-       set ld_library_path ""
-       append ld_library_path ":${gccdir}"
        set compiler ${gccdir}/g++
+       set ld_library_path ${ld_library_path_tmp}
        append ld_library_path ":${blddir}/src/.libs"
 
        if { [is_remote host] == 0 && [which $compiler] != 0 } {