[build] Default to DWARF 4 on Solaris if linker supports CIEv3

Rainer Orth ro@CeBiTec.Uni-Bielefeld.DE
Tue Mar 19 12:34:00 GMT 2013


As described in

	Don't use DWARF 4 on Solaris
        http://gcc.gnu.org/ml/gcc-patches/2012-05/msg00445.html

the Solaris linker couldn't handle CIEv3 in .eh_frame, so we defaulted
to DWARF 2 on Solaris in any configuration (Sun or GNU ld).  This has
changed in Solaris 11.1, where the necessary support was added.  The
following patch checks for this and defaults to DWARF 4 if either a
sufficiently recent Sun ld or GNU ld >= 2.16 is used.

Bootstrapped without regressions on i386-pc-solaris2.11 (Solaris 11.1)
with Sun ld and gld 2.23.1, and on i386-pc-solaris2.10 with Sun ld.

Ok for mainline?

	Rainer


2013-03-18  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>

	* configure.ac (gcc_cv_ld_eh_frame_ciev3): New test.
	* configure: Regenerate.
	* config.in: Regenerate.
	* config/sol2.c (solaris_override_options): Only enforce DWARF 2
	if !HAVE_LD_EH_FRAME_CIEV3.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: sol2-dwarf4.patch
Type: text/x-patch
Size: 2375 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20130319/884f620b/attachment.bin>
-------------- next part --------------

-- 
-----------------------------------------------------------------------------
Rainer Orth, Center for Biotechnology, Bielefeld University


More information about the Gcc-patches mailing list