0004-Pass-CXXFLAGS_FOR_BUILD-in-a-couple-of-places-to-avo.patch 2.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  1. From 7f40f8321fb999e9b34d948724517d3fb0d26820 Mon Sep 17 00:00:00 2001
  2. From: Richard Purdie <richard.purdie@linuxfoundation.org>
  3. Date: Thu, 28 Oct 2021 11:33:40 +0100
  4. Subject: [PATCH] Pass CXXFLAGS_FOR_BUILD in a couple of places to avoid these
  5. errors.
  6. If CXXFLAGS contains something unsupported by the build CXX, we see build failures (e.g. using -fmacro-prefix-map for the target).
  7. 2021-10-28 Richard Purdie <richard.purdie@linuxfoundation.org>
  8. ChangeLog:
  9. * Makefile.in: Regenerate.
  10. * Makefile.tpl: Add missing CXXFLAGS_FOR_BUILD overrides
  11. Upstream-Status: Pending [should be submittable]
  12. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
  13. Signed-off-by: Khem Raj <raj.khem@gmail.com>
  14. ---
  15. Makefile.in | 2 ++
  16. Makefile.tpl | 2 ++
  17. 2 files changed, 4 insertions(+)
  18. diff --git a/Makefile.in b/Makefile.in
  19. index 593495e1650..1d9c83cc566 100644
  20. --- a/Makefile.in
  21. +++ b/Makefile.in
  22. @@ -176,6 +176,7 @@ BUILD_EXPORTS = \
  23. # built for the build system to override those in BASE_FLAGS_TO_PASS.
  24. EXTRA_BUILD_FLAGS = \
  25. CFLAGS="$(CFLAGS_FOR_BUILD)" \
  26. + CXXFLAGS="$(CXXFLAGS_FOR_BUILD)" \
  27. LDFLAGS="$(LDFLAGS_FOR_BUILD)"
  28. # This is the list of directories to built for the host system.
  29. @@ -207,6 +208,7 @@ HOST_EXPORTS = \
  30. CPP_FOR_BUILD="$(CPP_FOR_BUILD)"; export CPP_FOR_BUILD; \
  31. CPPFLAGS_FOR_BUILD="$(CPPFLAGS_FOR_BUILD)"; export CPPFLAGS_FOR_BUILD; \
  32. CXX_FOR_BUILD="$(CXX_FOR_BUILD)"; export CXX_FOR_BUILD; \
  33. + CXXFLAGS_FOR_BUILD="$(CXXFLAGS_FOR_BUILD)"; export CXXFLAGS_FOR_BUILD; \
  34. DLLTOOL="$(DLLTOOL)"; export DLLTOOL; \
  35. DSYMUTIL="$(DSYMUTIL)"; export DSYMUTIL; \
  36. LD="$(LD)"; export LD; \
  37. diff --git a/Makefile.tpl b/Makefile.tpl
  38. index ef58fac2b9a..bab04f335c2 100644
  39. --- a/Makefile.tpl
  40. +++ b/Makefile.tpl
  41. @@ -179,6 +179,7 @@ BUILD_EXPORTS = \
  42. # built for the build system to override those in BASE_FLAGS_TO_PASS.
  43. EXTRA_BUILD_FLAGS = \
  44. CFLAGS="$(CFLAGS_FOR_BUILD)" \
  45. + CXXFLAGS="$(CXXFLAGS_FOR_BUILD)" \
  46. LDFLAGS="$(LDFLAGS_FOR_BUILD)"
  47. # This is the list of directories to built for the host system.
  48. @@ -210,6 +211,7 @@ HOST_EXPORTS = \
  49. CPP_FOR_BUILD="$(CPP_FOR_BUILD)"; export CPP_FOR_BUILD; \
  50. CPPFLAGS_FOR_BUILD="$(CPPFLAGS_FOR_BUILD)"; export CPPFLAGS_FOR_BUILD; \
  51. CXX_FOR_BUILD="$(CXX_FOR_BUILD)"; export CXX_FOR_BUILD; \
  52. + CXXFLAGS_FOR_BUILD="$(CXXFLAGS_FOR_BUILD)"; export CXXFLAGS_FOR_BUILD; \
  53. DLLTOOL="$(DLLTOOL)"; export DLLTOOL; \
  54. DSYMUTIL="$(DSYMUTIL)"; export DSYMUTIL; \
  55. LD="$(LD)"; export LD; \