Brad Bishop | bec4ebc | 2022-08-03 09:55:16 -0400 | [diff] [blame^] | 1 | From e700190743fa29ddaebd6ee075298a24b1688773 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 6/6] If CXXFLAGS contains something unsupported by the build |
| 5 | CXX, we see build failures (e.g. using -fmacro-prefix-map for the target). |
| 6 | |
| 7 | Pass CXXFLAGS_FOR_BUILD in a couple of places to avoid these errors. |
| 8 | |
| 9 | 2021-10-28 Richard Purdie <richard.purdie@linuxfoundation.org> |
| 10 | |
| 11 | ChangeLog: |
| 12 | |
| 13 | * Makefile.in: Regenerate. |
| 14 | * Makefile.tpl: Add missing CXXFLAGS_FOR_BUILD overrides |
| 15 | |
| 16 | Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> |
| 17 | --- |
| 18 | Makefile.in | 2 ++ |
| 19 | Makefile.tpl | 2 ++ |
| 20 | 2 files changed, 4 insertions(+) |
| 21 | |
| 22 | Upstream-Status: Pending [should be submittable] |
| 23 | |
| 24 | Index: gcc-11.2.0/Makefile.in |
| 25 | =================================================================== |
| 26 | --- gcc-11.2.0.orig/Makefile.in |
| 27 | +++ gcc-11.2.0/Makefile.in |
| 28 | @@ -172,6 +172,7 @@ BUILD_EXPORTS = \ |
| 29 | # built for the build system to override those in BASE_FLAGS_TO_PASS. |
| 30 | EXTRA_BUILD_FLAGS = \ |
| 31 | CFLAGS="$(CFLAGS_FOR_BUILD)" \ |
| 32 | + CXXFLAGS="$(CXXFLAGS_FOR_BUILD)" \ |
| 33 | LDFLAGS="$(LDFLAGS_FOR_BUILD)" |
| 34 | |
| 35 | # This is the list of directories to built for the host system. |
| 36 | @@ -203,6 +204,7 @@ HOST_EXPORTS = \ |
| 37 | CPP_FOR_BUILD="$(CPP_FOR_BUILD)"; export CPP_FOR_BUILD; \ |
| 38 | CPPFLAGS_FOR_BUILD="$(CPPFLAGS_FOR_BUILD)"; export CPPFLAGS_FOR_BUILD; \ |
| 39 | CXX_FOR_BUILD="$(CXX_FOR_BUILD)"; export CXX_FOR_BUILD; \ |
| 40 | + CXXFLAGS_FOR_BUILD="$(CXXFLAGS_FOR_BUILD)"; export CXXFLAGS_FOR_BUILD; \ |
| 41 | DLLTOOL="$(DLLTOOL)"; export DLLTOOL; \ |
| 42 | LD="$(LD)"; export LD; \ |
| 43 | LDFLAGS="$(STAGE1_LDFLAGS) $(LDFLAGS)"; export LDFLAGS; \ |
| 44 | Index: gcc-11.2.0/Makefile.tpl |
| 45 | =================================================================== |
| 46 | --- gcc-11.2.0.orig/Makefile.tpl |
| 47 | +++ gcc-11.2.0/Makefile.tpl |
| 48 | @@ -175,6 +175,7 @@ BUILD_EXPORTS = \ |
| 49 | # built for the build system to override those in BASE_FLAGS_TO_PASS. |
| 50 | EXTRA_BUILD_FLAGS = \ |
| 51 | CFLAGS="$(CFLAGS_FOR_BUILD)" \ |
| 52 | + CXXFLAGS="$(CXXFLAGS_FOR_BUILD)" \ |
| 53 | LDFLAGS="$(LDFLAGS_FOR_BUILD)" |
| 54 | |
| 55 | # This is the list of directories to built for the host system. |
| 56 | @@ -206,6 +207,7 @@ HOST_EXPORTS = \ |
| 57 | CPP_FOR_BUILD="$(CPP_FOR_BUILD)"; export CPP_FOR_BUILD; \ |
| 58 | CPPFLAGS_FOR_BUILD="$(CPPFLAGS_FOR_BUILD)"; export CPPFLAGS_FOR_BUILD; \ |
| 59 | CXX_FOR_BUILD="$(CXX_FOR_BUILD)"; export CXX_FOR_BUILD; \ |
| 60 | + CXXFLAGS_FOR_BUILD="$(CXXFLAGS_FOR_BUILD)"; export CXXFLAGS_FOR_BUILD; \ |
| 61 | DLLTOOL="$(DLLTOOL)"; export DLLTOOL; \ |
| 62 | LD="$(LD)"; export LD; \ |
| 63 | LDFLAGS="$(STAGE1_LDFLAGS) $(LDFLAGS)"; export LDFLAGS; \ |