opnsense-src/lib/clang
Jessica Clarke b20eb96fe8 clang: Build with -fno-strict-aliasing when using GCC
Somewhat ironically, there are strict aliasing violations in Clang,
which can result in the following assertion failure:

  Assertion `*(NamedDecl **)&Data == ND && "PointerUnion mangles the NamedDecl pointer!"' failed.

Upstream's clang/CMakeLists.txt specifically (not LLVM as a whole)
passes -fno-strict-aliasing if the compiler is not Clang, and this fixes
the above issue.

This was seen when cross-building from Linux using a bootstrap
compiler, but likely also affects worlds built with a new enough
external GCC toolchain.

MFC after:	1 week
Reviewed by:	dim
Differential Revision:	https://reviews.freebsd.org/D31533

(cherry picked from commit c1f7d8dd23)
2021-09-07 13:08:19 +01:00
..
headers Merge llvm-project 12.0.1 release and follow-up fixes 2021-07-31 20:56:55 +02:00
include Apply upstream lld fix for compressed input sections on BE targets 2021-08-14 14:52:55 +02:00
libclang Merge llvm-project 12.0.1 release and follow-up fixes 2021-07-31 20:56:55 +02:00
liblldb Merge llvm-project 12.0.1 release and follow-up fixes 2021-07-31 20:56:55 +02:00
libllvm Allow bootstrapping llvm-tblgen on macOS and Linux 2021-08-05 10:01:08 +01:00
libllvmminimal Merge llvm-project 12.0.1 release and follow-up fixes 2021-07-31 20:56:55 +02:00
clang.build.mk clang: Build with -fno-strict-aliasing when using GCC 2021-09-07 13:08:19 +01:00
clang.pre.mk Move all sources from the llvm project into contrib/llvm-project. 2019-12-20 19:53:05 +00:00
freebsd_cc_version.h Merge llvm-project 12.0.1 release and follow-up fixes 2021-07-31 20:56:55 +02:00
lldb.pre.mk Move all sources from the llvm project into contrib/llvm-project. 2019-12-20 19:53:05 +00:00
llvm.build.mk clang: Fix inverted condition in llvm.build.mk 2021-09-07 13:08:17 +01:00
llvm.pre.mk Move all sources from the llvm project into contrib/llvm-project. 2019-12-20 19:53:05 +00:00
Makefile Completely revamp the way llvm, clang and lldb are built. 2016-08-26 22:44:22 +00:00
Makefile.inc build: provide a default WARNS for all in-tree builds 2020-09-18 17:17:46 +00:00