Re: Bug#945133: gcc-9: __has_attribute(ifunc) false positive on hurd and kfreebsd

2020-01-23 Thread Matthias Klose
Forwarded ...

On 20.11.19 11:43, Fabian Kloetzl wrote:
> Package: gcc-9
> Version: 9.2.1-17
> Severity: normal
> 
> Dear Maintainer,
> 
> Recently, the build of one of my packages failed on hurd-i386 and
> kfreebsd-* due to unsupported ifuncs [1]. However, I had that code guarded
> by __has_attribute(ifunc) which, unfortunately, evaluates to 1 on said
> platforms. A minimal testcase is attached.
> 
> Best,
> Fabian
> 
> 1: https://buildd.debian.org/status/package.php?p=phylonium
> 



Re: Bug#945133: gcc-9: __has_attribute(ifunc) false positive on hurd and kfreebsd

2020-01-23 Thread Samuel Thibault
Hello,

On 20.11.19 11:43, Fabian Kloetzl wrote:
> Recently, the build of one of my packages failed on hurd-i386 and
> kfreebsd-* due to unsupported ifuncs [1]. However, I had that code guarded
> by __has_attribute(ifunc) which, unfortunately, evaluates to 1 on said
> platforms. A minimal testcase is attached.

AIUI, that is expected by gcc people: the gcc documentation says:

“to test whether the attribute referenced by its operand is recognized
by GCC”

Strictly speaking, being recognized by GCC doesn't mean being supported
on the target platform. I agree that it makes it not really useful
here, but I'm not the one to be convinced :) I'd say bring the issue to
upstream gcc.

Samuel