libchrome+update_engine: fix build with GCC 4.8

A new warning is triggering build failures since -Werror is used.
This commit is contained in:
Michael Marineau 2014-12-09 21:30:33 -08:00
parent c6c6c2e6e6
commit 5acaa8fce2
4 changed files with 10 additions and 0 deletions

View File

@ -50,6 +50,11 @@ src_configure() {
cros-debug-add-NDEBUG
export CCFLAGS="$CFLAGS"
# Fix builds with GCC 4.8
if [[ $(gcc-major-version) -ge 4 && $(gcc-minor-version) -ge 8 ]]; then
CCFLAGS+=" -Wno-unused-local-typedefs"
fi
mkdir -p third_party/libevent
echo '#include <event.h>' > third_party/libevent/event.h
}

View File

@ -54,6 +54,11 @@ src_compile() {
append-ldflags -nopie
fi
# Fix builds with GCC 4.8
if [[ $(gcc-major-version) -ge 4 && $(gcc-minor-version) -ge 8 ]]; then
append-flags -Wno-unused-local-typedefs
fi
tc-export CC CXX AR RANLIB LD NM PKG_CONFIG
cros-debug-add-NDEBUG
export CCFLAGS="$CFLAGS"