public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug libstdc++/65675] New: make bootstrap fails when configured with --disable-hosted-libstdcxx
@ 2015-04-06  4:50 ian at ianshome dot com
  2015-04-06 23:10 ` [Bug libstdc++/65675] " ian at ianshome dot com
                   ` (6 more replies)
  0 siblings, 7 replies; 8+ messages in thread
From: ian at ianshome dot com @ 2015-04-06  4:50 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65675

            Bug ID: 65675
           Summary: make bootstrap fails when configured with
                    --disable-hosted-libstdcxx
           Product: gcc
           Version: 4.8.4
            Status: UNCONFIRMED
          Severity: blocker
          Priority: P3
         Component: libstdc++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: ian at ianshome dot com

Linux Ubuntu-14-04 3.13.0-46-generic

../gcc_4_8_4/configure --enable-cxx-flags=-fno-exceptions \
                       --prefix=/opt/gcc_4_8_4 \
                       --enable-languages=c,c++ \
                       --disable-hosted-libstdcxx

make bootstrap

...

Fails with:

Entering directory `/mnt/gcc-build/gcc'
/mnt/gcc-build/./prev-gcc/xg++ -B/mnt/gcc-build/./prev-gcc/
-B/opt/gcc_4_8_4/x86_64-unknown-linux-gnu/bin/ -nostdinc++
-B/mnt/gcc-build/prev-x86_64-unknown-linux-gnu/libstdc++-v3/src/.libs
-B/mnt/gcc-build/prev-x86_64-unknown-linux-gnu/libstdc++-v3/libsupc++/.libs 
-I/mnt/gcc-build/prev-x86_64-unknown-linux-gnu/libstdc++-v3/include/x86_64-unknown-linux-gnu
 -I/mnt/gcc-build/prev-x86_64-unknown-linux-gnu/libstdc++-v3/include 
-I/mnt/gcc/libstdc++-v3/libsupc++
-L/mnt/gcc-build/prev-x86_64-unknown-linux-gnu/libstdc++-v3/src/.libs
-L/mnt/gcc-build/prev-x86_64-unknown-linux-gnu/libstdc++-v3/libsupc++/.libs  
-g -O2 -gtoggle -DIN_GCC    -fno-exceptions -fno-rtti
-fasynchronous-unwind-tables -W -Wall -Wno-narrowing -Wwrite-strings
-Wcast-qual -Wmissing-format-attribute -pedantic -Wno-long-long
-Wno-variadic-macros -Wno-overlength-strings   -DHAVE_CONFIG_H -DGENERATOR_FILE
-static-libstdc++ -static-libgcc  -o build/genmddeps \
        build/genmddeps.o build/read-md.o build/errors.o
.././libiberty/libiberty.a
/usr/bin/ld: cannot find -lstdc++
collect2: error: ld returned 1 exit status
make[3]: *** [build/genmddeps] Error 1
make[3]: Leaving directory `/mnt/gcc-build/gcc'
make[2]: *** [all-stage2-gcc] Error 2
make[2]: Leaving directory `/mnt/gcc-build'
make[1]: *** [stage2-bubble] Error 2
make[1]: Leaving directory `/mnt/gcc-build'
make: *** [bootstrap] Error 2


^ permalink raw reply	[flat|nested] 8+ messages in thread

* [Bug libstdc++/65675] make bootstrap fails when configured with --disable-hosted-libstdcxx
  2015-04-06  4:50 [Bug libstdc++/65675] New: make bootstrap fails when configured with --disable-hosted-libstdcxx ian at ianshome dot com
@ 2015-04-06 23:10 ` ian at ianshome dot com
  2015-04-06 23:12 ` ian at ianshome dot com
                   ` (5 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: ian at ianshome dot com @ 2015-04-06 23:10 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65675

--- Comment #1 from Ian Collins <ian at ianshome dot com> ---
The same error occurs building the 4.9 branch.


^ permalink raw reply	[flat|nested] 8+ messages in thread

* [Bug libstdc++/65675] make bootstrap fails when configured with --disable-hosted-libstdcxx
  2015-04-06  4:50 [Bug libstdc++/65675] New: make bootstrap fails when configured with --disable-hosted-libstdcxx ian at ianshome dot com
  2015-04-06 23:10 ` [Bug libstdc++/65675] " ian at ianshome dot com
@ 2015-04-06 23:12 ` ian at ianshome dot com
  2015-04-07  8:59 ` redi at gcc dot gnu.org
                   ` (4 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: ian at ianshome dot com @ 2015-04-06 23:12 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65675

Ian Collins <ian at ianshome dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Severity|blocker                     |normal

--- Comment #2 from Ian Collins <ian at ianshome dot com> ---
Specifying --disable-bootstrap as a configure option allows make
all-target-libstdc++-v3 to complete, given an existing compiler install.


^ permalink raw reply	[flat|nested] 8+ messages in thread

* [Bug libstdc++/65675] make bootstrap fails when configured with --disable-hosted-libstdcxx
  2015-04-06  4:50 [Bug libstdc++/65675] New: make bootstrap fails when configured with --disable-hosted-libstdcxx ian at ianshome dot com
  2015-04-06 23:10 ` [Bug libstdc++/65675] " ian at ianshome dot com
  2015-04-06 23:12 ` ian at ianshome dot com
@ 2015-04-07  8:59 ` redi at gcc dot gnu.org
  2015-04-07  9:04 ` [Bug bootstrap/65675] " redi at gcc dot gnu.org
                   ` (3 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: redi at gcc dot gnu.org @ 2015-04-07  8:59 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65675

--- Comment #3 from Jonathan Wakely <redi at gcc dot gnu.org> ---
Since GCC itself now depends on a hosted C++ library, you can't disable the
hosted library when bootstrapping.


^ permalink raw reply	[flat|nested] 8+ messages in thread

* [Bug bootstrap/65675] make bootstrap fails when configured with --disable-hosted-libstdcxx
  2015-04-06  4:50 [Bug libstdc++/65675] New: make bootstrap fails when configured with --disable-hosted-libstdcxx ian at ianshome dot com
                   ` (2 preceding siblings ...)
  2015-04-07  8:59 ` redi at gcc dot gnu.org
@ 2015-04-07  9:04 ` redi at gcc dot gnu.org
  2015-04-07  9:15 ` redi at gcc dot gnu.org
                   ` (2 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: redi at gcc dot gnu.org @ 2015-04-07  9:04 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65675

Jonathan Wakely <redi at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
          Component|libstdc++                   |bootstrap

--- Comment #4 from Jonathan Wakely <redi at gcc dot gnu.org> ---
I'm changing the component to bootstrap, since libstdc++ is behaving as
requested by --disable-hosted-libstdcxx


^ permalink raw reply	[flat|nested] 8+ messages in thread

* [Bug bootstrap/65675] make bootstrap fails when configured with --disable-hosted-libstdcxx
  2015-04-06  4:50 [Bug libstdc++/65675] New: make bootstrap fails when configured with --disable-hosted-libstdcxx ian at ianshome dot com
                   ` (3 preceding siblings ...)
  2015-04-07  9:04 ` [Bug bootstrap/65675] " redi at gcc dot gnu.org
@ 2015-04-07  9:15 ` redi at gcc dot gnu.org
  2023-10-24 16:36 ` [Bug libstdc++/65675] " redi at gcc dot gnu.org
  2023-10-24 19:14 ` redi at gcc dot gnu.org
  6 siblings, 0 replies; 8+ messages in thread
From: redi at gcc dot gnu.org @ 2015-04-07  9:15 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65675

--- Comment #5 from Jonathan Wakely <redi at gcc dot gnu.org> ---
It doesn't allow bootstrapping without a hosted runtime, but we probably want
this patch in libstdc++ anyway:

--- a/libstdc++-v3/include/bits/stl_algo.h
+++ b/libstdc++-v3/include/bits/stl_algo.h
@@ -4420,6 +4420,7 @@ _GLIBCXX_BEGIN_NAMESPACE_ALGO
                                std::__iterator_category(__result));
     }

+#if _GLIBCXX_HOSTED
   /**
    *  @brief Randomly shuffle the elements of a sequence.
    *  @ingroup mutating_algorithms
@@ -4450,6 +4451,7 @@ _GLIBCXX_BEGIN_NAMESPACE_ALGO
              std::iter_swap(__i, __j);
          }
     }
+#endif

   /**
    *  @brief Shuffle the elements of a sequence using a random number


^ permalink raw reply	[flat|nested] 8+ messages in thread

* [Bug libstdc++/65675] make bootstrap fails when configured with --disable-hosted-libstdcxx
  2015-04-06  4:50 [Bug libstdc++/65675] New: make bootstrap fails when configured with --disable-hosted-libstdcxx ian at ianshome dot com
                   ` (4 preceding siblings ...)
  2015-04-07  9:15 ` redi at gcc dot gnu.org
@ 2023-10-24 16:36 ` redi at gcc dot gnu.org
  2023-10-24 19:14 ` redi at gcc dot gnu.org
  6 siblings, 0 replies; 8+ messages in thread
From: redi at gcc dot gnu.org @ 2023-10-24 16:36 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65675

Jonathan Wakely <redi at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Last reconfirmed|                            |2023-10-24
     Ever confirmed|0                           |1
             Status|UNCONFIRMED                 |NEW

--- Comment #7 from Jonathan Wakely <redi at gcc dot gnu.org> ---
(In reply to Jonathan Wakely from comment #4)
> I'm changing the component to bootstrap, since libstdc++ is behaving as
> requested by --disable-hosted-libstdcxx

Huh, Andrew changed it back again :-)

I think the fix is for the top-level configure to also add:

  --disable-bootstrap --disable-libitm

when we're building without a hosted libstdc++. libitm uses C++ headers and
fails to build with a freestanding libstdc++, so we need to disable that too.

^ permalink raw reply	[flat|nested] 8+ messages in thread

* [Bug libstdc++/65675] make bootstrap fails when configured with --disable-hosted-libstdcxx
  2015-04-06  4:50 [Bug libstdc++/65675] New: make bootstrap fails when configured with --disable-hosted-libstdcxx ian at ianshome dot com
                   ` (5 preceding siblings ...)
  2023-10-24 16:36 ` [Bug libstdc++/65675] " redi at gcc dot gnu.org
@ 2023-10-24 19:14 ` redi at gcc dot gnu.org
  6 siblings, 0 replies; 8+ messages in thread
From: redi at gcc dot gnu.org @ 2023-10-24 19:14 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65675

--- Comment #8 from Jonathan Wakely <redi at gcc dot gnu.org> ---
libitm needs getenv, and so does libsanitizer:

/home/test/src/gcc/libsanitizer/ubsan/ubsan_flags.cpp: In function ‘const char*
__ubsan::GetFlag(const char*)’:
/home/test/src/gcc/libsanitizer/ubsan/ubsan_flags.cpp:29:12: error: ‘getenv’
was not declared in this scope
   29 |     return getenv(flag);
      |            ^~~~~~


So we need --disable-libsanitizer too.

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2023-10-24 19:14 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-04-06  4:50 [Bug libstdc++/65675] New: make bootstrap fails when configured with --disable-hosted-libstdcxx ian at ianshome dot com
2015-04-06 23:10 ` [Bug libstdc++/65675] " ian at ianshome dot com
2015-04-06 23:12 ` ian at ianshome dot com
2015-04-07  8:59 ` redi at gcc dot gnu.org
2015-04-07  9:04 ` [Bug bootstrap/65675] " redi at gcc dot gnu.org
2015-04-07  9:15 ` redi at gcc dot gnu.org
2023-10-24 16:36 ` [Bug libstdc++/65675] " redi at gcc dot gnu.org
2023-10-24 19:14 ` redi at gcc dot gnu.org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).