Files
gcc-reflection/gcc/config/sol2.opt.urls
Rainer Orth 5212086d0a Support Solaris CTF generation
The Solaris Compact C Type Format, CTF, was introduced back in Solaris
9.  It is the precursor to current GNU CTF, meant primarily for tools
like the low-level debugger mdb or DTrace that would like to avoid the
overhead of full DWARF-2 debugging information.  However, for a long
time creation required separate steps to convert DWARF information
(version 2 only) to CTF in the input objects and later merge this into
the final objects.  The tools to do so were available, but they were
barely documented and their use restricted to the core OS because of
this difficulty.

There's recently been a massive effort to simplify this and allow for
wider adoption.  The native linker has been extended to take GNU CTF
info in the input objects and convert that to Solaris CTF itself.  At
the same time, the massively enhanced tools and the format itself are
fully documented.

To make this even simpler to use, this patch introduces a new -gsctf
option to hide the details from users.  At compile time, it just passes
-gctf to the compiler, and at link time it invokes ld with -z ctf.

Bootstrapped without regressions on i386-pc-solaris2.11 and
sparc-sun-solaris2.11.

2025-11-23  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>

	gcc:
	* configure.ac (gcc_cv_ld_ctf): New check.
	(gcc_cv_have_ctfmerge): Likewise.
	* configure: Regenerate.
	* config.in: Regenerate.

	* config/sol2.h (SCTF_CC1_SPEC): Define.
	(LINK_SCTF_SPEC): Define.
	(LINK_SPEC): Add LINK_SCTF_SPEC.
	* config/i386/sol2.h (CC1_SPEC): Add SCTF_CC1_SPEC.
	* config/sparc/sol2.h: Likewise.
	* config/sol2.opt (gsctf): Declare.
	* config/sol2.opt.urls: Regenerate.

	* doc/invoke.texi (Option Summary): Add -gsctf.
	(Solaris 2 Options): Document it.
2025-12-28 11:32:37 +01:00

25 lines
631 B
Plaintext

; Autogenerated by regenerate-opt-urls.py from gcc/config/sol2.opt and generated HTML
G
UrlSuffix(gcc/System-V-Options.html#index-G-5)
gsctf
UrlSuffix(gcc/Solaris-2-Options.html#index-gsctf)
mclear-hwcap
UrlSuffix(gcc/Solaris-2-Options.html#index-mclear-hwcap)
mimpure-text
UrlSuffix(gcc/Solaris-2-Options.html#index-mimpure-text)
; skipping UrlSuffix for 'pthread' due to multiple URLs:
; duplicate: 'gcc/Link-Options.html#index-pthread-1'
; duplicate: 'gcc/Preprocessor-Options.html#index-pthread'
pthreads
UrlSuffix(gcc/Solaris-2-Options.html#index-pthreads)
rdynamic
UrlSuffix(gcc/Link-Options.html#index-rdynamic)