1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-12-16 10:20:30 +00:00

Disable the new clang 7.0.0 -Watomic-alignment warning ("misaligned or

large atomic operation may incur significant performance penalty" ) for
arm before armv6.  Since on these older architectures atomic operations
are always translated to libcalls, and this is expected, the warning is
not really useful there.
This commit is contained in:
Dimitry Andric 2018-08-05 18:27:36 +00:00
parent 64b2585ff9
commit 767e12d066
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/projects/clang700-import/; revision=337355

View File

@ -80,6 +80,10 @@ CWARNFLAGS.clang+= -Wno-unused-local-typedef
.if ${COMPILER_TYPE} == "clang" && ${COMPILER_VERSION} >= 40000 .if ${COMPILER_TYPE} == "clang" && ${COMPILER_VERSION} >= 40000
CWARNFLAGS.clang+= -Wno-address-of-packed-member CWARNFLAGS.clang+= -Wno-address-of-packed-member
.endif .endif
.if ${COMPILER_TYPE} == "clang" && ${COMPILER_VERSION} >= 70000 && \
${MACHINE_CPUARCH} == "arm" && !${MACHINE_ARCH:Marmv[67]*}
CWARNFLAGS.clang+= -Wno-atomic-alignment
.endif
.endif # WARNS <= 3 .endif # WARNS <= 3
.if ${WARNS} <= 2 .if ${WARNS} <= 2
CWARNFLAGS.clang+= -Wno-switch -Wno-switch-enum -Wno-knr-promoted-parameter CWARNFLAGS.clang+= -Wno-switch -Wno-switch-enum -Wno-knr-promoted-parameter