Develop and Download Open Source Software

Browse Subversion Repository

Diff of /trunk/Makefile.tpl

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 20 by monabuilder, Sun Dec 7 02:23:44 2008 UTC revision 21 by monamour, Mon Jul 27 20:34:36 2009 UTC
# Line 6  in Line 6  in
6  #  #
7  # Makefile for directory with subdirs to build.  # Makefile for directory with subdirs to build.
8  #   Copyright (C) 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998,  #   Copyright (C) 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998,
9  #   1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007 Free Software Foundation  #   1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009
10    #   Free Software Foundation
11  #  #
12  # This file is free software; you can redistribute it and/or modify  # 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  # it under the terms of the GNU General Public License as published by
# Line 177  HOST_EXPORTS = \ Line 178  HOST_EXPORTS = \
178          CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \          CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \
179          CXX="$(CXX)"; export CXX; \          CXX="$(CXX)"; export CXX; \
180          CXXFLAGS="$(CXXFLAGS)"; export CXXFLAGS; \          CXXFLAGS="$(CXXFLAGS)"; export CXXFLAGS; \
181            GCJ="$(GCJ)"; export GCJ; \
182            GFORTRAN="$(GFORTRAN)"; export GFORTRAN; \
183          AR="$(AR)"; export AR; \          AR="$(AR)"; export AR; \
184          AS="$(AS)"; export AS; \          AS="$(AS)"; export AS; \
185          CC_FOR_BUILD="$(CC_FOR_BUILD)"; export CC_FOR_BUILD; \          CC_FOR_BUILD="$(CC_FOR_BUILD)"; export CC_FOR_BUILD; \
# Line 212  HOST_EXPORTS = \ Line 215  HOST_EXPORTS = \
215  POSTSTAGE1_HOST_EXPORTS = \  POSTSTAGE1_HOST_EXPORTS = \
216          $(HOST_EXPORTS) \          $(HOST_EXPORTS) \
217          CC="$(STAGE_CC_WRAPPER) $$r/$(HOST_SUBDIR)/prev-gcc/xgcc$(exeext) \          CC="$(STAGE_CC_WRAPPER) $$r/$(HOST_SUBDIR)/prev-gcc/xgcc$(exeext) \
218            -B$$r/$(HOST_SUBDIR)/prev-gcc/ -B$(build_tooldir)/bin/"; export CC; \            -B$$r/$(HOST_SUBDIR)/prev-gcc/ -B$(build_tooldir)/bin/ \
219          CC_FOR_BUILD="$(STAGE_CC_WRAPPER) \            $(XGCC_FLAGS_FOR_TARGET) $$TFLAGS"; export CC; \
220            $$r/$(HOST_SUBDIR)/prev-gcc/xgcc$(exeext) \          CC_FOR_BUILD="$$CC"; export CC_FOR_BUILD; \
221            -B$$r/$(HOST_SUBDIR)/prev-gcc/ \          GNATBIND="$$r/$(HOST_SUBDIR)/prev-gcc/gnatbind"; export GNATBIND \
           -B$(build_tooldir)/bin/"; export CC_FOR_BUILD; \  
222          LDFLAGS="$(BOOT_LDFLAGS)"; export LDFLAGS;          LDFLAGS="$(BOOT_LDFLAGS)"; export LDFLAGS;
223    
224  # Target libraries are put under this directory:  # Target libraries are put under this directory:
# Line 230  BASE_TARGET_EXPORTS = \ Line 232  BASE_TARGET_EXPORTS = \
232          $(BASE_EXPORTS) \          $(BASE_EXPORTS) \
233          AR="$(AR_FOR_TARGET)"; export AR; \          AR="$(AR_FOR_TARGET)"; export AR; \
234          AS="$(COMPILER_AS_FOR_TARGET)"; export AS; \          AS="$(COMPILER_AS_FOR_TARGET)"; export AS; \
235          CC="$(CC_FOR_TARGET)"; export CC; \          CC="$(CC_FOR_TARGET) $(XGCC_FLAGS_FOR_TARGET) $$TFLAGS"; export CC; \
236          CFLAGS="$(CFLAGS_FOR_TARGET) $(SYSROOT_CFLAGS_FOR_TARGET) $(DEBUG_PREFIX_CFLAGS_FOR_TARGET)"; export CFLAGS; \          CFLAGS="$(CFLAGS_FOR_TARGET)"; export CFLAGS; \
237          CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \          CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \
238          CPPFLAGS="$(CPPFLAGS_FOR_TARGET)"; export CPPFLAGS; \          CPPFLAGS="$(CPPFLAGS_FOR_TARGET)"; export CPPFLAGS; \
239          CXXFLAGS="$(CXXFLAGS_FOR_TARGET) $(SYSROOT_CFLAGS_FOR_TARGET) $(DEBUG_PREFIX_CFLAGS_FOR_TARGET)"; export CXXFLAGS; \          CXXFLAGS="$(CXXFLAGS_FOR_TARGET)"; export CXXFLAGS; \
240          GCJ="$(GCJ_FOR_TARGET)"; export GCJ; \          GCJ="$(GCJ_FOR_TARGET) $(XGCC_FLAGS_FOR_TARGET) $$TFLAGS"; export GCJ; \
241          GFORTRAN="$(GFORTRAN_FOR_TARGET)"; export GFORTRAN; \          GFORTRAN="$(GFORTRAN_FOR_TARGET) $(XGCC_FLAGS_FOR_TARGET) $$TFLAGS"; export GFORTRAN; \
242          DLLTOOL="$(DLLTOOL_FOR_TARGET)"; export DLLTOOL; \          DLLTOOL="$(DLLTOOL_FOR_TARGET)"; export DLLTOOL; \
243          LD="$(COMPILER_LD_FOR_TARGET)"; export LD; \          LD="$(COMPILER_LD_FOR_TARGET)"; export LD; \
244          LDFLAGS="$(LDFLAGS_FOR_TARGET)"; export LDFLAGS; \          LDFLAGS="$(LDFLAGS_FOR_TARGET)"; export LDFLAGS; \
# Line 252  BASE_TARGET_EXPORTS = \ Line 254  BASE_TARGET_EXPORTS = \
254  RAW_CXX_TARGET_EXPORTS = \  RAW_CXX_TARGET_EXPORTS = \
255          $(BASE_TARGET_EXPORTS) \          $(BASE_TARGET_EXPORTS) \
256          CXX_FOR_TARGET="$(RAW_CXX_FOR_TARGET)"; export CXX_FOR_TARGET; \          CXX_FOR_TARGET="$(RAW_CXX_FOR_TARGET)"; export CXX_FOR_TARGET; \
257          CXX="$(RAW_CXX_FOR_TARGET)"; export CXX;          CXX="$(RAW_CXX_FOR_TARGET) $(XGCC_FLAGS_FOR_TARGET) $$TFLAGS"; export CXX;
258    
259  NORMAL_TARGET_EXPORTS = \  NORMAL_TARGET_EXPORTS = \
260          $(BASE_TARGET_EXPORTS) \          $(BASE_TARGET_EXPORTS) \
261          CXX="$(CXX_FOR_TARGET)"; export CXX;          CXX="$(CXX_FOR_TARGET) $(XGCC_FLAGS_FOR_TARGET) $$TFLAGS"; export CXX;
262    
263  # Where to find GMP  # Where to find GMP
264  HOST_GMPLIBS = @gmplibs@  HOST_GMPLIBS = @gmplibs@
# Line 356  LIBCFLAGS = $(CFLAGS) Line 358  LIBCFLAGS = $(CFLAGS)
358  CXXFLAGS = @CXXFLAGS@  CXXFLAGS = @CXXFLAGS@
359  LIBCXXFLAGS = $(CXXFLAGS) -fno-implicit-templates  LIBCXXFLAGS = $(CXXFLAGS) -fno-implicit-templates
360    
361    TFLAGS =
362    
363    # Defaults for all stages; some are overridden below.
364    
365    STAGE_CFLAGS = $(BOOT_CFLAGS)
366    STAGE_TFLAGS = $(TFLAGS)
367    STAGE_CONFIGURE_FLAGS=@stage2_werror_flag@
368    
369    [+ FOR bootstrap-stage +]
370    # Defaults for stage [+id+]; some are overridden below.
371    STAGE[+id+]_CFLAGS = $(STAGE_CFLAGS)
372    STAGE[+id+]_TFLAGS = $(STAGE_TFLAGS)
373    STAGE[+id+]_CONFIGURE_FLAGS = $(STAGE_CONFIGURE_FLAGS)
374    [+ ENDFOR bootstrap-stage +]
375    
376  # Only build the C compiler for stage1, because that is the only one that  # Only build the C compiler for stage1, because that is the only one that
377  # we can guarantee will build with the native compiler, and also it is the  # we can guarantee will build with the native compiler, and also it is the
378  # only thing useful for building stage2. STAGE1_CFLAGS (via CFLAGS),  # only thing useful for building stage2. STAGE1_CFLAGS (via CFLAGS),
379  # MAKEINFO and MAKEINFOFLAGS are explicitly passed here to make them  # MAKEINFO and MAKEINFOFLAGS are explicitly passed here to make them
380  # overrideable (for a bootstrap build stage1 also builds gcc.info).  # overrideable (for a bootstrap build stage1 also builds gcc.info).
381    
382    STAGE1_CFLAGS = @stage1_cflags@
383  STAGE1_CHECKING=@stage1_checking@  STAGE1_CHECKING=@stage1_checking@
384  STAGE1_LANGUAGES=@stage1_languages@  STAGE1_LANGUAGES=@stage1_languages@
385    # * We force-disable intermodule optimizations, even if
386    #   --enable-intermodule was passed, since the installed compiler
387    #   probably can't handle them.  Luckily, autoconf always respects
388    #   the last argument when conflicting --enable arguments are passed.
389    # * Likewise, we force-disable coverage flags, since the installed
390    #   compiler probably has never heard of them.
391    STAGE1_CONFIGURE_FLAGS = --disable-intermodule $(STAGE1_CHECKING) \
392              --disable-coverage --enable-languages="$(STAGE1_LANGUAGES)"
393    
394    STAGEprofile_CFLAGS = $(STAGE2_CFLAGS) -fprofile-generate
395    STAGEprofile_TFLAGS = $(STAGE2_TFLAGS)
396    
397  STAGE1_CFLAGS=@stage1_cflags@  STAGEfeedback_CFLAGS = $(STAGE3_CFLAGS) -fprofile-use
398  STAGE2_CFLAGS=$(BOOT_CFLAGS)  STAGEfeedback_TFLAGS = $(STAGE3_TFLAGS)
 STAGE3_CFLAGS=$(BOOT_CFLAGS)  
 STAGE4_CFLAGS=$(BOOT_CFLAGS)  
   
 STAGE1_LIBCFLAGS=$(CFLAGS_FOR_TARGET)  
 STAGE2_LIBCFLAGS=$(CFLAGS_FOR_TARGET)  
 STAGE3_LIBCFLAGS=$(CFLAGS_FOR_TARGET)  
 STAGE4_LIBCFLAGS=$(CFLAGS_FOR_TARGET)  
399    
400  do-compare = @do_compare@  do-compare = @do_compare@
401  do-compare3 = $(do-compare)  do-compare3 = $(do-compare)
 do-compare-debug = $(SHELL) $(srcdir)/contrib/compare-debug $$f1 $$f2  
402    
403  # -----------------------------------------------  # -----------------------------------------------
404  # Programs producing files for the TARGET machine  # Programs producing files for the TARGET machine
405  # -----------------------------------------------  # -----------------------------------------------
406    
 FLAGS_FOR_TARGET = @FLAGS_FOR_TARGET@  
   
407  AR_FOR_TARGET=@AR_FOR_TARGET@  AR_FOR_TARGET=@AR_FOR_TARGET@
408  AS_FOR_TARGET=@AS_FOR_TARGET@  AS_FOR_TARGET=@AS_FOR_TARGET@
409  CC_FOR_TARGET=$(STAGE_CC_WRAPPER) @CC_FOR_TARGET@ $(FLAGS_FOR_TARGET)  CC_FOR_TARGET=$(STAGE_CC_WRAPPER) @CC_FOR_TARGET@
410    
411  # If GCC_FOR_TARGET is not overriden on the command line, then this  # If GCC_FOR_TARGET is not overriden on the command line, then this
412  # variable is passed down to the gcc Makefile, where it is used to  # variable is passed down to the gcc Makefile, where it is used to
413  # build libgcc2.a.  We define it here so that it can itself be  # build libgcc2.a.  We define it here so that it can itself be
414  # overridden on the command line.  # overridden on the command line.
415  GCC_FOR_TARGET=$(STAGE_CC_WRAPPER) @GCC_FOR_TARGET@ $(FLAGS_FOR_TARGET)  GCC_FOR_TARGET=$(STAGE_CC_WRAPPER) @GCC_FOR_TARGET@
416  CXX_FOR_TARGET=$(STAGE_CC_WRAPPER) @CXX_FOR_TARGET@ $(FLAGS_FOR_TARGET)  CXX_FOR_TARGET=$(STAGE_CC_WRAPPER) @CXX_FOR_TARGET@
417  RAW_CXX_FOR_TARGET=$(STAGE_CC_WRAPPER) @RAW_CXX_FOR_TARGET@ $(FLAGS_FOR_TARGET)  RAW_CXX_FOR_TARGET=$(STAGE_CC_WRAPPER) @RAW_CXX_FOR_TARGET@
418  GCJ_FOR_TARGET=$(STAGE_CC_WRAPPER) @GCJ_FOR_TARGET@ $(FLAGS_FOR_TARGET)  GCJ_FOR_TARGET=$(STAGE_CC_WRAPPER) @GCJ_FOR_TARGET@
419  GFORTRAN_FOR_TARGET=$(STAGE_CC_WRAPPER) @GFORTRAN_FOR_TARGET@ $(FLAGS_FOR_TARGET)  GFORTRAN_FOR_TARGET=$(STAGE_CC_WRAPPER) @GFORTRAN_FOR_TARGET@
420  DLLTOOL_FOR_TARGET=@DLLTOOL_FOR_TARGET@  DLLTOOL_FOR_TARGET=@DLLTOOL_FOR_TARGET@
421  LD_FOR_TARGET=@LD_FOR_TARGET@  LD_FOR_TARGET=@LD_FOR_TARGET@
422    
# Line 415  COMPILER_NM_FOR_TARGET=@COMPILER_NM_FOR_ Line 434  COMPILER_NM_FOR_TARGET=@COMPILER_NM_FOR_
434    
435  CFLAGS_FOR_TARGET = @CFLAGS_FOR_TARGET@  CFLAGS_FOR_TARGET = @CFLAGS_FOR_TARGET@
436  CXXFLAGS_FOR_TARGET = @CXXFLAGS_FOR_TARGET@  CXXFLAGS_FOR_TARGET = @CXXFLAGS_FOR_TARGET@
 SYSROOT_CFLAGS_FOR_TARGET = @SYSROOT_CFLAGS_FOR_TARGET@  
 DEBUG_PREFIX_CFLAGS_FOR_TARGET = @DEBUG_PREFIX_CFLAGS_FOR_TARGET@  
437    
438  LIBCFLAGS_FOR_TARGET = $(CFLAGS_FOR_TARGET)  LIBCFLAGS_FOR_TARGET = $(CFLAGS_FOR_TARGET)
439  LIBCXXFLAGS_FOR_TARGET = $(CXXFLAGS_FOR_TARGET) -fno-implicit-templates  LIBCXXFLAGS_FOR_TARGET = $(CXXFLAGS_FOR_TARGET) -fno-implicit-templates
440  LDFLAGS_FOR_TARGET =  LDFLAGS_FOR_TARGET =
441    
442    FLAGS_FOR_TARGET = @FLAGS_FOR_TARGET@
443    SYSROOT_CFLAGS_FOR_TARGET = @SYSROOT_CFLAGS_FOR_TARGET@
444    DEBUG_PREFIX_CFLAGS_FOR_TARGET = @DEBUG_PREFIX_CFLAGS_FOR_TARGET@
445    
446    XGCC_FLAGS_FOR_TARGET = $(FLAGS_FOR_TARGET) $(SYSROOT_CFLAGS_FOR_TARGET) $(DEBUG_PREFIX_CFLAGS_FOR_TARGET)
447    
448  # ------------------------------------  # ------------------------------------
449  # Miscellaneous targets and flag lists  # Miscellaneous targets and flag lists
450  # ------------------------------------  # ------------------------------------
# Line 471  HOST_LIB_PATH_[+module+] = \ Line 494  HOST_LIB_PATH_[+module+] = \
494  # Flags to pass down to all sub-makes.  # Flags to pass down to all sub-makes.
495  BASE_FLAGS_TO_PASS =[+ FOR flags_to_pass +][+ IF optional +] \  BASE_FLAGS_TO_PASS =[+ FOR flags_to_pass +][+ IF optional +] \
496          "`echo '[+flag+]=$([+flag+])' | sed -e s'/[^=][^=]*=$$/XFOO=/'`"[+ ELSE optional +] \          "`echo '[+flag+]=$([+flag+])' | sed -e s'/[^=][^=]*=$$/XFOO=/'`"[+ ELSE optional +] \
497          "[+flag+]=$([+flag+])"[+ ENDIF optional+][+ ENDFOR flags_to_pass +] \          "[+flag+]=$([+flag+])"[+ ENDIF optional+][+ ENDFOR flags_to_pass +][+ FOR bootstrap-stage +] \
498            "STAGE[+id+]_CFLAGS=$(STAGE[+id+]_CFLAGS)" \
499            "STAGE[+id+]_TFLAGS=$(STAGE[+id+]_TFLAGS)"[+ ENDFOR bootstrap-stage +] \
500            "TFLAGS=$(TFLAGS)" \
501          "CONFIG_SHELL=$(SHELL)" \          "CONFIG_SHELL=$(SHELL)" \
502          "MAKEINFO=$(MAKEINFO) $(MAKEINFOFLAGS)"          "MAKEINFO=$(MAKEINFO) $(MAKEINFOFLAGS)"
503    
# Line 486  EXTRA_HOST_FLAGS = \ Line 512  EXTRA_HOST_FLAGS = \
512          'CC=$(CC)' \          'CC=$(CC)' \
513          'CXX=$(CXX)' \          'CXX=$(CXX)' \
514          'DLLTOOL=$(DLLTOOL)' \          'DLLTOOL=$(DLLTOOL)' \
515            'GCJ=$(GCJ)' \
516            'GFORTRAN=$(GFORTRAN)' \
517          'LD=$(LD)' \          'LD=$(LD)' \
518          'LIPO=$(LIPO)' \          'LIPO=$(LIPO)' \
519          'NM=$(NM)' \          'NM=$(NM)' \
# Line 512  X11_FLAGS_TO_PASS = \ Line 540  X11_FLAGS_TO_PASS = \
540  # Flags to pass to stage2 and later makes.  # Flags to pass to stage2 and later makes.
541    
542  POSTSTAGE1_FLAGS_TO_PASS = \  POSTSTAGE1_FLAGS_TO_PASS = \
543          CC="$${CC}" CC_FOR_BUILD="$${CC_FOR_BUILD}" \          CC="$${CC}" CC_FOR_BUILD="$${CC_FOR_BUILD}" GNATBIND="$${GNATBIND}" \
         GNATBIND="$$r/$(HOST_SUBDIR)/prev-gcc/gnatbind" \  
544          LDFLAGS="$(BOOT_LDFLAGS)" \          LDFLAGS="$(BOOT_LDFLAGS)" \
545          "`echo 'ADAFLAGS=$(BOOT_ADAFLAGS)' | sed -e s'/[^=][^=]*=$$/XFOO=/'`"          "`echo 'ADAFLAGS=$(BOOT_ADAFLAGS)' | sed -e s'/[^=][^=]*=$$/XFOO=/'`"
546    
# Line 525  POSTSTAGE1_FLAGS_TO_PASS = \ Line 552  POSTSTAGE1_FLAGS_TO_PASS = \
552  EXTRA_TARGET_FLAGS = \  EXTRA_TARGET_FLAGS = \
553          'AR=$$(AR_FOR_TARGET)' \          'AR=$$(AR_FOR_TARGET)' \
554          'AS=$(COMPILER_AS_FOR_TARGET)' \          'AS=$(COMPILER_AS_FOR_TARGET)' \
555          'CC=$$(CC_FOR_TARGET)' \          'CC=$$(CC_FOR_TARGET) $$(XGCC_FLAGS_FOR_TARGET) $$(TFLAGS)' \
556          'CFLAGS=$$(CFLAGS_FOR_TARGET) $(SYSROOT_CFLAGS_FOR_TARGET) $(DEBUG_PREFIX_CFLAGS_FOR_TARGET)' \          'CFLAGS=$$(CFLAGS_FOR_TARGET)' \
557          'CXX=$$(CXX_FOR_TARGET)' \          'CXX=$$(CXX_FOR_TARGET) $$(XGCC_FLAGS_FOR_TARGET) $$(TFLAGS)' \
558          'CXXFLAGS=$$(CXXFLAGS_FOR_TARGET) $(SYSROOT_CFLAGS_FOR_TARGET) $(DEBUG_PREFIX_CFLAGS_FOR_TARGET)' \          'CXXFLAGS=$$(CXXFLAGS_FOR_TARGET)' \
559          'DLLTOOL=$$(DLLTOOL_FOR_TARGET)' \          'DLLTOOL=$$(DLLTOOL_FOR_TARGET)' \
560            'GCJ=$$(GCJ_FOR_TARGET) $$(XGCC_FLAGS_FOR_TARGET) $$(TFLAGS)' \
561            'GFORTRAN=$$(GFORTRAN_FOR_TARGET) $$(XGCC_FLAGS_FOR_TARGET) $$(TFLAGS)' \
562          'LD=$(COMPILER_LD_FOR_TARGET)' \          'LD=$(COMPILER_LD_FOR_TARGET)' \
563          'LDFLAGS=$$(LDFLAGS_FOR_TARGET)' \          'LDFLAGS=$$(LDFLAGS_FOR_TARGET)' \
564          'LIBCFLAGS=$$(LIBCFLAGS_FOR_TARGET) $(SYSROOT_CFLAGS_FOR_TARGET) $(DEBUG_PREFIX_CFLAGS_FOR_TARGET)' \          'LIBCFLAGS=$$(LIBCFLAGS_FOR_TARGET)' \
565          'LIBCXXFLAGS=$$(LIBCXXFLAGS_FOR_TARGET) $(SYSROOT_CFLAGS_FOR_TARGET) $(DEBUG_PREFIX_CFLAGS_FOR_TARGET)' \          'LIBCXXFLAGS=$$(LIBCXXFLAGS_FOR_TARGET)' \
566          'NM=$(COMPILER_NM_FOR_TARGET)' \          'NM=$(COMPILER_NM_FOR_TARGET)' \
567          'OBJDUMP=$$(OBJDUMP_FOR_TARGET)' \          'OBJDUMP=$$(OBJDUMP_FOR_TARGET)' \
568          'RANLIB=$$(RANLIB_FOR_TARGET)' \          'RANLIB=$$(RANLIB_FOR_TARGET)' \
569          'WINDRES=$$(WINDRES_FOR_TARGET)' \          'WINDRES=$$(WINDRES_FOR_TARGET)' \
570          'WINDMC=$$(WINDMC_FOR_TARGET)'          'WINDMC=$$(WINDMC_FOR_TARGET)' \
571            'XGCC_FLAGS_FOR_TARGET=$(XGCC_FLAGS_FOR_TARGET)' \
572            "TFLAGS=$$TFLAGS"
573    
574  TARGET_FLAGS_TO_PASS = $(BASE_FLAGS_TO_PASS) $(EXTRA_TARGET_FLAGS)  TARGET_FLAGS_TO_PASS = $(BASE_FLAGS_TO_PASS) $(EXTRA_TARGET_FLAGS)
575    
# Line 558  EXTRA_GCC_FLAGS = \ Line 589  EXTRA_GCC_FLAGS = \
589    
590  GCC_FLAGS_TO_PASS = $(BASE_FLAGS_TO_PASS) $(EXTRA_HOST_FLAGS) $(EXTRA_GCC_FLAGS)  GCC_FLAGS_TO_PASS = $(BASE_FLAGS_TO_PASS) $(EXTRA_HOST_FLAGS) $(EXTRA_GCC_FLAGS)
591    
592    @if gcc
593    BUILD_CONFIG =
594    ifneq ($(BUILD_CONFIG),)
595    include $(foreach CONFIG, $(BUILD_CONFIG), $(srcdir)/config/$(CONFIG).mk)
596    endif
597    @endif gcc
598    
599  .PHONY: configure-host  .PHONY: configure-host
600  configure-host: [+  configure-host: [+
601    FOR host_modules +] \    FOR host_modules +] \
# Line 581  all: Line 619  all:
619          @: $(MAKE); $(unstage)          @: $(MAKE); $(unstage)
620          @r=`${PWD_COMMAND}`; export r; \          @r=`${PWD_COMMAND}`; export r; \
621          s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \          s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
622    @if gcc-bootstrap
623          if [ -f stage_last ]; then \          if [ -f stage_last ]; then \
624              TFLAGS="$(STAGE$(shell test ! -f stage_last || sed s,^stage,, stage_last)_TFLAGS)"; \
625            $(MAKE) $(TARGET_FLAGS_TO_PASS) all-host all-target; \            $(MAKE) $(TARGET_FLAGS_TO_PASS) all-host all-target; \
626          else \          else \
627            $(MAKE) $(RECURSE_FLAGS_TO_PASS) all-host all-target; \  @endif gcc-bootstrap
628          fi            $(MAKE) $(RECURSE_FLAGS_TO_PASS) all-host all-target \
629    @if gcc-bootstrap
630                ; \
631            fi \
632    @endif gcc-bootstrap
633            && :
634    
635  .PHONY: all-build  .PHONY: all-build
636  [+ FOR build_modules +]  [+ FOR build_modules +]
# Line 866  configure-stage[+id+]-[+prefix+][+module Line 911  configure-stage[+id+]-[+prefix+][+module
911          @$(SHELL) $(srcdir)/mkinstalldirs [+subdir+]/[+module+]          @$(SHELL) $(srcdir)/mkinstalldirs [+subdir+]/[+module+]
912          @r=`${PWD_COMMAND}`; export r; \          @r=`${PWD_COMMAND}`; export r; \
913          s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \          s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
914            TFLAGS="$(STAGE[+id+]_TFLAGS)"; \
915          [+ IF check_multilibs          [+ IF check_multilibs
916          +]echo "Checking multilib configuration for [+module+]..."; \          +]echo "Checking multilib configuration for [+module+]..."; \
917          $(CC_FOR_TARGET) --print-multi-lib > [+subdir+]/[+module+]/multilib.tmp 2> /dev/null ; \          $(CC_FOR_TARGET) --print-multi-lib > [+subdir+]/[+module+]/multilib.tmp 2> /dev/null ; \
# Line 881  configure-stage[+id+]-[+prefix+][+module Line 927  configure-stage[+id+]-[+prefix+][+module
927          fi; \          fi; \
928          [+ ENDIF check_multilibs +]test ! -f [+subdir+]/[+module+]/Makefile || exit 0; \          [+ ENDIF check_multilibs +]test ! -f [+subdir+]/[+module+]/Makefile || exit 0; \
929          [+exports+][+ IF prev +] \          [+exports+][+ IF prev +] \
930          [+poststage1_exports+][+ ENDIF prev +] [+ IF prefix +] \          [+poststage1_exports+][+ ENDIF prev +][+ IF prefix +] \
931          CFLAGS="[+stage_libcflags+] $(SYSROOT_CFLAGS_FOR_TARGET) $(DEBUG_PREFIX_CFLAGS_FOR_TARGET)"; export CFLAGS; \          CFLAGS="$(CFLAGS_FOR_TARGET)"; export CFLAGS; \
932          CXXFLAGS="[+stage_libcflags+] $(SYSROOT_CFLAGS_FOR_TARGET) $(DEBUG_PREFIX_CFLAGS_FOR_TARGET)"; export CXXFLAGS; [+ ELSE +] \          CXXFLAGS="$(CXXFLAGS_FOR_TARGET)"; export CXXFLAGS; \
933          CFLAGS="[+stage_cflags+]"; export CFLAGS; \          LIBCFLAGS="$(LIBCFLAGS_FOR_TARGET)"; export LIBCFLAGS;[+ ELSE prefix +] \
934          CXXFLAGS="[+stage_cflags+]"; export CXXFLAGS; [+ ENDIF +] \          CFLAGS="$(STAGE[+id+]_CFLAGS)"; export CFLAGS; \
935            CXXFLAGS="$(STAGE[+id+]_CFLAGS)"; export CXXFLAGS;[+ IF prev +] \
936            LIBCFLAGS="$(STAGE[+id+]_CFLAGS)"[+ ELSE prev +] \
937            LIBCFLAGS="$(LIBCFLAGS)"[+ ENDIF prev +]; export LIBCFLAGS;[+ ENDIF prefix +] \
938          echo Configuring stage [+id+] in [+subdir+]/[+module+] ; \          echo Configuring stage [+id+] in [+subdir+]/[+module+] ; \
939          $(SHELL) $(srcdir)/mkinstalldirs [+subdir+]/[+module+] ; \          $(SHELL) $(srcdir)/mkinstalldirs [+subdir+]/[+module+] ; \
940          cd [+subdir+]/[+module+] || exit 1; \          cd [+subdir+]/[+module+] || exit 1; \
# Line 898  configure-stage[+id+]-[+prefix+][+module Line 947  configure-stage[+id+]-[+prefix+][+module
947          libsrcdir="$$s/[+module+]"; \          libsrcdir="$$s/[+module+]"; \
948          $(SHELL) $${libsrcdir}/configure \          $(SHELL) $${libsrcdir}/configure \
949            [+args+] --build=${build_alias} --host=[+host_alias+] \            [+args+] --build=${build_alias} --host=[+host_alias+] \
950            --target=[+target_alias+] $${srcdiroption} \            --target=[+target_alias+] $${srcdiroption} [+ IF prev +]\
951            [+ IF prev +]--with-build-libsubdir=$(HOST_SUBDIR)[+ ENDIF prev +] \            --with-build-libsubdir=$(HOST_SUBDIR) [+ ENDIF prev +]\
952            [+stage_configure_flags+] [+extra_configure_flags+]            $(STAGE[+id+]_CONFIGURE_FLAGS)[+ IF extra_configure_flags +] \
953              [+extra_configure_flags+][+ ENDIF extra_configure_flags +]
954  @endif [+prefix+][+module+]-bootstrap  @endif [+prefix+][+module+]-bootstrap
955  [+ ENDFOR bootstrap_stage +]  [+ ENDFOR bootstrap_stage +]
956  [+ ENDIF bootstrap +]  [+ ENDIF bootstrap +]
# Line 940  all-stage[+id+]-[+prefix+][+module+]: co Line 990  all-stage[+id+]-[+prefix+][+module+]: co
990          @[ $(current_stage) = stage[+id+] ] || $(MAKE) stage[+id+]-start          @[ $(current_stage) = stage[+id+] ] || $(MAKE) stage[+id+]-start
991          @r=`${PWD_COMMAND}`; export r; \          @r=`${PWD_COMMAND}`; export r; \
992          s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \          s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
993            TFLAGS="$(STAGE[+id+]_TFLAGS)"; \
994          [+exports+][+ IF prev +] \          [+exports+][+ IF prev +] \
995          [+poststage1_exports+][+ ENDIF prev +] \          [+poststage1_exports+][+ ENDIF prev +] \
996          cd [+subdir+]/[+module+] && \          cd [+subdir+]/[+module+] && \
997          $(MAKE) $(BASE_FLAGS_TO_PASS) \          $(MAKE) $(BASE_FLAGS_TO_PASS)[+ IF prefix +] \
998                  CFLAGS="[+stage_cflags+]" CXXFLAGS="[+stage_cflags+]" \                  CFLAGS="$(CFLAGS_FOR_TARGET)" \
999                  LIBCFLAGS="[+stage_libcflags+]" \                  CXXFLAGS="$(CXXFLAGS_FOR_TARGET)" \
1000                  CFLAGS_FOR_TARGET="[+stage_libcflags+]" \                  LIBCFLAGS="$(LIBCFLAGS_FOR_TARGET)"[+ ELSE prefix +] \
1001                  CXXFLAGS_FOR_TARGET="[+stage_libcflags+]" [+args+] [+                  CFLAGS="$(STAGE[+id+]_CFLAGS)" \
1002                    CXXFLAGS="$(STAGE[+id+]_CFLAGS)"[+ IF prev +] \
1003                    LIBCFLAGS="$(STAGE[+id+]_CFLAGS)"[+ ELSE prev +] \
1004                    LIBCFLAGS="$(LIBCFLAGS)"[+ ENDIF prev +][+ ENDIF prefix +] \
1005                    CFLAGS_FOR_TARGET="$(CFLAGS_FOR_TARGET)" \
1006                    CXXFLAGS_FOR_TARGET="$(CXXFLAGS_FOR_TARGET)" \
1007                    LIBCFLAGS_FOR_TARGET="$(LIBCFLAGS_FOR_TARGET)" \
1008                    [+args+] [+
1009                  IF prev +][+poststage1_args+][+ ENDIF prev                  IF prev +][+poststage1_args+][+ ENDIF prev
1010                  +] [+extra_make_flags+] \                  +] [+extra_make_flags+] \
1011                    TFLAGS="$(STAGE[+id+]_TFLAGS)" \
1012                  $(TARGET-stage[+id+]-[+prefix+][+module+])                  $(TARGET-stage[+id+]-[+prefix+][+module+])
1013    
1014  maybe-clean-stage[+id+]-[+prefix+][+module+]: clean-stage[+id+]-[+prefix+][+module+]  maybe-clean-stage[+id+]-[+prefix+][+module+]: clean-stage[+id+]-[+prefix+][+module+]
# Line 1216  cross: all-build all-gas all-ld Line 1275  cross: all-build all-gas all-ld
1275  @endif gcc-no-bootstrap  @endif gcc-no-bootstrap
1276    
1277  @if gcc  @if gcc
1278  .PHONY: check-gcc-c++  [+ FOR languages +]
1279  check-gcc-c++:  .PHONY: check-gcc-[+language+] check-[+language+]
1280          @if [ -f ./gcc/Makefile ] ; then \  check-gcc-[+language+]:
1281            r=`${PWD_COMMAND}`; export r; \          r=`${PWD_COMMAND}`; export r; \
1282            s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \          s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
1283            $(HOST_EXPORTS) \          $(HOST_EXPORTS) \
1284            (cd gcc && $(MAKE) $(GCC_FLAGS_TO_PASS) check-c++); \          (cd gcc && $(MAKE) $(GCC_FLAGS_TO_PASS) [+gcc-check-target+]);
1285          else \  check-[+language+]: check-gcc-[+language+][+ IF lib-check-target +] [+ lib-check-target +][+ ENDIF lib-check-target +]
1286            true; \  [+ ENDFOR languages +]
         fi  
   
 .PHONY: check-c++  
 check-c++: check-target-libstdc++-v3 check-gcc-c++  
1287    
1288  # Install the gcc headers files, but not the fixed include files,  # Install the gcc headers files, but not the fixed include files,
1289  # which Cygnus is not allowed to distribute.  This rule is very  # which Cygnus is not allowed to distribute.  This rule is very
# Line 1372  do-clean: clean-stage[+id+] Line 1427  do-clean: clean-stage[+id+]
1427          : $(MAKE); $(stage); \          : $(MAKE); $(stage); \
1428          rm -f .bad_compare ; \          rm -f .bad_compare ; \
1429          echo Comparing stages [+prev+] and [+id+] ; \          echo Comparing stages [+prev+] and [+id+] ; \
1430          cd stage[+id+]-gcc; \          sed=`echo stage[+id+] | sed 's,^stage,,;s,.,.,g'`; \
1431          files=`find . -name "*$(objext)" -print` ; \          files=`find stage[+id+]-* -name "*$(objext)" -print | \
1432          cd .. ; \                   sed -n s,^stage$$sed-,,p` ; \
1433          for file in $${files} ; do \          for file in $${files} ; do \
1434            f1=$$r/stage[+prev+]-gcc/$$file; f2=$$r/stage[+id+]-gcc/$$file; \            f1=$$r/stage[+prev+]-$$file; f2=$$r/stage[+id+]-$$file; \
1435              if test ! -f $$f1; then continue; fi; \
1436            $(do-[+compare-target+]) > /dev/null 2>&1; \            $(do-[+compare-target+]) > /dev/null 2>&1; \
1437            if test $$? -eq 1; then \            if test $$? -eq 1; then \
1438              case $$file in \              case $$file in \
1439                ./cc*-checksum$(objext) | ./libgcc/* ) \                gcc/cc*-checksum$(objext) | ./libgcc/* | ./gcc/ada/*tools/*) \
1440                  echo warning: $$file differs ;; \                  echo warning: $$file differs ;; \
1441                *) \                *) \
1442                  echo $$file differs >> .bad_compare ;; \                  echo $$file differs >> .bad_compare ;; \
# Line 1411  do-clean: clean-stage[+id+] Line 1467  do-clean: clean-stage[+id+]
1467          @: $(MAKE); $(unstage)          @: $(MAKE); $(unstage)
1468          @r=`${PWD_COMMAND}`; export r; \          @r=`${PWD_COMMAND}`; export r; \
1469          s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \          s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
1470            TFLAGS="$(STAGE[+id+]_TFLAGS)"; \
1471          $(MAKE) $(TARGET_FLAGS_TO_PASS) all-host all-target          $(MAKE) $(TARGET_FLAGS_TO_PASS) all-host all-target
1472    
1473  [+bootstrap-target+]-lean:  [+bootstrap-target+]-lean:
# Line 1421  do-clean: clean-stage[+id+] Line 1478  do-clean: clean-stage[+id+]
1478          @: $(MAKE); $(unstage)          @: $(MAKE); $(unstage)
1479          @r=`${PWD_COMMAND}`; export r; \          @r=`${PWD_COMMAND}`; export r; \
1480          s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \          s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
1481            TFLAGS="$(STAGE[+id+]_TFLAGS)"; \
1482          $(MAKE) $(TARGET_FLAGS_TO_PASS) all-host all-target          $(MAKE) $(TARGET_FLAGS_TO_PASS) all-host all-target
1483  [+ ENDIF bootstrap-target +]  [+ ENDIF bootstrap-target +]
1484    
# Line 1443  distclean-stage[+id+]:: Line 1501  distclean-stage[+id+]::
1501          @: $(MAKE); $(unstage)          @: $(MAKE); $(unstage)
1502          @r=`${PWD_COMMAND}`; export r; \          @r=`${PWD_COMMAND}`; export r; \
1503          s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \          s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
1504            TFLAGS="$(STAGE[+id+]_TFLAGS)"; \
1505          $(MAKE) $(TARGET_FLAGS_TO_PASS) all-host all-target          $(MAKE) $(TARGET_FLAGS_TO_PASS) all-host all-target
1506  [+ ENDIF cleanstrap-target +]  [+ ENDIF cleanstrap-target +]
1507  @endif gcc-bootstrap  @endif gcc-bootstrap
# Line 1468  do-distclean: distclean-stage1 Line 1527  do-distclean: distclean-stage1
1527  # Provide a GCC build when we're building target libraries.  This does  # Provide a GCC build when we're building target libraries.  This does
1528  # not work as a dependency, just as the minimum necessary to avoid errors.  # not work as a dependency, just as the minimum necessary to avoid errors.
1529  stage_last:  stage_last:
1530            @r=`${PWD_COMMAND}`; export r; \
1531            s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
1532          $(MAKE) $(RECURSE_FLAGS_TO_PASS) stage1-bubble          $(MAKE) $(RECURSE_FLAGS_TO_PASS) stage1-bubble
1533    
1534  # Same as unstage, but not phony and defaulting to stage1-start.  We place  # Same as unstage, but not phony and defaulting to stage1-start.  We place
# Line 1478  stage_current: Line 1539  stage_current:
1539  .PHONY: restrap  .PHONY: restrap
1540  restrap::  restrap::
1541          @: $(MAKE); $(stage)          @: $(MAKE); $(stage)
1542          rm -rf stage1-$(TARGET_SUBDIR) [+ FOR bootstrap-stage +][+ IF prev          rm -rf stage1-$(TARGET_SUBDIR)[+ FOR bootstrap-stage +][+ IF prev
1543            +]stage[+id+]-* [+ ENDIF prev +][+ ENDFOR bootstrap-stage +]            +] stage[+id+]-*[+ ENDIF prev +][+ ENDFOR bootstrap-stage +]
1544  restrap:: all  restrap:: all
1545  @endif gcc-bootstrap  @endif gcc-bootstrap
1546    

Legend:
Removed from v.20  
changed lines
  Added in v.21

Back to OSDN">Back to OSDN
ViewVC Help
Powered by ViewVC 1.1.26