Re: False positive in skalibs system feature test

From: Jens Rehsack <rehsack_at_gmail.com>
Date: Sat, 26 Oct 2019 09:06:01 +0200

> Am 26.10.2019 um 03:53 schrieb Guillermo <gdiazhartusch_at_gmail.com>:
>
> El vie., 25 oct. 2019 a las 17:01, Jens Rehsack escribió:
>>
>>> [...]
>>> configure:2634: result: no
>>>
>>> As you can see, only the equivalent of a skarnet.org 'choose cl' is used here.
>>
>> Wasn't that clear enough when I told that weeks before?
>> For any typical library function, that is enough.
>
> In cases like this, not without precautions.

Wouldn't you please remove parts of the statement?

> This only worked because
> Autoconf happens to know about GNU libc's __stub_* macros, and adds
> garbage to the test source file if the relevant one is defined, so
> that the compile phase fails. If the compile phase had succeeded, the
> link phase would have as well. The configure script would have
> declared that lchown() is available, and one would have ended up with
> a useless lchown() substitute.

Uh - like the handling for __builtin_* stuff of clang.

But there is no need to do that, checking for SYS_getrandom tells
you about the syscall.

Anyway, the knowledge about __sub_* tells whether the libc configure
stage was done correctly.

Probably it's reasonable to do both ... check whether it's no stub
and check whether the syscall is available.

Cheers
--
Jens Rehsack - rehsack_at_gmail.com



Received on Sat Oct 26 2019 - 07:06:01 UTC

This archive was generated by hypermail 2.3.0 : Sun May 09 2021 - 19:38:49 UTC