Commit 6995087d by Benjamin Kosnik Committed by Benjamin Kosnik

re PR libstdc++/35887 (stl parallel includes installed for --disable-libgomp)


2008-04-24  Benjamin Kosnik  <bkoz@redhat.com>

	PR libstdc++/35887 
	* configure.ac: Add default argument to GLIBCXX_ENABLE_PARALLEL.
	Move atomic warnings to GLIBCXX_ENABLE_ATOMIC_BUILTINS.
	* acinclude.m4 (GLIBCXX_ENABLE_PARALLEL): Check for --disable-libgomp.
	(GLIBCXX_ENABLE_ATOMIC_BUILTINS): Add warning information.
	* configure: Regenerate.
	* include/Makefile.am (parallel_headers): Make conditional on
	ENABLE_PARALLEL.
	* include/Makefile.in: Regenerate.

From-SVN: r134649
parent 21df06df
2008-04-24 Benjamin Kosnik <bkoz@redhat.com>
PR libstdc++/35887
* configure.ac: Add default argument to GLIBCXX_ENABLE_PARALLEL.
Move atomic warnings to GLIBCXX_ENABLE_ATOMIC_BUILTINS.
* acinclude.m4 (GLIBCXX_ENABLE_PARALLEL): Check for --disable-libgomp.
(GLIBCXX_ENABLE_ATOMIC_BUILTINS): Add warning information.
* configure: Regenerate.
* include/Makefile.am (parallel_headers): Make conditional on
ENABLE_PARALLEL.
* include/Makefile.in: Regenerate.
2008-04-24 Paolo Carlini <pcarlini@suse.de>
PR libstdc++/35969
......
......@@ -1746,23 +1746,18 @@ 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
enable_parallel=yes;
# Check to see if OpenMP is explicitly disabled.
AC_MSG_CHECKING([for libgomp support])
GLIBCXX_ENABLE(libgomp,$1,,[enable code depending on libgomp],[permit yes|no])
AC_MSG_RESULT([$enable_libgomp])
if test x$enable_libgomp = xno; then
enable_parallel=no
else
AC_MSG_NOTICE([$glibcxx_builddir/../libgomp/omp.h not found])
enable_parallel=yes
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)
......@@ -2224,6 +2219,14 @@ EOF
# If still generic, set to mutex.
if test $atomicity_dir = "cpu/generic" ; then
atomicity_dir=cpu/generic/atomicity_mutex
AC_MSG_WARN([No native atomic operations are provided for this platform.])
if test $target_thread_file = single; then
AC_MSG_WARN([They cannot be faked when thread support is disabled.])
AC_MSG_WARN([Thread-safety of certain classes is not guaranteed.])
else
AC_MSG_WARN([They will be faked using a mutex.])
AC_MSG_WARN([Performance of certain classes will degrade as a result.])
fi
fi
])
......
......@@ -107,30 +107,20 @@ GLIBCXX_ENABLE_C99([yes])
GLIBCXX_ENABLE_CONCEPT_CHECKS([no])
GLIBCXX_ENABLE_DEBUG_FLAGS(["-g3 -O0"])
GLIBCXX_ENABLE_DEBUG([no])
GLIBCXX_ENABLE_PARALLEL
GLIBCXX_ENABLE_PARALLEL([yes])
GLIBCXX_ENABLE_CXX_FLAGS
GLIBCXX_ENABLE_FULLY_DYNAMIC_STRING([no])
# Checks for operating systems support that don't require linking.
GLIBCXX_CHECK_SYSTEM_ERROR
GLIBCXX_CHECK_STANDARD_LAYOUT
# No surprises, no surprises...
GLIBCXX_ENABLE_THREADS
GLIBCXX_ENABLE_ATOMIC_BUILTINS
if test $atomicity_dir = cpu/generic/atomicity_mutex ; then
AC_MSG_WARN([No native atomic operations are provided for this platform.])
if test $target_thread_file = single; then
AC_MSG_WARN([They cannot be faked when thread support is disabled.])
AC_MSG_WARN([Thread-safety of certain classes is not guaranteed.])
else
AC_MSG_WARN([They will be faked using a mutex.])
AC_MSG_WARN([Performance of certain classes will degrade as a result.])
fi
fi
# Checks for compiler support that don't require linking.
GLIBCXX_ENABLE_ATOMIC_BUILTINS
GLIBCXX_CHECK_COMPILER_FEATURES
# Only do link tests if native. Else, hardcode.
if $GLIBCXX_IS_NATIVE; then
# We can do more elaborate tests that assume a working linker.
......
......@@ -706,6 +706,7 @@ debug_headers = \
# Parallel mode headers
parallel_srcdir = ${glibcxx_srcdir}/include/parallel
parallel_builddir = ./parallel
if ENABLE_PARALLEL
parallel_headers = \
${parallel_srcdir}/algorithm \
${parallel_srcdir}/algobase.h \
......@@ -751,6 +752,9 @@ parallel_headers = \
${parallel_srcdir}/types.h \
${parallel_srcdir}/unique_copy.h \
${parallel_srcdir}/workstealing.h
else
parallel_headers =
endif
# Some of the different "C" header models need extra files.
......
......@@ -951,51 +951,52 @@ debug_headers = \
# Parallel mode headers
parallel_srcdir = ${glibcxx_srcdir}/include/parallel
parallel_builddir = ./parallel
parallel_headers = \
${parallel_srcdir}/algorithm \
${parallel_srcdir}/algobase.h \
${parallel_srcdir}/algo.h \
${parallel_srcdir}/algorithm \
${parallel_srcdir}/algorithmfwd.h \
${parallel_srcdir}/balanced_quicksort.h \
${parallel_srcdir}/base.h \
${parallel_srcdir}/basic_iterator.h \
${parallel_srcdir}/checkers.h \
${parallel_srcdir}/compatibility.h \
${parallel_srcdir}/compiletime_settings.h \
${parallel_srcdir}/equally_split.h \
${parallel_srcdir}/features.h \
${parallel_srcdir}/find.h \
${parallel_srcdir}/find_selectors.h \
${parallel_srcdir}/for_each.h \
${parallel_srcdir}/for_each_selectors.h \
${parallel_srcdir}/iterator.h \
${parallel_srcdir}/list_partition.h \
${parallel_srcdir}/losertree.h \
${parallel_srcdir}/merge.h \
${parallel_srcdir}/multiseq_selection.h \
${parallel_srcdir}/multiway_merge.h \
${parallel_srcdir}/multiway_mergesort.h \
${parallel_srcdir}/numeric \
${parallel_srcdir}/numericfwd.h \
${parallel_srcdir}/omp_loop.h \
${parallel_srcdir}/omp_loop_static.h \
${parallel_srcdir}/parallel.h \
${parallel_srcdir}/par_loop.h \
${parallel_srcdir}/partial_sum.h \
${parallel_srcdir}/partition.h \
${parallel_srcdir}/queue.h \
${parallel_srcdir}/quicksort.h \
${parallel_srcdir}/random_number.h \
${parallel_srcdir}/random_shuffle.h \
${parallel_srcdir}/search.h \
${parallel_srcdir}/set_operations.h \
${parallel_srcdir}/settings.h \
${parallel_srcdir}/sort.h \
${parallel_srcdir}/tags.h \
${parallel_srcdir}/types.h \
${parallel_srcdir}/unique_copy.h \
${parallel_srcdir}/workstealing.h
@ENABLE_PARALLEL_FALSE@parallel_headers =
@ENABLE_PARALLEL_TRUE@parallel_headers = \
@ENABLE_PARALLEL_TRUE@ ${parallel_srcdir}/algorithm \
@ENABLE_PARALLEL_TRUE@ ${parallel_srcdir}/algobase.h \
@ENABLE_PARALLEL_TRUE@ ${parallel_srcdir}/algo.h \
@ENABLE_PARALLEL_TRUE@ ${parallel_srcdir}/algorithm \
@ENABLE_PARALLEL_TRUE@ ${parallel_srcdir}/algorithmfwd.h \
@ENABLE_PARALLEL_TRUE@ ${parallel_srcdir}/balanced_quicksort.h \
@ENABLE_PARALLEL_TRUE@ ${parallel_srcdir}/base.h \
@ENABLE_PARALLEL_TRUE@ ${parallel_srcdir}/basic_iterator.h \
@ENABLE_PARALLEL_TRUE@ ${parallel_srcdir}/checkers.h \
@ENABLE_PARALLEL_TRUE@ ${parallel_srcdir}/compatibility.h \
@ENABLE_PARALLEL_TRUE@ ${parallel_srcdir}/compiletime_settings.h \
@ENABLE_PARALLEL_TRUE@ ${parallel_srcdir}/equally_split.h \
@ENABLE_PARALLEL_TRUE@ ${parallel_srcdir}/features.h \
@ENABLE_PARALLEL_TRUE@ ${parallel_srcdir}/find.h \
@ENABLE_PARALLEL_TRUE@ ${parallel_srcdir}/find_selectors.h \
@ENABLE_PARALLEL_TRUE@ ${parallel_srcdir}/for_each.h \
@ENABLE_PARALLEL_TRUE@ ${parallel_srcdir}/for_each_selectors.h \
@ENABLE_PARALLEL_TRUE@ ${parallel_srcdir}/iterator.h \
@ENABLE_PARALLEL_TRUE@ ${parallel_srcdir}/list_partition.h \
@ENABLE_PARALLEL_TRUE@ ${parallel_srcdir}/losertree.h \
@ENABLE_PARALLEL_TRUE@ ${parallel_srcdir}/merge.h \
@ENABLE_PARALLEL_TRUE@ ${parallel_srcdir}/multiseq_selection.h \
@ENABLE_PARALLEL_TRUE@ ${parallel_srcdir}/multiway_merge.h \
@ENABLE_PARALLEL_TRUE@ ${parallel_srcdir}/multiway_mergesort.h \
@ENABLE_PARALLEL_TRUE@ ${parallel_srcdir}/numeric \
@ENABLE_PARALLEL_TRUE@ ${parallel_srcdir}/numericfwd.h \
@ENABLE_PARALLEL_TRUE@ ${parallel_srcdir}/omp_loop.h \
@ENABLE_PARALLEL_TRUE@ ${parallel_srcdir}/omp_loop_static.h \
@ENABLE_PARALLEL_TRUE@ ${parallel_srcdir}/parallel.h \
@ENABLE_PARALLEL_TRUE@ ${parallel_srcdir}/par_loop.h \
@ENABLE_PARALLEL_TRUE@ ${parallel_srcdir}/partial_sum.h \
@ENABLE_PARALLEL_TRUE@ ${parallel_srcdir}/partition.h \
@ENABLE_PARALLEL_TRUE@ ${parallel_srcdir}/queue.h \
@ENABLE_PARALLEL_TRUE@ ${parallel_srcdir}/quicksort.h \
@ENABLE_PARALLEL_TRUE@ ${parallel_srcdir}/random_number.h \
@ENABLE_PARALLEL_TRUE@ ${parallel_srcdir}/random_shuffle.h \
@ENABLE_PARALLEL_TRUE@ ${parallel_srcdir}/search.h \
@ENABLE_PARALLEL_TRUE@ ${parallel_srcdir}/set_operations.h \
@ENABLE_PARALLEL_TRUE@ ${parallel_srcdir}/settings.h \
@ENABLE_PARALLEL_TRUE@ ${parallel_srcdir}/sort.h \
@ENABLE_PARALLEL_TRUE@ ${parallel_srcdir}/tags.h \
@ENABLE_PARALLEL_TRUE@ ${parallel_srcdir}/types.h \
@ENABLE_PARALLEL_TRUE@ ${parallel_srcdir}/unique_copy.h \
@ENABLE_PARALLEL_TRUE@ ${parallel_srcdir}/workstealing.h
@GLIBCXX_C_HEADERS_EXTRA_FALSE@c_base_headers_extra =
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment