From f6272144e98c00db18cf6708aceab96e6e7b1705 Mon Sep 17 00:00:00 2001 From: Thomas Haller Date: Tue, 10 Nov 2015 15:19:50 +0100 Subject: [PATCH] build: hack around compiler warning in g-ir-scanner The autoconf macro for GIR passes $CFLAGS to g-ir-scanner. g-ir-scanner extends those flags with the system-default which includes -D_FORTIFY_SOURCE=2. Probably it should not do that, but if you disable optimization, this results in a compler warning in "/usr/include/features.h" [1] export CFLAGS='-O0' # Happens both with clang or gcc. #export CC=clang git clean -fdx ./autogen.sh make Work around that by injecting -Wno-error to $CFLAGS when invoking g-ir-scanner. [1] Related: https://sourceware.org/bugzilla/show_bug.cgi?id=13979 --- m4/introspection.m4 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/m4/introspection.m4 b/m4/introspection.m4 index 589721c5a0..efe0e9ac76 100644 --- a/m4/introspection.m4 +++ b/m4/introspection.m4 @@ -63,7 +63,7 @@ m4_define([_GOBJECT_INTROSPECTION_CHECK_INTERNAL], INTROSPECTION_LIBS=`$PKG_CONFIG --libs gobject-introspection-1.0` INTROSPECTION_MAKEFILE=`$PKG_CONFIG --variable=datadir gobject-introspection-1.0`/gobject-introspection-1.0/Makefile.introspection fi - AC_SUBST(INTROSPECTION_SCANNER) + AC_SUBST(INTROSPECTION_SCANNER, 'CFLAGS="${CFLAGS} -Wno-error" '"$INTROSPECTION_SCANNER") AC_SUBST(INTROSPECTION_COMPILER) AC_SUBST(INTROSPECTION_GENERATE) AC_SUBST(INTROSPECTION_GIRDIR)