diff --git a/libstdc++-v3/doc/html/index.html b/libstdc++-v3/doc/html/index.html index ce951e6cc8e..ed7021bd461 100644 --- a/libstdc++-v3/doc/html/index.html +++ b/libstdc++-v3/doc/html/index.html @@ -1,6 +1,6 @@ -The GNU C++ Library

The GNU C++ Library

Short Contents

- Copyright (C) 2008-2022 +The GNU C++ Library

The GNU C++ Library

Short Contents

+ Copyright (C) 2008-2023 FSF

diff --git a/libstdc++-v3/doc/html/manual/configure.html b/libstdc++-v3/doc/html/manual/configure.html index 9c5c2d9f170..dd9e6ef3579 100644 --- a/libstdc++-v3/doc/html/manual/configure.html +++ b/libstdc++-v3/doc/html/manual/configure.html @@ -219,7 +219,10 @@ built. The C++ Standard also describes a freestanding environment, in which only a minimal set of headers are provided. This option builds such an - environment. + environment. Note that a hosted library installs headers that still can + be used in non hosted environments, as the library checks for + __STDC_HOSTED__, however, a library configured with + --disable-hosted-libstdcxx will not install unusable headers.

--disable-libstdcxx-hosted

This is an alias for --disable-hosted-libstdcxx.

--disable-libstdcxx-verbose

By default, the library is configured to write descriptive messages to standard error for certain events such as calling a pure virtual diff --git a/libstdc++-v3/doc/html/manual/documentation_hacking.html b/libstdc++-v3/doc/html/manual/documentation_hacking.html index 7766f133bea..24df9bd9481 100644 --- a/libstdc++-v3/doc/html/manual/documentation_hacking.html +++ b/libstdc++-v3/doc/html/manual/documentation_hacking.html @@ -560,4 +560,4 @@ make XSL_STYLE_DIR="/usr/share/xml/docbook/stylesheet/nwal


Home Porting to New Hardware or Operating Systems
\ No newline at end of file diff --git a/libstdc++-v3/doc/html/manual/memory.html b/libstdc++-v3/doc/html/manual/memory.html index a70613e8fd6..08ad2fd4dd8 100644 --- a/libstdc++-v3/doc/html/manual/memory.html +++ b/libstdc++-v3/doc/html/manual/memory.html @@ -644,4 +644,4 @@ be private. . N2461 - .

+ .

\ No newline at end of file diff --git a/libstdc++-v3/doc/html/manual/policy_data_structures.html b/libstdc++-v3/doc/html/manual/policy_data_structures.html index ef54da8053a..90345550012 100644 --- a/libstdc++-v3/doc/html/manual/policy_data_structures.html +++ b/libstdc++-v3/doc/html/manual/policy_data_structures.html @@ -1297,4 +1297,4 @@ Wickland . National Psychological Institute - .

+ .

\ No newline at end of file diff --git a/libstdc++-v3/doc/html/manual/status.html b/libstdc++-v3/doc/html/manual/status.html index 47bb0781417..c99d51ff709 100644 --- a/libstdc++-v3/doc/html/manual/status.html +++ b/libstdc++-v3/doc/html/manual/status.html @@ -1916,7 +1916,11 @@ or any notes about the implementation. P2186R2 - 12.1  

C++ TR1

+ 12.1   Easy [utilities], [ranges], and [iterators] + + P1642R11 + + 13.1  


C++ TR1

This table is based on the table of contents of ISO/IEC DTR 19768, Doc No: N1836=05-0096, Date: 2005-06-24, "Draft Technical Report on C++ Library Extensions". diff --git a/libstdc++-v3/doc/html/manual/test.html b/libstdc++-v3/doc/html/manual/test.html index 10ae4ed5e1b..fadadf249bb 100644 --- a/libstdc++-v3/doc/html/manual/test.html +++ b/libstdc++-v3/doc/html/manual/test.html @@ -203,6 +203,18 @@ cat 27_io/objects/char/3_xin.in | a.out

     make check-target-libstdc++-v3 RUNTESTFLAGS='--target_board \"unix{-mabi=32,,-mabi=64}\"'
 

+

+ If you wish to run the testsuite in a freestanding configuration, you can + pass the -ffreestanding flag. Doing so will run the tests + that do not require hosted features, and emit a + UNSUPPORTED for those that do. To run tests in the + freestanding configuration, you still need to build for a target you can + run programs on, e.g. x86_64-pc-linux-gnu, as a few tests + still execute the code they build. Here's an example of how to run the + testsuite with libstdc++ in freestanding mode: +

+    make check-target-libstdc++-v3 RUNTESTFLAGS='--target_board=unix/-ffreestanding'
+      

You can run the tests with a compiler and library that have already been installed. Make sure that the compiler (e.g., diff --git a/libstdc++-v3/doc/html/manual/using.html b/libstdc++-v3/doc/html/manual/using.html index f2dc2078759..f23325ebe97 100644 --- a/libstdc++-v3/doc/html/manual/using.html +++ b/libstdc++-v3/doc/html/manual/using.html @@ -40,4 +40,10 @@ -fopenmpFor parallel mode.-ltbbLinking to tbb (Thread Building Blocks) is required for use of the Parallel Standard Algorithms and execution policies in <execution>. + -ffreestanding + Limits the library to its freestanding subset. Headers that are + not supported in freestanding will emit a "This header is not available + in freestanding mode" error. + Headers that are in the freestanding subset partially will not expose + functionality that is not part of the freestanding subset.


\ No newline at end of file diff --git a/libstdc++-v3/doc/html/manual/using_dynamic_or_shared.html b/libstdc++-v3/doc/html/manual/using_dynamic_or_shared.html index 3c9e5fa54b0..73d1f18485f 100644 --- a/libstdc++-v3/doc/html/manual/using_dynamic_or_shared.html +++ b/libstdc++-v3/doc/html/manual/using_dynamic_or_shared.html @@ -30,15 +30,40 @@ initializer_list

  • type_traits -

  • There exists a library that offers runtime support for - just these headers, and it is called - libsupc++.a. To use it, compile with gcc instead of g++, like so: +

    + As of GCC 13, libstdc++ implements P1642, which brings in many more + headers, as well a quite a few ones not covered by the paper. + + In general, if a feature does not require traditionally libc-provided + facilities, or dynamic memory allocation, it's enabled in the + freestanding subset. In addition, if only a subset of a header + requires such features, it is partially included. Some examples + include: +

    • + string_view +

    • + tuple +

    • + bitset +

    + Currently, this subset includes all of the iterator APIs (including the + ranges APIs) that do not involve streams, the entire C++ algorithms + library, excluding parallel algorithms, and a large part of the + utilities library. This is on top of the headers included in the lists + above.

    - gcc foo.cc -lsupc++ + If you're using a libstdc++ configured for hosted environments, and + would like to not involve the libraries libstdc++ would depend on in + your programs, you will need to use gcc to link your + application with only libsupc++.a, + like so:

    - No attempt is made to verify that only the minimal subset - identified above is actually used at compile time. Violations - are diagnosed as undefined symbols at link time. + gcc -ffreestanding foo.cc -lsupc++ +

    + If you configured libstdc++ with + --disable-hosted-libstdcxx, however, you can use the + normal g++ command to link, as this configuration + provides a (nearly) empty libstdc++.a.

    Finding Dynamic or Shared Libraries

    If the only library built is the static library (libstdc++.a), or if diff --git a/libstdc++-v3/doc/xml/manual/configure.xml b/libstdc++-v3/doc/xml/manual/configure.xml index 8b3b8cab8c7..7ff07aea886 100644 --- a/libstdc++-v3/doc/xml/manual/configure.xml +++ b/libstdc++-v3/doc/xml/manual/configure.xml @@ -362,7 +362,10 @@ built. The C++ Standard also describes a freestanding environment, in which only a minimal set of headers are provided. This option builds such an - environment. + environment. Note that a hosted library installs headers that still can + be used in non hosted environments, as the library checks for + __STDC_HOSTED__, however, a library configured with + --disable-hosted-libstdcxx will not install unusable headers. diff --git a/libstdc++-v3/doc/xml/manual/status_cxx2023.xml b/libstdc++-v3/doc/xml/manual/status_cxx2023.xml index 365df505f54..f23c64d6a29 100644 --- a/libstdc++-v3/doc/xml/manual/status_cxx2023.xml +++ b/libstdc++-v3/doc/xml/manual/status_cxx2023.xml @@ -566,6 +566,17 @@ or any notes about the implementation. + + Easy [utilities], [ranges], and [iterators] + + + P1642R11 + + + 13.1 + + + diff --git a/libstdc++-v3/doc/xml/manual/test.xml b/libstdc++-v3/doc/xml/manual/test.xml index 7bc6e339723..964c53d2632 100644 --- a/libstdc++-v3/doc/xml/manual/test.xml +++ b/libstdc++-v3/doc/xml/manual/test.xml @@ -350,6 +350,20 @@ cat 27_io/objects/char/3_xin.in | a.out + + If you wish to run the testsuite in a freestanding configuration, you can + pass the -ffreestanding flag. Doing so will run the tests + that do not require hosted features, and emit a + UNSUPPORTED for those that do. To run tests in the + freestanding configuration, you still need to build for a target you can + run programs on, e.g. x86_64-pc-linux-gnu, as a few tests + still execute the code they build. Here's an example of how to run the + testsuite with libstdc++ in freestanding mode: + + make check-target-libstdc++-v3 RUNTESTFLAGS='--target_board=unix/-ffreestanding' + + + You can run the tests with a compiler and library that have already been installed. Make sure that the compiler (e.g., diff --git a/libstdc++-v3/doc/xml/manual/using.xml b/libstdc++-v3/doc/xml/manual/using.xml index 9c444dd2997..7f011a6d931 100644 --- a/libstdc++-v3/doc/xml/manual/using.xml +++ b/libstdc++-v3/doc/xml/manual/using.xml @@ -132,6 +132,17 @@ + + -ffreestanding + + Limits the library to its freestanding subset. Headers that are + not supported in freestanding will emit a "This header is not available + in freestanding mode" error. + Headers that are in the freestanding subset partially will not expose + functionality that is not part of the freestanding subset. + + + @@ -1523,19 +1534,60 @@ namespace gtk - There exists a library that offers runtime support for - just these headers, and it is called - libsupc++.a. To use it, compile with gcc instead of g++, like so: + + As of GCC 13, libstdc++ implements P1642, which brings in many more + headers, as well a quite a few ones not covered by the paper. + + In general, if a feature does not require traditionally libc-provided + facilities, or dynamic memory allocation, it's enabled in the + freestanding subset. In addition, if only a subset of a header + requires such features, it is partially included. Some examples + include: + + + + + + string_view + + + + + tuple + + + + + bitset + + + + + + Currently, this subset includes all of the iterator APIs (including the + ranges APIs) that do not involve streams, the entire C++ algorithms + library, excluding parallel algorithms, and a large part of the + utilities library. This is on top of the headers included in the lists + above. - gcc foo.cc -lsupc++ + If you're using a libstdc++ configured for hosted environments, and + would like to not involve the libraries libstdc++ would depend on in + your programs, you will need to use gcc to link your + application with only libsupc++.a, + like so: - No attempt is made to verify that only the minimal subset - identified above is actually used at compile time. Violations - are diagnosed as undefined symbols at link time. + gcc -ffreestanding foo.cc -lsupc++ + + + + If you configured libstdc++ with + --disable-hosted-libstdcxx, however, you can use the + normal g++ command to link, as this configuration + provides a (nearly) empty libstdc++.a.