RFA: Fix libstdc++/42813, partially fix libstdc++/36101

Joern Rennecke amylaar@spamcop.net
Fri Jan 22 10:51:00 GMT 2010


I have successfully bootstrapped / regtested this patch together
with the patch for PR bootstrap/42798 (which is required to build
at all with --enable-build-with-cxx on i686-pc-linux-gnu Fedora 12)
both with and without --enable-build-with-cxx on i686-pc-linux-gnu.

It fixes the libstdc++ abi_check regression, i.e. PR libstdc++/42813 .
-------------- next part --------------
2010-01-22  Joern Rennecke  <amylaar@spamcop.net>

	PR libstdc++/36101, PR libstdc++/42813
[toplevel]:
	* configure.ac (bootstrap_target_libs): Reflect dependency of
	target-libstdc++-v3 on target-libgomp.
	(target_configdirs): Substitute.
	* Makefile.def: Bootstrap target module libgomp.
	Remove dependency of configure-target-libstdc++-v3 on
	configure-target-libgomp.
	Add dependency of all-target-libstdc++-v3 on configure-target-libgomp.
	* Makefile.tpl (TARGET_CONFIGDIRS): New makefile variable.
	(BASE_TARGET_EXPORTS): Export TARGET_CONFIGDIRS.
	* configure, Makefile.in: Regenerate.
libstdc++-v3
	* acinclude.m4: (enable_parallel): Test ${TARGET_CONFIGDIRS} instead of
	loking for omp.h .
	* configure: Regenerate.

Index: libstdc++-v3/acinclude.m4
===================================================================
--- libstdc++-v3/acinclude.m4	(revision 156091)
+++ libstdc++-v3/acinclude.m4	(working copy)
@@ -2023,10 +2023,10 @@ AC_DEFUN([GLIBCXX_ENABLE_PARALLEL], [
 
   # See if configured libgomp/omp.h exists. (libgomp may be in
   # noconfigdirs but not explicitly disabled.)
-  if test -f $glibcxx_builddir/../libgomp/omp.h; then
+  if echo " ${TARGET_CONFIGDIRS} " | grep " libgomp " > /dev/null 2>&1 ; then
     enable_parallel=yes;
   else
-    AC_MSG_NOTICE([$glibcxx_builddir/../libgomp/omp.h not found])
+    AC_MSG_NOTICE([target-libgomp not built])
   fi
 
   AC_MSG_CHECKING([for parallel mode support])
Index: configure.ac
===================================================================
--- configure.ac	(revision 156091)
+++ configure.ac	(working copy)
@@ -1929,6 +1929,12 @@ if test -d ${srcdir}/gcc; then
         ;;
     esac
   done
+  # ??? Makefile.def has dependency information, but this is not available
+  # here.
+  # libstdc++-v3 depends on libgomp, so if we want to bootstrap the former, we
+  # also must bootstrap the latter.
+  bootstrap_target_libs=`echo $bootstrap_target_libs | \
+    sed -e "s/,target-libstdc++-v3,/&target-libgomp,/" `
 
   AC_ARG_ENABLE(stage1-languages,
 [  --enable-stage1-languages@<:@=all@:>@   choose additional languages to build during
@@ -3086,6 +3092,7 @@ AC_SUBST(build_configdirs)
 # Host module lists & subconfigure args.
 AC_SUBST(host_configargs)
 AC_SUBST(configdirs)
+AC_SUBST(target_configdirs)
 
 # Target module lists & subconfigure args.
 AC_SUBST(target_configargs)
Index: Makefile.def
===================================================================
--- Makefile.def	(revision 156091)
+++ Makefile.def	(working copy)
@@ -174,7 +174,7 @@ target_modules = { module= boehm-gc; };
 target_modules = { module= qthreads; };
 target_modules = { module= rda; };
 target_modules = { module= libada; };
-target_modules = { module= libgomp; lib_path=.libs; };
+target_modules = { module= libgomp; bootstrap= true; lib_path=.libs; };
 
 // These are (some of) the make targets to be done in each subdirectory.
 // Not all; these are the ones which don't have special options.
@@ -546,7 +546,10 @@ dependencies = { module=configure-target
 dependencies = { module=all-target-libobjc; on=all-target-libiberty; };
 dependencies = { module=all-target-libobjc; on=all-target-boehm-gc; };
 dependencies = { module=all-target-libstdc++-v3; on=all-target-libiberty; };
-dependencies = { module=configure-target-libstdc++-v3; on=configure-target-libgomp; };
+// parallel_list.o and parallel_settings.o depend on omp.h, which is
+// generated by the libgomp configure.  Unfortunately, due to the use of
+//  recursive make, we can't be that specific.
+dependencies = { module=all-target-libstdc++-v3; on=configure-target-libgomp; };
 
 // Target modules in the 'src' repository.
 lang_env_dependencies = { module=examples; };
Index: Makefile.tpl
===================================================================
--- Makefile.tpl	(revision 156091)
+++ Makefile.tpl	(working copy)
@@ -176,6 +176,7 @@ EXTRA_BUILD_FLAGS = \
 
 # This is the list of directories to built for the host system.
 SUBDIRS = @configdirs@
+TARGET_CONFIGDIRS = @target_configdirs@
 # This is set by the configure script to the arguments to use when configuring
 # directories built for the host system.
 HOST_CONFIGARGS = @host_configargs@
@@ -287,7 +288,8 @@ BASE_TARGET_EXPORTS = \
 @if gcc-bootstrap
 	$(RPATH_ENVVAR)=`echo "$(TARGET_LIB_PATH)$$$(RPATH_ENVVAR)" | sed 's,::*,:,g;s,^:*,,;s,:*$$,,'`; export $(RPATH_ENVVAR); \
 @endif gcc-bootstrap
-	$(RPATH_ENVVAR)=`echo "$(HOST_LIB_PATH)$$$(RPATH_ENVVAR)" | sed 's,::*,:,g;s,^:*,,;s,:*$$,,'`; export $(RPATH_ENVVAR);
+	$(RPATH_ENVVAR)=`echo "$(HOST_LIB_PATH)$$$(RPATH_ENVVAR)" | sed 's,::*,:,g;s,^:*,,;s,:*$$,,'`; export $(RPATH_ENVVAR); \
+	TARGET_CONFIGDIRS="$(TARGET_CONFIGDIRS)"; export TARGET_CONFIGDIRS;
 
 RAW_CXX_TARGET_EXPORTS = \
 	$(BASE_TARGET_EXPORTS) \


More information about the Gcc-patches mailing list