Bug 42813 - --enable-build-with-cxx libstdc++-v3 is incomplete
Summary: --enable-build-with-cxx libstdc++-v3 is incomplete
Status: RESOLVED FIXED
Alias: None
Product: gcc
Classification: Unclassified
Component: libstdc++ (show other bugs)
Version: 4.5.0
: P3 normal
Target Milestone: ---
Assignee: Not yet assigned to anyone
URL:
Keywords: build, patch
Depends on: 36101
Blocks:
  Show dependency tree / graph
 
Reported: 2010-01-20 18:29 UTC by Jorn Wolfgang Rennecke
Modified: 2026-08-17 12:01 UTC (History)
2 users (show)

See Also:
Host:
Target:
Build:
Known to work:
Known to fail:
Last reconfirmed:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jorn Wolfgang Rennecke 2010-01-20 18:29:14 UTC
On i686-pc-linux-gnu, seven libstdc++-v3 symbols are missing when configuring
with --enable-build-with-cxx.
For x86_64-unknown-linux-gnu, it's 53 vs. 46 missing symbols, i.e. again
seven more missing symbols for --enable-build-with-cxx.

Take for example:
__gnu_parallel::_Settings::get()

In the ordinary compilation, this symbol is defined in parallel_settings.o;
that object file is missing for --enable-build-with-cxx.

compilation of parallel_settings.cc depends on ENABLE_PARALLEL, set
by configure.

Inspection of the src/Makefile files shows that ENABLE_PARALLEL was not
set for --enable-build-with-cxx .
The building of parallel_list.o also depends on ENABLE_PARALLEL;
parallel_list and parallel_settings together account for the seven missing
symbols.

The normal bootstrap log file shows:
line 11064/21065:
checking for parallel mode support... yes

The --enable-build-with-cxx bootstrap log file shows:
line 4234/23482:
configure: /user/inria/fsf/bld-gcc-cxx12/i686-pc-linux-gnu/libstdc++-v3/../libgo
mp/omp.h not found
checking for parallel mode support... no

line 8212/23482:
configure: /user/inria/fsf/bld-gcc-cxx12/i686-pc-linux-gnu/libstdc++-v3/../libgo
mp/omp.h not found
checking for parallel mode support... no

line 12192/23482:
configure: /user/inria/fsf/bld-gcc-cxx12/i686-pc-linux-gnu/libstdc++-v3/../libgomp/omp.h not found
checking for parallel mode support... no


The normal bootstrap log shows:
line 9732/21065:
Configuring in i686-pc-linux-gnu/libgomp

The --enable-build-with-cxx bootstrap log file shows:
line 12983/23482:
Configuring in i686-pc-linux-gnu/libgomp

I.e. the problem is that libgomp is not built before the final
libstdc++-v3 is configured.
Comment 1 Paolo Carlini 2010-01-20 18:42:29 UTC
Is this issue related to PR36101?
Comment 2 Richard Biener 2010-01-20 18:43:27 UTC
libstdc++ configure issue.
Comment 3 Jorn Wolfgang Rennecke 2010-01-20 18:49:16 UTC
(In reply to comment #1)
> Is this issue related to PR36101?
Yes, if PR36101 was fixed, I'd expect this problem to go away.

Comment 4 Jorn Wolfgang Rennecke 2010-01-22 10:48:51 UTC
A patch is here:
http://gcc.gnu.org/ml/gcc-patches/2010-01/msg01168.html
Comment 5 Jorn Wolfgang Rennecke 2010-01-22 13:35:52 UTC
Subject: Bug 42813

Author: amylaar
Date: Fri Jan 22 13:35:38 2010
New Revision: 156172

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=156172
Log:
	PR libstdc++/36101, PR libstdc++/42813
[toplevel]:
	* configure.ac (target_configdirs): Substitute.
	* Makefile.def: Bootstrap target module 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.

Modified:
    trunk/ChangeLog
    trunk/Makefile.def
    trunk/Makefile.in
    trunk/Makefile.tpl
    trunk/configure
    trunk/configure.ac
    trunk/libstdc++-v3/ChangeLog
    trunk/libstdc++-v3/acinclude.m4
    trunk/libstdc++-v3/configure

Comment 6 Jorn Wolfgang Rennecke 2010-01-23 11:17:52 UTC
Subject: Bug 42813

Author: amylaar
Date: Sat Jan 23 11:17:30 2010
New Revision: 156189

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=156189
Log:
	PR libstdc++/36101, PR libstdc++/42813
	* configure.ac (bootstrap_target_libs): Include target-libgomp.
	* configure: Regenerate.

Modified:
    trunk/ChangeLog
    trunk/configure
    trunk/configure.ac

Comment 8 Jorn Wolfgang Rennecke 2010-01-25 18:01:47 UTC
Subject: Bug 42813

Author: amylaar
Date: Mon Jan 25 18:01:29 2010
New Revision: 156218

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=156218
Log:
	PR libstdc++/36101, PR libstdc++/42813
	* configure.ac (bootstrap_target_libs): Make inclusion of
	target-libgomp conditional on libgomb being in target_configdirs.
	* configure: Regenerate.

Modified:
    trunk/ChangeLog
    trunk/configure
    trunk/configure.ac

Comment 9 GCC Commits 2026-08-17 12:01:39 UTC
The master branch has been updated by Kyrylo Tkachov <ktkachov@gcc.gnu.org>:

https://gcc.gnu.org/g:bf2aada7d8a4f701365d260a56cb7669a6934c3e

commit r17-3332-gbf2aada7d8a4f701365d260a56cb7669a6934c3e
Author: Kyrylo Tkachov <ktkachov@nvidia.com>
Date:   Tue Aug 11 09:58:40 2026 +0200

    toplevel: do not make libstdc++ configure wait for libgomp
    
    libstdc++'s configure was made to depend on libgomp's configure by
    r0-83445-g6d3b5aea0bf4c9 ("configure.ac (TOPLEVEL_CONFIGURE_ARGUMENTS): Move
    libgomp before libstdc++.", 2007-09-20), when GLIBCXX_ENABLE_PARALLEL decided
    whether to enable parallel mode by looking for a configured libgomp/omp.h on
    disk:
    
      if test -f $glibcxx_builddir/../libgomp/omp.h; then
    
    r0-98141-gaae29963cf81dd ("PR libstdc++/36101, PR libstdc++/42813",
    2010-01-22) replaced that with
    
      if echo " ${TARGET_CONFIGDIRS} " | grep " libgomp " > /dev/null 2>&1 ; then
    
    so the test now reads a string the top level passes in, and nothing has to
    exist on disk by then.  The comment above it still describes the old
    behaviour, which is what makes the edge look necessary.
    
    Remove it.  The build time dependency, all-target-libstdc++-v3 on
    configure-target-libgomp, stays, since the parallel mode headers do include
    omp.h when they are compiled.
    
    This shortens the chain in front of libstdc++, which is the last thing to
    finish in every bootstrap stage.
    
    Bootstrapped on aarch64-none-linux-gnu.
    
    ChangeLog:
    
            * Makefile.def (dependencies): Remove the configure-target-libstdc++-v3
            on configure-target-libgomp dependency.
            * Makefile.in: Regenerate.
    
    Signed-off-by: Kyrylo Tkachov <ktkachov@nvidia.com>