On 11/27/18 6:20 AM, Pascal Stumpf wrote:
> On Mon, 26 Nov 2018 23:05:45 -0500, Brian Callahan wrote:
>> Hi ports --
>>
>> For some reason, the gcc package doesn't install the stdatomic.h header.
>> Which doesn't matter, until it matters.
> I believe GCC expects this header to be present on the host system. It
> *is* a standard (C11) header, after all.
>
>> Discovered when I was building Firefox on amd64 with gcc-6.4.0 (which
>> works at runtime just fine, but is not a discussion to be had on this
>> thread because it's way more involved than this simple diff). Firefox
>> needs stdatomic.h when using gcc, and this diff lets Firefox build
>> successfully.
>>
>> I'm kinda guessing with the PFRAG.* stuff outside of PFRAG.X86-main, so
>> more eyes appreciated.
> This is wrong if you install the header on all archs anyway. It could
> just be in PLIST-main. But I don't think that's the right solution
> anyway. We do currently have a stdatomic.h in base, as an intrinsic
> header to clang. I wonder if that is sufficient.
GCC is unable to see the clang header.
Here's a really simple program to demonstrate the problem:
#include <stdatomic.h>
int main(void) { return 0; }
Try to compile it with gcc-6.4.0, you'll get:
test.c:1:23: fatal error: stdatomic.h: No such file or directory
#include <stdatomic.h>
^
compilation terminated.
~Brian
>> OK? Better solution within the gcc framework itself?
>>
>> ~Brian
>>
>>
>>>> text/x-patch content
No comments:
Post a Comment