Don't crash declaring a function named "_".
[gcc.git] / Makefile.in
index ecca6e657187ab32f41ac38a01f7bd116f6d4916..660f8132246059d04011fbfa8b697ba407e9869c 100644 (file)
@@ -3,7 +3,7 @@
 #
 # 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
@@ -195,6 +195,7 @@ HOST_EXPORTS = \
        CXXFLAGS="$(CXXFLAGS)"; export CXXFLAGS; \
        GCJ="$(GCJ)"; export GCJ; \
        GFORTRAN="$(GFORTRAN)"; export GFORTRAN; \
+       GOC="$(GOC)"; export GOC; \
        AR="$(AR)"; export AR; \
        AS="$(AS)"; export AS; \
        CC_FOR_BUILD="$(CC_FOR_BUILD)"; export CC_FOR_BUILD; \
@@ -342,6 +343,7 @@ CXX_FOR_BUILD = @CXX_FOR_BUILD@
 DLLTOOL_FOR_BUILD = @DLLTOOL_FOR_BUILD@
 GCJ_FOR_BUILD = @GCJ_FOR_BUILD@
 GFORTRAN_FOR_BUILD = @GFORTRAN_FOR_BUILD@
+GOC_FOR_BUILD = @GOC_FOR_BUILD@
 LDFLAGS_FOR_BUILD = @LDFLAGS_FOR_BUILD@
 LD_FOR_BUILD = @LD_FOR_BUILD@
 NM_FOR_BUILD = @NM_FOR_BUILD@
@@ -638,6 +640,26 @@ HOST_LIB_PATH_libelf = \
 @endif libelf
 
 
+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 = \
        "DESTDIR=$(DESTDIR)" \
@@ -705,7 +727,6 @@ BASE_FLAGS_TO_PASS = \
        "CC_FOR_TARGET=$(CC_FOR_TARGET)" \
        "CFLAGS_FOR_TARGET=$(CFLAGS_FOR_TARGET)" \
        "CPPFLAGS_FOR_TARGET=$(CPPFLAGS_FOR_TARGET)" \
-       "CXX_FOR_TARGET=$(CXX_FOR_TARGET)" \
        "CXXFLAGS_FOR_TARGET=$(CXXFLAGS_FOR_TARGET)" \
        "DLLTOOL_FOR_TARGET=$(DLLTOOL_FOR_TARGET)" \
        "FLAGS_FOR_TARGET=$(FLAGS_FOR_TARGET)" \
@@ -745,6 +766,7 @@ BASE_FLAGS_TO_PASS = \
        "STAGEfeedback_CFLAGS=$(STAGEfeedback_CFLAGS)" \
        "STAGEfeedback_CXXFLAGS=$(STAGEfeedback_CXXFLAGS)" \
        "STAGEfeedback_TFLAGS=$(STAGEfeedback_TFLAGS)" \
+       $(CXX_FOR_TARGET_FLAG_TO_PASS) \
        "TFLAGS=$(TFLAGS)" \
        "CONFIG_SHELL=$(SHELL)" \
        "MAKEINFO=$(MAKEINFO) $(MAKEINFOFLAGS)" 
@@ -762,6 +784,7 @@ EXTRA_HOST_FLAGS = \
        'DLLTOOL=$(DLLTOOL)' \
        'GCJ=$(GCJ)' \
        'GFORTRAN=$(GFORTRAN)' \
+       'GOC=$(GOC)' \
        'LD=$(LD)' \
        'LIPO=$(LIPO)' \
        'NM=$(NM)' \
@@ -810,7 +833,7 @@ EXTRA_TARGET_FLAGS = \
        'DLLTOOL=$$(DLLTOOL_FOR_TARGET)' \
        'GCJ=$$(GCJ_FOR_TARGET) $$(XGCC_FLAGS_FOR_TARGET) $$(TFLAGS)' \
        'GFORTRAN=$$(GFORTRAN_FOR_TARGET) $$(XGCC_FLAGS_FOR_TARGET) $$(TFLAGS)' \
-       'GOC=$$(GOC_FOR_TARGET)' \
+       'GOC=$$(GOC_FOR_TARGET) $$(XGCC_FLAGS_FOR_TARGET) $$(TFLAGS)' \
        'GOCFLAGS=$$(GOCFLAGS_FOR_TARGET)' \
        'LD=$(COMPILER_LD_FOR_TARGET)' \
        'LDFLAGS=$$(LDFLAGS_FOR_TARGET)' \
@@ -3167,6 +3190,7 @@ install-strip-target:  \
     maybe-install-strip-target-libquadmath \
     maybe-install-strip-target-libgfortran \
     maybe-install-strip-target-libobjc \
+    maybe-install-strip-target-libgo \
     maybe-install-strip-target-libtermcap \
     maybe-install-strip-target-winsup \
     maybe-install-strip-target-libgloss \
@@ -45224,7 +45248,7 @@ configure-lto-plugin:
        libsrcdir="$$s/lto-plugin"; \
        $(SHELL) $${libsrcdir}/configure \
          $(HOST_CONFIGARGS) --build=${build_alias} --host=${host_alias} \
-         --target=${target_alias} $${srcdiroption}  \
+         --target=${target_alias} $${srcdiroption} --enable-shared \
          || exit 1
 @endif lto-plugin
 
@@ -45258,7 +45282,8 @@ configure-stage1-lto-plugin:
        $(SHELL) $${libsrcdir}/configure \
          $(HOST_CONFIGARGS) --build=${build_alias} --host=${host_alias} \
          --target=${target_alias} $${srcdiroption} \
-         $(STAGE1_CONFIGURE_FLAGS)
+         $(STAGE1_CONFIGURE_FLAGS) \
+         --enable-shared
 @endif lto-plugin-bootstrap
 
 .PHONY: configure-stage2-lto-plugin maybe-configure-stage2-lto-plugin
@@ -45291,7 +45316,8 @@ configure-stage2-lto-plugin:
          $(HOST_CONFIGARGS) --build=${build_alias} --host=${host_alias} \
          --target=${target_alias} $${srcdiroption} \
          --with-build-libsubdir=$(HOST_SUBDIR) \
-         $(STAGE2_CONFIGURE_FLAGS)
+         $(STAGE2_CONFIGURE_FLAGS) \
+         --enable-shared
 @endif lto-plugin-bootstrap
 
 .PHONY: configure-stage3-lto-plugin maybe-configure-stage3-lto-plugin
@@ -45324,7 +45350,8 @@ configure-stage3-lto-plugin:
          $(HOST_CONFIGARGS) --build=${build_alias} --host=${host_alias} \
          --target=${target_alias} $${srcdiroption} \
          --with-build-libsubdir=$(HOST_SUBDIR) \
-         $(STAGE3_CONFIGURE_FLAGS)
+         $(STAGE3_CONFIGURE_FLAGS) \
+         --enable-shared
 @endif lto-plugin-bootstrap
 
 .PHONY: configure-stage4-lto-plugin maybe-configure-stage4-lto-plugin
@@ -45357,7 +45384,8 @@ configure-stage4-lto-plugin:
          $(HOST_CONFIGARGS) --build=${build_alias} --host=${host_alias} \
          --target=${target_alias} $${srcdiroption} \
          --with-build-libsubdir=$(HOST_SUBDIR) \
-         $(STAGE4_CONFIGURE_FLAGS)
+         $(STAGE4_CONFIGURE_FLAGS) \
+         --enable-shared
 @endif lto-plugin-bootstrap
 
 .PHONY: configure-stageprofile-lto-plugin maybe-configure-stageprofile-lto-plugin
@@ -45390,7 +45418,8 @@ configure-stageprofile-lto-plugin:
          $(HOST_CONFIGARGS) --build=${build_alias} --host=${host_alias} \
          --target=${target_alias} $${srcdiroption} \
          --with-build-libsubdir=$(HOST_SUBDIR) \
-         $(STAGEprofile_CONFIGURE_FLAGS)
+         $(STAGEprofile_CONFIGURE_FLAGS) \
+         --enable-shared
 @endif lto-plugin-bootstrap
 
 .PHONY: configure-stagefeedback-lto-plugin maybe-configure-stagefeedback-lto-plugin
@@ -45423,7 +45452,8 @@ configure-stagefeedback-lto-plugin:
          $(HOST_CONFIGARGS) --build=${build_alias} --host=${host_alias} \
          --target=${target_alias} $${srcdiroption} \
          --with-build-libsubdir=$(HOST_SUBDIR) \
-         $(STAGEfeedback_CONFIGURE_FLAGS)
+         $(STAGEfeedback_CONFIGURE_FLAGS) \
+         --enable-shared
 @endif lto-plugin-bootstrap
 
 
@@ -50890,6 +50920,21 @@ install-target-libgo: installdirs
 
 @endif target-libgo
 
+.PHONY: install-strip-target-libgo maybe-install-strip-target-libgo
+maybe-install-strip-target-libgo:
+@if target-libgo
+maybe-install-strip-target-libgo: install-strip-target-libgo
+
+install-strip-target-libgo: installdirs
+       @: $(MAKE); $(unstage)
+       @r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+       $(NORMAL_TARGET_EXPORTS) \
+       (cd $(TARGET_SUBDIR)/libgo && \
+         $(MAKE) $(TARGET_FLAGS_TO_PASS)  install-strip)
+
+@endif target-libgo
+
 # Other targets (info, dvi, pdf, etc.)
 
 .PHONY: maybe-info-target-libgo info-target-libgo
@@ -60221,6 +60266,14 @@ configure-stage3-gcc: maybe-configure-stage3-intl
 configure-stage4-gcc: maybe-configure-stage4-intl
 configure-stageprofile-gcc: maybe-configure-stageprofile-intl
 configure-stagefeedback-gcc: maybe-configure-stagefeedback-intl
+configure-gcc: maybe-all-lto-plugin
+
+configure-stage1-gcc: maybe-all-stage1-lto-plugin
+configure-stage2-gcc: maybe-all-stage2-lto-plugin
+configure-stage3-gcc: maybe-all-stage3-lto-plugin
+configure-stage4-gcc: maybe-all-stage4-lto-plugin
+configure-stageprofile-gcc: maybe-all-stageprofile-lto-plugin
+configure-stagefeedback-gcc: maybe-all-stagefeedback-lto-plugin
 configure-gcc: maybe-all-binutils
 
 configure-stage1-gcc: maybe-all-stage1-binutils
@@ -60398,6 +60451,14 @@ all-stage4-gcc: maybe-all-stage4-libiberty
 all-stageprofile-gcc: maybe-all-stageprofile-libiberty
 all-stagefeedback-gcc: maybe-all-stagefeedback-libiberty
 all-gcc: maybe-all-fixincludes
+all-gcc: maybe-all-lto-plugin
+
+all-stage1-gcc: maybe-all-stage1-lto-plugin
+all-stage2-gcc: maybe-all-stage2-lto-plugin
+all-stage3-gcc: maybe-all-stage3-lto-plugin
+all-stage4-gcc: maybe-all-stage4-lto-plugin
+all-stageprofile-gcc: maybe-all-stageprofile-lto-plugin
+all-stagefeedback-gcc: maybe-all-stagefeedback-lto-plugin
 info-gcc: maybe-all-build-libiberty
 
 info-stage1-gcc: maybe-all-build-libiberty
@@ -60431,6 +60492,7 @@ html-stage4-gcc: maybe-all-build-libiberty
 html-stageprofile-gcc: maybe-all-build-libiberty
 html-stagefeedback-gcc: maybe-all-build-libiberty
 install-gcc: maybe-install-fixincludes
+install-gcc: maybe-install-lto-plugin
 install-strip-gcc: maybe-install-strip-fixincludes
 configure-libcpp: configure-libiberty
 
@@ -60466,14 +60528,14 @@ all-stageprofile-libcpp: maybe-all-stageprofile-intl
 all-stagefeedback-libcpp: maybe-all-stagefeedback-intl
 all-fixincludes: maybe-all-libiberty
 all-gnattools: maybe-all-target-libada
-all-lto-plugin: maybe-all-gcc
-
-all-stage1-lto-plugin: maybe-all-stage1-gcc
-all-stage2-lto-plugin: maybe-all-stage2-gcc
-all-stage3-lto-plugin: maybe-all-stage3-gcc
-all-stage4-lto-plugin: maybe-all-stage4-gcc
-all-stageprofile-lto-plugin: maybe-all-stageprofile-gcc
-all-stagefeedback-lto-plugin: maybe-all-stagefeedback-gcc
+all-lto-plugin: maybe-all-libiberty
+
+all-stage1-lto-plugin: maybe-all-stage1-libiberty
+all-stage2-lto-plugin: maybe-all-stage2-libiberty
+all-stage3-lto-plugin: maybe-all-stage3-libiberty
+all-stage4-lto-plugin: maybe-all-stage4-libiberty
+all-stageprofile-lto-plugin: maybe-all-stageprofile-libiberty
+all-stagefeedback-lto-plugin: maybe-all-stagefeedback-libiberty
 configure-mpfr: maybe-all-gmp
 
 configure-stage1-mpfr: maybe-all-stage1-gmp