Page MenuHomeFreeBSD

Fix clang error builtin-requires-header on pthread_create

Authored by alfredo on Feb 18 2019, 5:25 PM.



This change disables -Werror,-Wbuiltin-requires-header when compiling with clang.

Clang 8 is getting confused about having to include Clang's built-in "pthread.h" while it's trying to compile FreeBSD "pthread.h" itself. The error bellow repeats mentioning "pthread_create" on many other places. (similar issue

PR: 235583

Test Plan
  • buildworld for x86_64
  • buildworld for powerpc64 (cross)

Diff Detail

rS FreeBSD src repository - subversion
Lint OK
No Unit Test Coverage
Build Status
Buildable 22557
Build 21691: arc lint + arc unit

Event Timeline

alfredo edited the test plan for this revision. (Show Details)
alfredo added reviewers: jhibbits, bdragon, emaste.
alfredo added a subscriber: linimon.

I am unsure if it is a style rule but we generally place such pragmas before and after all declarations so that they don't get in the way of easier reading.

In this case it is not worth it, but you may want to check __NULLABILITY_PRAGMA_PUSH and __NULLABILITY_PRAGMA_POP in sys/sys/cdefs.h, and where such macros are located in the headers.

With source updated to revision 344922 this patch isn't needed anymore. It was fixed by other change somehow, so I'm abandoning this change.

Thank you all for the inputs.