[U-Boot] [PATCH 2/3] common: env_flags: include common.h even for HOST_CC
Tom Rini
trini at konsulko.com
Wed Feb 3 20:14:46 CET 2016
On Wed, Feb 03, 2016 at 06:53:11PM +0100, Albert ARIBAUD wrote:
> Hello Peter,
>
> On Wed, 3 Feb 2016 16:11:38 +0000, Peter Robinson
> <pbrobinson at gmail.com> wrote:
> > Hi Albert,
> >
> > On Wed, Feb 3, 2016 at 1:41 PM, Albert ARIBAUD
> > <albert.u.boot at aribaud.net> wrote:
> > > Hello Peter,
> > >
> > > On Wed, 3 Feb 2016 12:42:51 +0000, Peter Robinson
> > > <pbrobinson at gmail.com> 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 <pbrobinson at gmail.com>
> > >> ---
> > >> 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 <linux/string.h>
> > >> #include <linux/ctype.h>
> > >> +#include <common.h>
> > >>
> > >> #ifdef USE_HOSTCC /* Eliminate "ANSI does not permit..." warnings */
> > >> #include <stdint.h>
> > >> @@ -16,7 +17,6 @@
> > >> #include <env_flags.h>
> > >> #define getenv fw_getenv
> > >> #else
> > >> -#include <common.h>
> > >> #include <environment.h>
> > >> #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?
Please, gcc 5.3.x is one of my regular tests now. But I don't do a
tools only build (tossing that on my TODO list..).
--
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20160203/61d13f1e/attachment.sig>
More information about the U-Boot
mailing list