From: Chris Hanson Date: Sat, 4 Nov 2017 04:01:55 +0000 (-0700) Subject: Fix warnings from macOS compiler. X-Git-Tag: mit-scheme-pucked-9.2.12~14^2~9 X-Git-Url: https://birchwood-abbey.net/git?a=commitdiff_plain;h=a7078d7f1af7f4ca5b22e0fb22ee5788964e2971;p=mit-scheme.git Fix warnings from macOS compiler. --- 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"