X-Git-Url: http://git.sourceforge.jp/view?p=pf3gnuchains%2Fgcc-fork.git;a=blobdiff_plain;f=Makefile.tpl;h=371c3b6f7db65aa32b7ec74efe15e42dcd58b7a7;hp=f9a2936c33c8089bf5e2b87434a56079b37a5c61;hb=71e90b8eb10cfeb6d8ea67dd0019bb294c98a818;hpb=174d231ca3ffe1dfc6874f5ad53d56f225f0c75f diff --git a/Makefile.tpl b/Makefile.tpl index f9a2936c33c..371c3b6f7db 100644 --- a/Makefile.tpl +++ b/Makefile.tpl @@ -6,7 +6,7 @@ in # # Makefile for directory with subdirs to build. # Copyright (C) 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, -# 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 +# 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 # Free Software Foundation # # This file is free software; you can redistribute it and/or modify @@ -103,8 +103,6 @@ TOPLEVEL_CONFIGURE_ARGUMENTS=@TOPLEVEL_CONFIGURE_ARGUMENTS@ tooldir = @tooldir@ build_tooldir = @build_tooldir@ -GDB_NLM_DEPS = - # This is the name of the environment variable used for the path to # the libraries. RPATH_ENVVAR = @RPATH_ENVVAR@ @@ -211,6 +209,7 @@ HOST_EXPORTS = \ WINDMC="$(WINDMC)"; export WINDMC; \ OBJCOPY="$(OBJCOPY)"; export OBJCOPY; \ OBJDUMP="$(OBJDUMP)"; export OBJDUMP; \ + READELF="$(READELF)"; export READELF; \ AR_FOR_TARGET="$(AR_FOR_TARGET)"; export AR_FOR_TARGET; \ AS_FOR_TARGET="$(AS_FOR_TARGET)"; export AS_FOR_TARGET; \ GCC_FOR_TARGET="$(GCC_FOR_TARGET)"; export GCC_FOR_TARGET; \ @@ -218,6 +217,7 @@ HOST_EXPORTS = \ NM_FOR_TARGET="$(NM_FOR_TARGET)"; export NM_FOR_TARGET; \ OBJDUMP_FOR_TARGET="$(OBJDUMP_FOR_TARGET)"; export OBJDUMP_FOR_TARGET; \ RANLIB_FOR_TARGET="$(RANLIB_FOR_TARGET)"; export RANLIB_FOR_TARGET; \ + READELF_FOR_TARGET="$(READELF_FOR_TARGET)"; export READELF_FOR_TARGET; \ TOPLEVEL_CONFIGURE_ARGUMENTS="$(TOPLEVEL_CONFIGURE_ARGUMENTS)"; export TOPLEVEL_CONFIGURE_ARGUMENTS; \ HOST_LIBS="$(STAGE1_LIBS)"; export HOST_LIBS; \ GMPLIBS="$(HOST_GMPLIBS)"; export GMPLIBS; \ @@ -242,10 +242,13 @@ POSTSTAGE1_CXX_EXPORT = \ CXX="$(STAGE_CC_WRAPPER) $$r/$(HOST_SUBDIR)/prev-gcc/g++$(exeext) \ -B$$r/$(HOST_SUBDIR)/prev-gcc/ -B$(build_tooldir)/bin/ -nostdinc++ \ -B$$r/prev-$(TARGET_SUBDIR)/libstdc++-v3/src/.libs \ + -B$$r/prev-$(TARGET_SUBDIR)/libstdc++-v3/libsupc++/.libs \ -I$$r/prev-$(TARGET_SUBDIR)/libstdc++-v3/include/$(TARGET_SUBDIR) \ -I$$r/prev-$(TARGET_SUBDIR)/libstdc++-v3/include \ -I$$s/libstdc++-v3/libsupc++ \ - -L$$r/prev-$(TARGET_SUBDIR)/libstdc++-v3/src/.libs"; export CXX; \ + -L$$r/prev-$(TARGET_SUBDIR)/libstdc++-v3/src/.libs \ + -L$$r/prev-$(TARGET_SUBDIR)/libstdc++-v3/libsupc++/.libs"; \ + export CXX; \ CXX_FOR_BUILD="$$CXX"; export CXX_FOR_BUILD; @endif target-libstdc++-v3-bootstrap @@ -287,6 +290,7 @@ BASE_TARGET_EXPORTS = \ NM="$(COMPILER_NM_FOR_TARGET)"; export NM; \ OBJDUMP="$(OBJDUMP_FOR_TARGET)"; export OBJDUMP; \ RANLIB="$(RANLIB_FOR_TARGET)"; export RANLIB; \ + READELF="$(READELF_FOR_TARGET)"; export READELF; \ STRIP="$(STRIP_FOR_TARGET)"; export STRIP; \ WINDRES="$(WINDRES_FOR_TARGET)"; export WINDRES; \ WINDMC="$(WINDMC_FOR_TARGET)"; export WINDMC; \ @@ -321,11 +325,13 @@ HOST_CLOOGINC = @clooginc@ HOST_LIBELFLIBS = @libelflibs@ HOST_LIBELFINC = @libelfinc@ +EXTRA_CONFIGARGS_LIBJAVA = @EXTRA_CONFIGARGS_LIBJAVA@ + # ---------------------------------------------- # Programs producing files for the BUILD machine # ---------------------------------------------- -SHELL = @config_shell@ +SHELL = @SHELL@ # pwd command to use. Allow user to override default by setting PWDCMD in # the environment to account for automounters. The make variable must not @@ -397,6 +403,7 @@ LIPO = @LIPO@ NM = @NM@ OBJDUMP = @OBJDUMP@ RANLIB = @RANLIB@ +READELF = @READELF@ STRIP = @STRIP@ WINDRES = @WINDRES@ WINDMC = @WINDMC@ @@ -418,6 +425,7 @@ TFLAGS = STAGE_CFLAGS = $(BOOT_CFLAGS) STAGE_TFLAGS = $(TFLAGS) STAGE_CONFIGURE_FLAGS=@stage2_werror_flag@ +POSTSTAGE1_CONFIGURE_FLAGS = @POSTSTAGE1_CONFIGURE_FLAGS@ [+ FOR bootstrap-stage +] # Defaults for stage [+id+]; some are overridden below. @@ -428,7 +436,10 @@ STAGE[+id+]_CXXFLAGS = $(CXXFLAGS) STAGE[+id+]_CXXFLAGS = $(STAGE[+id+]_CFLAGS) @endif target-libstdc++-v3-bootstrap STAGE[+id+]_TFLAGS = $(STAGE_TFLAGS) -STAGE[+id+]_CONFIGURE_FLAGS = $(STAGE_CONFIGURE_FLAGS) +# STAGE1_CONFIGURE_FLAGS overridden below, so we can use +# POSTSTAGE1_CONFIGURE_FLAGS here. +STAGE[+id+]_CONFIGURE_FLAGS = \ + $(STAGE_CONFIGURE_FLAGS) $(POSTSTAGE1_CONFIGURE_FLAGS) [+ ENDFOR bootstrap-stage +] # Only build the C compiler for stage1, because that is the only one that @@ -446,6 +457,9 @@ STAGE1_LANGUAGES = @stage1_languages@ # the last argument when conflicting --enable arguments are passed. # * Likewise, we force-disable coverage flags, since the installed # compiler probably has never heard of them. +# * Don't remove this, because above we added +# POSTSTAGE1_CONFIGURE_FLAGS to STAGE[+id+]_CONFIGURE_FLAGS, which +# we don't want for STAGE1_CONFIGURE_FLAGS. STAGE1_CONFIGURE_FLAGS = --disable-intermodule $(STAGE1_CHECKING) \ --disable-coverage --enable-languages="$(STAGE1_LANGUAGES)" @@ -483,6 +497,7 @@ LIPO_FOR_TARGET=@LIPO_FOR_TARGET@ NM_FOR_TARGET=@NM_FOR_TARGET@ OBJDUMP_FOR_TARGET=@OBJDUMP_FOR_TARGET@ RANLIB_FOR_TARGET=@RANLIB_FOR_TARGET@ +READELF_FOR_TARGET=@READELF_FOR_TARGET@ STRIP_FOR_TARGET=@STRIP_FOR_TARGET@ WINDRES_FOR_TARGET=@WINDRES_FOR_TARGET@ WINDMC_FOR_TARGET=@WINDMC_FOR_TARGET@ @@ -496,7 +511,7 @@ CXXFLAGS_FOR_TARGET = @CXXFLAGS_FOR_TARGET@ LIBCFLAGS_FOR_TARGET = $(CFLAGS_FOR_TARGET) LIBCXXFLAGS_FOR_TARGET = $(CXXFLAGS_FOR_TARGET) -fno-implicit-templates -LDFLAGS_FOR_TARGET = +LDFLAGS_FOR_TARGET = @LDFLAGS_FOR_TARGET@ GOCFLAGS_FOR_TARGET = -O2 -g FLAGS_FOR_TARGET = @FLAGS_FOR_TARGET@ @@ -602,24 +617,13 @@ EXTRA_HOST_FLAGS = \ 'NM=$(NM)' \ 'OBJDUMP=$(OBJDUMP)' \ 'RANLIB=$(RANLIB)' \ + 'READELF=$(READELF)' \ 'STRIP=$(STRIP)' \ 'WINDRES=$(WINDRES)' \ 'WINDMC=$(WINDMC)' FLAGS_TO_PASS = $(BASE_FLAGS_TO_PASS) $(EXTRA_HOST_FLAGS) -# Flags that are concerned with the location of the X11 include files -# and library files -# -# NOTE: until the top-level is getting the values via autoconf, it only -# causes problems to have this top-level Makefile overriding the autoconf-set -# values in child directories. Only variables that don't conflict with -# autoconf'ed ones should be passed by X11_FLAGS_TO_PASS for now. -# -X11_FLAGS_TO_PASS = \ - 'X11_EXTRA_CFLAGS=$(X11_EXTRA_CFLAGS)' \ - 'X11_EXTRA_LIBS=$(X11_EXTRA_LIBS)' - # Flags to pass to stage2 and later makes. POSTSTAGE1_FLAGS_TO_PASS = \ @@ -654,6 +658,7 @@ EXTRA_TARGET_FLAGS = \ 'NM=$(COMPILER_NM_FOR_TARGET)' \ 'OBJDUMP=$$(OBJDUMP_FOR_TARGET)' \ 'RANLIB=$$(RANLIB_FOR_TARGET)' \ + 'READELF=$$(READELF_FOR_TARGET)' \ 'WINDRES=$$(WINDRES_FOR_TARGET)' \ 'WINDMC=$$(WINDMC_FOR_TARGET)' \ 'XGCC_FLAGS_FOR_TARGET=$(XGCC_FLAGS_FOR_TARGET)' \ @@ -670,10 +675,7 @@ TARGET_FLAGS_TO_PASS = $(BASE_FLAGS_TO_PASS) $(EXTRA_TARGET_FLAGS) EXTRA_GCC_FLAGS = \ "GCC_FOR_TARGET=$(GCC_FOR_TARGET)" \ "`echo 'STMP_FIXPROTO=$(STMP_FIXPROTO)' | sed -e s'/[^=][^=]*=$$/XFOO=/'`" \ - "`echo 'LIMITS_H_TEST=$(LIMITS_H_TEST)' | sed -e s'/[^=][^=]*=$$/XFOO=/'`" \ - "`echo 'LIBGCC2_CFLAGS=$(LIBGCC2_CFLAGS)' | sed -e s'/[^=][^=]*=$$/XFOO=/'`" \ - "`echo 'LIBGCC2_DEBUG_CFLAGS=$(LIBGCC2_DEBUG_CFLAGS)' | sed -e s'/[^=][^=]*=$$/XFOO=/'`" \ - "`echo 'LIBGCC2_INCLUDES=$(LIBGCC2_INCLUDES)' | sed -e s'/[^=][^=]*=$$/XFOO=/'`" + "`echo 'LIMITS_H_TEST=$(LIMITS_H_TEST)' | sed -e s'/[^=][^=]*=$$/XFOO=/'`" GCC_FLAGS_TO_PASS = $(BASE_FLAGS_TO_PASS) $(EXTRA_HOST_FLAGS) $(EXTRA_GCC_FLAGS) @@ -904,11 +906,12 @@ install.all: install-no-fixedincludes true ; \ fi -# install-no-fixedincludes is used because Cygnus can not distribute -# the fixed header files. +# install-no-fixedincludes is used to allow the elaboration of binary packages +# suitable for distribution, where we cannot include the fixed system header +# files. .PHONY: install-no-fixedincludes install-no-fixedincludes: installdirs install-host-nogcc \ - install-target gcc-no-fixedincludes + install-target gcc-install-no-fixedincludes .PHONY: install-strip install-strip: @@ -1405,6 +1408,13 @@ ENDIF raw_cxx +] [+ ENDFOR recursive_targets +] [+ ENDFOR target_modules +] +@if target-libmudflap +.PHONY: check-target-libmudflap-c++ +check-target-libmudflap-c++: + $(MAKE) RUNTESTFLAGS="$(RUNTESTFLAGS) c++frags.exp" check-target-libmudflap + +@endif target-libmudflap + # ---------- # GCC module # ---------- @@ -1434,25 +1444,16 @@ check-gcc-[+language+]: check-[+language+]: check-gcc-[+language+][+ FOR lib-check-target +] [+ lib-check-target +][+ ENDFOR lib-check-target +] [+ ENDFOR languages +] -# Install the gcc headers files, but not the fixed include files, -# which Cygnus is not allowed to distribute. This rule is very -# dependent on the workings of the gcc Makefile.in. -.PHONY: gcc-no-fixedincludes -gcc-no-fixedincludes: +# The gcc part of install-no-fixedincludes, which relies on an intimate +# knowledge of how a number of gcc internal targets (inter)operate. Delegate. +.PHONY: gcc-install-no-fixedincludes +gcc-install-no-fixedincludes: @if [ -f ./gcc/Makefile ]; then \ - rm -rf gcc/tmp-include; \ - mv gcc/include gcc/tmp-include 2>/dev/null; \ - mkdir gcc/include; \ - cp $(srcdir)/gcc/gsyslimits.h gcc/include/syslimits.h; \ - touch gcc/stmp-fixinc gcc/include/fixed; \ - rm -f gcc/stmp-headers gcc/stmp-int-hdrs; \ r=`${PWD_COMMAND}`; export r; \ - s=`cd $(srcdir); ${PWD_COMMAND}` ; export s; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ $(HOST_EXPORTS) \ - (cd ./gcc && \ - $(MAKE) $(GCC_FLAGS_TO_PASS) install); \ - rm -rf gcc/include; \ - mv gcc/tmp-include gcc/include 2>/dev/null; \ + (cd ./gcc \ + && $(MAKE) $(GCC_FLAGS_TO_PASS) install-no-fixedincludes); \ else true; fi @endif gcc