+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.
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)
+ # 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
# 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.
ia64)
atomic_word_dir=cpu/ia64
;;
- i[567]86 | x86_64)
+ i[4567]86 | x86_64)
atomic_flags="-march=native"
;;
powerpc* | rs6000)
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
-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}; \
$(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 \
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
-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}; \
$(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 \
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 != ""} {
# 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 } {