2476
by Arne Fitzenreiter
Fix toolchain build at Fedora13 and Ubuntu10.04. |
1 |
###############################################################################
|
2 |
# #
|
|
3 |
# IPFire.org - A linux based firewall #
|
|
9495.1.245
by Peter Müller
Fix Bugzilla URL in GCC LFS file |
4 |
# Copyright (C) 2007-2022 IPFire Team <info@ipfire.org> #
|
2476
by Arne Fitzenreiter
Fix toolchain build at Fedora13 and Ubuntu10.04. |
5 |
# #
|
6 |
# This program is free software: you can redistribute it and/or modify #
|
|
7 |
# it under the terms of the GNU General Public License as published by #
|
|
8 |
# the Free Software Foundation, either version 3 of the License, or #
|
|
9 |
# (at your option) any later version. #
|
|
10 |
# #
|
|
11 |
# This program is distributed in the hope that it will be useful, #
|
|
12 |
# but WITHOUT ANY WARRANTY; without even the implied warranty of #
|
|
13 |
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the #
|
|
14 |
# GNU General Public License for more details. #
|
|
15 |
# #
|
|
16 |
# You should have received a copy of the GNU General Public License #
|
|
17 |
# along with this program. If not, see <http://www.gnu.org/licenses/>. #
|
|
18 |
# #
|
|
19 |
###############################################################################
|
|
20 |
||
21 |
############################################################################### |
|
22 |
# Definitions |
|
23 |
############################################################################### |
|
24 |
||
25 |
include Config |
|
26 |
||
11690
by Michael Tremer
gcc: Update to 13.2.0 |
27 |
VER = 13.2.0 |
3224
by Michael Tremer
toolchain: gcc: Update to 4.4.7. |
28 |
|
8918
by Michael Tremer
GCC: Update to 10.3.0 |
29 |
GMP_VER = 6.2.1 |
11041
by Michael Tremer
gcc: Update to 12.2.0 |
30 |
MPFR_VER = 4.2.0 |
11465
by Michael Tremer
gcc: Update to 13.1.0 |
31 |
MPC_VER = 1.3.1 |
2476
by Arne Fitzenreiter
Fix toolchain build at Fedora13 and Ubuntu10.04. |
32 |
|
33 |
THISAPP = gcc-$(VER) |
|
6044
by Arne Fitzenreiter
toolchain: update to gcc-7.3.0 and enable retpolines on x86_64 and i586 |
34 |
DL_FILE = $(THISAPP).tar.xz |
2476
by Arne Fitzenreiter
Fix toolchain build at Fedora13 and Ubuntu10.04. |
35 |
DL_FROM = $(URL_IPFIRE) |
36 |
DIR_APP = $(DIR_SRC)/$(THISAPP) |
|
37 |
||
8937
by Arne Fitzenreiter
gcc: remove CCFLAGS only in pass1 of the toolchain |
38 |
ifeq "$(PASS)" "1" |
3266.1.2
by Michael Tremer
gcc: Import patches from RHEL6. |
39 |
CFLAGS := $(patsubst -march=%,,$(CFLAGS)) |
5669
by Arne Fitzenreiter
toolchain: filter -mfpu from CFLAGS for first pass |
40 |
CFLAGS := $(patsubst -mfpu=%,,$(CFLAGS)) |
3266.1.2
by Michael Tremer
gcc: Import patches from RHEL6. |
41 |
CFLAGS := $(patsubst -mtune=%,,$(CFLAGS)) |
3315.1.3
by Arne Fitzenreiter
toolchain: fix build on arm with hardfloat host distro. |
42 |
CFLAGS := $(patsubst -mfloat-abi=%,,$(CFLAGS)) |
4996
by Michael Tremer
gcc: Update to version 4.9.3 |
43 |
CFLAGS := $(filter-out -fexceptions,$(CFLAGS)) |
6044
by Arne Fitzenreiter
toolchain: update to gcc-7.3.0 and enable retpolines on x86_64 and i586 |
44 |
|
45 |
CFLAGS := $(patsubst -mindirect-branch=%,,$(CFLAGS)) |
|
11978
by Arne Fitzenreiter
gcc: fix toolchain crossbuild |
46 |
CFLAGS := $(patsubst -mbranch-protection=%,,$(CFLAGS)) |
6044
by Arne Fitzenreiter
toolchain: update to gcc-7.3.0 and enable retpolines on x86_64 and i586 |
47 |
CFLAGS := $(patsubst -mfunction-return=%,,$(CFLAGS)) |
8193.1.7
by Arne Fitzenreiter
toolchain: fix build with gcc<8 on builder. |
48 |
CFLAGS := $(patsubst -fstack-clash-protection,,$(CFLAGS)) |
49 |
CFLAGS := $(patsubst -fcf-protection,,$(CFLAGS)) |
|
6044
by Arne Fitzenreiter
toolchain: update to gcc-7.3.0 and enable retpolines on x86_64 and i586 |
50 |
endif |
51 |
||
4996
by Michael Tremer
gcc: Update to version 4.9.3 |
52 |
CXXFLAGS := $(CFLAGS) |
4778.1.8
by Michael Tremer
Fix toolchain build with newer versions of GCC |
53 |
|
5851
by Michael Tremer
Move toolchain from /tools to /tools_${arch} |
54 |
# Normal build or $(TOOLS_DIR) build. |
2476
by Arne Fitzenreiter
Fix toolchain build at Fedora13 and Ubuntu10.04. |
55 |
# |
56 |
ifeq "$(ROOT)" "" |
|
57 |
TARGET = $(DIR_INFO)/$(THISAPP) |
|
3239
by Michael Tremer
gcc: Build package for stage2. |
58 |
EXTRA_CONFIG = \ |
59 |
--prefix=/usr \ |
|
60 |
--libexecdir=/usr/lib \ |
|
61 |
--enable-shared \ |
|
62 |
--enable-threads=posix \ |
|
63 |
--enable-__cxa_atexit \ |
|
64 |
--enable-clocale=gnu \ |
|
7929
by Michael Tremer
gcc: Drop support for Go |
65 |
--enable-languages=c,c++ \ |
3239
by Michael Tremer
gcc: Build package for stage2. |
66 |
--disable-bootstrap \ |
67 |
--disable-nls |
|
2476
by Arne Fitzenreiter
Fix toolchain build at Fedora13 and Ubuntu10.04. |
68 |
EXTRA_MAKE = |
69 |
EXTRA_INSTALL = |
|
11056
by Arne Fitzenreiter
gcc: build libatomic before zstd of riscv64 |
70 |
ifeq "$(PASS)" "A" |
71 |
TARGET = $(DIR_INFO)/$(THISAPP)-libatomic |
|
72 |
endif |
|
2476
by Arne Fitzenreiter
Fix toolchain build at Fedora13 and Ubuntu10.04. |
73 |
else |
74 |
ifeq "$(PASS)" "1" |
|
75 |
TARGET = $(DIR_INFO)/$(THISAPP)-tools1 |
|
3224
by Michael Tremer
toolchain: gcc: Update to 4.4.7. |
76 |
EXTRA_CONFIG = \ |
77 |
--target=$(CROSSTARGET) \ |
|
5851
by Michael Tremer
Move toolchain from /tools to /tools_${arch} |
78 |
--prefix=$(TOOLS_DIR) \ |
5018.1.2
by Arne Fitzenreiter
toolchain: fix full toolchain crossbuild |
79 |
--with-sysroot=$(ROOT) \ |
5851
by Michael Tremer
Move toolchain from /tools to /tools_${arch} |
80 |
--with-local-prefix=$(TOOLS_DIR) \ |
81 |
--with-native-system-header-dir=$(TOOLS_DIR)/include \ |
|
9495.1.23
by Michael Tremer
binutils+gcc: Fix that the toolchain compiler is trying to link against host libraries |
82 |
--with-glibc-version=2.11 \ |
3224
by Michael Tremer
toolchain: gcc: Update to 4.4.7. |
83 |
--disable-nls \ |
84 |
--disable-shared \ |
|
9495.1.23
by Michael Tremer
binutils+gcc: Fix that the toolchain compiler is trying to link against host libraries |
85 |
--disable-multilib \ |
3224
by Michael Tremer
toolchain: gcc: Update to 4.4.7. |
86 |
--disable-decimal-float \ |
87 |
--disable-threads \ |
|
5018.1.2
by Arne Fitzenreiter
toolchain: fix full toolchain crossbuild |
88 |
--disable-libatomic \ |
3224
by Michael Tremer
toolchain: gcc: Update to 4.4.7. |
89 |
--disable-libmudflap \ |
90 |
--disable-libssp \ |
|
5547
by Michael Tremer
gcc: Do not build libmpx on x86 in first pass in toolchain |
91 |
--disable-libmpx \ |
3224
by Michael Tremer
toolchain: gcc: Update to 4.4.7. |
92 |
--disable-libgomp \ |
93 |
--disable-libquadmath \ |
|
5018.1.2
by Arne Fitzenreiter
toolchain: fix full toolchain crossbuild |
94 |
--disable-libstdc++-v3 \ |
95 |
--disable-libvtv \ |
|
96 |
--disable-libcilkrts \ |
|
97 |
--disable-libitm \ |
|
98 |
--disable-libsanitizer \ |
|
3224
by Michael Tremer
toolchain: gcc: Update to 4.4.7. |
99 |
--with-newlib \ |
100 |
--without-headers \ |
|
101 |
--without-ppl \ |
|
102 |
--without-cloog \ |
|
5018.1.2
by Arne Fitzenreiter
toolchain: fix full toolchain crossbuild |
103 |
--enable-languages=c,c++ |
9495.1.243
by Peter Müller
Early spring clean: Remove trailing whitespaces, and correct licence headers |
104 |
EXTRA_MAKE = |
105 |
EXTRA_INSTALL = |
|
2476
by Arne Fitzenreiter
Fix toolchain build at Fedora13 and Ubuntu10.04. |
106 |
else |
5018.1.2
by Arne Fitzenreiter
toolchain: fix full toolchain crossbuild |
107 |
ifeq "$(PASS)" "2" |
2476
by Arne Fitzenreiter
Fix toolchain build at Fedora13 and Ubuntu10.04. |
108 |
TARGET = $(DIR_INFO)/$(THISAPP)-tools2 |
3224
by Michael Tremer
toolchain: gcc: Update to 4.4.7. |
109 |
EXTRA_ENV = \ |
5526
by Michael Tremer
gcc: Remove unnecessary compiler options |
110 |
CC="$(CROSSTARGET)-gcc" \ |
5018.1.2
by Arne Fitzenreiter
toolchain: fix full toolchain crossbuild |
111 |
CXX="$(CROSSTARGET)-g++" \ |
3224
by Michael Tremer
toolchain: gcc: Update to 4.4.7. |
112 |
AR="$(CROSSTARGET)-ar" \ |
113 |
RANLIB="$(CROSSTARGET)-ranlib" |
|
114 |
EXTRA_CONFIG = \ |
|
9495.1.33
by Michael Tremer
binutils/gcc: Explicitely declare host and build architecture tuple |
115 |
--build=$(BUILDTARGET) \ |
116 |
--host=$(BUILDTARGET) \ |
|
5851
by Michael Tremer
Move toolchain from /tools to /tools_${arch} |
117 |
--prefix=$(TOOLS_DIR) \ |
118 |
--with-local-prefix=$(TOOLS_DIR) \ |
|
119 |
--with-native-system-header-dir=$(TOOLS_DIR)/include \ |
|
11036
by Michael Tremer
Drop support for armv6l (and armv7hl) |
120 |
--disable-bootstrap \ |
3224
by Michael Tremer
toolchain: gcc: Update to 4.4.7. |
121 |
--enable-languages=c,c++ \ |
122 |
--disable-libstdcxx-pch \ |
|
9495.1.23
by Michael Tremer
binutils+gcc: Fix that the toolchain compiler is trying to link against host libraries |
123 |
--disable-multilib \ |
5548
by Michael Tremer
gcc: Perform full bootstrap on ARM32 |
124 |
--disable-libgomp |
9495.1.243
by Peter Müller
Early spring clean: Remove trailing whitespaces, and correct licence headers |
125 |
EXTRA_MAKE = |
126 |
EXTRA_INSTALL = |
|
5018.1.2
by Arne Fitzenreiter
toolchain: fix full toolchain crossbuild |
127 |
else |
128 |
# PASS=L # libstdc++-v3 |
|
129 |
TARGET = $(DIR_INFO)/$(THISAPP)-libstdc++ |
|
130 |
EXTRA_ENV = \ |
|
5526
by Michael Tremer
gcc: Remove unnecessary compiler options |
131 |
CC="$(CROSSTARGET)-gcc" \ |
5018.1.2
by Arne Fitzenreiter
toolchain: fix full toolchain crossbuild |
132 |
AR="$(CROSSTARGET)-ar" \ |
133 |
RANLIB="$(CROSSTARGET)-ranlib" |
|
134 |
EXTRA_CONFIG = \ |
|
135 |
--host=$(CROSSTARGET) \ |
|
5851
by Michael Tremer
Move toolchain from /tools to /tools_${arch} |
136 |
--prefix=$(TOOLS_DIR) \ |
5018.1.2
by Arne Fitzenreiter
toolchain: fix full toolchain crossbuild |
137 |
--with-sysroot=$(ROOT) \ |
138 |
--disable-shared \ |
|
139 |
--disable-nls \ |
|
140 |
--disable-libstdcxx-threads \ |
|
141 |
--disable-libstdcxx-pch \ |
|
5851
by Michael Tremer
Move toolchain from /tools to /tools_${arch} |
142 |
--with-gxx-include-dir=$(TOOLS_DIR)/$(CROSSTARGET)/include/c++/$(VER) |
9495.1.243
by Peter Müller
Early spring clean: Remove trailing whitespaces, and correct licence headers |
143 |
EXTRA_MAKE = |
144 |
EXTRA_INSTALL = |
|
5018.1.2
by Arne Fitzenreiter
toolchain: fix full toolchain crossbuild |
145 |
endif |
2476
by Arne Fitzenreiter
Fix toolchain build at Fedora13 and Ubuntu10.04. |
146 |
endif |
147 |
endif |
|
148 |
||
8243
by Michael Tremer
Update GCC to 10.2.0 |
149 |
ifeq "$(BUILD_ARCH)" "aarch64" |
150 |
EXTRA_CONFIG += \ |
|
151 |
--enable-standard-branch-protection |
|
152 |
endif |
|
153 |
||
8729.1.9
by Michael Tremer
gcc: Compile for rv64gc |
154 |
ifeq "$(BUILD_ARCH)" "riscv64" |
155 |
EXTRA_CONFIG += \ |
|
156 |
--with-arch=rv64gc \ |
|
157 |
--with-abi=lp64d |
|
158 |
endif |
|
159 |
||
3266.1.2
by Michael Tremer
gcc: Import patches from RHEL6. |
160 |
EXTRA_CONFIG += \ |
5543
by Michael Tremer
gcc: Always pass --disable-multilib |
161 |
--disable-multilib \ |
9495.1.245
by Peter Müller
Fix Bugzilla URL in GCC LFS file |
162 |
--with-bugurl=https://bugzilla.ipfire.org \ |
3266.1.2
by Michael Tremer
gcc: Import patches from RHEL6. |
163 |
--disable-libunwind-exceptions \ |
9495.1.305
by Peter Müller
Revert "gcc: Compile without ZSTD" |
164 |
--enable-gnu-unique-object |
3266.1.2
by Michael Tremer
gcc: Import patches from RHEL6. |
165 |
|
2913.16.1
by Michael Tremer
Add support to build an ARM toolchain. |
166 |
export XCFLAGS = $(CFLAGS) |
167 |
export TCFLAGS = $(CFLAGS) |
|
3026
by Arne Fitzenreiter
toolchain: cpu-type fixes. |
168 |
|
2476
by Arne Fitzenreiter
Fix toolchain build at Fedora13 and Ubuntu10.04. |
169 |
############################################################################### |
170 |
# Top-level Rules |
|
171 |
############################################################################### |
|
3224
by Michael Tremer
toolchain: gcc: Update to 4.4.7. |
172 |
|
173 |
objects = $(DL_FILE) \ |
|
6044
by Arne Fitzenreiter
toolchain: update to gcc-7.3.0 and enable retpolines on x86_64 and i586 |
174 |
gmp-$(GMP_VER).tar.xz \ |
175 |
mpfr-$(MPFR_VER).tar.xz \ |
|
4996
by Michael Tremer
gcc: Update to version 4.9.3 |
176 |
mpc-$(MPC_VER).tar.gz |
2476
by Arne Fitzenreiter
Fix toolchain build at Fedora13 and Ubuntu10.04. |
177 |
|
178 |
$(DL_FILE) = $(DL_FROM)/$(DL_FILE) |
|
6045
by Arne Fitzenreiter
gcc: fix gmp download |
179 |
gmp-$(GMP_VER).tar.xz = $(DL_FROM)/gmp-$(GMP_VER).tar.xz |
6044
by Arne Fitzenreiter
toolchain: update to gcc-7.3.0 and enable retpolines on x86_64 and i586 |
180 |
mpfr-$(MPFR_VER).tar.xz = $(DL_FROM)/mpfr-$(MPFR_VER).tar.xz |
4996
by Michael Tremer
gcc: Update to version 4.9.3 |
181 |
mpc-$(MPC_VER).tar.gz = $(DL_FROM)/mpc-$(MPC_VER).tar.gz |
2476
by Arne Fitzenreiter
Fix toolchain build at Fedora13 and Ubuntu10.04. |
182 |
|
11690
by Michael Tremer
gcc: Update to 13.2.0 |
183 |
$(DL_FILE)_BLAKE2 = 0034b29d3d6cc05821f0c4253ce077805943aff7b370729dd203bda57d89c107edd657eeddc2fb1e69ea15c7b0323b961f46516c7f4af89a3ccf7fea84701be2 |
9648
by Peter Müller
Switch checksums from MD5 to BLAKE2 |
184 |
gmp-$(GMP_VER).tar.xz_BLAKE2 = c0d85f175392a50cfa01bc6b0a312b235946ad8b4f6f84f6dabd33d7a6f2cc75c9b0e1e33057be07750bfa0145b7c4cf3b6188a5be6ca9d7271ec2276c84ebcb |
11041
by Michael Tremer
gcc: Update to 12.2.0 |
185 |
mpfr-$(MPFR_VER).tar.xz_BLAKE2 = dd88ae3a6a910ad8faeb791b49c3b1085de5d0d4c49c637c124bf4d9bc79fb621d0d1d69e07d0642b9b678f6d355a5830d083dfd189e1e91d0e04c970c10bd64 |
11465
by Michael Tremer
gcc: Update to 13.1.0 |
186 |
mpc-$(MPC_VER).tar.gz_BLAKE2 = 76434e6f8830af3571836d51576bfebbc9701e9bbb5c4686f134081cd96cd90ae02f7ff42bf9e3957c7a7ba92b6b2d9cdabe18f0269271147521cd7f6a2d551c |
2476
by Arne Fitzenreiter
Fix toolchain build at Fedora13 and Ubuntu10.04. |
187 |
|
188 |
install : $(TARGET) |
|
189 |
||
190 |
check : $(patsubst %,$(DIR_CHK)/%,$(objects)) |
|
191 |
||
192 |
download :$(patsubst %,$(DIR_DL)/%,$(objects)) |
|
193 |
||
9648
by Peter Müller
Switch checksums from MD5 to BLAKE2 |
194 |
b2 : $(subst %,%_BLAKE2,$(objects)) |
2476
by Arne Fitzenreiter
Fix toolchain build at Fedora13 and Ubuntu10.04. |
195 |
|
196 |
############################################################################### |
|
9648
by Peter Müller
Switch checksums from MD5 to BLAKE2 |
197 |
# Downloading, checking, b2sum |
2476
by Arne Fitzenreiter
Fix toolchain build at Fedora13 and Ubuntu10.04. |
198 |
############################################################################### |
199 |
||
200 |
$(patsubst %,$(DIR_CHK)/%,$(objects)) : |
|
201 |
@$(CHECK) |
|
202 |
||
203 |
$(patsubst %,$(DIR_DL)/%,$(objects)) : |
|
204 |
@$(LOAD) |
|
205 |
||
9648
by Peter Müller
Switch checksums from MD5 to BLAKE2 |
206 |
$(subst %,%_BLAKE2,$(objects)) : |
207 |
@$(B2SUM) |
|
2476
by Arne Fitzenreiter
Fix toolchain build at Fedora13 and Ubuntu10.04. |
208 |
|
209 |
############################################################################### |
|
210 |
# Installation Details |
|
211 |
############################################################################### |
|
212 |
||
213 |
$(TARGET) : $(patsubst %,$(DIR_DL)/%,$(objects)) |
|
214 |
@$(PREBUILD) |
|
4996
by Michael Tremer
gcc: Update to version 4.9.3 |
215 |
@rm -rf $(DIR_APP) $(DIR_SRC)/gcc-build && cd $(DIR_SRC) && tar axf $(DIR_DL)/$(DL_FILE) |
11661
by Arne Fitzenreiter
gcc: fix build on riscv64 |
216 |
cd $(DIR_APP) && patch -Np1 < $(DIR_SRC)/src/patches/gcc/gcc-13.1.0-riscv_use_log2_from_cheader_without_namespace.patch |
217 |
||
2476
by Arne Fitzenreiter
Fix toolchain build at Fedora13 and Ubuntu10.04. |
218 |
@mkdir $(DIR_SRC)/gcc-build |
2913.16.1
by Michael Tremer
Add support to build an ARM toolchain. |
219 |
|
5529
by Michael Tremer
Cleanup makefiles by using the new TOOLCHAIN variable |
220 |
cd $(DIR_APP) && sed -i 's/install_to_$$(INSTALL_DEST) //' libiberty/Makefile.in |
221 |
cd $(DIR_APP) && sed -i gcc/Makefile.in \ |
|
222 |
-e 's@\./fixinc\.sh@-c true@' \ |
|
223 |
-e 's/^T_CFLAGS =$$/& -fomit-frame-pointer/' |
|
224 |
||
225 |
ifeq "$(TOOLCHAIN)" "1" |
|
3224
by Michael Tremer
toolchain: gcc: Update to 4.4.7. |
226 |
# Build gmp and mpfr internally in toolchain. |
6044
by Arne Fitzenreiter
toolchain: update to gcc-7.3.0 and enable retpolines on x86_64 and i586 |
227 |
cd $(DIR_APP) && tar xfa $(DIR_DL)/gmp-$(GMP_VER).tar.xz |
3224
by Michael Tremer
toolchain: gcc: Update to 4.4.7. |
228 |
cd $(DIR_APP) && mv -v gmp-$(GMP_VER) gmp |
6044
by Arne Fitzenreiter
toolchain: update to gcc-7.3.0 and enable retpolines on x86_64 and i586 |
229 |
cd $(DIR_APP) && tar xfa $(DIR_DL)/mpfr-$(MPFR_VER).tar.xz |
3224
by Michael Tremer
toolchain: gcc: Update to 4.4.7. |
230 |
cd $(DIR_APP) && mv -v mpfr-$(MPFR_VER) mpfr |
4996
by Michael Tremer
gcc: Update to version 4.9.3 |
231 |
cd $(DIR_APP) && tar xfa $(DIR_DL)/mpc-$(MPC_VER).tar.gz |
232 |
cd $(DIR_APP) && mv -v mpc-$(MPC_VER) mpc |
|
3224
by Michael Tremer
toolchain: gcc: Update to 4.4.7. |
233 |
|
5529
by Michael Tremer
Cleanup makefiles by using the new TOOLCHAIN variable |
234 |
ifeq "$(PASS)" "2" |
5018.1.2
by Arne Fitzenreiter
toolchain: fix full toolchain crossbuild |
235 |
cd $(DIR_APP) && cat gcc/limitx.h gcc/glimits.h gcc/limity.h > \ |
5851
by Michael Tremer
Move toolchain from /tools to /tools_${arch} |
236 |
`dirname $$($(TOOLS_DIR)/bin/$(CROSSTARGET)-gcc -print-libgcc-file-name)`/include-fixed/limits.h |
5529
by Michael Tremer
Cleanup makefiles by using the new TOOLCHAIN variable |
237 |
endif |
238 |
||
3224
by Michael Tremer
toolchain: gcc: Update to 4.4.7. |
239 |
for file in $$(find $(DIR_APP)/gcc/config -name linux64.h -o -name linux.h \ |
5519
by Michael Tremer
gcc: Update to version 6.3.0 |
240 |
-o -name sysv4.h -o -name linux-eabi.h -o -name linux-elf.h -o -name aarch64-linux.h); do \ |
3224
by Michael Tremer
toolchain: gcc: Update to 4.4.7. |
241 |
echo "Processing $${file}..."; \ |
242 |
sed -i $${file} \ |
|
5851
by Michael Tremer
Move toolchain from /tools to /tools_${arch} |
243 |
-e 's@/lib\(64\)\?\(32\)\?/ld@$(TOOLS_DIR)&@g' \ |
244 |
-e 's@/usr@$(TOOLS_DIR)@g'; \ |
|
5018.1.2
by Arne Fitzenreiter
toolchain: fix full toolchain crossbuild |
245 |
echo '#undef STANDARD_STARTFILE_PREFIX_1' >> $${file}; \ |
246 |
echo '#undef STANDARD_STARTFILE_PREFIX_2' >> $${file}; \ |
|
5851
by Michael Tremer
Move toolchain from /tools to /tools_${arch} |
247 |
echo '#define STANDARD_STARTFILE_PREFIX_1 "$(TOOLS_DIR)/lib/"' >> $${file}; \ |
3224
by Michael Tremer
toolchain: gcc: Update to 4.4.7. |
248 |
echo '#define STANDARD_STARTFILE_PREFIX_2 ""' >> $${file}; \ |
249 |
done |
|
250 |
endif |
|
5529
by Michael Tremer
Cleanup makefiles by using the new TOOLCHAIN variable |
251 |
|
252 |
ifeq "$(PASS)" "L" |
|
5018.1.2
by Arne Fitzenreiter
toolchain: fix full toolchain crossbuild |
253 |
# libstdc++ pass |
254 |
cd $(DIR_SRC)/gcc-build && \ |
|
255 |
$(EXTRA_ENV) \ |
|
256 |
$(DIR_APP)/libstdc++-v3/configure \ |
|
257 |
$(EXTRA_CONFIG) |
|
7978
by Peter Müller
gcc: disable parallel build |
258 |
cd $(DIR_SRC)/gcc-build && make $(EXTRA_MAKE) |
5018.1.2
by Arne Fitzenreiter
toolchain: fix full toolchain crossbuild |
259 |
cd $(DIR_SRC)/gcc-build && make $(EXTRA_INSTALL) install |
11056
by Arne Fitzenreiter
gcc: build libatomic before zstd of riscv64 |
260 |
else |
261 |
ifeq "$(PASS)" "A" |
|
262 |
# libatomic pass |
|
263 |
cd $(DIR_SRC)/gcc-build && \ |
|
264 |
$(EXTRA_ENV) \ |
|
265 |
$(DIR_APP)/libatomic/configure \ |
|
266 |
$(EXTRA_CONFIG) |
|
267 |
cd $(DIR_SRC)/gcc-build && make $(EXTRA_MAKE) |
|
268 |
cd $(DIR_SRC)/gcc-build && make $(EXTRA_INSTALL) install |
|
5529
by Michael Tremer
Cleanup makefiles by using the new TOOLCHAIN variable |
269 |
else |
270 |
# The actual build. |
|
271 |
cd $(DIR_SRC)/gcc-build && \ |
|
272 |
$(EXTRA_ENV) \ |
|
273 |
$(DIR_APP)/configure \ |
|
274 |
$(EXTRA_CONFIG) |
|
9160.1.151
by Arne Fitzenreiter
gcc: enable parallel build |
275 |
cd $(DIR_SRC)/gcc-build && make $(EXTRA_MAKE) $(MAKETUNING) |
5529
by Michael Tremer
Cleanup makefiles by using the new TOOLCHAIN variable |
276 |
cd $(DIR_SRC)/gcc-build && make $(EXTRA_INSTALL) install |
277 |
endif |
|
11056
by Arne Fitzenreiter
gcc: build libatomic before zstd of riscv64 |
278 |
endif |
5529
by Michael Tremer
Cleanup makefiles by using the new TOOLCHAIN variable |
279 |
|
280 |
ifeq "$(TOOLCHAIN)" "1" |
|
281 |
ifeq "$(PASS)" "1" |
|
5851
by Michael Tremer
Move toolchain from /tools to /tools_${arch} |
282 |
ln -svf libgcc.a $$($(TOOLS_DIR)/bin/$(CROSSTARGET)-gcc -print-libgcc-file-name | sed 's/libgcc/&_eh/') |
5529
by Michael Tremer
Cleanup makefiles by using the new TOOLCHAIN variable |
283 |
endif |
284 |
||
285 |
ifeq "$(PASS)" "2" |
|
5851
by Michael Tremer
Move toolchain from /tools to /tools_${arch} |
286 |
ln -svf gcc $(TOOLS_DIR)/bin/cc |
5529
by Michael Tremer
Cleanup makefiles by using the new TOOLCHAIN variable |
287 |
# remove gdb python files from libdir |
5851
by Michael Tremer
Move toolchain from /tools to /tools_${arch} |
288 |
rm -rf $(TOOLS_DIR)/lib/*-gdb.py |
5529
by Michael Tremer
Cleanup makefiles by using the new TOOLCHAIN variable |
289 |
endif |
290 |
||
291 |
ifeq "$(PASS)" "L" |
|
5519
by Michael Tremer
gcc: Update to version 6.3.0 |
292 |
# Workaround for https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70936 |
5851
by Michael Tremer
Move toolchain from /tools to /tools_${arch} |
293 |
sed -e "s/^#include_next/#include/" -i $(TOOLS_DIR)/$(CROSSTARGET)/include/c++/$(VER)/cstdlib |
5529
by Michael Tremer
Cleanup makefiles by using the new TOOLCHAIN variable |
294 |
endif |
3224
by Michael Tremer
toolchain: gcc: Update to 4.4.7. |
295 |
|
5529
by Michael Tremer
Cleanup makefiles by using the new TOOLCHAIN variable |
296 |
else # NON-TOOLCHAIN |
3239
by Michael Tremer
gcc: Build package for stage2. |
297 |
ln -svf ../usr/bin/cpp /lib |
3253
by Michael Tremer
gcc: Create 'cc' symlink. |
298 |
ln -svf gcc /usr/bin/cc |
5023.1.4
by Arne Fitzenreiter
gcc: remove gdb python files also in root build. |
299 |
# remove gdb python files from libdir |
300 |
rm -rf /usr/lib/*-gdb.py |
|
5529
by Michael Tremer
Cleanup makefiles by using the new TOOLCHAIN variable |
301 |
endif |
302 |
||
2476
by Arne Fitzenreiter
Fix toolchain build at Fedora13 and Ubuntu10.04. |
303 |
@rm -rf $(DIR_APP) $(DIR_SRC)/gcc-build |
304 |
@$(POSTBUILD) |