diff options
Diffstat (limited to 'meta/recipes-devtools/gcc/gcc-7.3/0038-Fix-various-_FOR_BUILD-and-related-variables.patch')
-rw-r--r-- | meta/recipes-devtools/gcc/gcc-7.3/0038-Fix-various-_FOR_BUILD-and-related-variables.patch | 137 |
1 files changed, 0 insertions, 137 deletions
diff --git a/meta/recipes-devtools/gcc/gcc-7.3/0038-Fix-various-_FOR_BUILD-and-related-variables.patch b/meta/recipes-devtools/gcc/gcc-7.3/0038-Fix-various-_FOR_BUILD-and-related-variables.patch deleted file mode 100644 index a226d10d06..0000000000 --- a/meta/recipes-devtools/gcc/gcc-7.3/0038-Fix-various-_FOR_BUILD-and-related-variables.patch +++ /dev/null | |||
@@ -1,137 +0,0 @@ | |||
1 | From 6e7f526e71a76aac3d49ba8f1742fe1b359c1060 Mon Sep 17 00:00:00 2001 | ||
2 | From: Khem Raj <raj.khem@gmail.com> | ||
3 | Date: Mon, 7 Dec 2015 23:42:45 +0000 | ||
4 | Subject: [PATCH 38/47] Fix various _FOR_BUILD and related variables | ||
5 | |||
6 | When doing a FOR_BUILD thing, you have to override CFLAGS with | ||
7 | CFLAGS_FOR_BUILD. And if you use C++, you also have to override | ||
8 | CXXFLAGS with CXXFLAGS_FOR_BUILD. | ||
9 | Without this, when building for mingw, you end up trying to use | ||
10 | the mingw headers for a host build. | ||
11 | |||
12 | The same goes for other variables as well, such as CPPFLAGS, | ||
13 | CPP, and GMPINC. | ||
14 | |||
15 | Upstream-Status: Pending | ||
16 | |||
17 | Signed-off-by: Peter Seebach <peter.seebach@windriver.com> | ||
18 | Signed-off-by: Mark Hatle <mark.hatle@windriver.com> | ||
19 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
20 | --- | ||
21 | Makefile.in | 6 ++++++ | ||
22 | Makefile.tpl | 5 +++++ | ||
23 | gcc/Makefile.in | 2 +- | ||
24 | gcc/configure | 2 +- | ||
25 | gcc/configure.ac | 2 +- | ||
26 | 5 files changed, 14 insertions(+), 3 deletions(-) | ||
27 | |||
28 | diff --git a/Makefile.in b/Makefile.in | ||
29 | index e34e9555388..a03740f3f9d 100644 | ||
30 | --- a/Makefile.in | ||
31 | +++ b/Makefile.in | ||
32 | @@ -152,6 +152,7 @@ BUILD_EXPORTS = \ | ||
33 | CPP="$(CC_FOR_BUILD) -E"; export CPP; \ | ||
34 | CFLAGS="$(CFLAGS_FOR_BUILD)"; export CFLAGS; \ | ||
35 | CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \ | ||
36 | + CPPFLAGS="$(CPPFLAGS_FOR_BUILD)"; export CPPFLAGS; \ | ||
37 | CXX="$(CXX_FOR_BUILD)"; export CXX; \ | ||
38 | CXXFLAGS="$(CXXFLAGS_FOR_BUILD)"; export CXXFLAGS; \ | ||
39 | GFORTRAN="$(GFORTRAN_FOR_BUILD)"; export GFORTRAN; \ | ||
40 | @@ -169,6 +170,9 @@ BUILD_EXPORTS = \ | ||
41 | # built for the build system to override those in BASE_FLAGS_TO_PASS. | ||
42 | EXTRA_BUILD_FLAGS = \ | ||
43 | CFLAGS="$(CFLAGS_FOR_BUILD)" \ | ||
44 | + CXXFLAGS="$(CXXFLAGS_FOR_BUILD)" \ | ||
45 | + CPP="$(CC_FOR_BUILD) -E" \ | ||
46 | + CPPFLAGS="$(CPPFLAGS_FOR_BUILD)" \ | ||
47 | LDFLAGS="$(LDFLAGS_FOR_BUILD)" | ||
48 | |||
49 | # This is the list of directories to built for the host system. | ||
50 | @@ -186,6 +190,7 @@ HOST_SUBDIR = @host_subdir@ | ||
51 | HOST_EXPORTS = \ | ||
52 | $(BASE_EXPORTS) \ | ||
53 | CC="$(CC)"; export CC; \ | ||
54 | + CPP="$(CC) -E"; export CPP; \ | ||
55 | ADA_CFLAGS="$(ADA_CFLAGS)"; export ADA_CFLAGS; \ | ||
56 | CFLAGS="$(CFLAGS)"; export CFLAGS; \ | ||
57 | CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \ | ||
58 | @@ -734,6 +739,7 @@ BASE_FLAGS_TO_PASS = \ | ||
59 | "CC_FOR_BUILD=$(CC_FOR_BUILD)" \ | ||
60 | "CFLAGS_FOR_BUILD=$(CFLAGS_FOR_BUILD)" \ | ||
61 | "CXX_FOR_BUILD=$(CXX_FOR_BUILD)" \ | ||
62 | + "CXXFLAGS_FOR_BUILD=$(CXXFLAGS_FOR_BUILD)" \ | ||
63 | "EXPECT=$(EXPECT)" \ | ||
64 | "FLEX=$(FLEX)" \ | ||
65 | "INSTALL=$(INSTALL)" \ | ||
66 | diff --git a/Makefile.tpl b/Makefile.tpl | ||
67 | index d0fa07005be..953376c658d 100644 | ||
68 | --- a/Makefile.tpl | ||
69 | +++ b/Makefile.tpl | ||
70 | @@ -154,6 +154,7 @@ BUILD_EXPORTS = \ | ||
71 | CC="$(CC_FOR_BUILD)"; export CC; \ | ||
72 | CFLAGS="$(CFLAGS_FOR_BUILD)"; export CFLAGS; \ | ||
73 | CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \ | ||
74 | + CPPFLAGS="$(CPPFLAGS_FOR_BUILD)"; export CPPFLAGS; \ | ||
75 | CXX="$(CXX_FOR_BUILD)"; export CXX; \ | ||
76 | CXXFLAGS="$(CXXFLAGS_FOR_BUILD)"; export CXXFLAGS; \ | ||
77 | GFORTRAN="$(GFORTRAN_FOR_BUILD)"; export GFORTRAN; \ | ||
78 | @@ -171,6 +172,9 @@ BUILD_EXPORTS = \ | ||
79 | # built for the build system to override those in BASE_FLAGS_TO_PASS. | ||
80 | EXTRA_BUILD_FLAGS = \ | ||
81 | CFLAGS="$(CFLAGS_FOR_BUILD)" \ | ||
82 | + CXXFLAGS="$(CXXFLAGS_FOR_BUILD)" \ | ||
83 | + CPP="$(CC_FOR_BUILD) -E" \ | ||
84 | + CPPFLAGS="$(CPPFLAGS_FOR_BUILD)" \ | ||
85 | LDFLAGS="$(LDFLAGS_FOR_BUILD)" | ||
86 | |||
87 | # This is the list of directories to built for the host system. | ||
88 | @@ -188,6 +192,7 @@ HOST_SUBDIR = @host_subdir@ | ||
89 | HOST_EXPORTS = \ | ||
90 | $(BASE_EXPORTS) \ | ||
91 | CC="$(CC)"; export CC; \ | ||
92 | + CPP="$(CC) -E"; export CPP; \ | ||
93 | ADA_CFLAGS="$(ADA_CFLAGS)"; export ADA_CFLAGS; \ | ||
94 | CFLAGS="$(CFLAGS)"; export CFLAGS; \ | ||
95 | CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \ | ||
96 | diff --git a/gcc/Makefile.in b/gcc/Makefile.in | ||
97 | index 95d21effad3..dbe2bacde50 100644 | ||
98 | --- a/gcc/Makefile.in | ||
99 | +++ b/gcc/Makefile.in | ||
100 | @@ -795,7 +795,7 @@ BUILD_LDFLAGS=@BUILD_LDFLAGS@ | ||
101 | BUILD_NO_PIE_FLAG = @BUILD_NO_PIE_FLAG@ | ||
102 | BUILD_LDFLAGS += $(BUILD_NO_PIE_FLAG) | ||
103 | BUILD_CPPFLAGS= -I. -I$(@D) -I$(srcdir) -I$(srcdir)/$(@D) \ | ||
104 | - -I$(srcdir)/../include @INCINTL@ $(CPPINC) $(CPPFLAGS) | ||
105 | + -I$(srcdir)/../include @INCINTL@ $(CPPINC) $(CPPFLAGS_FOR_BUILD) | ||
106 | |||
107 | # Actual name to use when installing a native compiler. | ||
108 | GCC_INSTALL_NAME := $(shell echo gcc|sed '$(program_transform_name)') | ||
109 | diff --git a/gcc/configure b/gcc/configure | ||
110 | index 6ba391ed068..72ca6e5c535 100755 | ||
111 | --- a/gcc/configure | ||
112 | +++ b/gcc/configure | ||
113 | @@ -11789,7 +11789,7 @@ else | ||
114 | CC="${CC_FOR_BUILD}" CFLAGS="${CFLAGS_FOR_BUILD}" \ | ||
115 | CXX="${CXX_FOR_BUILD}" CXXFLAGS="${CXXFLAGS_FOR_BUILD}" \ | ||
116 | LD="${LD_FOR_BUILD}" LDFLAGS="${LDFLAGS_FOR_BUILD}" \ | ||
117 | - GMPINC="" CPPFLAGS="${CPPFLAGS} -DGENERATOR_FILE" \ | ||
118 | + GMPINC="" CPPFLAGS="${CPPFLAGS_FOR_BUILD} -DGENERATOR_FILE" \ | ||
119 | ${realsrcdir}/configure \ | ||
120 | --enable-languages=${enable_languages-all} \ | ||
121 | --target=$target_alias --host=$build_alias --build=$build_alias | ||
122 | diff --git a/gcc/configure.ac b/gcc/configure.ac | ||
123 | index 8551a412df3..6eefb61dc2b 100644 | ||
124 | --- a/gcc/configure.ac | ||
125 | +++ b/gcc/configure.ac | ||
126 | @@ -1708,7 +1708,7 @@ else | ||
127 | CC="${CC_FOR_BUILD}" CFLAGS="${CFLAGS_FOR_BUILD}" \ | ||
128 | CXX="${CXX_FOR_BUILD}" CXXFLAGS="${CXXFLAGS_FOR_BUILD}" \ | ||
129 | LD="${LD_FOR_BUILD}" LDFLAGS="${LDFLAGS_FOR_BUILD}" \ | ||
130 | - GMPINC="" CPPFLAGS="${CPPFLAGS} -DGENERATOR_FILE" \ | ||
131 | + GMPINC="" CPPFLAGS="${CPPFLAGS_FOR_BUILD} -DGENERATOR_FILE" \ | ||
132 | ${realsrcdir}/configure \ | ||
133 | --enable-languages=${enable_languages-all} \ | ||
134 | --target=$target_alias --host=$build_alias --build=$build_alias | ||
135 | -- | ||
136 | 2.12.2 | ||
137 | |||