build: hack around compiler warning in g-ir-scanner
authorThomas Haller <thaller@redhat.com>
Tue, 10 Nov 2015 14:19:50 +0000 (15:19 +0100)
committerThomas Haller <thaller@redhat.com>
Tue, 10 Nov 2015 17:12:12 +0000 (18:12 +0100)
commitf6272144e98c00db18cf6708aceab96e6e7b1705
tree9b7e7734a66603ec7b6e524b060113e7baa8a390
parent09a2be3b65b627144fd5f107e53f4983cc410429
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