diff mbox

[U-Boot,2/2] tools: include u-boot version of sha256.h

Message ID 1401457528-13709-3-git-send-email-jeroen@myspectrum.nl
State Accepted
Delegated to: Tom Rini
Headers show

Commit Message

Jeroen Hofstee May 30, 2014, 1:45 p.m. UTC
When building tools the u-boot specific sha256.h is required, but the
host version of sha256.h is used when present. This leads to build errors
on FreeBSD which does have a system sha256.h include. Like libfdt_env.h
explicitly include u-boot's sha256.h.

cc: Simon Glass <sjg@chromium.org>
Signed-off-by: Jeroen Hofstee <jeroen@myspectrum.nl>
---
 tools/Makefile | 1 +
 1 file changed, 1 insertion(+)

Comments

Simon Glass June 3, 2014, 2:11 p.m. UTC | #1
On 30 May 2014 07:45, Jeroen Hofstee <jeroen@myspectrum.nl> wrote:
> When building tools the u-boot specific sha256.h is required, but the
> host version of sha256.h is used when present. This leads to build errors
> on FreeBSD which does have a system sha256.h include. Like libfdt_env.h
> explicitly include u-boot's sha256.h.
>
> cc: Simon Glass <sjg@chromium.org>
> Signed-off-by: Jeroen Hofstee <jeroen@myspectrum.nl>

There might be a general approach here, but this is just as reasonable
as the libfdt_env.h inclusion.

Acked-by: Simon Glass <sjg@chromium.org>

(tested with buildman - no build regressions on all boards)

> ---
>  tools/Makefile | 1 +
>  1 file changed, 1 insertion(+)
>
> diff --git a/tools/Makefile b/tools/Makefile
> index 6e43a01..5105360 100644
> --- a/tools/Makefile
> +++ b/tools/Makefile
> @@ -185,6 +185,7 @@ endif # !LOGO_BMP
>  # Define _GNU_SOURCE to obtain the getline prototype from stdio.h
>  #
>  HOST_EXTRACFLAGS += -include $(srctree)/include/libfdt_env.h \
> +               -include $(srctree)/include/sha256.h \
>                 $(patsubst -I%,-idirafter%, $(UBOOTINCLUDE)) \
>                 -I$(srctree)/lib/libfdt \
>                 -I$(srctree)/tools \
> --
> 1.8.3.2
>
Jeroen Hofstee June 3, 2014, 6:27 p.m. UTC | #2
Hello Simon,

On di, 2014-06-03 at 08:11 -0600, Simon Glass wrote:
> On 30 May 2014 07:45, Jeroen Hofstee <jeroen@myspectrum.nl> wrote:
> > When building tools the u-boot specific sha256.h is required, but the
> > host version of sha256.h is used when present. This leads to build errors
> > on FreeBSD which does have a system sha256.h include. Like libfdt_env.h
> > explicitly include u-boot's sha256.h.
> >
> > cc: Simon Glass <sjg@chromium.org>
> > Signed-off-by: Jeroen Hofstee <jeroen@myspectrum.nl>
> 
> There might be a general approach here, but this is just as reasonable
> as the libfdt_env.h inclusion.
> 
> Acked-by: Simon Glass <sjg@chromium.org>
> 
> (tested with buildman - no build regressions on all boards)

Thanks for testing. One of the more generic solutions I considered is to
actually move all such headers to include/u-boot. I tried that, but it
rapidly becomes a big patch touching files in all archs, which is a bit
too big after an rc2 is already out.

Tom, since this does fix a build error, can you consider including this
in the next release? (and preferably "Makefile: fix clang warnings due
to clang support" as well, as it gains nothing but introduces quite some
compile noise [but is waiting for feedback from Masahiro]).

Regards,
Jeroen
Tom Rini June 11, 2014, 10:17 p.m. UTC | #3
On Fri, May 30, 2014 at 03:45:28PM +0200, Jeroen Hofstee wrote:

> When building tools the u-boot specific sha256.h is required, but the
> host version of sha256.h is used when present. This leads to build errors
> on FreeBSD which does have a system sha256.h include. Like libfdt_env.h
> explicitly include u-boot's sha256.h.
> 
> cc: Simon Glass <sjg@chromium.org>
> Signed-off-by: Jeroen Hofstee <jeroen@myspectrum.nl>
> Acked-by: Simon Glass <sjg@chromium.org>

Applied to u-boot/master, thanks!
diff mbox

Patch

diff --git a/tools/Makefile b/tools/Makefile
index 6e43a01..5105360 100644
--- a/tools/Makefile
+++ b/tools/Makefile
@@ -185,6 +185,7 @@  endif # !LOGO_BMP
 # Define _GNU_SOURCE to obtain the getline prototype from stdio.h
 #
 HOST_EXTRACFLAGS += -include $(srctree)/include/libfdt_env.h \
+		-include $(srctree)/include/sha256.h \
 		$(patsubst -I%,-idirafter%, $(UBOOTINCLUDE)) \
 		-I$(srctree)/lib/libfdt \
 		-I$(srctree)/tools \