> -----Original Message----- > From: Philippe Mathieu-Daudé <philippe.mathieu.da...@gmail.com> On > Behalf Of Philippe Mathieu-Daudé > Sent: Tuesday, September 29, 2020 11:02 AM > To: Taylor Simpson <tsimp...@quicinc.com>; qemu-devel@nongnu.org > Cc: a...@rev.ng; riku.voi...@iki.fi; richard.hender...@linaro.org; > laur...@vivier.eu; aleksandar.m.m...@gmail.com > Subject: Re: [RFC PATCH v4 00/29] Hexagon patch series > > QEMU aims to support the 2 latest releases of supported distributions. > From time to time a brave developer look at the different versions > packaged and make some cleanup in the code base. It used to be tedious, > now that repology.org exists it is a bit easier. > > The last effort is from Thomas, see commit efc6c070aca: > > The supported distributions use the following version > of GCC: > > RHEL-7: 4.8.5 > Debian (Stretch): 6.3.0 > Debian (Jessie): 4.8.4 > OpenBSD (ports): 4.9.4 > FreeBSD (ports): 8.2.0 > OpenSUSE Leap 15: 7.3.1 > Ubuntu (Xenial): 5.3.1 > macOS (Homebrew): 8.2.0 > > So we can safely assume GCC 4.8 these days. > > This is the "mandated" compiler version.
Ouch! 4.8 is old enough that it doesn't support C11 _Generic which I am using. That needs at least GCC 4.9. Here are a couple of examples. As you can see, _Generic is used to dispatch to slightly different TCG generation functions depending on the type of the operands. I will scratch my head and figure out a different way to do this. #define MEM_STORE1_FUNC(X) \ _Generic((X), int : gen_store1i, TCGv_i32 : gen_store1) #define MEM_STORE1(VA, DATA, SLOT) \ MEM_STORE1_FUNC(DATA)(cpu_env, VA, DATA, ctx, SLOT) #define GETBYTE_FUNC(X) \ _Generic((X), TCGv_i32 : gen_get_byte, TCGv_i64 : gen_get_byte_i64) #define fGETBYTE(N, SRC) GETBYTE_FUNC(SRC)(BYTE, N, SRC, true) #define fGETUBYTE(N, SRC) GETBYTE_FUNC(SRC)(BYTE, N, SRC, false) FWIW, I have been using 5.5. The errors you saw started around 7.5 and are easy to fix. Taylor