On 8/18/19 10:29 AM, Gerald Pfeifer wrote:
> On Sat, 9 Dec 2017, Jakub Jelinek wrote:
>>> Some users on FreeBSD noticed a problem when trying to use GCC to
>>> build things in a standalone environment that manifests itself as
>>>
>>> /usr/local/lib/gcc/x86_64-unknown-freebsd11.0/6.3.0/include/xmmintrin.h:34 
>>> from
>>> /usr/local/lib/gcc/x86_64-unknown-freebsd11.0/6.3.0/include/immintrin.h:29 
>>> from
>>> /workspace/src/sys/crypto/aesni/intel_sha256.c:62 
>>> In function '_mm_malloc':
>>> /usr/local/lib/gcc/x86_64-unknown-freebsd11.0/6.3.0/include/mm_malloc.h:39: 
>>> error: 'errno' undeclared (first use in this function)
>>>
>>> It turns out the clang version of xmmintrin.h does not include mm_malloc.h 
>>> if !__STDC_HOSTED__ whereas ours unconditionally does so.
>>
>> Wouldn't it be better to just ifdef out parts of gmm_malloc.h (pmm_malloc.h
>> should be ok)?
> 
> Very good point, Jakub.  Thank you!  
> 
> Somehow I thought I had submitted this updated patch, but apparently 
> not so. :-(  (This has been on my autotester for ages.)
> 
> Okay?  And if so, okay for GCC 9 after a while?
> 
> Gerald
> 
> 
> 2019-08-18  Gerald Pfeifer  <ger...@pfeifer.com>
>  
>       * config/i386/gmm_malloc.h: Only include errno.h and use errno
>       if __STDC_HOSTED__.
OK.
jeff

Reply via email to