All the mail mirrored from lore.kernel.org
 help / color / mirror / Atom feed
From: Masahiro Yamada <yamada.masahiro@socionext.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH] If CONFIG_SANDBOX isn't defined the build fails in fw_env.c
Date: Wed, 17 Jun 2015 20:29:47 +0900	[thread overview]
Message-ID: <CAK7LNAQFSYW_Q42eY+L+2pnZTpp0iQHQcK4-c4R-cSyMOTvjJA@mail.gmail.com> (raw)
In-Reply-To: <CAPnjgZ2DG5MAAJdTDvygD25t5vRHmOz4TPhYgZEL9HvAEVqadA@mail.gmail.com>

Hi.


2015-06-17 3:24 GMT+09:00 Simon Glass <sjg@chromium.org>:
> Hi Peter,
>
> On 15 June 2015 at 13:40, Peter Robinson <pbrobinson@gmail.com> wrote:
>> In our Fedora builds we get the below errors if we build the following using
>> a vanilla u-boot 2015.07rc2. I'm not sure if it's the best fix but it fixes
>> the build for rc2.
>>
>> make HOSTCC="gcc $RPM_OPT_FLAGS" CROSS_COMPILE="" defconfig V=1 O=builds/
>> make HOSTCC="gcc $RPM_OPT_FLAGS" CROSS_COMPILE="" tools-all V=1 O=builds/
>>
>> gcc -O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches  -m64 -mtune=generic -Wp,-MD,tools/env/.fw_env.o.d -Itools/env -Wall -Wstrict-prototypes -O2 -fomit-frame-pointer -idirafterinclude -idirafter../include -idirafter../arch/sandbox/include -idirafter ../tools/env -DUSE_HOSTCC -DTEXT_BASE= -c -o tools/env/fw_env.o ../tools/env/fw_env.c
>> In file included from ../include/configs/sandbox.h:130:0,
>>                  from include/config.h:5,
>>                  from ../tools/env/fw_env.h:11,
>>                  from ../tools/env/fw_env.c:34:
>> ../include/env_default.h:104:2: error: expected '}' before 'BOOT_TARGET_DEVICES_references_HOST_without_CONFIG_SANDBOX'
>>   CONFIG_EXTRA_ENV_SETTINGS
>>   ^
>> scripts/Makefile.host:108: recipe for target 'tools/env/fw_env.o' failed
>> make[2]: *** [tools/env/fw_env.o] Error 1
>
> Thanks for the report. I can't seem to repeat this. The build
> completes OK for me.
>
> CONFIG_SANDBOX is defined in arch/Kconfig. It ends up in your build
> directory in these files.
>
> b/sandbox/include/config/auto.conf:CONFIG_SANDBOX=y
> b/sandbox/include/generated/autoconf.h:#define CONFIG_SANDBOX 1
>
> autoconf.h is the one that matters. I wonder why this is not included
> in your case?
>
> I notice that fw_env.h starts like this:
>
> /* Pull in the current config to define the default environment */
> #ifndef __ASSEMBLY__
> #define __ASSEMBLY__ /* get only #defines from config.h */
> #include <config.h>
> #undef __ASSEMBLY__
> #else
> #include <config.h>
> #endif
> #include <generated/autoconf.h>
>
> Should the inclusion of autoconf.h go above the inclusion of config.h, perhaps?


Right.

autoconf.h should be included earlier than any other headers.
Besides, linux/kconfig.h is preferred to generated/autoconf.h


I posted a patch for this problem last year.  See
http://patchwork.ozlabs.org/patch/417192/

I do not know why it was dismissed long.


And then, another patch was posted and picked up.

http://patchwork.ozlabs.org/patch/461411/

But, it was not good...



-- 
Best Regards
Masahiro Yamada

  parent reply	other threads:[~2015-06-17 11:29 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-06-15 19:40 [U-Boot] [PATCH] If CONFIG_SANDBOX isn't defined the build fails in fw_env.c Peter Robinson
2015-06-15 19:40 ` [U-Boot] [PATCH] If CONFIG_SANDBOX isn't defined the build fails in fw_env.c due to a with with the following error: Peter Robinson
2015-06-16 18:24 ` [U-Boot] [PATCH] If CONFIG_SANDBOX isn't defined the build fails in fw_env.c Simon Glass
2015-06-16 20:04   ` Tom Rini
2015-06-16 21:07     ` Simon Glass
2015-06-17 11:29   ` Masahiro Yamada [this message]
2015-06-17 15:06     ` Simon Glass
2015-06-17 15:26       ` Peter Robinson
2015-06-17 16:00       ` Peter Robinson

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAK7LNAQFSYW_Q42eY+L+2pnZTpp0iQHQcK4-c4R-cSyMOTvjJA@mail.gmail.com \
    --to=yamada.masahiro@socionext.com \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.