* [U-Boot] idirafter causes host sha256.h to be included
@ 2014-05-09 22:31 Jeroen Hofstee
2014-05-24 1:37 ` Simon Glass
0 siblings, 1 reply; 4+ messages in thread
From: Jeroen Hofstee @ 2014-05-09 22:31 UTC (permalink / raw)
To: u-boot
Hello,
tools/Makefile uses the following substitution
HOST_EXTRACFLAGS += -include $(srctree)/include/libfdt_env.h \
$(patsubst -I%,-idirafter%, $(UBOOTINCLUDE)) \
...
Which adds -idirafterinclude when compiling image-fit.c. Since
mentioned file includes sha256.h, which is a system include on FreeBSD,
the system version is included instead of the intended U-boot
include/sha256.h and building fails. Without the substitution it builds
successfully.
What is the intention of using idirafter?
Regards,
Jeroen
^ permalink raw reply [flat|nested] 4+ messages in thread
* [U-Boot] idirafter causes host sha256.h to be included
2014-05-09 22:31 [U-Boot] idirafter causes host sha256.h to be included Jeroen Hofstee
@ 2014-05-24 1:37 ` Simon Glass
2014-05-24 21:09 ` Jeroen Hofstee
0 siblings, 1 reply; 4+ messages in thread
From: Simon Glass @ 2014-05-24 1:37 UTC (permalink / raw)
To: u-boot
+Masahiro
Hi Jeroen,
On 9 May 2014 12:31, Jeroen Hofstee <dasuboot@myspectrum.nl> wrote:
> Hello,
>
> tools/Makefile uses the following substitution
>
> HOST_EXTRACFLAGS += -include $(srctree)/include/libfdt_env.h \
> $(patsubst -I%,-idirafter%, $(UBOOTINCLUDE)) \
> ...
>
> Which adds -idirafterinclude when compiling image-fit.c. Since
> mentioned file includes sha256.h, which is a system include on FreeBSD,
> the system version is included instead of the intended U-boot
> include/sha256.h and building fails. Without the substitution it builds
> successfully.
>
> What is the intention of using idirafter?
I believe this is so that U-Boot headers are available when building.
You might need to add a work-around like we have for libfdt_env.h. It
is also possible that there is a more general solution, sorry I'm not
sure what it might be.
Regards,
Simon
^ permalink raw reply [flat|nested] 4+ messages in thread
* [U-Boot] idirafter causes host sha256.h to be included
2014-05-24 1:37 ` Simon Glass
@ 2014-05-24 21:09 ` Jeroen Hofstee
2014-05-27 3:37 ` Simon Glass
0 siblings, 1 reply; 4+ messages in thread
From: Jeroen Hofstee @ 2014-05-24 21:09 UTC (permalink / raw)
To: u-boot
Hello Simon,
On vr, 2014-05-23 at 15:37 -1000, Simon Glass wrote:
> On 9 May 2014 12:31, Jeroen Hofstee <dasuboot@myspectrum.nl> wrote:
> > Hello,
> >
> > tools/Makefile uses the following substitution
> >
> > HOST_EXTRACFLAGS += -include $(srctree)/include/libfdt_env.h \
> > $(patsubst -I%,-idirafter%, $(UBOOTINCLUDE)) \
> > ...
> >
> > Which adds -idirafterinclude when compiling image-fit.c. Since
> > mentioned file includes sha256.h, which is a system include on FreeBSD,
> > the system version is included instead of the intended U-boot
> > include/sha256.h and building fails. Without the substitution it builds
> > successfully.
> >
> > What is the intention of using idirafter?
>
> I believe this is so that U-Boot headers are available when building.
> You might need to add a work-around like we have for libfdt_env.h. It
> is also possible that there is a more general solution, sorry I'm not
> sure what it might be.
>
Thanks for mentioning the libfdt_env.h. As mentioned in the thread
discussing the patch errno.h is one of the reasons to require the
dirafter, since the tools need the host version of it. A possible
solution could perhaps be to place such standard headers in a separate
directory and only include it for an u-boot build. The tools can then be
compiled without the idirafter and not including this location as an
include path.
Regards,
Jeroen
^ permalink raw reply [flat|nested] 4+ messages in thread
* [U-Boot] idirafter causes host sha256.h to be included
2014-05-24 21:09 ` Jeroen Hofstee
@ 2014-05-27 3:37 ` Simon Glass
0 siblings, 0 replies; 4+ messages in thread
From: Simon Glass @ 2014-05-27 3:37 UTC (permalink / raw)
To: u-boot
Hi Jeroen,
On 24 May 2014 11:09, Jeroen Hofstee <dasuboot@myspectrum.nl> wrote:
> Hello Simon,
>
> On vr, 2014-05-23 at 15:37 -1000, Simon Glass wrote:
>
>> On 9 May 2014 12:31, Jeroen Hofstee <dasuboot@myspectrum.nl> wrote:
>> > Hello,
>> >
>> > tools/Makefile uses the following substitution
>> >
>> > HOST_EXTRACFLAGS += -include $(srctree)/include/libfdt_env.h \
>> > $(patsubst -I%,-idirafter%, $(UBOOTINCLUDE)) \
>> > ...
>> >
>> > Which adds -idirafterinclude when compiling image-fit.c. Since
>> > mentioned file includes sha256.h, which is a system include on FreeBSD,
>> > the system version is included instead of the intended U-boot
>> > include/sha256.h and building fails. Without the substitution it builds
>> > successfully.
>> >
>> > What is the intention of using idirafter?
>>
>> I believe this is so that U-Boot headers are available when building.
>> You might need to add a work-around like we have for libfdt_env.h. It
>> is also possible that there is a more general solution, sorry I'm not
>> sure what it might be.
>>
>
> Thanks for mentioning the libfdt_env.h. As mentioned in the thread
> discussing the patch errno.h is one of the reasons to require the
> dirafter, since the tools need the host version of it. A possible
> solution could perhaps be to place such standard headers in a separate
> directory and only include it for an u-boot build. The tools can then be
> compiled without the idirafter and not including this location as an
> include path.
I did originally write a patch which might have solved this problem -
it force the build to use U-Boot headers except for a few special
cases. You might be able to find it in patchwork (archived?) But I
think Masahiro came up with what I thought was a better way - more
general purpose than my patch. You have I think the opposite problem
to what I was facing. I'm not sure of the best general approach now. I
suggest you experiment and see if you can come up with a suitable
patch.
Regards,
Simon
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2014-05-27 3:37 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-05-09 22:31 [U-Boot] idirafter causes host sha256.h to be included Jeroen Hofstee
2014-05-24 1:37 ` Simon Glass
2014-05-24 21:09 ` Jeroen Hofstee
2014-05-27 3:37 ` Simon Glass
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox