From mboxrd@z Thu Jan 1 00:00:00 1970 From: Albert ARIBAUD Date: Wed, 3 Feb 2016 18:53:11 +0100 Subject: [U-Boot] [PATCH 2/3] common: env_flags: include common.h even for HOST_CC In-Reply-To: References: <1454503371-15918-1-git-send-email-pbrobinson@gmail.com> <1454503371-15918-3-git-send-email-pbrobinson@gmail.com> <20160203144128.2a160dd6@lilith> Message-ID: <20160203185311.3fd9c9ff@lilith> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Hello Peter, On Wed, 3 Feb 2016 16:11:38 +0000, Peter Robinson wrote: > Hi Albert, > > On Wed, Feb 3, 2016 at 1:41 PM, Albert ARIBAUD > wrote: > > Hello Peter, > > > > On Wed, 3 Feb 2016 12:42:51 +0000, Peter Robinson > > wrote: > >> When compiling with gcc 6 we get the following error due to ARRAY_SIZE being > >> defined elsewhere. > >> > >> common/env_flags.c:155: undefined reference to `ARRAY_SIZE' > >> > >> Signed-off-by: Peter Robinson > >> --- > >> common/env_flags.c | 2 +- > >> 1 file changed, 1 insertion(+), 1 deletion(-) > >> > >> diff --git a/common/env_flags.c b/common/env_flags.c > >> index 9c3aed1..696adef 100644 > >> --- a/common/env_flags.c > >> +++ b/common/env_flags.c > >> @@ -7,6 +7,7 @@ > >> > >> #include > >> #include > >> +#include > >> > >> #ifdef USE_HOSTCC /* Eliminate "ANSI does not permit..." warnings */ > >> #include > >> @@ -16,7 +17,6 @@ > >> #include > >> #define getenv fw_getenv > >> #else > >> -#include > >> #include > >> #endif > > > > How come this happens only with gcc-6? Previous compilers surely did not > > 'guess' the proper value of ARRAY_SIZE, right? > > So testing this RC on on Fedora 23 with gcc 5.3.1 I see the same > failure, I didn't see it with 2016.01 when using 5.3.1 so I'm not sure > what's changed there OK, so maybe unrelated to gcc 6. Could you git bisect? > Peter Amicalement, -- Albert.