From: Ivan Maidanski Date: Wed, 17 Aug 2016 22:15:20 +0000 (+0300) Subject: Fix compilation if configured with --enable-werror on OS X X-Git-Tag: v7.6.2~445 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=062f31050243f32ef0fb47c90358572e74fd046f;p=gc Fix compilation if configured with --enable-werror on OS X GC_init_dyld uses _dyld_bind_fully_image_containing_address() which is deprecated starting from OS X 10.5. * configure.ac (werror): Add -Wno-deprecated-declarations to WERROR_CFLAGS if host is darwin. --- diff --git a/configure.ac b/configure.ac index 3763c232..73da0c98 100644 --- a/configure.ac +++ b/configure.ac @@ -904,6 +904,12 @@ AC_ARG_ENABLE(werror, [--enable-werror Pass -Werror to the C compiler], werror_flag=$enableval, werror_flag=no) if test x$werror_flag = xyes; then WERROR_CFLAGS="-Werror" + case "$host" in + # _dyld_bind_fully_image_containing_address is deprecated in OS X 10.5+ + *-*-darwin*) + WERROR_CFLAGS="$WERROR_CFLAGS -Wno-deprecated-declarations" + ;; + esac fi AC_SUBST([WERROR_CFLAGS])