2
1

uboot-tools-2011.03-hostcflags-override-fix.patch 946 B

1234567891011121314151617181920212223242526272829
  1. [PATCH] Fix tools build with custom HOSTCFLAGS
  2. We always need to append HOSTCPPFLAGS, even if HOSTCFLAGS have been
  3. overridden on the cmdline.
  4. Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
  5. ---
  6. config.mk | 6 ++++--
  7. 1 file changed, 4 insertions(+), 2 deletions(-)
  8. Index: u-boot-2011.03/config.mk
  9. ===================================================================
  10. --- u-boot-2011.03.orig/config.mk
  11. +++ u-boot-2011.03/config.mk
  12. @@ -46,10 +46,12 @@
  13. #########################################################################
  14. -HOSTCFLAGS = -Wall -Wstrict-prototypes -O2 -fomit-frame-pointer \
  15. - $(HOSTCPPFLAGS)
  16. +HOSTCFLAGS = -Wall -Wstrict-prototypes -O2 -fomit-frame-pointer
  17. HOSTSTRIP = strip
  18. +# append CPPFLAGS even if CFLAGS has been overridden on cmdline
  19. +override HOSTCFLAGS += $(HOSTCPPFLAGS)
  20. +
  21. #
  22. # Mac OS X / Darwin's C preprocessor is Apple specific. It
  23. # generates numerous errors and warnings. We want to bypass it