[PUSHED,2/3] doc: Move Picolibc option documentation

Message ID 20260404234813.676699-2-sloosemore@baylibre.com
State New
Headers
Series [PUSHED,1/3] doc: Rename "Submodel Options" |

Checks

Context Check Description
rivoscibot/toolchain-ci-rivos-apply-patch warning Patch failed to apply to tip of tree.
rivoscibot/toolchain-ci-rivos-lint warning Lint failed
rivoscibot/toolchain-ci-rivos-build--newlib-rv64gcv-lp64d-multilib success Build passed
rivoscibot/toolchain-ci-rivos-build--linux-rv64gcv-lp64d-multilib success Build passed
rivoscibot/toolchain-ci-rivos-build--linux-rv64gc_zba_zbb_zbc_zbs-lp64d-multilib success Build passed
rivoscibot/toolchain-ci-rivos-test success Testing passed
linaro-tcwg-bot/tcwg_gcc_build--master-arm fail Patch failed to apply
linaro-tcwg-bot/tcwg_gcc_build--master-aarch64 fail Patch failed to apply

Commit Message

Sandra Loosemore April 4, 2026, 11:48 p.m. UTC
  The documentation for Picolibc options was inserted at the top level
within the GCC options section.  It really should be classified with
the target-specific options; that's where we document other options
specific to the runtime configuration, including MinGW, Darwin,
Gnu/Linux, etc.

gcc/ChangeLog
	* doc/invoke.texi (GCC Command Options): Move Picolibc Options
	section to Target-Specific Options.
	(Option Summary): Likewise.
---
 gcc/doc/invoke.texi | 137 ++++++++++++++++++++++----------------------
 1 file changed, 68 insertions(+), 69 deletions(-)
  

Patch

diff --git a/gcc/doc/invoke.texi b/gcc/doc/invoke.texi
index aab93f49e7a..68f0b3b2270 100644
--- a/gcc/doc/invoke.texi
+++ b/gcc/doc/invoke.texi
@@ -164,7 +164,6 @@  listing and explanation of the binary and decimal byte size prefixes.
 * Link Options::        Specifying libraries and so on.
 * Directory Options::   Where to find header files and libraries.
                         Where to find the compiler executable files.
-* Picolibc Options::    Select compile and link options when using picolibc.
 * Code Gen Options::    Specifying conventions for function calls, data layout
                         and register usage.
 * Developer Options::   Printing GCC configuration info, statistics, and
@@ -798,11 +797,6 @@  Objective-C and Objective-C++ Dialects}.
 --no-canonical-prefixes  --no-standard-includes
 --prefix=@var{prefix}  --sysroot=@var{dir}}
 
-@item Picolibc Options
-@xref{Picolibc Options,,Options for use with Picolibc}.
-@gccoptlist{--oslib=@var{library} --crt0=@r{[}none@r{|}minimal@r{|}hosted@r{|}semihost@r{]}
---printf=@r{[}d@r{|}f@r{|}l@r{|}i@r{|}m@r{]}  --scanf=@r{[}d@r{|}f@r{|}l@r{|}i@r{|}m@r{]}}
-
 @item Code Generation Options
 @xref{Code Gen Options,,Options for Code Generation Conventions}.
 @gccoptlist{-fcall-saved-@var{reg}  -fcall-used-@var{reg}
@@ -1319,6 +1313,10 @@  Objective-C and Objective-C++ Dialects}.
 -mint32  -mint16
 -msplit  -munix-asm  -mdec-asm  -mgnu-asm  -mlra}
 
+@emph{Picolibc Options} (@ref{Picolibc Options})
+@gccoptlist{--oslib=@var{library} --crt0=@r{[}none@r{|}minimal@r{|}hosted@r{|}semihost@r{]}
+--printf=@r{[}d@r{|}f@r{|}l@r{|}i@r{|}m@r{]}  --scanf=@r{[}d@r{|}f@r{|}l@r{|}i@r{|}m@r{]}}
+
 @emph{PowerPC Options}
 See RS/6000 and PowerPC Options.
 
@@ -18928,69 +18926,6 @@  such a suffix.
 
 @end table
 
-@node Picolibc Options
-@section Options for use with Picolibc
-@cindex picolibc options
-@cindex options, picolibc
-
-These options control compilation and linking when using picolibc:
-
-@table @gcctabopt
-@opindex oslib
-@item --oslib=@var{library}
-Search the library named @var{library} after the C library, permitting
-symbols undefined by the C library to be defined by this library. The
-C library, libgcc and this library are placed between
-@option{--start-group} and @option{--end-group} flags so that each can
-refer to symbols in the others. For many targets, picolibc provides a
-@samp{semihost} variant (specified with @option{--oslib=semihost})
-which provides enough basic OS functionality to support console and
-file I/O when run in an emulator or when using an in-circuit debugger.
-
-@opindex crt0
-@item --crt0=@r{[}none@r{|}minimal@r{|}hosted@r{|}semihost@r{]}
-Replace the default @file{crt0.o} name with
-@file{crt0-@var{variant}.o}. The @samp{none} variant provides no
-startup code at all, allowing the user to supply their
-own. @samp{minimal} performs basic memory setup but does not invoke
-any constructors. When no @option{-crt0} option is provided, the
-default initialization code adds calls to all
-constructors. @samp{hosted} adds a call to @code{exit} when
-@code{main} returns. @samp{semihost} accesses a command line parameter
-supplied via the semihosting interface and splits that into arguments
-at whitespace boundaries, passing the resulting array of strings to
-main in @code{argc} and @code{argv}. On some targets, including
-aarch64, arc, arm, loongarch, m68k, riscv, super-h and x86,
-@samp{semihost} also traps hardware exceptions and prints information
-to the console. Note that @option{--crt0=semihost} depends upon APIs
-provided by @option{--oslib=semihost}.
-
-@opindex printf
-@item --printf=@r{[}d@r{|}f@r{|}l@r{|}i@r{|}m@r{]}
-Select the printf variant. Picolibc provides five different printf
-variants which offer decreasing levels of functionality along with
-decreasing code size. @samp{d} is the default level, offering full C17
-and POSIX.1-2024 conformance. @samp{f} provides the same feature set,
-but supports @code{float} values instead of @code{double} which are
-passed using the @code{printf_float} macro. @samp{l} elides all
-floating point and POSIX positional parameter support. @samp{i} limits
-integers to those no larger than @code{long}. @samp{m} removes support
-for most formatting options including width and precision. The formats
-and arguments are still parsed correctly, but output does not respect
-those parameters.
-
-@opindex scanf
-@item --scanf=@r{[}d@r{|}f@r{|}l@r{|}i@r{|}m@r{]}
-Select the scanf variant. Picolibc provides five different scanf
-variants which offer decreasing levels of functionality along with
-decreasing code size. @samp{d} is the default level, offering full C17
-and POSIX.1-2024 conformance. @samp{f} removes support for
-@code{double} values. @samp{l} elides all floating point
-support. @samp{i} limits integers to those no larger than
-@code{long}. @samp{m} removes support for @code{%[} conversion specifiers.
-
-@end table
-
 @node Code Gen Options
 @section Options for Code Generation Conventions
 @cindex code generation conventions
@@ -21258,6 +21193,7 @@  other compilers on the same platform.
 * Nvidia PTX Options::
 * OpenRISC Options::
 * PDP-11 Options::
+* Picolibc Options::
 * PowerPC Options::
 * PRU Options::
 * RISC-V Options::
@@ -30915,6 +30851,69 @@  Use the new LRA register allocator.  By default, the old ``reload''
 allocator is used.
 @end table
 
+@node Picolibc Options
+@subsection Picolibc Options
+@cindex picolibc options
+@cindex options, picolibc
+
+These options control compilation and linking when using picolibc:
+
+@table @gcctabopt
+@opindex oslib
+@item --oslib=@var{library}
+Search the library named @var{library} after the C library, permitting
+symbols undefined by the C library to be defined by this library. The
+C library, libgcc and this library are placed between
+@option{--start-group} and @option{--end-group} flags so that each can
+refer to symbols in the others. For many targets, picolibc provides a
+@samp{semihost} variant (specified with @option{--oslib=semihost})
+which provides enough basic OS functionality to support console and
+file I/O when run in an emulator or when using an in-circuit debugger.
+
+@opindex crt0
+@item --crt0=@r{[}none@r{|}minimal@r{|}hosted@r{|}semihost@r{]}
+Replace the default @file{crt0.o} name with
+@file{crt0-@var{variant}.o}. The @samp{none} variant provides no
+startup code at all, allowing the user to supply their
+own. @samp{minimal} performs basic memory setup but does not invoke
+any constructors. When no @option{-crt0} option is provided, the
+default initialization code adds calls to all
+constructors. @samp{hosted} adds a call to @code{exit} when
+@code{main} returns. @samp{semihost} accesses a command line parameter
+supplied via the semihosting interface and splits that into arguments
+at whitespace boundaries, passing the resulting array of strings to
+main in @code{argc} and @code{argv}. On some targets, including
+aarch64, arc, arm, loongarch, m68k, riscv, super-h and x86,
+@samp{semihost} also traps hardware exceptions and prints information
+to the console. Note that @option{--crt0=semihost} depends upon APIs
+provided by @option{--oslib=semihost}.
+
+@opindex printf
+@item --printf=@r{[}d@r{|}f@r{|}l@r{|}i@r{|}m@r{]}
+Select the printf variant. Picolibc provides five different printf
+variants which offer decreasing levels of functionality along with
+decreasing code size. @samp{d} is the default level, offering full C17
+and POSIX.1-2024 conformance. @samp{f} provides the same feature set,
+but supports @code{float} values instead of @code{double} which are
+passed using the @code{printf_float} macro. @samp{l} elides all
+floating point and POSIX positional parameter support. @samp{i} limits
+integers to those no larger than @code{long}. @samp{m} removes support
+for most formatting options including width and precision. The formats
+and arguments are still parsed correctly, but output does not respect
+those parameters.
+
+@opindex scanf
+@item --scanf=@r{[}d@r{|}f@r{|}l@r{|}i@r{|}m@r{]}
+Select the scanf variant. Picolibc provides five different scanf
+variants which offer decreasing levels of functionality along with
+decreasing code size. @samp{d} is the default level, offering full C17
+and POSIX.1-2024 conformance. @samp{f} removes support for
+@code{double} values. @samp{l} elides all floating point
+support. @samp{i} limits integers to those no larger than
+@code{long}. @samp{m} removes support for @code{%[} conversion specifiers.
+
+@end table
+
 @node PowerPC Options
 @subsection PowerPC Options
 @cindex PowerPC options