On Wed, 20 Sep 2017, Steve Ellcey wrote:

> On Wed, 2017-09-20 at 18:01 +0000, Joseph Myers wrote:
> > 
> > (It may nevertheless be a good idea to set 
> > default_gnu_indirect_function=yes for AArch64 configurations in GCC
> > that 
> > use glibc.)
> > 
> 
> I have submitted a patch for that.
> 
> https://gcc.gnu.org/ml/gcc-patches/2017-09/msg00285.html

I'm not entirely convinced the architecture conditions make sense there.

The problem case is: binutils gains support for IFUNCs for an architecture 
that didn't previously have them.  glibc detects the support, but cannot 
use IFUNC attributes with any existing GCC version for that architecture 
because GCC didn't know that binutils would gain that support.  That means 
existing GCC versions unnecessarily cannot build glibc with new binutils 
for that architecture.  (You could make the multi-arch support test check 
for IFUNC attribute support so multi-arch just gets disabled in that case, 
but it would be better to be able to build with existing GCC versions.)

I.e. what I think would be better is: compiler support depends on the 
target OS, and make sure the linker gives a clear error (even better, that 
the assembler does so) if you try to build something with IFUNCs on an 
architecture without support.  (If the linker / assembler don't already 
give such errors you could choose to keep architecture conditionals when 
building GCC with older binutils versions.)

-- 
Joseph S. Myers
jos...@codesourcery.com

Reply via email to