From 32f9fe7fab642378767318d971d7bcc7df47dab9 Mon Sep 17 00:00:00 2001 From: Dan Albert Date: Thu, 20 Nov 2014 09:00:46 -0800 Subject: Global C++11 compatibility. Our build system compiles flex/bison as C++ rather than C, but a few projects add `-x c` to their flags, forcing the compiler to compile them as C. This causes the compiler to reject the global C++ standard flag, so we need to explicitly provide a C standard flag to override it. Bug: 18466763 Change-Id: Id68ad9317261ed4d857a949b07288bd137ff6303 --- edify/Android.mk | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'edify') diff --git a/edify/Android.mk b/edify/Android.mk index 61ed6fa..03c04e4 100644 --- a/edify/Android.mk +++ b/edify/Android.mk @@ -7,9 +7,10 @@ edify_src_files := \ parser.y \ expr.c -# "-x c" forces the lex/yacc files to be compiled as c; -# the build system otherwise forces them to be c++. -edify_cflags := -x c +# "-x c" forces the lex/yacc files to be compiled as c the build system +# otherwise forces them to be c++. Need to also add an explicit -std because the +# build system will soon default C++ to -std=c++11. +edify_cflags := -x c -std=gnu89 # # Build the host-side command line tool -- cgit v1.1