This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [build] Fix HAVE_GAS_CFI_DIRECTIVE for x86_64-pc-solaris2.*


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]