X-Git-Url: http://git.sourceforge.jp/view?p=pf3gnuchains%2Fgcc-fork.git;a=blobdiff_plain;f=Makefile.tpl;h=4dd23915bed8e172860b355ef871760d70b347a4;hp=37e7e09ae2b5540894886147f45acc9930a06e18;hb=11712a33c84450e2a47a3c3a736ce97308c1bbee;hpb=5ff5b630048221ef121f0b96f0cf56a4de32a96e diff --git a/Makefile.tpl b/Makefile.tpl index 37e7e09ae2b..4dd23915bed 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 # 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@ @@ -242,10 +240,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 @@ -321,11 +322,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 @@ -418,6 +421,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 +432,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 +453,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)" @@ -496,7 +506,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@ @@ -551,6 +561,26 @@ HOST_LIB_PATH_[+module+] = \ @endif [+module+] [+ ENDIF lib_path +][+ ENDFOR host_modules +] +CXX_FOR_TARGET_FLAG_TO_PASS = \ + "CXX_FOR_TARGET=$(CXX_FOR_TARGET)" +@if target-libstdc++-v3 +# CXX_FOR_TARGET is tricky to get right for target libs that require a +# functional C++ compiler. When we recurse, if we expand +# CXX_FOR_TARGET before configuring libstdc++-v3, we won't get +# libstdc++ include flags from the script. Instead, we get an +# -funconfigured-* word, so that we'll get errors if this invalid C++ +# command line is used for anything, but also so that we can use the +# word to decide whether or not to pass on this CXX_FOR_TARGET. If we +# don't pass it on, sub-make will use the default definition, that +# re-expands it at the time of use, so we'll get it right when we need +# it. One potential exception is the expansion of CXX_FOR_TARGET +# passed down as part of CXX within TARGET_FLAGS, but this wouldn't +# really work, for C++ host programs can't depend on the current-stage +# C++ target library. +CXX_FOR_TARGET_FLAG_TO_PASS = \ + $(shell if echo "$(CXX_FOR_TARGET)" | grep " -funconfigured-" > /dev/null; then :; else echo '"CXX_FOR_TARGET=$(CXX_FOR_TARGET)"'; fi) +@endif target-libstdc++-v3 + # Flags to pass down to all sub-makes. BASE_FLAGS_TO_PASS =[+ FOR flags_to_pass +][+ IF optional +] \ "`echo '[+flag+]=$([+flag+])' | sed -e s'/[^=][^=]*=$$/XFOO=/'`"[+ ELSE optional +] \ @@ -558,6 +588,7 @@ BASE_FLAGS_TO_PASS =[+ FOR flags_to_pass +][+ IF optional +] \ "STAGE[+id+]_CFLAGS=$(STAGE[+id+]_CFLAGS)" \ "STAGE[+id+]_CXXFLAGS=$(STAGE[+id+]_CXXFLAGS)" \ "STAGE[+id+]_TFLAGS=$(STAGE[+id+]_TFLAGS)"[+ ENDFOR bootstrap-stage +] \ + $(CXX_FOR_TARGET_FLAG_TO_PASS) \ "TFLAGS=$(TFLAGS)" \ "CONFIG_SHELL=$(SHELL)" \ "MAKEINFO=$(MAKEINFO) $(MAKEINFOFLAGS)" @@ -587,18 +618,6 @@ EXTRA_HOST_FLAGS = \ 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 = \ @@ -889,6 +908,26 @@ install.all: install-no-fixedincludes install-no-fixedincludes: installdirs install-host-nogcc \ install-target gcc-no-fixedincludes +.PHONY: install-strip +install-strip: + @: $(MAKE); $(unstage) + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(MAKE) $(RECURSE_FLAGS_TO_PASS) installdirs install-strip-host install-strip-target + +.PHONY: install-strip-host +install-strip-host: [+ + FOR host_modules +] \ + maybe-install-strip-[+module+][+ + ENDFOR host_modules +] + +.PHONY: install-strip-target +install-strip-target: [+ + FOR target_modules +] \ + maybe-install-strip-target-[+module+][+ + ENDFOR target_modules +] + + ### other supporting targets MAKEDIRS= \ @@ -1174,6 +1213,23 @@ install-[+module+]: installdirs [+ ENDIF no_install +] @endif [+module+] +.PHONY: install-strip-[+module+] maybe-install-strip-[+module+] +maybe-install-strip-[+module+]: +@if [+module+] +maybe-install-strip-[+module+]: install-strip-[+module+] +[+ IF no_install +] +install-strip-[+module+]: +[+ ELSE install +] +install-strip-[+module+]: installdirs + @: $(MAKE); $(unstage) + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(HOST_EXPORTS) \ + (cd $(HOST_SUBDIR)/[+module+] && \ + $(MAKE) $(FLAGS_TO_PASS) [+extra_make_flags+] install-strip) +[+ ENDIF no_install +] +@endif [+module+] + # Other targets (info, dvi, pdf, etc.) [+ FOR recursive_targets +] .PHONY: maybe-[+make_target+]-[+module+] [+make_target+]-[+module+] @@ -1286,6 +1342,28 @@ ENDIF raw_cxx +] [+ ENDIF no_install +] @endif target-[+module+] +.PHONY: install-strip-target-[+module+] maybe-install-strip-target-[+module+] +maybe-install-strip-target-[+module+]: +@if target-[+module+] +maybe-install-strip-target-[+module+]: install-strip-target-[+module+] +[+ IF no_install +] +# Dummy target for uninstallable. +install-strip-target-[+module+]: +[+ ELSE install +] +install-strip-target-[+module+]: installdirs + @: $(MAKE); $(unstage) + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \[+ +IF raw_cxx +] + $(RAW_CXX_TARGET_EXPORTS) \[+ +ELSE normal_cxx +] + $(NORMAL_TARGET_EXPORTS) \[+ +ENDIF raw_cxx +] + (cd $(TARGET_SUBDIR)/[+module+] && \ + $(MAKE) $(TARGET_FLAGS_TO_PASS) [+extra_make_flags+] install-strip) +[+ ENDIF no_install +] +@endif target-[+module+] + # Other targets (info, dvi, pdf, etc.) [+ FOR recursive_targets +] .PHONY: maybe-[+make_target+]-target-[+module+] [+make_target+]-target-[+module+] @@ -1325,6 +1403,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 # ----------