From a7078d7f1af7f4ca5b22e0fb22ee5788964e2971 Mon Sep 17 00:00:00 2001 From: Chris Hanson Date: Fri, 3 Nov 2017 21:01:55 -0700 Subject: [PATCH] Fix warnings from macOS compiler. --- src/microcode/configure.ac | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/microcode/configure.ac b/src/microcode/configure.ac index 65c41703e..feb26f8b5 100644 --- a/src/microcode/configure.ac +++ b/src/microcode/configure.ac @@ -333,6 +333,8 @@ darwin*) fi MACOSX_CFLAGS="${MACOSX_CFLAGS} -fconstant-cfstrings" MACOSX_CFLAGS="${MACOSX_CFLAGS} -DSIGNAL_HANDLERS_CAN_USE_SCHEME_STACK" + dnl needed for lgamma_r: + MACOSX_CFLAGS="${MACOSX_CFLAGS} -D_REENTRANT" AC_MSG_NOTICE([Compiling for MacOSX version ${MACOSX}]) case ${mit_scheme_native_code} in i386) @@ -345,7 +347,11 @@ darwin*) AS_FLAGS="-arch x86_64 ${AS_FLAGS}" ;; esac - CFLAGS="${CFLAGS} ${MACOSX_CFLAGS} -frounding-math" + if ! cc --version | grep -q clang; then + dnl -frounding-math not supported by clang. + MACOSX_CFLAGS="${MACOSX_CFLAGS} -frounding-math" + fi + CFLAGS="${CFLAGS} ${MACOSX_CFLAGS}" LDFLAGS="${LDFLAGS} ${MACOSX_CFLAGS} -Wl,-syslibroot,${MACOSX_SYSROOT}" LDFLAGS="${LDFLAGS} -framework CoreFoundation" MODULE_LDFLAGS="${MODULE_LDFLAGS} -bundle" -- 2.25.1