svn commit: r337355 - projects/clang700-import/share/mk

Dimitry Andric dim at FreeBSD.org
Sun Aug 5 18:27:37 UTC 2018


Author: dim
Date: Sun Aug  5 18:27:36 2018
New Revision: 337355
URL: https://svnweb.freebsd.org/changeset/base/337355

Log:
  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.

Modified:
  projects/clang700-import/share/mk/bsd.sys.mk

Modified: projects/clang700-import/share/mk/bsd.sys.mk
==============================================================================
--- projects/clang700-import/share/mk/bsd.sys.mk	Sun Aug  5 18:24:35 2018	(r337354)
+++ projects/clang700-import/share/mk/bsd.sys.mk	Sun Aug  5 18:27:36 2018	(r337355)
@@ -80,6 +80,10 @@ CWARNFLAGS.clang+=	-Wno-unused-local-typedef
 .if ${COMPILER_TYPE} == "clang" && ${COMPILER_VERSION} >= 40000
 CWARNFLAGS.clang+=	-Wno-address-of-packed-member
 .endif
+.if ${COMPILER_TYPE} == "clang" && ${COMPILER_VERSION} >= 70000 && \
+    ${MACHINE_CPUARCH} == "arm" && !${MACHINE_ARCH:Marmv[67]*}
+CWARNFLAGS.clang+=	-Wno-atomic-alignment
+.endif
 .endif # WARNS <= 3
 .if ${WARNS} <= 2
 CWARNFLAGS.clang+=	-Wno-switch -Wno-switch-enum -Wno-knr-promoted-parameter


More information about the svn-src-projects mailing list