comparison Makefile.tpl @ 55:77e2b8dfacca gcc-4.4.5

update it from 4.4.3 to 4.5.0
author ryoma <e075725@ie.u-ryukyu.ac.jp>
date Fri, 12 Feb 2010 23:39:51 +0900
parents a06113de4d67
children b7f97abdc517
comparison
equal deleted inserted replaced
52:c156f1bd5cd9 55:77e2b8dfacca
4 4
5 # Makefile.in is generated from Makefile.tpl by 'autogen Makefile.def'. 5 # Makefile.in is generated from Makefile.tpl by 'autogen Makefile.def'.
6 # 6 #
7 # Makefile for directory with subdirs to build. 7 # Makefile for directory with subdirs to build.
8 # Copyright (C) 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 8 # Copyright (C) 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998,
9 # 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2009 9 # 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009
10 # Free Software Foundation 10 # Free Software Foundation
11 # 11 #
12 # This file is free software; you can redistribute it and/or modify 12 # This file is free software; you can redistribute it and/or modify
13 # it under the terms of the GNU General Public License as published by 13 # it under the terms of the GNU General Public License as published by
14 # the Free Software Foundation; either version 3 of the License, or 14 # the Free Software Foundation; either version 3 of the License, or
118 BUILD_SUBDIR = @build_subdir@ 118 BUILD_SUBDIR = @build_subdir@
119 # This is set by the configure script to the arguments to use when configuring 119 # This is set by the configure script to the arguments to use when configuring
120 # directories built for the build system. 120 # directories built for the build system.
121 BUILD_CONFIGARGS = @build_configargs@ --with-build-subdir="$(BUILD_SUBDIR)" 121 BUILD_CONFIGARGS = @build_configargs@ --with-build-subdir="$(BUILD_SUBDIR)"
122 122
123 # Linker flags to use on the host, for stage1 or when not
124 # bootstrapping.
125 STAGE1_LDFLAGS = @stage1_ldflags@
126
127 # Libraries to use on the host, for stage1 or when not bootstrapping.
128 STAGE1_LIBS = @stage1_libs@
129
130 # Linker flags to use for stage2 and later.
131 POSTSTAGE1_LDFLAGS = @poststage1_ldflags@
132
133 # Libraries to use for stage2 and later.
134 POSTSTAGE1_LIBS = @poststage1_libs@
135
123 # This is the list of variables to export in the environment when 136 # This is the list of variables to export in the environment when
124 # configuring any subdirectory. It must also be exported whenever 137 # configuring any subdirectory. It must also be exported whenever
125 # recursing into a build directory in case that directory's Makefile 138 # recursing into a build directory in case that directory's Makefile
126 # re-runs configure. 139 # re-runs configure.
127 BASE_EXPORTS = \ 140 BASE_EXPORTS = \
128 FLEX="$(FLEX)"; export FLEX; \ 141 FLEX="$(FLEX)"; export FLEX; \
129 LEX="$(LEX)"; export LEX; \ 142 LEX="$(LEX)"; export LEX; \
130 BISON="$(BISON)"; export BISON; \ 143 BISON="$(BISON)"; export BISON; \
131 YACC="$(YACC)"; export YACC; \ 144 YACC="$(YACC)"; export YACC; \
132 M4="$(M4)"; export M4; \ 145 M4="$(M4)"; export M4; \
146 SED="$(SED)"; export SED; \
147 AWK="$(AWK)"; export AWK; \
133 MAKEINFO="$(MAKEINFO)"; export MAKEINFO; 148 MAKEINFO="$(MAKEINFO)"; export MAKEINFO;
134 149
135 # This is the list of variables to export in the environment when 150 # This is the list of variables to export in the environment when
136 # configuring subdirectories for the build system. 151 # configuring subdirectories for the build system.
137 BUILD_EXPORTS = \ 152 BUILD_EXPORTS = \
176 ADA_CFLAGS="$(ADA_CFLAGS)"; export ADA_CFLAGS; \ 191 ADA_CFLAGS="$(ADA_CFLAGS)"; export ADA_CFLAGS; \
177 CFLAGS="$(CFLAGS)"; export CFLAGS; \ 192 CFLAGS="$(CFLAGS)"; export CFLAGS; \
178 CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \ 193 CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \
179 CXX="$(CXX)"; export CXX; \ 194 CXX="$(CXX)"; export CXX; \
180 CXXFLAGS="$(CXXFLAGS)"; export CXXFLAGS; \ 195 CXXFLAGS="$(CXXFLAGS)"; export CXXFLAGS; \
196 GCJ="$(GCJ)"; export GCJ; \
197 GFORTRAN="$(GFORTRAN)"; export GFORTRAN; \
181 AR="$(AR)"; export AR; \ 198 AR="$(AR)"; export AR; \
182 AS="$(AS)"; export AS; \ 199 AS="$(AS)"; export AS; \
183 CC_FOR_BUILD="$(CC_FOR_BUILD)"; export CC_FOR_BUILD; \ 200 CC_FOR_BUILD="$(CC_FOR_BUILD)"; export CC_FOR_BUILD; \
184 DLLTOOL="$(DLLTOOL)"; export DLLTOOL; \ 201 DLLTOOL="$(DLLTOOL)"; export DLLTOOL; \
185 LD="$(LD)"; export LD; \ 202 LD="$(LD)"; export LD; \
186 LDFLAGS="$(LDFLAGS)"; export LDFLAGS; \ 203 LDFLAGS="$(STAGE1_LDFLAGS) $(LDFLAGS)"; export LDFLAGS; \
187 NM="$(NM)"; export NM; \ 204 NM="$(NM)"; export NM; \
188 RANLIB="$(RANLIB)"; export RANLIB; \ 205 RANLIB="$(RANLIB)"; export RANLIB; \
189 WINDRES="$(WINDRES)"; export WINDRES; \ 206 WINDRES="$(WINDRES)"; export WINDRES; \
190 WINDMC="$(WINDMC)"; export WINDMC; \ 207 WINDMC="$(WINDMC)"; export WINDMC; \
191 OBJCOPY="$(OBJCOPY)"; export OBJCOPY; \ 208 OBJCOPY="$(OBJCOPY)"; export OBJCOPY; \
196 LD_FOR_TARGET="$(LD_FOR_TARGET)"; export LD_FOR_TARGET; \ 213 LD_FOR_TARGET="$(LD_FOR_TARGET)"; export LD_FOR_TARGET; \
197 NM_FOR_TARGET="$(NM_FOR_TARGET)"; export NM_FOR_TARGET; \ 214 NM_FOR_TARGET="$(NM_FOR_TARGET)"; export NM_FOR_TARGET; \
198 OBJDUMP_FOR_TARGET="$(OBJDUMP_FOR_TARGET)"; export OBJDUMP_FOR_TARGET; \ 215 OBJDUMP_FOR_TARGET="$(OBJDUMP_FOR_TARGET)"; export OBJDUMP_FOR_TARGET; \
199 RANLIB_FOR_TARGET="$(RANLIB_FOR_TARGET)"; export RANLIB_FOR_TARGET; \ 216 RANLIB_FOR_TARGET="$(RANLIB_FOR_TARGET)"; export RANLIB_FOR_TARGET; \
200 TOPLEVEL_CONFIGURE_ARGUMENTS="$(TOPLEVEL_CONFIGURE_ARGUMENTS)"; export TOPLEVEL_CONFIGURE_ARGUMENTS; \ 217 TOPLEVEL_CONFIGURE_ARGUMENTS="$(TOPLEVEL_CONFIGURE_ARGUMENTS)"; export TOPLEVEL_CONFIGURE_ARGUMENTS; \
218 HOST_LIBS="$(STAGE1_LIBS)"; export HOST_LIBS; \
201 GMPLIBS="$(HOST_GMPLIBS)"; export GMPLIBS; \ 219 GMPLIBS="$(HOST_GMPLIBS)"; export GMPLIBS; \
202 GMPINC="$(HOST_GMPINC)"; export GMPINC; \ 220 GMPINC="$(HOST_GMPINC)"; export GMPINC; \
203 PPLLIBS="$(HOST_PPLLIBS)"; export PPLLIBS; \ 221 PPLLIBS="$(HOST_PPLLIBS)"; export PPLLIBS; \
204 PPLINC="$(HOST_PPLINC)"; export PPLINC; \ 222 PPLINC="$(HOST_PPLINC)"; export PPLINC; \
205 CLOOGLIBS="$(HOST_CLOOGLIBS)"; export CLOOGLIBS; \ 223 CLOOGLIBS="$(HOST_CLOOGLIBS)"; export CLOOGLIBS; \
206 CLOOGINC="$(HOST_CLOOGINC)"; export CLOOGINC; \ 224 CLOOGINC="$(HOST_CLOOGINC)"; export CLOOGINC; \
225 LIBELFLIBS="$(HOST_LIBELFLIBS)" ; export LIBELFLIBS; \
226 LIBELFINC="$(HOST_LIBELFINC)" ; export LIBELFINC; \
207 @if gcc-bootstrap 227 @if gcc-bootstrap
208 $(RPATH_ENVVAR)=`echo "$(TARGET_LIB_PATH)$$$(RPATH_ENVVAR)" | sed 's,::*,:,g;s,^:*,,;s,:*$$,,'`; export $(RPATH_ENVVAR); \ 228 $(RPATH_ENVVAR)=`echo "$(TARGET_LIB_PATH)$$$(RPATH_ENVVAR)" | sed 's,::*,:,g;s,^:*,,;s,:*$$,,'`; export $(RPATH_ENVVAR); \
209 @endif gcc-bootstrap 229 @endif gcc-bootstrap
210 $(RPATH_ENVVAR)=`echo "$(HOST_LIB_PATH)$$$(RPATH_ENVVAR)" | sed 's,::*,:,g;s,^:*,,;s,:*$$,,'`; export $(RPATH_ENVVAR); 230 $(RPATH_ENVVAR)=`echo "$(HOST_LIB_PATH)$$$(RPATH_ENVVAR)" | sed 's,::*,:,g;s,^:*,,;s,:*$$,,'`; export $(RPATH_ENVVAR);
211 231
232 POSTSTAGE1_CXX_EXPORT = \
233 CXX='$(CXX)'; export CXX; \
234 CXX_FOR_BUILD='$(CXX_FOR_BUILD)'; export CXX_FOR_BUILD;
235 @if target-libstdc++-v3-bootstrap
236 # Override the above if we're bootstrapping C++.
237 POSTSTAGE1_CXX_EXPORT = \
238 CXX="$(STAGE_CC_WRAPPER) $$r/$(HOST_SUBDIR)/prev-gcc/g++$(exeext) \
239 -B$$r/$(HOST_SUBDIR)/prev-gcc/ -B$(build_tooldir)/bin/ -nostdinc++ \
240 -I$$r/prev-$(TARGET_SUBDIR)/libstdc++-v3/include/$(TARGET_SUBDIR) \
241 -I$$r/prev-$(TARGET_SUBDIR)/libstdc++-v3/include \
242 -I$$s/libstdc++-v3/libsupc++ \
243 -L$$r/prev-$(TARGET_SUBDIR)/libstdc++-v3/src/.libs"; export CXX; \
244 CXX_FOR_BUILD="$$CXX"; export CXX_FOR_BUILD;
245 @endif target-libstdc++-v3-bootstrap
246
212 # Similar, for later GCC stages. 247 # Similar, for later GCC stages.
213 POSTSTAGE1_HOST_EXPORTS = \ 248 POSTSTAGE1_HOST_EXPORTS = \
214 $(HOST_EXPORTS) \ 249 $(HOST_EXPORTS) \
215 CC="$(STAGE_CC_WRAPPER) $$r/$(HOST_SUBDIR)/prev-gcc/xgcc$(exeext) \ 250 CC="$(STAGE_CC_WRAPPER) $$r/$(HOST_SUBDIR)/prev-gcc/xgcc$(exeext) \
216 -B$$r/$(HOST_SUBDIR)/prev-gcc/ -B$(build_tooldir)/bin/"; export CC; \ 251 -B$$r/$(HOST_SUBDIR)/prev-gcc/ -B$(build_tooldir)/bin/ \
217 CC_FOR_BUILD="$(STAGE_CC_WRAPPER) \ 252 $(XGCC_FLAGS_FOR_TARGET) $$TFLAGS"; export CC; \
218 $$r/$(HOST_SUBDIR)/prev-gcc/xgcc$(exeext) \ 253 CC_FOR_BUILD="$$CC"; export CC_FOR_BUILD; \
219 -B$$r/$(HOST_SUBDIR)/prev-gcc/ \ 254 $(POSTSTAGE1_CXX_EXPORT) \
220 -B$(build_tooldir)/bin/"; export CC_FOR_BUILD; \ 255 GNATBIND="$$r/$(HOST_SUBDIR)/prev-gcc/gnatbind"; export GNATBIND; \
221 LDFLAGS="$(BOOT_LDFLAGS)"; export LDFLAGS; 256 LDFLAGS="$(POSTSTAGE1_LDFLAGS) $(BOOT_LDFLAGS)"; export LDFLAGS; \
257 HOST_LIBS="$(POSTSTAGE1_LIBS)"; export HOST_LIBS;
222 258
223 # Target libraries are put under this directory: 259 # Target libraries are put under this directory:
224 TARGET_SUBDIR = @target_subdir@ 260 TARGET_SUBDIR = @target_subdir@
225 # This is set by the configure script to the arguments to use when configuring 261 # This is set by the configure script to the arguments to use when configuring
226 # directories built for the target. 262 # directories built for the target.
229 # configuring subdirectories for the host system. 265 # configuring subdirectories for the host system.
230 BASE_TARGET_EXPORTS = \ 266 BASE_TARGET_EXPORTS = \
231 $(BASE_EXPORTS) \ 267 $(BASE_EXPORTS) \
232 AR="$(AR_FOR_TARGET)"; export AR; \ 268 AR="$(AR_FOR_TARGET)"; export AR; \
233 AS="$(COMPILER_AS_FOR_TARGET)"; export AS; \ 269 AS="$(COMPILER_AS_FOR_TARGET)"; export AS; \
234 CC="$(CC_FOR_TARGET)"; export CC; \ 270 CC="$(CC_FOR_TARGET) $(XGCC_FLAGS_FOR_TARGET) $$TFLAGS"; export CC; \
235 CFLAGS="$(CFLAGS_FOR_TARGET) $(SYSROOT_CFLAGS_FOR_TARGET) $(DEBUG_PREFIX_CFLAGS_FOR_TARGET)"; export CFLAGS; \ 271 CFLAGS="$(CFLAGS_FOR_TARGET)"; export CFLAGS; \
236 CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \ 272 CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \
237 CPPFLAGS="$(CPPFLAGS_FOR_TARGET)"; export CPPFLAGS; \ 273 CPPFLAGS="$(CPPFLAGS_FOR_TARGET)"; export CPPFLAGS; \
238 CXXFLAGS="$(CXXFLAGS_FOR_TARGET) $(SYSROOT_CFLAGS_FOR_TARGET) $(DEBUG_PREFIX_CFLAGS_FOR_TARGET)"; export CXXFLAGS; \ 274 CXXFLAGS="$(CXXFLAGS_FOR_TARGET)"; export CXXFLAGS; \
239 GCJ="$(GCJ_FOR_TARGET)"; export GCJ; \ 275 GCJ="$(GCJ_FOR_TARGET) $(XGCC_FLAGS_FOR_TARGET) $$TFLAGS"; export GCJ; \
240 GFORTRAN="$(GFORTRAN_FOR_TARGET)"; export GFORTRAN; \ 276 GFORTRAN="$(GFORTRAN_FOR_TARGET) $(XGCC_FLAGS_FOR_TARGET) $$TFLAGS"; export GFORTRAN; \
241 DLLTOOL="$(DLLTOOL_FOR_TARGET)"; export DLLTOOL; \ 277 DLLTOOL="$(DLLTOOL_FOR_TARGET)"; export DLLTOOL; \
242 LD="$(COMPILER_LD_FOR_TARGET)"; export LD; \ 278 LD="$(COMPILER_LD_FOR_TARGET)"; export LD; \
243 LDFLAGS="$(LDFLAGS_FOR_TARGET)"; export LDFLAGS; \ 279 LDFLAGS="$(LDFLAGS_FOR_TARGET)"; export LDFLAGS; \
244 LIPO="$(LIPO_FOR_TARGET)"; export LIPO; \ 280 LIPO="$(LIPO_FOR_TARGET)"; export LIPO; \
245 NM="$(COMPILER_NM_FOR_TARGET)"; export NM; \ 281 NM="$(COMPILER_NM_FOR_TARGET)"; export NM; \
251 $(RPATH_ENVVAR)=`echo "$(HOST_LIB_PATH)$(TARGET_LIB_PATH)$$$(RPATH_ENVVAR)" | sed 's,::*,:,g;s,^:*,,;s,:*$$,,'`; export $(RPATH_ENVVAR); 287 $(RPATH_ENVVAR)=`echo "$(HOST_LIB_PATH)$(TARGET_LIB_PATH)$$$(RPATH_ENVVAR)" | sed 's,::*,:,g;s,^:*,,;s,:*$$,,'`; export $(RPATH_ENVVAR);
252 288
253 RAW_CXX_TARGET_EXPORTS = \ 289 RAW_CXX_TARGET_EXPORTS = \
254 $(BASE_TARGET_EXPORTS) \ 290 $(BASE_TARGET_EXPORTS) \
255 CXX_FOR_TARGET="$(RAW_CXX_FOR_TARGET)"; export CXX_FOR_TARGET; \ 291 CXX_FOR_TARGET="$(RAW_CXX_FOR_TARGET)"; export CXX_FOR_TARGET; \
256 CXX="$(RAW_CXX_FOR_TARGET)"; export CXX; 292 CXX="$(RAW_CXX_FOR_TARGET) $(XGCC_FLAGS_FOR_TARGET) $$TFLAGS"; export CXX;
257 293
258 NORMAL_TARGET_EXPORTS = \ 294 NORMAL_TARGET_EXPORTS = \
259 $(BASE_TARGET_EXPORTS) \ 295 $(BASE_TARGET_EXPORTS) \
260 CXX="$(CXX_FOR_TARGET)"; export CXX; 296 CXX="$(CXX_FOR_TARGET) $(XGCC_FLAGS_FOR_TARGET) $$TFLAGS"; export CXX;
261 297
262 # Where to find GMP 298 # Where to find GMP
263 HOST_GMPLIBS = @gmplibs@ 299 HOST_GMPLIBS = @gmplibs@
264 HOST_GMPINC = @gmpinc@ 300 HOST_GMPINC = @gmpinc@
265 301
268 HOST_PPLINC = @pplinc@ 304 HOST_PPLINC = @pplinc@
269 305
270 # Where to find CLOOG 306 # Where to find CLOOG
271 HOST_CLOOGLIBS = @clooglibs@ 307 HOST_CLOOGLIBS = @clooglibs@
272 HOST_CLOOGINC = @clooginc@ 308 HOST_CLOOGINC = @clooginc@
309
310 # Where to find libelf
311 HOST_LIBELFLIBS = @libelflibs@
312 HOST_LIBELFINC = @libelfinc@
273 313
274 # ---------------------------------------------- 314 # ----------------------------------------------
275 # Programs producing files for the BUILD machine 315 # Programs producing files for the BUILD machine
276 # ---------------------------------------------- 316 # ----------------------------------------------
277 317
312 # here so that they can be overridden by Makefile fragments. 352 # here so that they can be overridden by Makefile fragments.
313 BOOT_CFLAGS= -g -O2 353 BOOT_CFLAGS= -g -O2
314 BOOT_LDFLAGS= 354 BOOT_LDFLAGS=
315 BOOT_ADAFLAGS=-gnatpg -gnata 355 BOOT_ADAFLAGS=-gnatpg -gnata
316 356
357 AWK = @AWK@
358 SED = @SED@
317 BISON = @BISON@ 359 BISON = @BISON@
318 YACC = @YACC@ 360 YACC = @YACC@
319 FLEX = @FLEX@ 361 FLEX = @FLEX@
320 LEX = @LEX@ 362 LEX = @LEX@
321 M4 = @M4@ 363 M4 = @M4@
355 LDFLAGS = @LDFLAGS@ 397 LDFLAGS = @LDFLAGS@
356 LIBCFLAGS = $(CFLAGS) 398 LIBCFLAGS = $(CFLAGS)
357 CXXFLAGS = @CXXFLAGS@ 399 CXXFLAGS = @CXXFLAGS@
358 LIBCXXFLAGS = $(CXXFLAGS) -fno-implicit-templates 400 LIBCXXFLAGS = $(CXXFLAGS) -fno-implicit-templates
359 401
402 TFLAGS =
403
404 # Defaults for all stages; some are overridden below.
405
406 STAGE_CFLAGS = $(BOOT_CFLAGS)
407 STAGE_TFLAGS = $(TFLAGS)
408 STAGE_CONFIGURE_FLAGS=@stage2_werror_flag@
409
410 [+ FOR bootstrap-stage +]
411 # Defaults for stage [+id+]; some are overridden below.
412 STAGE[+id+]_CFLAGS = $(STAGE_CFLAGS)
413 STAGE[+id+]_CXXFLAGS = $(CXXFLAGS)
414 @if target-libstdc++-v3-bootstrap
415 # Override the above if we're bootstrapping C++.
416 STAGE[+id+]_CXXFLAGS = $(STAGE[+id+]_CFLAGS)
417 @endif target-libstdc++-v3-bootstrap
418 STAGE[+id+]_TFLAGS = $(STAGE_TFLAGS)
419 STAGE[+id+]_CONFIGURE_FLAGS = $(STAGE_CONFIGURE_FLAGS)
420 [+ ENDFOR bootstrap-stage +]
421
360 # Only build the C compiler for stage1, because that is the only one that 422 # Only build the C compiler for stage1, because that is the only one that
361 # we can guarantee will build with the native compiler, and also it is the 423 # we can guarantee will build with the native compiler, and also it is the
362 # only thing useful for building stage2. STAGE1_CFLAGS (via CFLAGS), 424 # only thing useful for building stage2. STAGE1_CFLAGS (via CFLAGS),
363 # MAKEINFO and MAKEINFOFLAGS are explicitly passed here to make them 425 # MAKEINFO and MAKEINFOFLAGS are explicitly passed here to make them
364 # overrideable (for a bootstrap build stage1 also builds gcc.info). 426 # overrideable (for a bootstrap build stage1 also builds gcc.info).
365 427
366 STAGE1_CHECKING=@stage1_checking@ 428 STAGE1_CFLAGS = @stage1_cflags@
367 STAGE1_LANGUAGES=@stage1_languages@ 429 STAGE1_CHECKING = @stage1_checking@
368 430 STAGE1_LANGUAGES = @stage1_languages@
369 STAGE1_CFLAGS=@stage1_cflags@ 431 # * We force-disable intermodule optimizations, even if
370 STAGE2_CFLAGS=$(BOOT_CFLAGS) 432 # --enable-intermodule was passed, since the installed compiler
371 STAGE3_CFLAGS=$(BOOT_CFLAGS) 433 # probably can't handle them. Luckily, autoconf always respects
372 STAGE4_CFLAGS=$(BOOT_CFLAGS) 434 # the last argument when conflicting --enable arguments are passed.
373 435 # * Likewise, we force-disable coverage flags, since the installed
374 STAGE1_LIBCFLAGS=$(CFLAGS_FOR_TARGET) 436 # compiler probably has never heard of them.
375 STAGE2_LIBCFLAGS=$(CFLAGS_FOR_TARGET) 437 STAGE1_CONFIGURE_FLAGS = --disable-intermodule $(STAGE1_CHECKING) \
376 STAGE3_LIBCFLAGS=$(CFLAGS_FOR_TARGET) 438 --disable-coverage --enable-languages="$(STAGE1_LANGUAGES)"
377 STAGE4_LIBCFLAGS=$(CFLAGS_FOR_TARGET) 439
440 STAGEprofile_CFLAGS = $(STAGE2_CFLAGS) -fprofile-generate
441 STAGEprofile_TFLAGS = $(STAGE2_TFLAGS)
442
443 STAGEfeedback_CFLAGS = $(STAGE3_CFLAGS) -fprofile-use
444 STAGEfeedback_TFLAGS = $(STAGE3_TFLAGS)
378 445
379 do-compare = @do_compare@ 446 do-compare = @do_compare@
380 do-compare3 = $(do-compare) 447 do-compare3 = $(do-compare)
381 do-compare-debug = $(SHELL) $(srcdir)/contrib/compare-debug $$f1 $$f2
382 448
383 # ----------------------------------------------- 449 # -----------------------------------------------
384 # Programs producing files for the TARGET machine 450 # Programs producing files for the TARGET machine
385 # ----------------------------------------------- 451 # -----------------------------------------------
386 452
387 FLAGS_FOR_TARGET = @FLAGS_FOR_TARGET@
388
389 AR_FOR_TARGET=@AR_FOR_TARGET@ 453 AR_FOR_TARGET=@AR_FOR_TARGET@
390 AS_FOR_TARGET=@AS_FOR_TARGET@ 454 AS_FOR_TARGET=@AS_FOR_TARGET@
391 CC_FOR_TARGET=$(STAGE_CC_WRAPPER) @CC_FOR_TARGET@ $(FLAGS_FOR_TARGET) 455 CC_FOR_TARGET=$(STAGE_CC_WRAPPER) @CC_FOR_TARGET@
392 456
393 # If GCC_FOR_TARGET is not overriden on the command line, then this 457 # If GCC_FOR_TARGET is not overriden on the command line, then this
394 # variable is passed down to the gcc Makefile, where it is used to 458 # variable is passed down to the gcc Makefile, where it is used to
395 # build libgcc2.a. We define it here so that it can itself be 459 # build libgcc2.a. We define it here so that it can itself be
396 # overridden on the command line. 460 # overridden on the command line.
397 GCC_FOR_TARGET=$(STAGE_CC_WRAPPER) @GCC_FOR_TARGET@ $(FLAGS_FOR_TARGET) 461 GCC_FOR_TARGET=$(STAGE_CC_WRAPPER) @GCC_FOR_TARGET@
398 CXX_FOR_TARGET=$(STAGE_CC_WRAPPER) @CXX_FOR_TARGET@ $(FLAGS_FOR_TARGET) 462 CXX_FOR_TARGET=$(STAGE_CC_WRAPPER) @CXX_FOR_TARGET@
399 RAW_CXX_FOR_TARGET=$(STAGE_CC_WRAPPER) @RAW_CXX_FOR_TARGET@ $(FLAGS_FOR_TARGET) 463 RAW_CXX_FOR_TARGET=$(STAGE_CC_WRAPPER) @RAW_CXX_FOR_TARGET@
400 GCJ_FOR_TARGET=$(STAGE_CC_WRAPPER) @GCJ_FOR_TARGET@ $(FLAGS_FOR_TARGET) 464 GCJ_FOR_TARGET=$(STAGE_CC_WRAPPER) @GCJ_FOR_TARGET@
401 GFORTRAN_FOR_TARGET=$(STAGE_CC_WRAPPER) @GFORTRAN_FOR_TARGET@ $(FLAGS_FOR_TARGET) 465 GFORTRAN_FOR_TARGET=$(STAGE_CC_WRAPPER) @GFORTRAN_FOR_TARGET@
402 DLLTOOL_FOR_TARGET=@DLLTOOL_FOR_TARGET@ 466 DLLTOOL_FOR_TARGET=@DLLTOOL_FOR_TARGET@
403 LD_FOR_TARGET=@LD_FOR_TARGET@ 467 LD_FOR_TARGET=@LD_FOR_TARGET@
404 468
405 LIPO_FOR_TARGET=@LIPO_FOR_TARGET@ 469 LIPO_FOR_TARGET=@LIPO_FOR_TARGET@
406 NM_FOR_TARGET=@NM_FOR_TARGET@ 470 NM_FOR_TARGET=@NM_FOR_TARGET@
414 COMPILER_LD_FOR_TARGET=@COMPILER_LD_FOR_TARGET@ 478 COMPILER_LD_FOR_TARGET=@COMPILER_LD_FOR_TARGET@
415 COMPILER_NM_FOR_TARGET=@COMPILER_NM_FOR_TARGET@ 479 COMPILER_NM_FOR_TARGET=@COMPILER_NM_FOR_TARGET@
416 480
417 CFLAGS_FOR_TARGET = @CFLAGS_FOR_TARGET@ 481 CFLAGS_FOR_TARGET = @CFLAGS_FOR_TARGET@
418 CXXFLAGS_FOR_TARGET = @CXXFLAGS_FOR_TARGET@ 482 CXXFLAGS_FOR_TARGET = @CXXFLAGS_FOR_TARGET@
419 SYSROOT_CFLAGS_FOR_TARGET = @SYSROOT_CFLAGS_FOR_TARGET@
420 DEBUG_PREFIX_CFLAGS_FOR_TARGET = @DEBUG_PREFIX_CFLAGS_FOR_TARGET@
421 483
422 LIBCFLAGS_FOR_TARGET = $(CFLAGS_FOR_TARGET) 484 LIBCFLAGS_FOR_TARGET = $(CFLAGS_FOR_TARGET)
423 LIBCXXFLAGS_FOR_TARGET = $(CXXFLAGS_FOR_TARGET) -fno-implicit-templates 485 LIBCXXFLAGS_FOR_TARGET = $(CXXFLAGS_FOR_TARGET) -fno-implicit-templates
424 LDFLAGS_FOR_TARGET = 486 LDFLAGS_FOR_TARGET =
487
488 FLAGS_FOR_TARGET = @FLAGS_FOR_TARGET@
489 SYSROOT_CFLAGS_FOR_TARGET = @SYSROOT_CFLAGS_FOR_TARGET@
490 DEBUG_PREFIX_CFLAGS_FOR_TARGET = @DEBUG_PREFIX_CFLAGS_FOR_TARGET@
491
492 XGCC_FLAGS_FOR_TARGET = $(FLAGS_FOR_TARGET) $(SYSROOT_CFLAGS_FOR_TARGET) $(DEBUG_PREFIX_CFLAGS_FOR_TARGET)
425 493
426 # ------------------------------------ 494 # ------------------------------------
427 # Miscellaneous targets and flag lists 495 # Miscellaneous targets and flag lists
428 # ------------------------------------ 496 # ------------------------------------
429 497
470 [+ ENDIF lib_path +][+ ENDFOR host_modules +] 538 [+ ENDIF lib_path +][+ ENDFOR host_modules +]
471 539
472 # Flags to pass down to all sub-makes. 540 # Flags to pass down to all sub-makes.
473 BASE_FLAGS_TO_PASS =[+ FOR flags_to_pass +][+ IF optional +] \ 541 BASE_FLAGS_TO_PASS =[+ FOR flags_to_pass +][+ IF optional +] \
474 "`echo '[+flag+]=$([+flag+])' | sed -e s'/[^=][^=]*=$$/XFOO=/'`"[+ ELSE optional +] \ 542 "`echo '[+flag+]=$([+flag+])' | sed -e s'/[^=][^=]*=$$/XFOO=/'`"[+ ELSE optional +] \
475 "[+flag+]=$([+flag+])"[+ ENDIF optional+][+ ENDFOR flags_to_pass +] \ 543 "[+flag+]=$([+flag+])"[+ ENDIF optional+][+ ENDFOR flags_to_pass +][+ FOR bootstrap-stage +] \
544 "STAGE[+id+]_CFLAGS=$(STAGE[+id+]_CFLAGS)" \
545 "STAGE[+id+]_CXXFLAGS=$(STAGE[+id+]_CXXFLAGS)" \
546 "STAGE[+id+]_TFLAGS=$(STAGE[+id+]_TFLAGS)"[+ ENDFOR bootstrap-stage +] \
547 "TFLAGS=$(TFLAGS)" \
476 "CONFIG_SHELL=$(SHELL)" \ 548 "CONFIG_SHELL=$(SHELL)" \
477 "MAKEINFO=$(MAKEINFO) $(MAKEINFOFLAGS)" 549 "MAKEINFO=$(MAKEINFO) $(MAKEINFOFLAGS)"
478 550
479 # We leave this in just in case, but it is not needed anymore. 551 # We leave this in just in case, but it is not needed anymore.
480 RECURSE_FLAGS_TO_PASS = $(BASE_FLAGS_TO_PASS) 552 RECURSE_FLAGS_TO_PASS = $(BASE_FLAGS_TO_PASS)
485 'AR=$(AR)' \ 557 'AR=$(AR)' \
486 'AS=$(AS)' \ 558 'AS=$(AS)' \
487 'CC=$(CC)' \ 559 'CC=$(CC)' \
488 'CXX=$(CXX)' \ 560 'CXX=$(CXX)' \
489 'DLLTOOL=$(DLLTOOL)' \ 561 'DLLTOOL=$(DLLTOOL)' \
562 'GCJ=$(GCJ)' \
563 'GFORTRAN=$(GFORTRAN)' \
490 'LD=$(LD)' \ 564 'LD=$(LD)' \
491 'LIPO=$(LIPO)' \ 565 'LIPO=$(LIPO)' \
492 'NM=$(NM)' \ 566 'NM=$(NM)' \
493 'OBJDUMP=$(OBJDUMP)' \ 567 'OBJDUMP=$(OBJDUMP)' \
494 'RANLIB=$(RANLIB)' \ 568 'RANLIB=$(RANLIB)' \
512 586
513 # Flags to pass to stage2 and later makes. 587 # Flags to pass to stage2 and later makes.
514 588
515 POSTSTAGE1_FLAGS_TO_PASS = \ 589 POSTSTAGE1_FLAGS_TO_PASS = \
516 CC="$${CC}" CC_FOR_BUILD="$${CC_FOR_BUILD}" \ 590 CC="$${CC}" CC_FOR_BUILD="$${CC_FOR_BUILD}" \
517 GNATBIND="$$r/$(HOST_SUBDIR)/prev-gcc/gnatbind" \ 591 CXX="$${CXX}" CXX_FOR_BUILD="$${CXX_FOR_BUILD}" \
518 LDFLAGS="$(BOOT_LDFLAGS)" \ 592 GNATBIND="$${GNATBIND}" \
593 LDFLAGS="$${LDFLAGS}" \
594 HOST_LIBS="$${HOST_LIBS}" \
519 "`echo 'ADAFLAGS=$(BOOT_ADAFLAGS)' | sed -e s'/[^=][^=]*=$$/XFOO=/'`" 595 "`echo 'ADAFLAGS=$(BOOT_ADAFLAGS)' | sed -e s'/[^=][^=]*=$$/XFOO=/'`"
520 596
521 # Flags to pass down to makes which are built with the target environment. 597 # Flags to pass down to makes which are built with the target environment.
522 # The double $ decreases the length of the command line; those variables 598 # The double $ decreases the length of the command line; those variables
523 # are set in BASE_FLAGS_TO_PASS, and the sub-make will expand them. The 599 # are set in BASE_FLAGS_TO_PASS, and the sub-make will expand them. The
524 # *_CFLAGS_FOR_TARGET variables are not passed down and most often empty, 600 # *_CFLAGS_FOR_TARGET variables are not passed down and most often empty,
525 # so we expand them here. 601 # so we expand them here.
526 EXTRA_TARGET_FLAGS = \ 602 EXTRA_TARGET_FLAGS = \
527 'AR=$$(AR_FOR_TARGET)' \ 603 'AR=$$(AR_FOR_TARGET)' \
528 'AS=$(COMPILER_AS_FOR_TARGET)' \ 604 'AS=$(COMPILER_AS_FOR_TARGET)' \
529 'CC=$$(CC_FOR_TARGET)' \ 605 'CC=$$(CC_FOR_TARGET) $$(XGCC_FLAGS_FOR_TARGET) $$(TFLAGS)' \
530 'CFLAGS=$$(CFLAGS_FOR_TARGET) $(SYSROOT_CFLAGS_FOR_TARGET) $(DEBUG_PREFIX_CFLAGS_FOR_TARGET)' \ 606 'CFLAGS=$$(CFLAGS_FOR_TARGET)' \
531 'CXX=$$(CXX_FOR_TARGET)' \ 607 'CXX=$$(CXX_FOR_TARGET) $$(XGCC_FLAGS_FOR_TARGET) $$(TFLAGS)' \
532 'CXXFLAGS=$$(CXXFLAGS_FOR_TARGET) $(SYSROOT_CFLAGS_FOR_TARGET) $(DEBUG_PREFIX_CFLAGS_FOR_TARGET)' \ 608 'CXXFLAGS=$$(CXXFLAGS_FOR_TARGET)' \
533 'DLLTOOL=$$(DLLTOOL_FOR_TARGET)' \ 609 'DLLTOOL=$$(DLLTOOL_FOR_TARGET)' \
610 'GCJ=$$(GCJ_FOR_TARGET) $$(XGCC_FLAGS_FOR_TARGET) $$(TFLAGS)' \
611 'GFORTRAN=$$(GFORTRAN_FOR_TARGET) $$(XGCC_FLAGS_FOR_TARGET) $$(TFLAGS)' \
534 'LD=$(COMPILER_LD_FOR_TARGET)' \ 612 'LD=$(COMPILER_LD_FOR_TARGET)' \
535 'LDFLAGS=$$(LDFLAGS_FOR_TARGET)' \ 613 'LDFLAGS=$$(LDFLAGS_FOR_TARGET)' \
536 'LIBCFLAGS=$$(LIBCFLAGS_FOR_TARGET) $(SYSROOT_CFLAGS_FOR_TARGET) $(DEBUG_PREFIX_CFLAGS_FOR_TARGET)' \ 614 'LIBCFLAGS=$$(LIBCFLAGS_FOR_TARGET)' \
537 'LIBCXXFLAGS=$$(LIBCXXFLAGS_FOR_TARGET) $(SYSROOT_CFLAGS_FOR_TARGET) $(DEBUG_PREFIX_CFLAGS_FOR_TARGET)' \ 615 'LIBCXXFLAGS=$$(LIBCXXFLAGS_FOR_TARGET)' \
538 'NM=$(COMPILER_NM_FOR_TARGET)' \ 616 'NM=$(COMPILER_NM_FOR_TARGET)' \
539 'OBJDUMP=$$(OBJDUMP_FOR_TARGET)' \ 617 'OBJDUMP=$$(OBJDUMP_FOR_TARGET)' \
540 'RANLIB=$$(RANLIB_FOR_TARGET)' \ 618 'RANLIB=$$(RANLIB_FOR_TARGET)' \
541 'WINDRES=$$(WINDRES_FOR_TARGET)' \ 619 'WINDRES=$$(WINDRES_FOR_TARGET)' \
542 'WINDMC=$$(WINDMC_FOR_TARGET)' 620 'WINDMC=$$(WINDMC_FOR_TARGET)' \
621 'XGCC_FLAGS_FOR_TARGET=$(XGCC_FLAGS_FOR_TARGET)' \
622 "TFLAGS=$$TFLAGS"
543 623
544 TARGET_FLAGS_TO_PASS = $(BASE_FLAGS_TO_PASS) $(EXTRA_TARGET_FLAGS) 624 TARGET_FLAGS_TO_PASS = $(BASE_FLAGS_TO_PASS) $(EXTRA_TARGET_FLAGS)
545 625
546 # Flags to pass down to gcc. gcc builds a library, libgcc.a, so it 626 # Flags to pass down to gcc. gcc builds a library, libgcc.a, so it
547 # unfortunately needs the native compiler and the target ar and 627 # unfortunately needs the native compiler and the target ar and
557 "`echo 'LIBGCC2_DEBUG_CFLAGS=$(LIBGCC2_DEBUG_CFLAGS)' | sed -e s'/[^=][^=]*=$$/XFOO=/'`" \ 637 "`echo 'LIBGCC2_DEBUG_CFLAGS=$(LIBGCC2_DEBUG_CFLAGS)' | sed -e s'/[^=][^=]*=$$/XFOO=/'`" \
558 "`echo 'LIBGCC2_INCLUDES=$(LIBGCC2_INCLUDES)' | sed -e s'/[^=][^=]*=$$/XFOO=/'`" 638 "`echo 'LIBGCC2_INCLUDES=$(LIBGCC2_INCLUDES)' | sed -e s'/[^=][^=]*=$$/XFOO=/'`"
559 639
560 GCC_FLAGS_TO_PASS = $(BASE_FLAGS_TO_PASS) $(EXTRA_HOST_FLAGS) $(EXTRA_GCC_FLAGS) 640 GCC_FLAGS_TO_PASS = $(BASE_FLAGS_TO_PASS) $(EXTRA_HOST_FLAGS) $(EXTRA_GCC_FLAGS)
561 641
642 @if gcc
643 BUILD_CONFIG = @BUILD_CONFIG@
644 ifneq ($(BUILD_CONFIG),)
645 include $(foreach CONFIG, $(BUILD_CONFIG), $(srcdir)/config/$(CONFIG).mk)
646 endif
647 @endif gcc
648
562 .PHONY: configure-host 649 .PHONY: configure-host
563 configure-host: [+ 650 configure-host: [+
564 FOR host_modules +] \ 651 FOR host_modules +] \
565 maybe-configure-[+module+][+ 652 maybe-configure-[+module+][+
566 ENDFOR host_modules +] 653 ENDFOR host_modules +]
580 $(MAKE) $(RECURSE_FLAGS_TO_PASS) `cat stage_final`-bubble 667 $(MAKE) $(RECURSE_FLAGS_TO_PASS) `cat stage_final`-bubble
581 @endif gcc-bootstrap 668 @endif gcc-bootstrap
582 @: $(MAKE); $(unstage) 669 @: $(MAKE); $(unstage)
583 @r=`${PWD_COMMAND}`; export r; \ 670 @r=`${PWD_COMMAND}`; export r; \
584 s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ 671 s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
672 @if gcc-bootstrap
585 if [ -f stage_last ]; then \ 673 if [ -f stage_last ]; then \
674 TFLAGS="$(STAGE$(shell test ! -f stage_last || sed s,^stage,, stage_last)_TFLAGS)"; \
586 $(MAKE) $(TARGET_FLAGS_TO_PASS) all-host all-target; \ 675 $(MAKE) $(TARGET_FLAGS_TO_PASS) all-host all-target; \
587 else \ 676 else \
588 $(MAKE) $(RECURSE_FLAGS_TO_PASS) all-host all-target; \ 677 @endif gcc-bootstrap
589 fi 678 $(MAKE) $(RECURSE_FLAGS_TO_PASS) all-host all-target \
679 @if gcc-bootstrap
680 ; \
681 fi \
682 @endif gcc-bootstrap
683 && :
590 684
591 .PHONY: all-build 685 .PHONY: all-build
592 [+ FOR build_modules +] 686 [+ FOR build_modules +]
593 all-build: maybe-all-build-[+module+][+ ENDFOR build_modules +] 687 all-build: maybe-all-build-[+module+][+ ENDFOR build_modules +]
594 688
837 else \ 931 else \
838 mv [+subdir+]/[+module+]/multilib.tmp [+subdir+]/[+module+]/multilib.out; \ 932 mv [+subdir+]/[+module+]/multilib.tmp [+subdir+]/[+module+]/multilib.out; \
839 fi; \ 933 fi; \
840 [+ ENDIF check_multilibs +]test ! -f [+subdir+]/[+module+]/Makefile || exit 0; \ 934 [+ ENDIF check_multilibs +]test ! -f [+subdir+]/[+module+]/Makefile || exit 0; \
841 $(SHELL) $(srcdir)/mkinstalldirs [+subdir+]/[+module+] ; \ 935 $(SHELL) $(srcdir)/mkinstalldirs [+subdir+]/[+module+] ; \
842 [+exports+] \ 936 [+exports+] [+extra_exports+] \
843 echo Configuring in [+subdir+]/[+module+]; \ 937 echo Configuring in [+subdir+]/[+module+]; \
844 cd "[+subdir+]/[+module+]" || exit 1; \ 938 cd "[+subdir+]/[+module+]" || exit 1; \
845 case $(srcdir) in \ 939 case $(srcdir) in \
846 /* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \ 940 /* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \
847 *) topdir=`echo [+subdir+]/[+module+]/ | \ 941 *) topdir=`echo [+subdir+]/[+module+]/ | \
865 configure-stage[+id+]-[+prefix+][+module+]: 959 configure-stage[+id+]-[+prefix+][+module+]:
866 @[ $(current_stage) = stage[+id+] ] || $(MAKE) stage[+id+]-start 960 @[ $(current_stage) = stage[+id+] ] || $(MAKE) stage[+id+]-start
867 @$(SHELL) $(srcdir)/mkinstalldirs [+subdir+]/[+module+] 961 @$(SHELL) $(srcdir)/mkinstalldirs [+subdir+]/[+module+]
868 @r=`${PWD_COMMAND}`; export r; \ 962 @r=`${PWD_COMMAND}`; export r; \
869 s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ 963 s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
964 TFLAGS="$(STAGE[+id+]_TFLAGS)"; \
870 [+ IF check_multilibs 965 [+ IF check_multilibs
871 +]echo "Checking multilib configuration for [+module+]..."; \ 966 +]echo "Checking multilib configuration for [+module+]..."; \
872 $(CC_FOR_TARGET) --print-multi-lib > [+subdir+]/[+module+]/multilib.tmp 2> /dev/null ; \ 967 $(CC_FOR_TARGET) --print-multi-lib > [+subdir+]/[+module+]/multilib.tmp 2> /dev/null ; \
873 if test -r [+subdir+]/[+module+]/multilib.out; then \ 968 if test -r [+subdir+]/[+module+]/multilib.out; then \
874 if cmp -s [+subdir+]/[+module+]/multilib.tmp [+subdir+]/[+module+]/multilib.out; then \ 969 if cmp -s [+subdir+]/[+module+]/multilib.tmp [+subdir+]/[+module+]/multilib.out; then \
880 else \ 975 else \
881 mv [+subdir+]/[+module+]/multilib.tmp [+subdir+]/[+module+]/multilib.out; \ 976 mv [+subdir+]/[+module+]/multilib.tmp [+subdir+]/[+module+]/multilib.out; \
882 fi; \ 977 fi; \
883 [+ ENDIF check_multilibs +]test ! -f [+subdir+]/[+module+]/Makefile || exit 0; \ 978 [+ ENDIF check_multilibs +]test ! -f [+subdir+]/[+module+]/Makefile || exit 0; \
884 [+exports+][+ IF prev +] \ 979 [+exports+][+ IF prev +] \
885 [+poststage1_exports+][+ ENDIF prev +] [+ IF prefix +] \ 980 [+poststage1_exports+][+ ENDIF prev +][+ IF prefix +] \
886 CFLAGS="[+stage_libcflags+] $(SYSROOT_CFLAGS_FOR_TARGET) $(DEBUG_PREFIX_CFLAGS_FOR_TARGET)"; export CFLAGS; \ 981 CFLAGS="$(CFLAGS_FOR_TARGET)"; export CFLAGS; \
887 CXXFLAGS="[+stage_libcflags+] $(SYSROOT_CFLAGS_FOR_TARGET) $(DEBUG_PREFIX_CFLAGS_FOR_TARGET)"; export CXXFLAGS; [+ ELSE +] \ 982 CXXFLAGS="$(CXXFLAGS_FOR_TARGET)"; export CXXFLAGS; \
888 CFLAGS="[+stage_cflags+]"; export CFLAGS; \ 983 LIBCFLAGS="$(LIBCFLAGS_FOR_TARGET)"; export LIBCFLAGS;[+ ELSE prefix +] \
889 CXXFLAGS="[+stage_cflags+]"; export CXXFLAGS; [+ ENDIF +] \ 984 CFLAGS="$(STAGE[+id+]_CFLAGS)"; export CFLAGS; \
985 CXXFLAGS="$(STAGE[+id+]_CXXFLAGS)"; export CXXFLAGS;[+ IF prev +] \
986 LIBCFLAGS="$(STAGE[+id+]_CFLAGS)"[+ ELSE prev +] \
987 LIBCFLAGS="$(LIBCFLAGS)"[+ ENDIF prev +]; export LIBCFLAGS;[+
988 ENDIF prefix +] [+extra_exports+] \
890 echo Configuring stage [+id+] in [+subdir+]/[+module+] ; \ 989 echo Configuring stage [+id+] in [+subdir+]/[+module+] ; \
891 $(SHELL) $(srcdir)/mkinstalldirs [+subdir+]/[+module+] ; \ 990 $(SHELL) $(srcdir)/mkinstalldirs [+subdir+]/[+module+] ; \
892 cd [+subdir+]/[+module+] || exit 1; \ 991 cd [+subdir+]/[+module+] || exit 1; \
893 case $(srcdir) in \ 992 case $(srcdir) in \
894 /* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \ 993 /* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \
897 esac; \ 996 esac; \
898 srcdiroption="--srcdir=$${topdir}/[+module+]"; \ 997 srcdiroption="--srcdir=$${topdir}/[+module+]"; \
899 libsrcdir="$$s/[+module+]"; \ 998 libsrcdir="$$s/[+module+]"; \
900 $(SHELL) $${libsrcdir}/configure \ 999 $(SHELL) $${libsrcdir}/configure \
901 [+args+] --build=${build_alias} --host=[+host_alias+] \ 1000 [+args+] --build=${build_alias} --host=[+host_alias+] \
902 --target=[+target_alias+] $${srcdiroption} \ 1001 --target=[+target_alias+] $${srcdiroption} [+ IF prev +]\
903 [+ IF prev +]--with-build-libsubdir=$(HOST_SUBDIR)[+ ENDIF prev +] \ 1002 --with-build-libsubdir=$(HOST_SUBDIR) [+ ENDIF prev +]\
904 [+stage_configure_flags+] [+extra_configure_flags+] 1003 $(STAGE[+id+]_CONFIGURE_FLAGS)[+ IF extra_configure_flags +] \
1004 [+extra_configure_flags+][+ ENDIF extra_configure_flags +]
905 @endif [+prefix+][+module+]-bootstrap 1005 @endif [+prefix+][+module+]-bootstrap
906 [+ ENDFOR bootstrap_stage +] 1006 [+ ENDFOR bootstrap_stage +]
907 [+ ENDIF bootstrap +] 1007 [+ ENDIF bootstrap +]
908 [+ ENDDEF +] 1008 [+ ENDDEF +]
909 1009
919 maybe-all-[+prefix+][+module+]: all-[+prefix+][+module+] 1019 maybe-all-[+prefix+][+module+]: all-[+prefix+][+module+]
920 all-[+prefix+][+module+]: configure-[+prefix+][+module+][+ IF bootstrap +][+ ELSE +] 1020 all-[+prefix+][+module+]: configure-[+prefix+][+module+][+ IF bootstrap +][+ ELSE +]
921 @: $(MAKE); $(unstage)[+ ENDIF bootstrap +] 1021 @: $(MAKE); $(unstage)[+ ENDIF bootstrap +]
922 @r=`${PWD_COMMAND}`; export r; \ 1022 @r=`${PWD_COMMAND}`; export r; \
923 s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ 1023 s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
924 [+exports+] \ 1024 [+exports+] [+extra_exports+] \
925 (cd [+subdir+]/[+module+] && \ 1025 (cd [+subdir+]/[+module+] && \
926 $(MAKE) $(BASE_FLAGS_TO_PASS) [+args+] [+extra_make_flags+] \ 1026 $(MAKE) $(BASE_FLAGS_TO_PASS) [+args+] [+extra_make_flags+] \
927 $(TARGET-[+prefix+][+module+])) 1027 $(TARGET-[+prefix+][+module+]))
928 @endif [+prefix+][+module+] 1028 @endif [+prefix+][+module+]
929 1029
939 TARGET-stage[+id+]-[+prefix+][+module+] = $(TARGET-[+prefix+][+module+]) 1039 TARGET-stage[+id+]-[+prefix+][+module+] = $(TARGET-[+prefix+][+module+])
940 all-stage[+id+]-[+prefix+][+module+]: configure-stage[+id+]-[+prefix+][+module+] 1040 all-stage[+id+]-[+prefix+][+module+]: configure-stage[+id+]-[+prefix+][+module+]
941 @[ $(current_stage) = stage[+id+] ] || $(MAKE) stage[+id+]-start 1041 @[ $(current_stage) = stage[+id+] ] || $(MAKE) stage[+id+]-start
942 @r=`${PWD_COMMAND}`; export r; \ 1042 @r=`${PWD_COMMAND}`; export r; \
943 s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ 1043 s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
1044 TFLAGS="$(STAGE[+id+]_TFLAGS)"; \
944 [+exports+][+ IF prev +] \ 1045 [+exports+][+ IF prev +] \
945 [+poststage1_exports+][+ ENDIF prev +] \ 1046 [+poststage1_exports+][+ ENDIF prev +] [+extra_exports+] \
946 cd [+subdir+]/[+module+] && \ 1047 cd [+subdir+]/[+module+] && \
947 $(MAKE) $(BASE_FLAGS_TO_PASS) \ 1048 $(MAKE) $(BASE_FLAGS_TO_PASS)[+ IF prefix +] \
948 CFLAGS="[+stage_cflags+]" CXXFLAGS="[+stage_cflags+]" \ 1049 CFLAGS="$(CFLAGS_FOR_TARGET)" \
949 LIBCFLAGS="[+stage_libcflags+]" \ 1050 CXXFLAGS="$(CXXFLAGS_FOR_TARGET)" \
950 CFLAGS_FOR_TARGET="[+stage_libcflags+]" \ 1051 LIBCFLAGS="$(LIBCFLAGS_FOR_TARGET)"[+ ELSE prefix +] \
951 CXXFLAGS_FOR_TARGET="[+stage_libcflags+]" [+args+] [+ 1052 CFLAGS="$(STAGE[+id+]_CFLAGS)" \
1053 CXXFLAGS="$(STAGE[+id+]_CXXFLAGS)"[+ IF prev +] \
1054 LIBCFLAGS="$(STAGE[+id+]_CFLAGS)"[+ ELSE prev +] \
1055 LIBCFLAGS="$(LIBCFLAGS)"[+ ENDIF prev +][+ ENDIF prefix +] \
1056 CFLAGS_FOR_TARGET="$(CFLAGS_FOR_TARGET)" \
1057 CXXFLAGS_FOR_TARGET="$(CXXFLAGS_FOR_TARGET)" \
1058 LIBCFLAGS_FOR_TARGET="$(LIBCFLAGS_FOR_TARGET)" \
1059 [+args+] [+
952 IF prev +][+poststage1_args+][+ ENDIF prev 1060 IF prev +][+poststage1_args+][+ ENDIF prev
953 +] [+extra_make_flags+] \ 1061 +] [+extra_make_flags+] \
1062 TFLAGS="$(STAGE[+id+]_TFLAGS)" \
954 $(TARGET-stage[+id+]-[+prefix+][+module+]) 1063 $(TARGET-stage[+id+]-[+prefix+][+module+])
955 1064
956 maybe-clean-stage[+id+]-[+prefix+][+module+]: clean-stage[+id+]-[+prefix+][+module+] 1065 maybe-clean-stage[+id+]-[+prefix+][+module+]: clean-stage[+id+]-[+prefix+][+module+]
957 clean-stage[+id+]: clean-stage[+id+]-[+prefix+][+module+] 1066 clean-stage[+id+]: clean-stage[+id+]-[+prefix+][+module+]
958 clean-stage[+id+]-[+prefix+][+module+]: 1067 clean-stage[+id+]-[+prefix+][+module+]:
1215 echo "Building runtime libraries"; \ 1324 echo "Building runtime libraries"; \
1216 $(MAKE) $(RECURSE_FLAGS_TO_PASS) LANGUAGES="c c++" all 1325 $(MAKE) $(RECURSE_FLAGS_TO_PASS) LANGUAGES="c c++" all
1217 @endif gcc-no-bootstrap 1326 @endif gcc-no-bootstrap
1218 1327
1219 @if gcc 1328 @if gcc
1220 .PHONY: check-gcc-c++ 1329 [+ FOR languages +]
1221 check-gcc-c++: 1330 .PHONY: check-gcc-[+language+] check-[+language+]
1222 @if [ -f ./gcc/Makefile ] ; then \ 1331 check-gcc-[+language+]:
1223 r=`${PWD_COMMAND}`; export r; \ 1332 r=`${PWD_COMMAND}`; export r; \
1224 s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ 1333 s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
1225 $(HOST_EXPORTS) \ 1334 $(HOST_EXPORTS) \
1226 (cd gcc && $(MAKE) $(GCC_FLAGS_TO_PASS) check-c++); \ 1335 (cd gcc && $(MAKE) $(GCC_FLAGS_TO_PASS) [+gcc-check-target+]);
1227 else \ 1336 check-[+language+]: check-gcc-[+language+][+ IF lib-check-target +] [+ lib-check-target +][+ ENDIF lib-check-target +]
1228 true; \ 1337 [+ ENDFOR languages +]
1229 fi
1230
1231 .PHONY: check-c++
1232 check-c++: check-target-libstdc++-v3 check-gcc-c++
1233 1338
1234 # Install the gcc headers files, but not the fixed include files, 1339 # Install the gcc headers files, but not the fixed include files,
1235 # which Cygnus is not allowed to distribute. This rule is very 1340 # which Cygnus is not allowed to distribute. This rule is very
1236 # dependent on the workings of the gcc Makefile.in. 1341 # dependent on the workings of the gcc Makefile.in.
1237 .PHONY: gcc-no-fixedincludes 1342 .PHONY: gcc-no-fixedincludes
1371 exit 0 ; \ 1476 exit 0 ; \
1372 fi; \ 1477 fi; \
1373 : $(MAKE); $(stage); \ 1478 : $(MAKE); $(stage); \
1374 rm -f .bad_compare ; \ 1479 rm -f .bad_compare ; \
1375 echo Comparing stages [+prev+] and [+id+] ; \ 1480 echo Comparing stages [+prev+] and [+id+] ; \
1376 cd stage[+id+]-gcc; \ 1481 sed=`echo stage[+id+] | sed 's,^stage,,;s,.,.,g'`; \
1377 files=`find . -name "*$(objext)" -print` ; \ 1482 files=`find stage[+id+]-* -name "*$(objext)" -print | \
1378 cd .. ; \ 1483 sed -n s,^stage$$sed-,,p` ; \
1379 for file in $${files} ; do \ 1484 for file in $${files} ; do \
1380 f1=$$r/stage[+prev+]-gcc/$$file; f2=$$r/stage[+id+]-gcc/$$file; \ 1485 f1=$$r/stage[+prev+]-$$file; f2=$$r/stage[+id+]-$$file; \
1486 if test ! -f $$f1; then continue; fi; \
1381 $(do-[+compare-target+]) > /dev/null 2>&1; \ 1487 $(do-[+compare-target+]) > /dev/null 2>&1; \
1382 if test $$? -eq 1; then \ 1488 if test $$? -eq 1; then \
1383 case $$file in \ 1489 case $$file in \
1384 ./cc*-checksum$(objext) | ./libgcc/* ) \ 1490 @compare_exclusions@) \
1385 echo warning: $$file differs ;; \ 1491 echo warning: $$file differs ;; \
1386 *) \ 1492 *) \
1387 echo $$file differs >> .bad_compare ;; \ 1493 echo $$file differs >> .bad_compare ;; \
1388 esac ; \ 1494 esac ; \
1389 fi ; \ 1495 fi ; \
1410 s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ 1516 s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
1411 $(MAKE) $(RECURSE_FLAGS_TO_PASS) stage[+id+]-bubble 1517 $(MAKE) $(RECURSE_FLAGS_TO_PASS) stage[+id+]-bubble
1412 @: $(MAKE); $(unstage) 1518 @: $(MAKE); $(unstage)
1413 @r=`${PWD_COMMAND}`; export r; \ 1519 @r=`${PWD_COMMAND}`; export r; \
1414 s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ 1520 s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
1521 TFLAGS="$(STAGE[+id+]_TFLAGS)"; \
1415 $(MAKE) $(TARGET_FLAGS_TO_PASS) all-host all-target 1522 $(MAKE) $(TARGET_FLAGS_TO_PASS) all-host all-target
1416 1523
1417 [+bootstrap-target+]-lean: 1524 [+bootstrap-target+]-lean:
1418 echo stage[+id+] > stage_final 1525 echo stage[+id+] > stage_final
1419 @r=`${PWD_COMMAND}`; export r; \ 1526 @r=`${PWD_COMMAND}`; export r; \
1420 s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ 1527 s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
1421 $(MAKE) $(RECURSE_FLAGS_TO_PASS) LEAN=: stage[+id+]-bubble 1528 $(MAKE) $(RECURSE_FLAGS_TO_PASS) LEAN=: stage[+id+]-bubble
1422 @: $(MAKE); $(unstage) 1529 @: $(MAKE); $(unstage)
1423 @r=`${PWD_COMMAND}`; export r; \ 1530 @r=`${PWD_COMMAND}`; export r; \
1424 s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ 1531 s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
1532 TFLAGS="$(STAGE[+id+]_TFLAGS)"; \
1425 $(MAKE) $(TARGET_FLAGS_TO_PASS) all-host all-target 1533 $(MAKE) $(TARGET_FLAGS_TO_PASS) all-host all-target
1426 [+ ENDIF bootstrap-target +] 1534 [+ ENDIF bootstrap-target +]
1427 1535
1428 # Rules to wipe a stage and all the following ones, also used for cleanstrap 1536 # Rules to wipe a stage and all the following ones, also used for cleanstrap
1429 [+ IF prev +]distclean-stage[+prev+]:: distclean-stage[+id+] [+ ENDIF prev +] 1537 [+ IF prev +]distclean-stage[+prev+]:: distclean-stage[+id+] [+ ENDIF prev +]
1442 s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ 1550 s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
1443 $(MAKE) $(RECURSE_FLAGS_TO_PASS) stage[+id+]-bubble 1551 $(MAKE) $(RECURSE_FLAGS_TO_PASS) stage[+id+]-bubble
1444 @: $(MAKE); $(unstage) 1552 @: $(MAKE); $(unstage)
1445 @r=`${PWD_COMMAND}`; export r; \ 1553 @r=`${PWD_COMMAND}`; export r; \
1446 s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ 1554 s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
1555 TFLAGS="$(STAGE[+id+]_TFLAGS)"; \
1447 $(MAKE) $(TARGET_FLAGS_TO_PASS) all-host all-target 1556 $(MAKE) $(TARGET_FLAGS_TO_PASS) all-host all-target
1448 [+ ENDIF cleanstrap-target +] 1557 [+ ENDIF cleanstrap-target +]
1449 @endif gcc-bootstrap 1558 @endif gcc-bootstrap
1450 1559
1451 [+ ENDFOR bootstrap-stage +] 1560 [+ ENDFOR bootstrap-stage +]
1479 @if test -f stage_last; then $(unstage); else $(MAKE) stage1-start; fi 1588 @if test -f stage_last; then $(unstage); else $(MAKE) stage1-start; fi
1480 1589
1481 .PHONY: restrap 1590 .PHONY: restrap
1482 restrap:: 1591 restrap::
1483 @: $(MAKE); $(stage) 1592 @: $(MAKE); $(stage)
1484 rm -rf stage1-$(TARGET_SUBDIR) [+ FOR bootstrap-stage +][+ IF prev 1593 rm -rf stage1-$(TARGET_SUBDIR)[+ FOR bootstrap-stage +][+ IF prev
1485 +]stage[+id+]-* [+ ENDIF prev +][+ ENDFOR bootstrap-stage +] 1594 +] stage[+id+]-*[+ ENDIF prev +][+ ENDFOR bootstrap-stage +]
1486 restrap:: all 1595 restrap:: all
1487 @endif gcc-bootstrap 1596 @endif gcc-bootstrap
1488 1597
1489 # -------------------------------------- 1598 # --------------------------------------
1490 # Dependencies between different modules 1599 # Dependencies between different modules