This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [build] Fix HAVE_GAS_CFI_DIRECTIVE for x86_64-pc-solaris2.*
- From: Rainer Orth <ro at CeBiTec dot Uni-Bielefeld dot DE>
- To: gcc-patches at gcc dot gnu dot org
- Cc: Paolo Bonzini <bonzini at gnu dot org>, Alexandre Oliva <aoliva at redhat dot com>
- Date: Tue, 06 Feb 2018 19:36:06 +0100
- Subject: Re: [build] Fix HAVE_GAS_CFI_DIRECTIVE for x86_64-pc-solaris2.*
- Authentication-results: sourceware.org; auth=none
- References: <yddinbie5e7.fsf@CeBiTec.Uni-Bielefeld.DE>
Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE> writes:
> When compiling MariaDB 10.2 (which uses cfi directives in inline asm,
> but gets the conditionals wrong) on Solaris 11.4 with an
> x86_64-pc-solaris2.11 gcc using gas, I noticed that this one incorrectly
> doesn't use cfi directives although it could/should.
>
> Looking closer, I noticed that the logic in gcc/configure.ac's
> gcc_cv_as_cfi_directive test is not only hard to follow due to deeply
> nested ifs, but plain wrong in the current case: for 64-bit Solaris/x86,
> the .eh_frame section is (and should be) read-only, unlike the 32-bit
> case, but is incorrectly rejected.
>
> Unlike what we currently do, configure.ac needs to verify that both the
> 32 and 64-bit .eh_frame sections are as the toolchain requires them to
> be, which is what the current patch does.
>
> Since .eh_frame section test already appeared repeatedly, making the
> whole code hard to read due to the redundancy, I've moved it to a shell
> function. While gcc/configure.ac itself currently doesn't use those
> directly, the generated configure already does, so we should be save
> here.
>
> Tested with a standalone script with the necessary boilerplate added on
> Solaris 10, 11.3 and 11.4 with /bin/as, bundled gas (2.15, 2.23.1,
> 2.29), and gas 2.30 on both sparc and x86.
>
> Also bootstrapped without regressions on i386-pc-solaris2.11 and
> sparc-sun-solaris2.11 (as/ld, gas/ld, both 32 and 64-bit).
>
> While this only touches Solaris-specific code, it would be nice if one
> of the build maintainers could have a look.
>
> Ok for mainline?
After a week with no word from the build maintainers, I've installed the
patch on mainline since it's purely Solaris-specific.
Rainer
--
-----------------------------------------------------------------------------
Rainer Orth, Center for Biotechnology, Bielefeld University