git: dd9c06d0a662 - stable/12 - lib/msun: Exclude ignored-pragmas from -Werror
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Sat, 25 Dec 2021 11:56:33 UTC
The branch stable/12 has been updated by dim: URL: https://cgit.FreeBSD.org/src/commit/?id=dd9c06d0a6624424890ff0d12d0ecc238a4be42d commit dd9c06d0a6624424890ff0d12d0ecc238a4be42d Author: Alex Richardson <arichardson@FreeBSD.org> AuthorDate: 2021-04-15 15:27:52 +0000 Commit: Dimitry Andric <dim@FreeBSD.org> CommitDate: 2021-12-25 11:51:44 +0000 lib/msun: Exclude ignored-pragmas from -Werror This avoids build failures due to the clang 12 warning: '#pragma FENV_ACCESS' is not supported on this target - ignored Clang 12 currently emits this warning for all non-x86 architectures. While this can result in incorrect code generation (e.g. on AArch64 some exceptions are not raised as expected), this is a pre-existing issue and we should not fail the build due to this warning. Reviewed By: dim, emaste MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D29743 (cherry picked from commit 168234fa67c38f898b784b3265dd77ace0b0a2f9) --- lib/msun/Makefile | 6 ++++++ lib/msun/tests/Makefile | 6 ++++++ 2 files changed, 12 insertions(+) diff --git a/lib/msun/Makefile b/lib/msun/Makefile index d56b33deabea..b76dde4c1dd0 100644 --- a/lib/msun/Makefile +++ b/lib/msun/Makefile @@ -255,4 +255,10 @@ MLINKS+=trunc.3 truncf.3 trunc.3 truncl.3 HAS_TESTS= SUBDIR.${MK_TESTS}+= tests +.include <bsd.compiler.mk> +.if ${COMPILER_TYPE} == "clang" && ${COMPILER_VERSION} >= 120000 +# Silence '#pragma FENV_ACCESS' is not supported on this target - ignored +CWARNFLAGS+= -Wno-error=ignored-pragmas +.endif + .include <bsd.lib.mk> diff --git a/lib/msun/tests/Makefile b/lib/msun/tests/Makefile index 91d32517143f..df09831c6c6e 100644 --- a/lib/msun/tests/Makefile +++ b/lib/msun/tests/Makefile @@ -104,6 +104,12 @@ ARCH_SUBDIR= ${MACHINE_CPUARCH} # precision is. CFLAGS+= -DLDBL_PREC=${LDBL_PREC} +.include <bsd.compiler.mk> +.if ${COMPILER_TYPE} == "clang" && ${COMPILER_VERSION} >= 120000 +# Silence '#pragma FENV_ACCESS' is not supported on this target - ignored +CWARNFLAGS+= -Wno-error=ignored-pragmas +.endif + .include <netbsd-tests.test.mk> .include <bsd.test.mk>