configure.host: Set atomic_flags on i486.
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. From-SVN: r128579
This commit is contained in:
parent
e74392f0a8
commit
bdfb7c6d56
@ -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.
|
||||
|
@ -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)
|
||||
|
17
libstdc++-v3/configure
vendored
17
libstdc++-v3/configure
vendored
@ -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.
|
||||
|
@ -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)
|
||||
|
@ -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 \
|
||||
|
@ -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 \
|
||||
|
@ -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 } {
|
||||
|
Loading…
Reference in New Issue
Block a user