]> granicus.if.org Git - gc/commitdiff
Fix compilation if configured with --enable-werror on OS X
authorIvan Maidanski <ivmai@mail.ru>
Wed, 17 Aug 2016 22:15:20 +0000 (01:15 +0300)
committerIvan Maidanski <ivmai@mail.ru>
Mon, 31 Oct 2016 07:36:54 +0000 (10:36 +0300)
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.

configure.ac

index 3763c23223a75c5426751097695ef2358138b123..73da0c98996850653a263e1a94b913e3f442f8bb 100644 (file)
@@ -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])