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
HOST_LIBELFLIBS = @libelflibs@
HOST_LIBELFINC = @libelfinc@
+EXTRA_CONFIGARGS_LIBJAVA = @EXTRA_CONFIGARGS_LIBJAVA@
+
# ----------------------------------------------
# Programs producing files for the BUILD machine
# ----------------------------------------------
STAGE_CFLAGS = $(BOOT_CFLAGS)
STAGE_TFLAGS = $(TFLAGS)
STAGE_CONFIGURE_FLAGS=@stage2_werror_flag@
+POSTSTAGE1_CONFIGURE_FLAGS = @POSTSTAGE1_CONFIGURE_FLAGS@
# Defaults for stage 1; some are overridden below.
STAGE1_CXXFLAGS = $(STAGE1_CFLAGS)
@endif target-libstdc++-v3-bootstrap
STAGE1_TFLAGS = $(STAGE_TFLAGS)
-STAGE1_CONFIGURE_FLAGS = $(STAGE_CONFIGURE_FLAGS)
+# STAGE1_CONFIGURE_FLAGS overridden below, so we can use
+# POSTSTAGE1_CONFIGURE_FLAGS here.
+STAGE1_CONFIGURE_FLAGS = \
+ $(STAGE_CONFIGURE_FLAGS) $(POSTSTAGE1_CONFIGURE_FLAGS)
# Defaults for stage 2; some are overridden below.
STAGE2_CFLAGS = $(STAGE_CFLAGS)
STAGE2_CXXFLAGS = $(STAGE2_CFLAGS)
@endif target-libstdc++-v3-bootstrap
STAGE2_TFLAGS = $(STAGE_TFLAGS)
-STAGE2_CONFIGURE_FLAGS = $(STAGE_CONFIGURE_FLAGS)
+# STAGE1_CONFIGURE_FLAGS overridden below, so we can use
+# POSTSTAGE1_CONFIGURE_FLAGS here.
+STAGE2_CONFIGURE_FLAGS = \
+ $(STAGE_CONFIGURE_FLAGS) $(POSTSTAGE1_CONFIGURE_FLAGS)
# Defaults for stage 3; some are overridden below.
STAGE3_CFLAGS = $(STAGE_CFLAGS)
STAGE3_CXXFLAGS = $(STAGE3_CFLAGS)
@endif target-libstdc++-v3-bootstrap
STAGE3_TFLAGS = $(STAGE_TFLAGS)
-STAGE3_CONFIGURE_FLAGS = $(STAGE_CONFIGURE_FLAGS)
+# STAGE1_CONFIGURE_FLAGS overridden below, so we can use
+# POSTSTAGE1_CONFIGURE_FLAGS here.
+STAGE3_CONFIGURE_FLAGS = \
+ $(STAGE_CONFIGURE_FLAGS) $(POSTSTAGE1_CONFIGURE_FLAGS)
# Defaults for stage 4; some are overridden below.
STAGE4_CFLAGS = $(STAGE_CFLAGS)
STAGE4_CXXFLAGS = $(STAGE4_CFLAGS)
@endif target-libstdc++-v3-bootstrap
STAGE4_TFLAGS = $(STAGE_TFLAGS)
-STAGE4_CONFIGURE_FLAGS = $(STAGE_CONFIGURE_FLAGS)
+# STAGE1_CONFIGURE_FLAGS overridden below, so we can use
+# POSTSTAGE1_CONFIGURE_FLAGS here.
+STAGE4_CONFIGURE_FLAGS = \
+ $(STAGE_CONFIGURE_FLAGS) $(POSTSTAGE1_CONFIGURE_FLAGS)
# Defaults for stage profile; some are overridden below.
STAGEprofile_CFLAGS = $(STAGE_CFLAGS)
STAGEprofile_CXXFLAGS = $(STAGEprofile_CFLAGS)
@endif target-libstdc++-v3-bootstrap
STAGEprofile_TFLAGS = $(STAGE_TFLAGS)
-STAGEprofile_CONFIGURE_FLAGS = $(STAGE_CONFIGURE_FLAGS)
+# STAGE1_CONFIGURE_FLAGS overridden below, so we can use
+# POSTSTAGE1_CONFIGURE_FLAGS here.
+STAGEprofile_CONFIGURE_FLAGS = \
+ $(STAGE_CONFIGURE_FLAGS) $(POSTSTAGE1_CONFIGURE_FLAGS)
# Defaults for stage feedback; some are overridden below.
STAGEfeedback_CFLAGS = $(STAGE_CFLAGS)
STAGEfeedback_CXXFLAGS = $(STAGEfeedback_CFLAGS)
@endif target-libstdc++-v3-bootstrap
STAGEfeedback_TFLAGS = $(STAGE_TFLAGS)
-STAGEfeedback_CONFIGURE_FLAGS = $(STAGE_CONFIGURE_FLAGS)
+# STAGE1_CONFIGURE_FLAGS overridden below, so we can use
+# POSTSTAGE1_CONFIGURE_FLAGS here.
+STAGEfeedback_CONFIGURE_FLAGS = \
+ $(STAGE_CONFIGURE_FLAGS) $(POSTSTAGE1_CONFIGURE_FLAGS)
# Only build the C compiler for stage1, because that is the only one that
# 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_CONFIGURE_FLAGS, which
+# we don't want for STAGE1_CONFIGURE_FLAGS.
STAGE1_CONFIGURE_FLAGS = --disable-intermodule $(STAGE1_CHECKING) \
--disable-coverage --enable-languages="$(STAGE1_LANGUAGES)"
maybe-configure-target-libtermcap \
maybe-configure-target-winsup \
maybe-configure-target-libgloss \
- maybe-configure-target-libiberty \
maybe-configure-target-libffi \
maybe-configure-target-libjava \
maybe-configure-target-zlib \
all-target: maybe-all-target-libtermcap
all-target: maybe-all-target-winsup
all-target: maybe-all-target-libgloss
-all-target: maybe-all-target-libiberty
all-target: maybe-all-target-libffi
all-target: maybe-all-target-libjava
all-target: maybe-all-target-zlib
info-target: maybe-info-target-libtermcap
info-target: maybe-info-target-winsup
info-target: maybe-info-target-libgloss
-info-target: maybe-info-target-libiberty
info-target: maybe-info-target-libffi
info-target: maybe-info-target-libjava
info-target: maybe-info-target-zlib
dvi-target: maybe-dvi-target-libtermcap
dvi-target: maybe-dvi-target-winsup
dvi-target: maybe-dvi-target-libgloss
-dvi-target: maybe-dvi-target-libiberty
dvi-target: maybe-dvi-target-libffi
dvi-target: maybe-dvi-target-libjava
dvi-target: maybe-dvi-target-zlib
pdf-target: maybe-pdf-target-libtermcap
pdf-target: maybe-pdf-target-winsup
pdf-target: maybe-pdf-target-libgloss
-pdf-target: maybe-pdf-target-libiberty
pdf-target: maybe-pdf-target-libffi
pdf-target: maybe-pdf-target-libjava
pdf-target: maybe-pdf-target-zlib
html-target: maybe-html-target-libtermcap
html-target: maybe-html-target-winsup
html-target: maybe-html-target-libgloss
-html-target: maybe-html-target-libiberty
html-target: maybe-html-target-libffi
html-target: maybe-html-target-libjava
html-target: maybe-html-target-zlib
TAGS-target: maybe-TAGS-target-libtermcap
TAGS-target: maybe-TAGS-target-winsup
TAGS-target: maybe-TAGS-target-libgloss
-TAGS-target: maybe-TAGS-target-libiberty
TAGS-target: maybe-TAGS-target-libffi
TAGS-target: maybe-TAGS-target-libjava
TAGS-target: maybe-TAGS-target-zlib
install-info-target: maybe-install-info-target-libtermcap
install-info-target: maybe-install-info-target-winsup
install-info-target: maybe-install-info-target-libgloss
-install-info-target: maybe-install-info-target-libiberty
install-info-target: maybe-install-info-target-libffi
install-info-target: maybe-install-info-target-libjava
install-info-target: maybe-install-info-target-zlib
install-pdf-target: maybe-install-pdf-target-libtermcap
install-pdf-target: maybe-install-pdf-target-winsup
install-pdf-target: maybe-install-pdf-target-libgloss
-install-pdf-target: maybe-install-pdf-target-libiberty
install-pdf-target: maybe-install-pdf-target-libffi
install-pdf-target: maybe-install-pdf-target-libjava
install-pdf-target: maybe-install-pdf-target-zlib
install-html-target: maybe-install-html-target-libtermcap
install-html-target: maybe-install-html-target-winsup
install-html-target: maybe-install-html-target-libgloss
-install-html-target: maybe-install-html-target-libiberty
install-html-target: maybe-install-html-target-libffi
install-html-target: maybe-install-html-target-libjava
install-html-target: maybe-install-html-target-zlib
installcheck-target: maybe-installcheck-target-libtermcap
installcheck-target: maybe-installcheck-target-winsup
installcheck-target: maybe-installcheck-target-libgloss
-installcheck-target: maybe-installcheck-target-libiberty
installcheck-target: maybe-installcheck-target-libffi
installcheck-target: maybe-installcheck-target-libjava
installcheck-target: maybe-installcheck-target-zlib
mostlyclean-target: maybe-mostlyclean-target-libtermcap
mostlyclean-target: maybe-mostlyclean-target-winsup
mostlyclean-target: maybe-mostlyclean-target-libgloss
-mostlyclean-target: maybe-mostlyclean-target-libiberty
mostlyclean-target: maybe-mostlyclean-target-libffi
mostlyclean-target: maybe-mostlyclean-target-libjava
mostlyclean-target: maybe-mostlyclean-target-zlib
clean-target: maybe-clean-target-libtermcap
clean-target: maybe-clean-target-winsup
clean-target: maybe-clean-target-libgloss
-clean-target: maybe-clean-target-libiberty
clean-target: maybe-clean-target-libffi
clean-target: maybe-clean-target-libjava
clean-target: maybe-clean-target-zlib
distclean-target: maybe-distclean-target-libtermcap
distclean-target: maybe-distclean-target-winsup
distclean-target: maybe-distclean-target-libgloss
-distclean-target: maybe-distclean-target-libiberty
distclean-target: maybe-distclean-target-libffi
distclean-target: maybe-distclean-target-libjava
distclean-target: maybe-distclean-target-zlib
maintainer-clean-target: maybe-maintainer-clean-target-libtermcap
maintainer-clean-target: maybe-maintainer-clean-target-winsup
maintainer-clean-target: maybe-maintainer-clean-target-libgloss
-maintainer-clean-target: maybe-maintainer-clean-target-libiberty
maintainer-clean-target: maybe-maintainer-clean-target-libffi
maintainer-clean-target: maybe-maintainer-clean-target-libjava
maintainer-clean-target: maybe-maintainer-clean-target-zlib
maybe-check-target-libtermcap \
maybe-check-target-winsup \
maybe-check-target-libgloss \
- maybe-check-target-libiberty \
maybe-check-target-libffi \
maybe-check-target-libjava \
maybe-check-target-zlib \
maybe-install-target-libtermcap \
maybe-install-target-winsup \
maybe-install-target-libgloss \
- maybe-install-target-libiberty \
maybe-install-target-libffi \
maybe-install-target-libjava \
maybe-install-target-zlib \
maybe-install-strip-target-libtermcap \
maybe-install-strip-target-winsup \
maybe-install-strip-target-libgloss \
- maybe-install-strip-target-libiberty \
maybe-install-strip-target-libffi \
maybe-install-strip-target-libjava \
maybe-install-strip-target-zlib \
-.PHONY: configure-target-libiberty maybe-configure-target-libiberty
-maybe-configure-target-libiberty:
-@if gcc-bootstrap
-configure-target-libiberty: stage_current
-@endif gcc-bootstrap
-@if target-libiberty
-maybe-configure-target-libiberty: configure-target-libiberty
-configure-target-libiberty:
- @: $(MAKE); $(unstage)
- @r=`${PWD_COMMAND}`; export r; \
- s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- echo "Checking multilib configuration for libiberty..."; \
- $(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/libiberty ; \
- $(CC_FOR_TARGET) --print-multi-lib > $(TARGET_SUBDIR)/libiberty/multilib.tmp 2> /dev/null ; \
- if test -r $(TARGET_SUBDIR)/libiberty/multilib.out; then \
- if cmp -s $(TARGET_SUBDIR)/libiberty/multilib.tmp $(TARGET_SUBDIR)/libiberty/multilib.out; then \
- rm -f $(TARGET_SUBDIR)/libiberty/multilib.tmp; \
- else \
- rm -f $(TARGET_SUBDIR)/libiberty/Makefile; \
- mv $(TARGET_SUBDIR)/libiberty/multilib.tmp $(TARGET_SUBDIR)/libiberty/multilib.out; \
- fi; \
- else \
- mv $(TARGET_SUBDIR)/libiberty/multilib.tmp $(TARGET_SUBDIR)/libiberty/multilib.out; \
- fi; \
- test ! -f $(TARGET_SUBDIR)/libiberty/Makefile || exit 0; \
- $(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/libiberty ; \
- $(NORMAL_TARGET_EXPORTS) \
- echo Configuring in $(TARGET_SUBDIR)/libiberty; \
- cd "$(TARGET_SUBDIR)/libiberty" || exit 1; \
- case $(srcdir) in \
- /* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \
- *) topdir=`echo $(TARGET_SUBDIR)/libiberty/ | \
- sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
- esac; \
- srcdiroption="--srcdir=$${topdir}/libiberty"; \
- libsrcdir="$$s/libiberty"; \
- rm -f no-such-file || : ; \
- CONFIG_SITE=no-such-file $(SHELL) $${libsrcdir}/configure \
- $(TARGET_CONFIGARGS) --build=${build_alias} --host=${target_alias} \
- --target=${target_alias} $${srcdiroption} \
- || exit 1
-@endif target-libiberty
-
-
-
-
-
-.PHONY: all-target-libiberty maybe-all-target-libiberty
-maybe-all-target-libiberty:
-@if gcc-bootstrap
-all-target-libiberty: stage_current
-@endif gcc-bootstrap
-@if target-libiberty
-TARGET-target-libiberty=all
-maybe-all-target-libiberty: all-target-libiberty
-all-target-libiberty: configure-target-libiberty
- @: $(MAKE); $(unstage)
- @r=`${PWD_COMMAND}`; export r; \
- s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(NORMAL_TARGET_EXPORTS) \
- (cd $(TARGET_SUBDIR)/libiberty && \
- $(MAKE) $(BASE_FLAGS_TO_PASS) $(EXTRA_TARGET_FLAGS) \
- $(TARGET-target-libiberty))
-@endif target-libiberty
-
-
-
-
-
-.PHONY: check-target-libiberty maybe-check-target-libiberty
-maybe-check-target-libiberty:
-@if target-libiberty
-maybe-check-target-libiberty: check-target-libiberty
-
-check-target-libiberty:
- @: $(MAKE); $(unstage)
- @r=`${PWD_COMMAND}`; export r; \
- s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(NORMAL_TARGET_EXPORTS) \
- (cd $(TARGET_SUBDIR)/libiberty && \
- $(MAKE) $(TARGET_FLAGS_TO_PASS) check)
-
-@endif target-libiberty
-
-.PHONY: install-target-libiberty maybe-install-target-libiberty
-maybe-install-target-libiberty:
-@if target-libiberty
-maybe-install-target-libiberty: install-target-libiberty
-
-install-target-libiberty: installdirs
- @: $(MAKE); $(unstage)
- @r=`${PWD_COMMAND}`; export r; \
- s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(NORMAL_TARGET_EXPORTS) \
- (cd $(TARGET_SUBDIR)/libiberty && \
- $(MAKE) $(TARGET_FLAGS_TO_PASS) install)
-
-@endif target-libiberty
-
-.PHONY: install-strip-target-libiberty maybe-install-strip-target-libiberty
-maybe-install-strip-target-libiberty:
-@if target-libiberty
-maybe-install-strip-target-libiberty: install-strip-target-libiberty
-
-install-strip-target-libiberty: installdirs
- @: $(MAKE); $(unstage)
- @r=`${PWD_COMMAND}`; export r; \
- s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(NORMAL_TARGET_EXPORTS) \
- (cd $(TARGET_SUBDIR)/libiberty && \
- $(MAKE) $(TARGET_FLAGS_TO_PASS) install-strip)
-
-@endif target-libiberty
-
-# Other targets (info, dvi, pdf, etc.)
-
-.PHONY: maybe-info-target-libiberty info-target-libiberty
-maybe-info-target-libiberty:
-@if target-libiberty
-maybe-info-target-libiberty: info-target-libiberty
-
-info-target-libiberty: \
- configure-target-libiberty
- @: $(MAKE); $(unstage)
- @[ -f $(TARGET_SUBDIR)/libiberty/Makefile ] || exit 0 ; \
- r=`${PWD_COMMAND}`; export r; \
- s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(NORMAL_TARGET_EXPORTS) \
- echo "Doing info in $(TARGET_SUBDIR)/libiberty" ; \
- for flag in $(EXTRA_TARGET_FLAGS); do \
- eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
- done; \
- (cd $(TARGET_SUBDIR)/libiberty && \
- $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
- "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
- "RANLIB=$${RANLIB}" \
- "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
- info) \
- || exit 1
-
-@endif target-libiberty
-
-.PHONY: maybe-dvi-target-libiberty dvi-target-libiberty
-maybe-dvi-target-libiberty:
-@if target-libiberty
-maybe-dvi-target-libiberty: dvi-target-libiberty
-
-dvi-target-libiberty: \
- configure-target-libiberty
- @: $(MAKE); $(unstage)
- @[ -f $(TARGET_SUBDIR)/libiberty/Makefile ] || exit 0 ; \
- r=`${PWD_COMMAND}`; export r; \
- s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(NORMAL_TARGET_EXPORTS) \
- echo "Doing dvi in $(TARGET_SUBDIR)/libiberty" ; \
- for flag in $(EXTRA_TARGET_FLAGS); do \
- eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
- done; \
- (cd $(TARGET_SUBDIR)/libiberty && \
- $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
- "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
- "RANLIB=$${RANLIB}" \
- "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
- dvi) \
- || exit 1
-
-@endif target-libiberty
-
-.PHONY: maybe-pdf-target-libiberty pdf-target-libiberty
-maybe-pdf-target-libiberty:
-@if target-libiberty
-maybe-pdf-target-libiberty: pdf-target-libiberty
-
-pdf-target-libiberty: \
- configure-target-libiberty
- @: $(MAKE); $(unstage)
- @[ -f $(TARGET_SUBDIR)/libiberty/Makefile ] || exit 0 ; \
- r=`${PWD_COMMAND}`; export r; \
- s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(NORMAL_TARGET_EXPORTS) \
- echo "Doing pdf in $(TARGET_SUBDIR)/libiberty" ; \
- for flag in $(EXTRA_TARGET_FLAGS); do \
- eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
- done; \
- (cd $(TARGET_SUBDIR)/libiberty && \
- $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
- "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
- "RANLIB=$${RANLIB}" \
- "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
- pdf) \
- || exit 1
-
-@endif target-libiberty
-
-.PHONY: maybe-html-target-libiberty html-target-libiberty
-maybe-html-target-libiberty:
-@if target-libiberty
-maybe-html-target-libiberty: html-target-libiberty
-
-html-target-libiberty: \
- configure-target-libiberty
- @: $(MAKE); $(unstage)
- @[ -f $(TARGET_SUBDIR)/libiberty/Makefile ] || exit 0 ; \
- r=`${PWD_COMMAND}`; export r; \
- s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(NORMAL_TARGET_EXPORTS) \
- echo "Doing html in $(TARGET_SUBDIR)/libiberty" ; \
- for flag in $(EXTRA_TARGET_FLAGS); do \
- eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
- done; \
- (cd $(TARGET_SUBDIR)/libiberty && \
- $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
- "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
- "RANLIB=$${RANLIB}" \
- "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
- html) \
- || exit 1
-
-@endif target-libiberty
-
-.PHONY: maybe-TAGS-target-libiberty TAGS-target-libiberty
-maybe-TAGS-target-libiberty:
-@if target-libiberty
-maybe-TAGS-target-libiberty: TAGS-target-libiberty
-
-TAGS-target-libiberty: \
- configure-target-libiberty
- @: $(MAKE); $(unstage)
- @[ -f $(TARGET_SUBDIR)/libiberty/Makefile ] || exit 0 ; \
- r=`${PWD_COMMAND}`; export r; \
- s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(NORMAL_TARGET_EXPORTS) \
- echo "Doing TAGS in $(TARGET_SUBDIR)/libiberty" ; \
- for flag in $(EXTRA_TARGET_FLAGS); do \
- eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
- done; \
- (cd $(TARGET_SUBDIR)/libiberty && \
- $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
- "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
- "RANLIB=$${RANLIB}" \
- "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
- TAGS) \
- || exit 1
-
-@endif target-libiberty
-
-.PHONY: maybe-install-info-target-libiberty install-info-target-libiberty
-maybe-install-info-target-libiberty:
-@if target-libiberty
-maybe-install-info-target-libiberty: install-info-target-libiberty
-
-install-info-target-libiberty: \
- configure-target-libiberty \
- info-target-libiberty
- @: $(MAKE); $(unstage)
- @[ -f $(TARGET_SUBDIR)/libiberty/Makefile ] || exit 0 ; \
- r=`${PWD_COMMAND}`; export r; \
- s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(NORMAL_TARGET_EXPORTS) \
- echo "Doing install-info in $(TARGET_SUBDIR)/libiberty" ; \
- for flag in $(EXTRA_TARGET_FLAGS); do \
- eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
- done; \
- (cd $(TARGET_SUBDIR)/libiberty && \
- $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
- "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
- "RANLIB=$${RANLIB}" \
- "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
- install-info) \
- || exit 1
-
-@endif target-libiberty
-
-.PHONY: maybe-install-pdf-target-libiberty install-pdf-target-libiberty
-maybe-install-pdf-target-libiberty:
-@if target-libiberty
-maybe-install-pdf-target-libiberty: install-pdf-target-libiberty
-
-install-pdf-target-libiberty: \
- configure-target-libiberty \
- pdf-target-libiberty
- @: $(MAKE); $(unstage)
- @[ -f $(TARGET_SUBDIR)/libiberty/Makefile ] || exit 0 ; \
- r=`${PWD_COMMAND}`; export r; \
- s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(NORMAL_TARGET_EXPORTS) \
- echo "Doing install-pdf in $(TARGET_SUBDIR)/libiberty" ; \
- for flag in $(EXTRA_TARGET_FLAGS); do \
- eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
- done; \
- (cd $(TARGET_SUBDIR)/libiberty && \
- $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
- "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
- "RANLIB=$${RANLIB}" \
- "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
- install-pdf) \
- || exit 1
-
-@endif target-libiberty
-
-.PHONY: maybe-install-html-target-libiberty install-html-target-libiberty
-maybe-install-html-target-libiberty:
-@if target-libiberty
-maybe-install-html-target-libiberty: install-html-target-libiberty
-
-install-html-target-libiberty: \
- configure-target-libiberty \
- html-target-libiberty
- @: $(MAKE); $(unstage)
- @[ -f $(TARGET_SUBDIR)/libiberty/Makefile ] || exit 0 ; \
- r=`${PWD_COMMAND}`; export r; \
- s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(NORMAL_TARGET_EXPORTS) \
- echo "Doing install-html in $(TARGET_SUBDIR)/libiberty" ; \
- for flag in $(EXTRA_TARGET_FLAGS); do \
- eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
- done; \
- (cd $(TARGET_SUBDIR)/libiberty && \
- $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
- "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
- "RANLIB=$${RANLIB}" \
- "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
- install-html) \
- || exit 1
-
-@endif target-libiberty
-
-.PHONY: maybe-installcheck-target-libiberty installcheck-target-libiberty
-maybe-installcheck-target-libiberty:
-@if target-libiberty
-maybe-installcheck-target-libiberty: installcheck-target-libiberty
-
-installcheck-target-libiberty: \
- configure-target-libiberty
- @: $(MAKE); $(unstage)
- @[ -f $(TARGET_SUBDIR)/libiberty/Makefile ] || exit 0 ; \
- r=`${PWD_COMMAND}`; export r; \
- s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(NORMAL_TARGET_EXPORTS) \
- echo "Doing installcheck in $(TARGET_SUBDIR)/libiberty" ; \
- for flag in $(EXTRA_TARGET_FLAGS); do \
- eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
- done; \
- (cd $(TARGET_SUBDIR)/libiberty && \
- $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
- "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
- "RANLIB=$${RANLIB}" \
- "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
- installcheck) \
- || exit 1
-
-@endif target-libiberty
-
-.PHONY: maybe-mostlyclean-target-libiberty mostlyclean-target-libiberty
-maybe-mostlyclean-target-libiberty:
-@if target-libiberty
-maybe-mostlyclean-target-libiberty: mostlyclean-target-libiberty
-
-mostlyclean-target-libiberty:
- @: $(MAKE); $(unstage)
- @[ -f $(TARGET_SUBDIR)/libiberty/Makefile ] || exit 0 ; \
- r=`${PWD_COMMAND}`; export r; \
- s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(NORMAL_TARGET_EXPORTS) \
- echo "Doing mostlyclean in $(TARGET_SUBDIR)/libiberty" ; \
- for flag in $(EXTRA_TARGET_FLAGS); do \
- eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
- done; \
- (cd $(TARGET_SUBDIR)/libiberty && \
- $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
- "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
- "RANLIB=$${RANLIB}" \
- "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
- mostlyclean) \
- || exit 1
-
-@endif target-libiberty
-
-.PHONY: maybe-clean-target-libiberty clean-target-libiberty
-maybe-clean-target-libiberty:
-@if target-libiberty
-maybe-clean-target-libiberty: clean-target-libiberty
-
-clean-target-libiberty:
- @: $(MAKE); $(unstage)
- @[ -f $(TARGET_SUBDIR)/libiberty/Makefile ] || exit 0 ; \
- r=`${PWD_COMMAND}`; export r; \
- s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(NORMAL_TARGET_EXPORTS) \
- echo "Doing clean in $(TARGET_SUBDIR)/libiberty" ; \
- for flag in $(EXTRA_TARGET_FLAGS); do \
- eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
- done; \
- (cd $(TARGET_SUBDIR)/libiberty && \
- $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
- "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
- "RANLIB=$${RANLIB}" \
- "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
- clean) \
- || exit 1
-
-@endif target-libiberty
-
-.PHONY: maybe-distclean-target-libiberty distclean-target-libiberty
-maybe-distclean-target-libiberty:
-@if target-libiberty
-maybe-distclean-target-libiberty: distclean-target-libiberty
-
-distclean-target-libiberty:
- @: $(MAKE); $(unstage)
- @[ -f $(TARGET_SUBDIR)/libiberty/Makefile ] || exit 0 ; \
- r=`${PWD_COMMAND}`; export r; \
- s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(NORMAL_TARGET_EXPORTS) \
- echo "Doing distclean in $(TARGET_SUBDIR)/libiberty" ; \
- for flag in $(EXTRA_TARGET_FLAGS); do \
- eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
- done; \
- (cd $(TARGET_SUBDIR)/libiberty && \
- $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
- "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
- "RANLIB=$${RANLIB}" \
- "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
- distclean) \
- || exit 1
-
-@endif target-libiberty
-
-.PHONY: maybe-maintainer-clean-target-libiberty maintainer-clean-target-libiberty
-maybe-maintainer-clean-target-libiberty:
-@if target-libiberty
-maybe-maintainer-clean-target-libiberty: maintainer-clean-target-libiberty
-
-maintainer-clean-target-libiberty:
- @: $(MAKE); $(unstage)
- @[ -f $(TARGET_SUBDIR)/libiberty/Makefile ] || exit 0 ; \
- r=`${PWD_COMMAND}`; export r; \
- s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(NORMAL_TARGET_EXPORTS) \
- echo "Doing maintainer-clean in $(TARGET_SUBDIR)/libiberty" ; \
- for flag in $(EXTRA_TARGET_FLAGS); do \
- eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
- done; \
- (cd $(TARGET_SUBDIR)/libiberty && \
- $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
- "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
- "RANLIB=$${RANLIB}" \
- "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
- maintainer-clean) \
- || exit 1
-
-@endif target-libiberty
-
-
-
-
-
.PHONY: configure-target-libffi maybe-configure-target-libffi
maybe-configure-target-libffi:
@if gcc-bootstrap
rm -f no-such-file || : ; \
CONFIG_SITE=no-such-file $(SHELL) $${libsrcdir}/configure \
$(TARGET_CONFIGARGS) --build=${build_alias} --host=${target_alias} \
- --target=${target_alias} $${srcdiroption} \
+ --target=${target_alias} $${srcdiroption} $(EXTRA_CONFIGARGS_LIBJAVA) \
|| exit 1
@endif target-libjava
configure-target-libtermcap: stage_last
configure-target-winsup: stage_last
configure-target-libgloss: stage_last
-configure-target-libiberty: stage_last
configure-target-libffi: stage_last
configure-target-libjava: stage_last
configure-target-zlib: stage_last
configure-target-libtermcap: maybe-all-gcc
configure-target-winsup: maybe-all-gcc
configure-target-libgloss: maybe-all-gcc
-configure-target-libiberty: maybe-all-gcc
configure-target-libffi: maybe-all-gcc
configure-target-libjava: maybe-all-gcc
configure-target-zlib: maybe-all-gcc
configure-target-boehm-gc: maybe-all-target-libstdc++-v3
configure-target-fastjar: maybe-configure-target-zlib
all-target-fastjar: maybe-all-target-zlib
-all-target-fastjar: maybe-all-target-libiberty
configure-target-libgo: maybe-configure-target-libffi
configure-target-libgo: maybe-all-target-libstdc++-v3
all-target-libgo: maybe-all-target-libffi
all-target-libjava: maybe-all-target-boehm-gc
all-target-libjava: maybe-all-target-libffi
configure-target-libobjc: maybe-configure-target-boehm-gc
-all-target-libobjc: maybe-all-target-libiberty
all-target-libobjc: maybe-all-target-boehm-gc
-all-target-libstdc++-v3: maybe-all-target-libiberty
configure-target-libstdc++-v3: maybe-configure-target-libgomp
configure-stage1-target-libstdc++-v3: maybe-configure-stage1-target-libgomp
all-stageprofile-target-libstdc++-v3: maybe-configure-stageprofile-target-libgomp
all-stagefeedback-target-libstdc++-v3: maybe-configure-stagefeedback-target-libgomp
all-target-libgloss: maybe-all-target-newlib
-all-target-winsup: maybe-all-target-libiberty
all-target-winsup: maybe-all-target-libtermcap
-configure-target-libiberty: maybe-all-binutils
-configure-target-libiberty: maybe-all-ld
configure-target-newlib: maybe-all-binutils
configure-target-newlib: maybe-all-ld
configure-target-libgfortran: maybe-all-target-libquadmath
configure-target-libtermcap: maybe-all-target-libgcc
configure-target-winsup: maybe-all-target-libgcc
configure-target-libgloss: maybe-all-target-libgcc
-configure-target-libiberty: maybe-all-target-libgcc
configure-target-libffi: maybe-all-target-libgcc
configure-target-libjava: maybe-all-target-libgcc
configure-target-zlib: maybe-all-target-libgcc
configure-target-winsup: maybe-all-target-newlib maybe-all-target-libgloss
-
configure-target-libffi: maybe-all-target-newlib maybe-all-target-libgloss
configure-target-libjava: maybe-all-target-newlib maybe-all-target-libgloss
ac_subst_vars='LTLIBOBJS
LIBOBJS
compare_exclusions
+POSTSTAGE1_CONFIGURE_FLAGS
stage2_werror_flag
stage1_checking
stage1_cflags
LDFLAGS
CFLAGS
CC
+EXTRA_CONFIGARGS_LIBJAVA
target_subdir
host_subdir
build_subdir
enable_libquadmath_support
enable_libada
enable_libssp
+enable_static_libjava
+enable_bootstrap
enable_build_with_cxx
+enable_build_poststage1_with_cxx
with_mpc
with_mpc_include
with_mpc_lib
enable_objc_gc
with_build_sysroot
with_debug_prefix_map
-enable_bootstrap
with_build_config
enable_serial_configure
with_build_time_tools
disable libquadmath support for Fortran
--enable-libada build libada directory
--enable-libssp build libssp directory
+ --enable-static-libjava[=ARG]
+ build static libjava [default=no]
+ --enable-bootstrap enable bootstrapping [yes if native build]
--enable-build-with-cxx build with C++ compiler instead of C compiler
+ --enable-build-poststage1-with-cxx
+ build stages 2 and 3 with C++, not C
--disable-ppl-version-check
disable check for PPL version
--enable-cloog-backend[=BACKEND]
Mostly useful for compiler development
--enable-objc-gc enable use of Boehm's garbage collector with the GNU
Objective-C runtime
- --enable-bootstrap enable bootstrapping [yes if native build]
--enable-serial-[{host,target,build}-]configure
force sequential configuration of sub-packages for
the host, target or build machine, or all
# these libraries are built for the target environment, and are built after
# the host libraries and the host tools (which may be a cross compiler)
-#
+# Note that libiberty is not a target library.
target_libraries="target-libgcc \
- target-libiberty \
target-libgloss \
target-newlib \
target-libgomp \
;;
esac
+# Check whether --enable-static-libjava was given.
+if test "${enable_static_libjava+set}" = set; then :
+ enableval=$enable_static_libjava; ENABLE_STATIC_LIBJAVA=$enableval
+else
+ ENABLE_STATIC_LIBJAVA=no
+fi
+
+enable_static_libjava=
+if test "${ENABLE_STATIC_LIBJAVA}" = "yes" ; then
+ enable_static_libjava=yes
+fi
+
+if test x$enable_static_libjava != xyes ; then
+ EXTRA_CONFIGARGS_LIBJAVA=--disable-static
+fi
+
# Disable libmudflap on some systems.
if test x$enable_libmudflap = x ; then
;;
esac
-# Disable target libiberty for some systems.
-case "${target}" in
- *-*-kaos*)
- # Remove unsupported stuff on all kaOS configurations.
- skipdirs="target-libiberty"
- ;;
- *-*-netbsd*)
- # Skip some stuff on all NetBSD configurations.
- noconfigdirs="$noconfigdirs target-libiberty"
- ;;
- *-*-netware*)
- noconfigdirs="$noconfigdirs target-libiberty"
- ;;
- *-*-rtems*)
- skipdirs="${skipdirs} target-libiberty"
- ;;
- *-*-tpf*)
- noconfigdirs="$noconfigdirs target-libiberty"
- ;;
- *-*-vxworks*)
- noconfigdirs="$noconfigdirs target-libiberty"
- ;;
- sh*-*-pe|mips*-*-pe|*arm-wince-pe)
- noconfigdirs="$noconfigdirs target-libiberty"
- ;;
- arm*-*-symbianelf*)
- noconfigdirs="$noconfigdirs target-libiberty"
- ;;
- avr-*-*)
- noconfigdirs="$noconfigdirs target-libiberty"
- ;;
- m68hc11-*-*|m6811-*-*|m68hc12-*-*|m6812-*-*)
- noconfigdirs="$noconfigdirs target-libiberty"
- ;;
- picochip-*-*)
- noconfigdirs="$noconfigdirs target-libiberty"
- ;;
- mips*-sde-elf*)
- skipdirs="$skipdirs target-libiberty"
- ;;
- ip2k-*-*)
- noconfigdirs="$noconfigdirs target-libiberty"
- ;;
-esac
-
# Disable libstdc++-v3 for some systems.
case "${target}" in
*-*-vxworks*)
+# Check whether --enable-bootstrap was given.
+if test "${enable_bootstrap+set}" = set; then :
+ enableval=$enable_bootstrap;
+else
+ enable_bootstrap=default
+fi
+
+
+# Issue errors and warnings for invalid/strange bootstrap combinations.
+if test -r $srcdir/gcc/configure; then
+ have_compiler=yes
+else
+ have_compiler=no
+fi
+
+case "$have_compiler:$host:$target:$enable_bootstrap" in
+ *:*:*:no) ;;
+
+ # Default behavior. Enable bootstrap if we have a compiler
+ # and we are in a native configuration.
+ yes:$build:$build:default)
+ enable_bootstrap=yes ;;
+
+ *:*:*:default)
+ enable_bootstrap=no ;;
+
+ # We have a compiler and we are in a native configuration, bootstrap is ok
+ yes:$build:$build:yes)
+ ;;
+
+ # Other configurations, but we have a compiler. Assume the user knows
+ # what he's doing.
+ yes:*:*:yes)
+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: trying to bootstrap a cross compiler" >&5
+$as_echo "$as_me: WARNING: trying to bootstrap a cross compiler" >&2;}
+ ;;
+
+ # No compiler: if they passed --enable-bootstrap explicitly, fail
+ no:*:*:yes)
+ as_fn_error "cannot bootstrap without a compiler" "$LINENO" 5 ;;
+
+ # Fail if wrong command line
+ *)
+ as_fn_error "invalid option for --enable-bootstrap" "$LINENO" 5
+ ;;
+esac
+
# See if we are building gcc with C++.
# Check whether --enable-build-with-cxx was given.
if test "${enable_build_with_cxx+set}" = set; then :
fi
+# Build stage1 with C and build stages 2 and 3 with C++.
+# Check whether --enable-build-poststage1-with-cxx was given.
+if test "${enable_build_poststage1_with_cxx+set}" = set; then :
+ enableval=$enable_build_poststage1_with_cxx; ENABLE_BUILD_POSTSTAGE1_WITH_CXX=$enableval
+else
+ ENABLE_BUILD_POSTSTAGE1_WITH_CXX=yes
+fi
+
+
# Used for setting $lt_cv_objdir
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for objdir" >&5
$as_echo_n "checking for objdir... " >&6; }
;;
esac
+ # If bootstrapping, then using --enable-build-with-cxx or
+ # --enable-build-poststage1-with-cxx requires enabling C++.
+ case ",$enable_languages,:,$ENABLE_BUILD_WITH_CXX,$ENABLE_BUILD_POSTSTAGE1_WITH_CXX,:$enable_bootstrap" in
+ *,c++,*:*:*) ;;
+ *:*,yes,*:yes)
+ if test -f ${srcdir}/gcc/cp/config-lang.in; then
+ enable_languages="${enable_languages},c++"
+ else
+ as_fn_error "bootstrapping with --enable-build-with-cxx or --enable-build-poststage1-with-cxx requires c++ sources" "$LINENO" 5
+ fi
+ ;;
+ esac
+
# First scan to see if an enabled language requires some other language.
# We assume that a given config-lang.in will list all the language
# front ends it requires, even if some are required indirectly.
exit 1
fi
- if test "$language" = "c++" \
- && test "$ENABLE_BUILD_WITH_CXX" = "yes"; then
- boot_language=yes
+ if test "$language" = "c++"; then
+ if test "$ENABLE_BUILD_WITH_CXX" = "yes" \
+ || test "$ENABLE_BUILD_POSTSTAGE1_WITH_CXX" = "yes"; then
+ boot_language=yes
+ fi
fi
case ,${enable_languages}, in
fi
done
-# Sometimes the tools are distributed with libiberty but with no other
-# libraries. In that case, we don't want to build target-libiberty.
-# Don't let libgcc imply libiberty either.
-if test -n "${target_configdirs}" ; then
- libgcc=
- others=
- for i in `echo ${target_configdirs} | sed -e s/target-//g` ; do
- if test "$i" = "libgcc"; then
- libgcc=target-libgcc
- elif test "$i" != "libiberty" ; then
- if test -r $srcdir/$i/configure ; then
- others=yes;
- break;
- fi
- fi
- done
- if test -z "${others}" ; then
- target_configdirs=$libgcc
- fi
-fi
-
# Quietly strip out all directories which aren't configurable in this tree.
# This relies on all configurable subdirectories being autoconfiscated, which
# is now the case.
# 99 commands in a script, for HP-UX sed.
# Do not nest @if/@endif pairs, because configure will not warn you at all.
-# Check whether --enable-bootstrap was given.
-if test "${enable_bootstrap+set}" = set; then :
- enableval=$enable_bootstrap;
-else
- enable_bootstrap=default
-fi
-
-
-# Issue errors and warnings for invalid/strange bootstrap combinations.
-case "$configdirs" in
- *gcc*) have_compiler=yes ;;
- *) have_compiler=no ;;
-esac
-
-case "$have_compiler:$host:$target:$enable_bootstrap" in
- *:*:*:no) ;;
-
- # Default behavior. Enable bootstrap if we have a compiler
- # and we are in a native configuration.
- yes:$build:$build:default)
- enable_bootstrap=yes ;;
-
- *:*:*:default)
- enable_bootstrap=no ;;
-
- # We have a compiler and we are in a native configuration, bootstrap is ok
- yes:$build:$build:yes)
- ;;
-
- # Other configurations, but we have a compiler. Assume the user knows
- # what he's doing.
- yes:*:*:yes)
- { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: trying to bootstrap a cross compiler" >&5
-$as_echo "$as_me: WARNING: trying to bootstrap a cross compiler" >&2;}
- ;;
-
- # No compiler: if they passed --enable-bootstrap explicitly, fail
- no:*:*:yes)
- as_fn_error "cannot bootstrap without a compiler" "$LINENO" 5 ;;
-
- # Fail if wrong command line
- *)
- as_fn_error "invalid option for --enable-bootstrap" "$LINENO" 5
- ;;
-esac
-
-case ",$enable_languages,:$ENABLE_BUILD_WITH_CXX:$enable_bootstrap" in
- *,c++,*:yes:yes) ;;
- *:yes:yes)
- as_fn_error "bootstrapping with --enable-build-with-cxx requires c++ in --enable-languages" "$LINENO" 5
- ;;
-esac
-
case "$enable_bootstrap:$ENABLE_GOLD: $configdirs :,$stage1_languages," in
yes:yes:*\ gold\ *:*,c++,*) ;;
yes:yes:*\ gold\ *:*)
esac
+# If using ENABLE_BUILD_POSTSTAGE1_WITH_CXX, pass
+# --enable-build-with-cxx after stage1.
+if test "$ENABLE_BUILD_POSTSTAGE1_WITH_CXX" = "yes"; then
+ POSTSTAGE1_CONFIGURE_FLAGS=--enable-build-with-cxx
+else
+ POSTSTAGE1_CONFIGURE_FLAGS=
+fi
+
+
# Specify what files to not compare during bootstrap.
compare_exclusions="gcc/cc*-checksum\$(objext) | gcc/ada/*tools/*"
# these libraries are built for the target environment, and are built after
# the host libraries and the host tools (which may be a cross compiler)
-#
+# Note that libiberty is not a target library.
target_libraries="target-libgcc \
- target-libiberty \
target-libgloss \
target-newlib \
target-libgomp \
;;
esac
+AC_ARG_ENABLE(static-libjava,
+[AS_HELP_STRING([[--enable-static-libjava[=ARG]]],
+ [build static libjava @<:@default=no@:>@])],
+ENABLE_STATIC_LIBJAVA=$enableval,
+ENABLE_STATIC_LIBJAVA=no)
+enable_static_libjava=
+if test "${ENABLE_STATIC_LIBJAVA}" = "yes" ; then
+ enable_static_libjava=yes
+fi
+
+if test x$enable_static_libjava != xyes ; then
+ EXTRA_CONFIGARGS_LIBJAVA=--disable-static
+fi
+AC_SUBST(EXTRA_CONFIGARGS_LIBJAVA)
# Disable libmudflap on some systems.
if test x$enable_libmudflap = x ; then
;;
esac
-# Disable target libiberty for some systems.
-case "${target}" in
- *-*-kaos*)
- # Remove unsupported stuff on all kaOS configurations.
- skipdirs="target-libiberty"
- ;;
- *-*-netbsd*)
- # Skip some stuff on all NetBSD configurations.
- noconfigdirs="$noconfigdirs target-libiberty"
- ;;
- *-*-netware*)
- noconfigdirs="$noconfigdirs target-libiberty"
- ;;
- *-*-rtems*)
- skipdirs="${skipdirs} target-libiberty"
- ;;
- *-*-tpf*)
- noconfigdirs="$noconfigdirs target-libiberty"
- ;;
- *-*-vxworks*)
- noconfigdirs="$noconfigdirs target-libiberty"
- ;;
- sh*-*-pe|mips*-*-pe|*arm-wince-pe)
- noconfigdirs="$noconfigdirs target-libiberty"
- ;;
- arm*-*-symbianelf*)
- noconfigdirs="$noconfigdirs target-libiberty"
- ;;
- avr-*-*)
- noconfigdirs="$noconfigdirs target-libiberty"
- ;;
- m68hc11-*-*|m6811-*-*|m68hc12-*-*|m6812-*-*)
- noconfigdirs="$noconfigdirs target-libiberty"
- ;;
- picochip-*-*)
- noconfigdirs="$noconfigdirs target-libiberty"
- ;;
- mips*-sde-elf*)
- skipdirs="$skipdirs target-libiberty"
- ;;
- ip2k-*-*)
- noconfigdirs="$noconfigdirs target-libiberty"
- ;;
-esac
-
# Disable libstdc++-v3 for some systems.
case "${target}" in
*-*-vxworks*)
ACX_PROG_GNAT
ACX_PROG_CMP_IGNORE_INITIAL
+AC_ARG_ENABLE([bootstrap],
+[AS_HELP_STRING([--enable-bootstrap],
+ [enable bootstrapping @<:@yes if native build@:>@])],,
+enable_bootstrap=default)
+
+# Issue errors and warnings for invalid/strange bootstrap combinations.
+if test -r $srcdir/gcc/configure; then
+ have_compiler=yes
+else
+ have_compiler=no
+fi
+
+case "$have_compiler:$host:$target:$enable_bootstrap" in
+ *:*:*:no) ;;
+
+ # Default behavior. Enable bootstrap if we have a compiler
+ # and we are in a native configuration.
+ yes:$build:$build:default)
+ enable_bootstrap=yes ;;
+
+ *:*:*:default)
+ enable_bootstrap=no ;;
+
+ # We have a compiler and we are in a native configuration, bootstrap is ok
+ yes:$build:$build:yes)
+ ;;
+
+ # Other configurations, but we have a compiler. Assume the user knows
+ # what he's doing.
+ yes:*:*:yes)
+ AC_MSG_WARN([trying to bootstrap a cross compiler])
+ ;;
+
+ # No compiler: if they passed --enable-bootstrap explicitly, fail
+ no:*:*:yes)
+ AC_MSG_ERROR([cannot bootstrap without a compiler]) ;;
+
+ # Fail if wrong command line
+ *)
+ AC_MSG_ERROR([invalid option for --enable-bootstrap])
+ ;;
+esac
+
# See if we are building gcc with C++.
AC_ARG_ENABLE(build-with-cxx,
[AS_HELP_STRING([--enable-build-with-cxx],
ENABLE_BUILD_WITH_CXX=$enableval,
ENABLE_BUILD_WITH_CXX=no)
+# Build stage1 with C and build stages 2 and 3 with C++.
+AC_ARG_ENABLE(build-poststage1-with-cxx,
+[AS_HELP_STRING([--enable-build-poststage1-with-cxx],
+ [build stages 2 and 3 with C++, not C])],
+ENABLE_BUILD_POSTSTAGE1_WITH_CXX=$enableval,
+ENABLE_BUILD_POSTSTAGE1_WITH_CXX=yes)
+
# Used for setting $lt_cv_objdir
_LT_CHECK_OBJDIR
;;
esac
+ # If bootstrapping, then using --enable-build-with-cxx or
+ # --enable-build-poststage1-with-cxx requires enabling C++.
+ case ",$enable_languages,:,$ENABLE_BUILD_WITH_CXX,$ENABLE_BUILD_POSTSTAGE1_WITH_CXX,:$enable_bootstrap" in
+ *,c++,*:*:*) ;;
+ *:*,yes,*:yes)
+ if test -f ${srcdir}/gcc/cp/config-lang.in; then
+ enable_languages="${enable_languages},c++"
+ else
+ AC_MSG_ERROR([bootstrapping with --enable-build-with-cxx or --enable-build-poststage1-with-cxx requires c++ sources])
+ fi
+ ;;
+ esac
+
# First scan to see if an enabled language requires some other language.
# We assume that a given config-lang.in will list all the language
# front ends it requires, even if some are required indirectly.
exit 1
fi
- if test "$language" = "c++" \
- && test "$ENABLE_BUILD_WITH_CXX" = "yes"; then
- boot_language=yes
+ if test "$language" = "c++"; then
+ if test "$ENABLE_BUILD_WITH_CXX" = "yes" \
+ || test "$ENABLE_BUILD_POSTSTAGE1_WITH_CXX" = "yes"; then
+ boot_language=yes
+ fi
fi
case ,${enable_languages}, in
fi
done
-# Sometimes the tools are distributed with libiberty but with no other
-# libraries. In that case, we don't want to build target-libiberty.
-# Don't let libgcc imply libiberty either.
-if test -n "${target_configdirs}" ; then
- libgcc=
- others=
- for i in `echo ${target_configdirs} | sed -e s/target-//g` ; do
- if test "$i" = "libgcc"; then
- libgcc=target-libgcc
- elif test "$i" != "libiberty" ; then
- if test -r $srcdir/$i/configure ; then
- others=yes;
- break;
- fi
- fi
- done
- if test -z "${others}" ; then
- target_configdirs=$libgcc
- fi
-fi
-
# Quietly strip out all directories which aren't configurable in this tree.
# This relies on all configurable subdirectories being autoconfiscated, which
# is now the case.
# 99 commands in a script, for HP-UX sed.
# Do not nest @if/@endif pairs, because configure will not warn you at all.
-AC_ARG_ENABLE([bootstrap],
-[AS_HELP_STRING([--enable-bootstrap],
- [enable bootstrapping @<:@yes if native build@:>@])],,
-enable_bootstrap=default)
-
-# Issue errors and warnings for invalid/strange bootstrap combinations.
-case "$configdirs" in
- *gcc*) have_compiler=yes ;;
- *) have_compiler=no ;;
-esac
-
-case "$have_compiler:$host:$target:$enable_bootstrap" in
- *:*:*:no) ;;
-
- # Default behavior. Enable bootstrap if we have a compiler
- # and we are in a native configuration.
- yes:$build:$build:default)
- enable_bootstrap=yes ;;
-
- *:*:*:default)
- enable_bootstrap=no ;;
-
- # We have a compiler and we are in a native configuration, bootstrap is ok
- yes:$build:$build:yes)
- ;;
-
- # Other configurations, but we have a compiler. Assume the user knows
- # what he's doing.
- yes:*:*:yes)
- AC_MSG_WARN([trying to bootstrap a cross compiler])
- ;;
-
- # No compiler: if they passed --enable-bootstrap explicitly, fail
- no:*:*:yes)
- AC_MSG_ERROR([cannot bootstrap without a compiler]) ;;
-
- # Fail if wrong command line
- *)
- AC_MSG_ERROR([invalid option for --enable-bootstrap])
- ;;
-esac
-
-case ",$enable_languages,:$ENABLE_BUILD_WITH_CXX:$enable_bootstrap" in
- *,c++,*:yes:yes) ;;
- *:yes:yes)
- AC_MSG_ERROR([bootstrapping with --enable-build-with-cxx requires c++ in --enable-languages])
- ;;
-esac
-
case "$enable_bootstrap:$ENABLE_GOLD: $configdirs :,$stage1_languages," in
yes:yes:*\ gold\ *:*,c++,*) ;;
yes:yes:*\ gold\ *:*)
esac
AC_SUBST(stage2_werror_flag)
+# If using ENABLE_BUILD_POSTSTAGE1_WITH_CXX, pass
+# --enable-build-with-cxx after stage1.
+if test "$ENABLE_BUILD_POSTSTAGE1_WITH_CXX" = "yes"; then
+ POSTSTAGE1_CONFIGURE_FLAGS=--enable-build-with-cxx
+else
+ POSTSTAGE1_CONFIGURE_FLAGS=
+fi
+AC_SUBST(POSTSTAGE1_CONFIGURE_FLAGS)
+
# Specify what files to not compare during bootstrap.
compare_exclusions="gcc/cc*-checksum\$(objext) | gcc/ada/*tools/*"