mirror of
git://gcc.gnu.org/git/gcc.git
synced 2025-04-16 07:50:27 +08:00
re PR bootstrap/25670 (build fail with 'make all-gcc')
2006-02-20 Paolo Bonzini <bonzini@gnu.org> PR bootstrap/25670 * Makefile.tpl ([+compare-target+]): Print explanation messages. * Makefile.def (ADAFLAGS, BOOT_ADAFLAGS, LANGUAGES): New flags_to_pass. * Makefile.tpl (BASE_FLAGS_TO_PASS): Support optional flags_to_pass. (EXTRA_GCC_FLAGS): Remove ADAFLAGS, BOOT_ADAFLAGS, LANGUAGES, BUILD_PREFIX, BUILD_PREFIX_1. * configure.in: (BUILD_PREFIX, BUILD_PREFIX_1): Don't substitute. * Makefile.def (bootstrap stage 1): Pass LIBCFLAGS too. * Makefile.tpl (POSTSTAGE1_FLAGS_TO_PASS): Override LIBCFLAGS too. * Makefile.tpl (configure-stage[+id+]-[+prefix+][+module+], all-stage[+id+]-[+prefix+][+module+], : Use $(current_stage) instead of `cat stage_current`. Always provide the `r' and `s' variables. (clean-stage[+id+]-[+prefix+][+module+]): Likewise, and make it into a single shell execution. (configure-[+prefix+][+module+], all-[+prefix+][+module+]): For bootstrapped modules, make the stage1 module if the build was not started yet, else build the current stage. (all-host, all-target): Omit bootstrapped modules (if bootstrapping). (all-build, all-host, all-target, [+make_target+]-host, [+make_target+]-target): Do not use \-continued lines. (target modules): Depend on stage_last, not all-gcc, if bootstrapping. (current_stage, restrap, stage_last): New. * Makefile.in: Regenerate. * configure: Regenerate. gcc: 2006-02-20 Paolo Bonzini <bonzini@gnu.org> PR bootstrap/25476 * Makefile.in (LDFLAGS): Define from autoconf substitution. * Makefile.in (BOOTSTRAPPING): New. (quickstrap): New definition if BOOTSTRAPPING=yes. * Makefile.in (CONFIG_LANGUAGES): Substitute all_selected_languages. * configure.ac: Substitute all_selected_languages with the languages that were configured. For all the other variables except lang_specs_files, include all the languages in the tree. * configure: Regenerate. * Makefile.in (stmp-fixinc): Copy includes from the prev-gcc directory, if there is one. Run the commands to run fixincludes in the same subshell. * doc/makefile.texi: Document new makefile targets from toplevel bootstrap. * doc/install.texi: Document exact conventions for searching target tools. Document --with-build-time-tools. Document toplevel bootstrap. Document something more about building an Ada cross-compiler. Don't list GNU Make requirements which affect all platforms. From-SVN: r111295
This commit is contained in:
parent
6a34c78895
commit
cc11cc9b0f
32
ChangeLog
32
ChangeLog
@ -1,3 +1,35 @@
|
||||
2006-02-20 Paolo Bonzini <bonzini@gnu.org>
|
||||
|
||||
PR bootstrap/25670
|
||||
|
||||
* Makefile.tpl ([+compare-target+]): Print explanation messages.
|
||||
|
||||
* Makefile.def (ADAFLAGS, BOOT_ADAFLAGS, LANGUAGES): New flags_to_pass.
|
||||
* Makefile.tpl (BASE_FLAGS_TO_PASS): Support optional flags_to_pass.
|
||||
(EXTRA_GCC_FLAGS): Remove ADAFLAGS, BOOT_ADAFLAGS, LANGUAGES,
|
||||
BUILD_PREFIX, BUILD_PREFIX_1.
|
||||
* configure.in: (BUILD_PREFIX, BUILD_PREFIX_1): Don't substitute.
|
||||
|
||||
* Makefile.def (bootstrap stage 1): Pass LIBCFLAGS too.
|
||||
* Makefile.tpl (POSTSTAGE1_FLAGS_TO_PASS): Override LIBCFLAGS too.
|
||||
|
||||
* Makefile.tpl (configure-stage[+id+]-[+prefix+][+module+],
|
||||
all-stage[+id+]-[+prefix+][+module+], : Use $(current_stage) instead
|
||||
of `cat stage_current`. Always provide the `r' and `s' variables.
|
||||
(clean-stage[+id+]-[+prefix+][+module+]): Likewise, and make it into
|
||||
a single shell execution.
|
||||
(configure-[+prefix+][+module+], all-[+prefix+][+module+]): For
|
||||
bootstrapped modules, make the stage1 module if the build was not
|
||||
started yet, else build the current stage.
|
||||
(all-host, all-target): Omit bootstrapped modules (if bootstrapping).
|
||||
(all-build, all-host, all-target, [+make_target+]-host,
|
||||
[+make_target+]-target): Do not use \-continued lines.
|
||||
(target modules): Depend on stage_last, not all-gcc, if bootstrapping.
|
||||
(current_stage, restrap, stage_last): New.
|
||||
|
||||
* Makefile.in: Regenerate.
|
||||
* configure: Regenerate.
|
||||
|
||||
2006-02-19 Bud Davis <jmdavis@link.com>
|
||||
|
||||
* MAINTAINERS (Write After Approval): Remove myself.
|
||||
|
@ -207,7 +207,9 @@ flags_to_pass = { flag= SHELL ; };
|
||||
flags_to_pass = { flag= YACC ; };
|
||||
|
||||
// Host tools
|
||||
flags_to_pass = { flag= ADAFLAGS ; optional=true ; };
|
||||
flags_to_pass = { flag= AR_FLAGS ; };
|
||||
flags_to_pass = { flag= BOOT_ADAFLAGS ; optional=true ; };
|
||||
flags_to_pass = { flag= BOOT_CFLAGS ; };
|
||||
flags_to_pass = { flag= BOOT_LDFLAGS ; };
|
||||
flags_to_pass = { flag= CFLAGS ; };
|
||||
@ -241,6 +243,7 @@ flags_to_pass = { flag= STRIP_FOR_TARGET ; };
|
||||
flags_to_pass = { flag= WINDRES_FOR_TARGET ; };
|
||||
|
||||
// Miscellaneous
|
||||
flags_to_pass = { flag= LANGUAGES ; optional=true ; };
|
||||
flags_to_pass = { flag= LEAN ; };
|
||||
|
||||
// Inter-module dependencies
|
||||
@ -461,7 +464,7 @@ bootstrap_stage = {
|
||||
id=1 ;
|
||||
stage_configure_flags='--disable-intermodule \
|
||||
--disable-coverage --enable-languages="$(STAGE1_LANGUAGES)"' ;
|
||||
stage_make_flags='CFLAGS="$(STAGE1_CFLAGS)"' ; };
|
||||
stage_make_flags='CFLAGS="$(STAGE1_CFLAGS)" LIBCFLAGS="$(STAGE1_CFLAGS)"' ; };
|
||||
bootstrap_stage = {
|
||||
id=2 ; prev=1 ;
|
||||
bootstrap_target=bootstrap2 ;
|
||||
|
3588
Makefile.in
3588
Makefile.in
File diff suppressed because it is too large
Load Diff
135
Makefile.tpl
135
Makefile.tpl
@ -389,8 +389,9 @@ HOST_LIB_PATH_[+module+] = \
|
||||
[+ ENDIF lib_path +][+ ENDFOR host_modules +]
|
||||
|
||||
# Flags to pass down to all sub-makes.
|
||||
BASE_FLAGS_TO_PASS = [+ FOR flags_to_pass +]\
|
||||
"[+flag+]=$([+flag+])" [+ ENDFOR flags_to_pass +]\
|
||||
BASE_FLAGS_TO_PASS =[+ FOR flags_to_pass +][+ IF optional +] \
|
||||
"`echo '[+flag+]=$([+flag+])' | sed -e s'/[^=][^=]*=$$/XFOO=/'`"[+ ELSE optional +] \
|
||||
"[+flag+]=$([+flag+])"[+ ENDIF optional+][+ ENDFOR flags_to_pass +] \
|
||||
"CONFIG_SHELL=$(SHELL)" \
|
||||
"MAKEINFO=$(MAKEINFO) $(MAKEINFOFLAGS)"
|
||||
|
||||
@ -457,16 +458,12 @@ TARGET_FLAGS_TO_PASS = $(BASE_FLAGS_TO_PASS) $(EXTRA_TARGET_FLAGS)
|
||||
# The BUILD_* variables are a special case, which are used for the gcc
|
||||
# cross-building scheme.
|
||||
EXTRA_GCC_FLAGS = \
|
||||
'BUILD_PREFIX=$(BUILD_PREFIX)' \
|
||||
'BUILD_PREFIX_1=$(BUILD_PREFIX_1)' \
|
||||
"GCC_FOR_TARGET=$(GCC_FOR_TARGET)" \
|
||||
"`echo 'LANGUAGES=$(LANGUAGES)' | sed -e s'/[^=][^=]*=$$/XFOO=/'`" \
|
||||
"`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 'BOOT_ADAFLAGS=$(BOOT_ADAFLAGS)' | sed -e s'/[^=][^=]*=$$/XFOO=/'`"
|
||||
"`echo 'LIBGCC2_INCLUDES=$(LIBGCC2_INCLUDES)' | sed -e s'/[^=][^=]*=$$/XFOO=/'`"
|
||||
|
||||
GCC_FLAGS_TO_PASS = $(BASE_FLAGS_TO_PASS) $(EXTRA_HOST_FLAGS) $(EXTRA_GCC_FLAGS)
|
||||
|
||||
@ -500,20 +497,20 @@ all:
|
||||
fi
|
||||
|
||||
.PHONY: all-build
|
||||
all-build: [+
|
||||
FOR build_modules +] \
|
||||
maybe-all-build-[+module+][+
|
||||
ENDFOR build_modules +]
|
||||
[+ FOR build_modules +]
|
||||
all-build: maybe-all-build-[+module+][+ ENDFOR build_modules +]
|
||||
|
||||
.PHONY: all-host
|
||||
all-host: [+
|
||||
FOR host_modules +] \
|
||||
maybe-all-[+module+][+
|
||||
ENDFOR host_modules +]
|
||||
[+ FOR host_modules +][+ IF bootstrap +]
|
||||
@if [+module+]-no-bootstrap[+ ENDIF bootstrap +]
|
||||
all-host: maybe-all-[+module+][+ IF bootstrap +]
|
||||
@endif [+module+]-no-bootstrap[+ ENDIF bootstrap +][+ ENDFOR host_modules +]
|
||||
|
||||
.PHONY: all-target
|
||||
all-target: [+
|
||||
FOR target_modules +] \
|
||||
maybe-all-target-[+module+][+
|
||||
ENDFOR target_modules +]
|
||||
[+ FOR target_modules +][+ IF bootstrap +]
|
||||
@if [+module+]-no-bootstrap[+ ENDIF bootstrap +]
|
||||
all-target: maybe-all-target-[+module+][+ IF bootstrap +]
|
||||
@endif [+module+]-no-bootstrap[+ ENDIF bootstrap +][+ ENDFOR target_modules +]
|
||||
|
||||
# Do a target for all the subdirectories. A ``make do-X'' will do a
|
||||
# ``make X'' in all subdirectories (because, in general, there is a
|
||||
@ -530,16 +527,12 @@ do-[+make_target+]:
|
||||
|
||||
|
||||
.PHONY: [+make_target+]-host
|
||||
[+make_target+]-host: [+
|
||||
FOR host_modules +] \
|
||||
maybe-[+make_target+]-[+module+][+
|
||||
ENDFOR host_modules +]
|
||||
[+ FOR host_modules +]
|
||||
[+make_target+]-host: maybe-[+make_target+]-[+module+][+ ENDFOR host_modules +]
|
||||
|
||||
.PHONY: [+make_target+]-target
|
||||
[+make_target+]-target: [+
|
||||
FOR target_modules +] \
|
||||
maybe-[+make_target+]-target-[+module+][+
|
||||
ENDFOR target_modules +]
|
||||
[+ FOR target_modules +]
|
||||
[+make_target+]-target: maybe-[+make_target+]-target-[+module+][+ ENDFOR target_modules +]
|
||||
[+ ENDFOR recursive_targets +]
|
||||
|
||||
# Here are the targets which correspond to the do-X targets.
|
||||
@ -729,13 +722,17 @@ TAGS: do-TAGS
|
||||
maybe-configure-[+prefix+][+module+]:
|
||||
@if [+prefix+][+module+]
|
||||
maybe-configure-[+prefix+][+module+]: configure-[+prefix+][+module+]
|
||||
configure-[+prefix+][+module+]:
|
||||
@[+ IF bootstrap +]test -f stage_last && exit 0; \
|
||||
[+ ELSE bootstrap +]: $(MAKE); $(unstage)
|
||||
@[+ ENDIF bootstrap +][+ IF check_multilibs
|
||||
+]r=`${PWD_COMMAND}`; export r; \
|
||||
configure-[+prefix+][+module+]: [+ IF bootstrap +]
|
||||
@endif [+prefix+][+module+]
|
||||
@if [+prefix+][+module+]-bootstrap
|
||||
@if test -f stage_last; then $(unstage); else $(MAKE) stage1-start; fi
|
||||
@endif [+prefix+][+module+]-bootstrap
|
||||
@if [+prefix+][+module+][+ ELSE bootstrap +]
|
||||
@: $(MAKE); $(unstage)[+ ENDIF bootstrap +]
|
||||
@r=`${PWD_COMMAND}`; export r; \
|
||||
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
|
||||
echo "Checking multilib configuration for [+module+]..."; \
|
||||
[+ IF check_multilibs
|
||||
+]echo "Checking multilib configuration for [+module+]..."; \
|
||||
$(SHELL) $(srcdir)/mkinstalldirs [+subdir+]/[+module+] ; \
|
||||
$(CC_FOR_TARGET) --print-multi-lib > [+subdir+]/[+module+]/multilib.tmp 2> /dev/null ; \
|
||||
if test -r [+subdir+]/[+module+]/multilib.out; then \
|
||||
@ -747,11 +744,9 @@ configure-[+prefix+][+module+]:
|
||||
fi; \
|
||||
else \
|
||||
mv [+subdir+]/[+module+]/multilib.tmp [+subdir+]/[+module+]/multilib.out; \
|
||||
fi
|
||||
@[+ ENDIF check_multilibs +]test ! -f [+subdir+]/[+module+]/Makefile || exit 0; \
|
||||
fi; \
|
||||
[+ ENDIF check_multilibs +]test ! -f [+subdir+]/[+module+]/Makefile || exit 0; \
|
||||
$(SHELL) $(srcdir)/mkinstalldirs [+subdir+]/[+module+] ; \
|
||||
r=`${PWD_COMMAND}`; export r; \
|
||||
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
|
||||
[+exports+] \
|
||||
echo Configuring in [+subdir+]/[+module+]; \
|
||||
cd "[+subdir+]/[+module+]" || exit 1; \
|
||||
@ -775,12 +770,12 @@ maybe-configure-stage[+id+]-[+prefix+][+module+]:
|
||||
@if [+prefix+][+module+]-bootstrap
|
||||
maybe-configure-stage[+id+]-[+prefix+][+module+]: configure-stage[+id+]-[+prefix+][+module+]
|
||||
configure-stage[+id+]-[+prefix+][+module+]:
|
||||
@[ `cat stage_current` = stage[+id+] ] || $(MAKE) stage[+id+]-start
|
||||
@[ $(current_stage) = stage[+id+] ] || $(MAKE) stage[+id+]-start
|
||||
@$(SHELL) $(srcdir)/mkinstalldirs [+subdir+]/[+module+]
|
||||
[+ IF check_multilibs
|
||||
+]@r=`${PWD_COMMAND}`; export r; \
|
||||
@r=`${PWD_COMMAND}`; export r; \
|
||||
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
|
||||
echo "Checking multilib configuration for [+module+]..."; \
|
||||
[+ IF check_multilibs
|
||||
+]echo "Checking multilib configuration for [+module+]..."; \
|
||||
$(CC_FOR_TARGET) --print-multi-lib > [+subdir+]/[+module+]/multilib.tmp 2> /dev/null ; \
|
||||
if test -r [+subdir+]/[+module+]/multilib.out; then \
|
||||
if cmp -s [+subdir+]/[+module+]/multilib.tmp [+subdir+]/[+module+]/multilib.out; then \
|
||||
@ -791,8 +786,8 @@ configure-stage[+id+]-[+prefix+][+module+]:
|
||||
fi; \
|
||||
else \
|
||||
mv [+subdir+]/[+module+]/multilib.tmp [+subdir+]/[+module+]/multilib.out; \
|
||||
fi
|
||||
@[+ ENDIF check_multilibs +]test ! -f [+subdir+]/[+module+]/Makefile || exit 0; \
|
||||
fi; \
|
||||
[+ ENDIF check_multilibs +]test ! -f [+subdir+]/[+module+]/Makefile || exit 0; \
|
||||
[+exports+][+ IF prev +] \
|
||||
[+poststage1_exports+][+ ENDIF prev +] \
|
||||
echo Configuring stage [+id+] in [+subdir+]/[+module+] ; \
|
||||
@ -820,10 +815,14 @@ maybe-all-[+prefix+][+module+]:
|
||||
TARGET-[+prefix+][+module+]=[+
|
||||
IF target +][+target+][+ ELSE +]all[+ ENDIF target +]
|
||||
maybe-all-[+prefix+][+module+]: all-[+prefix+][+module+]
|
||||
all-[+prefix+][+module+]: configure-[+prefix+][+module+]
|
||||
@[+ IF bootstrap +]test -f stage_last && exit 0; \
|
||||
[+ ELSE bootstrap +]: $(MAKE); $(unstage)
|
||||
@[+ ENDIF bootstrap +]r=`${PWD_COMMAND}`; export r; \
|
||||
all-[+prefix+][+module+]: configure-[+prefix+][+module+][+ IF bootstrap +]
|
||||
@endif [+prefix+][+module+]
|
||||
@if [+prefix+][+module+]-bootstrap
|
||||
@if test -f stage_last; then $(unstage); else $(MAKE) stage1-start; fi
|
||||
@endif [+prefix+][+module+]-bootstrap
|
||||
@if [+prefix+][+module+][+ ELSE bootstrap +]
|
||||
@: $(MAKE); $(unstage)[+ ENDIF bootstrap +]
|
||||
@r=`${PWD_COMMAND}`; export r; \
|
||||
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
|
||||
[+exports+] \
|
||||
(cd [+subdir+]/[+module+] && \
|
||||
@ -841,7 +840,7 @@ maybe-all-stage[+id+]-[+prefix+][+module+]: all-stage[+id+]-[+prefix+][+module+]
|
||||
all-stage[+id+]: all-stage[+id+]-[+prefix+][+module+]
|
||||
TARGET-stage[+id+]-[+prefix+][+module+] = $(TARGET-[+prefix+][+module+])
|
||||
all-stage[+id+]-[+prefix+][+module+]: configure-stage[+id+]-[+prefix+][+module+]
|
||||
@[ `cat stage_current` = stage[+id+] ] || $(MAKE) stage[+id+]-start
|
||||
@[ $(current_stage) = stage[+id+] ] || $(MAKE) stage[+id+]-start
|
||||
@r=`${PWD_COMMAND}`; export r; \
|
||||
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
|
||||
[+exports+][+ IF prev +] \
|
||||
@ -857,7 +856,7 @@ clean-stage[+id+]: clean-stage[+id+]-[+prefix+][+module+]
|
||||
clean-stage[+id+]-[+prefix+][+module+]:
|
||||
@[ -f [+subdir+]/[+module+]/Makefile ] || [ -f [+subdir+]/stage[+id+]-[+module+]/Makefile ] \
|
||||
|| exit 0 ; \
|
||||
[ `cat stage_current` = stage[+id+] ] || $(MAKE) stage[+id+]-start
|
||||
[ $(current_stage) = stage[+id+] ] || $(MAKE) stage[+id+]-start; \
|
||||
cd [+subdir+]/[+module+] && \
|
||||
$(MAKE) [+args+] [+ IF prev +] \
|
||||
[+poststage1_args+] [+ ENDIF prev +] \
|
||||
@ -1210,10 +1209,12 @@ gcc-no-fixedincludes:
|
||||
|
||||
unstage = :
|
||||
stage = :
|
||||
current_stage = ""
|
||||
|
||||
@if gcc-bootstrap
|
||||
unstage = [ -f stage_current ] || $(MAKE) `cat stage_last`-start
|
||||
stage = if [ -f stage_current ]; then $(MAKE) `cat stage_current`-end || exit 1; else :; fi
|
||||
current_stage = "`cat stage_current 2> /dev/null`"
|
||||
@endif gcc-bootstrap
|
||||
|
||||
.PHONY: unstage stage
|
||||
@ -1256,6 +1257,7 @@ POSTSTAGE1_FLAGS_TO_PASS = \
|
||||
CC="$${CC}" CC_FOR_BUILD="$${CC_FOR_BUILD}" \
|
||||
STAGE_PREFIX=$$r/prev-gcc/ \
|
||||
CFLAGS="$(BOOT_CFLAGS)" \
|
||||
LIBCFLAGS="$(BOOT_CFLAGS)" \
|
||||
LDFLAGS="$(BOOT_LDFLAGS)" \
|
||||
ADAC="\$$(CC)"
|
||||
|
||||
@ -1337,6 +1339,7 @@ do-clean: clean-stage[+id+]
|
||||
fi; \
|
||||
: $(MAKE); $(stage); \
|
||||
rm -f .bad_compare ; \
|
||||
echo Comparing stages [+prev+] and [+id+] ; \
|
||||
cd stage[+id+]-gcc; \
|
||||
files=`find . -name "*$(objext)" -print` ; \
|
||||
cd .. ; \
|
||||
@ -1357,7 +1360,7 @@ do-clean: clean-stage[+id+]
|
||||
cat .bad_compare; \
|
||||
exit 1; \
|
||||
else \
|
||||
true; \
|
||||
echo Comparison successful.; \
|
||||
fi ; \
|
||||
$(STAMP) [+compare-target+][+ IF prev +]
|
||||
if $(LEAN); then \
|
||||
@ -1420,19 +1423,39 @@ stagefeedback-start::
|
||||
|
||||
@if gcc-bootstrap
|
||||
do-distclean: distclean-stage1
|
||||
|
||||
# Provide a GCC build when we're building target libraries. This does
|
||||
# not work as a dependency, just as the minimum necessary to avoid errors.
|
||||
stage_last:
|
||||
$(MAKE) $(RECURSE_FLAGS_TO_PASS) stage1-bubble
|
||||
@endif gcc-bootstrap
|
||||
|
||||
.PHONY: restrap
|
||||
restrap:
|
||||
@: $(MAKE); $(stage)
|
||||
rm -rf stage1-$(TARGET_SUBDIR) [+ FOR bootstrap-stage +][+ IF prev
|
||||
+]stage[+id+] [+ ENDIF prev +][+ ENDFOR bootstrap-stage +]
|
||||
$(MAKE) $(RECURSE_FLAGS_TO_PASS) all
|
||||
|
||||
# --------------------------------------
|
||||
# Dependencies between different modules
|
||||
# --------------------------------------
|
||||
|
||||
# Generic dependencies for target modules on host stuff, especially gcc
|
||||
[+ FOR target_modules +][+ IF bootstrap +]
|
||||
@if gcc-bootstrap[+ FOR bootstrap_stage +]
|
||||
configure-stage[+id+]-target-[+module+]: maybe-all-stage[+id+]-gcc[+ ENDFOR +]
|
||||
@endif gcc-bootstrap[+ ENDIF bootstrap +]
|
||||
configure-target-[+module+]: maybe-all-gcc
|
||||
[+ ENDFOR target_modules +]
|
||||
@if gcc-bootstrap[+ FOR target_modules +][+ IF bootstrap
|
||||
+][+ FOR bootstrap_stage +]
|
||||
configure-stage[+id+]-target-[+module+]: maybe-all-stage[+id+]-gcc[+
|
||||
ENDFOR +][+ ELSE bootstrap +]
|
||||
configure-target-[+module+]: stage_last[+
|
||||
ENDIF bootstrap +][+ ENDFOR target_modules +]
|
||||
@endif gcc-bootstrap
|
||||
|
||||
@if gcc-no-bootstrap[+ FOR target_modules +][+ IF bootstrap
|
||||
+][+ ELSE +]
|
||||
configure-target-[+module+]: maybe-all-gcc[+
|
||||
ENDIF bootstrap +][+ ENDFOR target_modules +]
|
||||
@endif gcc-no-bootstrap
|
||||
|
||||
|
||||
[+ FOR lang_env_dependencies +]
|
||||
configure-target-[+module+]: maybe-all-target-newlib maybe-all-target-libgloss
|
||||
|
@ -1060,8 +1060,6 @@ if test "${build}" != "${host}" ; then
|
||||
CXX=${CXX-${host_alias}-c++}
|
||||
CXXFLAGS=${CXXFLAGS-"-g -O2"}
|
||||
CC_FOR_BUILD=${CC_FOR_BUILD-gcc}
|
||||
BUILD_PREFIX=${build_alias}-
|
||||
BUILD_PREFIX_1=${build_alias}-
|
||||
|
||||
else
|
||||
# Set reasonable default values for some tools even if not Canadian.
|
||||
@ -1073,9 +1071,6 @@ else
|
||||
# This is all going to change when we autoconfiscate...
|
||||
|
||||
CC_FOR_BUILD="\$(CC)"
|
||||
BUILD_PREFIX=
|
||||
BUILD_PREFIX_1=loser-
|
||||
|
||||
AC_PROG_CC
|
||||
|
||||
# We must set the default linker to the linker used by gcc for the correct
|
||||
@ -2160,8 +2155,6 @@ AC_SUBST_FILE(ospace_frag)
|
||||
|
||||
# Miscellanea: directories, flags, etc.
|
||||
AC_SUBST(RPATH_ENVVAR)
|
||||
AC_SUBST(BUILD_PREFIX)
|
||||
AC_SUBST(BUILD_PREFIX_1)
|
||||
AC_SUBST(tooldir)
|
||||
AC_SUBST(build_tooldir)
|
||||
AC_SUBST(CONFIGURE_GDB_TK)
|
||||
|
@ -1,3 +1,28 @@
|
||||
2006-02-20 Paolo Bonzini <bonzini@gnu.org>
|
||||
|
||||
PR bootstrap/25476
|
||||
|
||||
* Makefile.in (LDFLAGS): Define from autoconf substitution.
|
||||
|
||||
* Makefile.in (BOOTSTRAPPING): New.
|
||||
(quickstrap): New definition if BOOTSTRAPPING=yes.
|
||||
|
||||
* Makefile.in (CONFIG_LANGUAGES): Substitute all_selected_languages.
|
||||
* configure.ac: Substitute all_selected_languages with the languages
|
||||
that were configured. For all the other variables except
|
||||
lang_specs_files, include all the languages in the tree.
|
||||
* configure: Regenerate.
|
||||
|
||||
* Makefile.in (stmp-fixinc): Copy includes from the prev-gcc directory,
|
||||
if there is one. Run the commands to run fixincludes in the same
|
||||
subshell.
|
||||
|
||||
* doc/makefile.texi: Document new makefile targets from toplevel bootstrap.
|
||||
* doc/install.texi: Document exact conventions for searching target tools.
|
||||
Document --with-build-time-tools. Document toplevel bootstrap. Document
|
||||
something more about building an Ada cross-compiler. Don't list GNU Make
|
||||
requirements which affect all platforms.
|
||||
|
||||
2006-02-19 Roger Sayle <roger@eyesopen.com>
|
||||
|
||||
PR middle-end/19543
|
||||
|
@ -130,7 +130,7 @@ T_ADAFLAGS =
|
||||
SUBDIRS =@subdirs@ build
|
||||
|
||||
# Selection of languages to be made.
|
||||
CONFIG_LANGUAGES = @all_languages@
|
||||
CONFIG_LANGUAGES = @all_selected_languages@
|
||||
LANGUAGES = c gcov$(exeext) gcov-dump$(exeext) $(CONFIG_LANGUAGES)
|
||||
|
||||
# Selection of languages to be made during stage1 build.
|
||||
@ -150,6 +150,7 @@ BOOT_LANGUAGES = c @all_boot_languages@
|
||||
XCFLAGS =
|
||||
TCFLAGS =
|
||||
CFLAGS = -g
|
||||
LDFLAGS = @LDFLAGS@
|
||||
STAGE1_CFLAGS = -g @stage1_cflags@
|
||||
STAGE1_CHECKING = -DENABLE_CHECKING -DENABLE_ASSERT_CHECKING
|
||||
BOOT_CFLAGS = -g -O2
|
||||
@ -3193,17 +3194,23 @@ stmp-fixinc: gsyslimits.h macro_list \
|
||||
fi
|
||||
rm -rf include; mkdir include
|
||||
-chmod a+rx include
|
||||
(TARGET_MACHINE='$(target)'; srcdir=`cd $(srcdir); ${PWD_COMMAND}`; \
|
||||
SHELL='$(SHELL)'; MACRO_LIST=`${PWD_COMMAND}`/macro_list ; \
|
||||
export TARGET_MACHINE srcdir SHELL MACRO_LIST && \
|
||||
cd $(build_objdir)/fixincludes && \
|
||||
$(SHELL) ./fixinc.sh ../../gcc/include \
|
||||
$(SYSTEM_HEADER_DIR) $(OTHER_FIXINCLUDES_DIRS) )
|
||||
rm -f include/syslimits.h
|
||||
if [ -f include/limits.h ]; then \
|
||||
mv include/limits.h include/syslimits.h; \
|
||||
if [ -d ../prev-gcc ]; then \
|
||||
cd ../prev-gcc && \
|
||||
$(MAKE) $(INSTALL_HEADERS_DIR) DESTDIR=`pwd`/../gcc/ \
|
||||
libsubdir=. ; \
|
||||
else \
|
||||
cp $(srcdir)/gsyslimits.h include/syslimits.h; \
|
||||
(TARGET_MACHINE='$(target)'; srcdir=`cd $(srcdir); ${PWD_COMMAND}`; \
|
||||
SHELL='$(SHELL)'; MACRO_LIST=`${PWD_COMMAND}`/macro_list ; \
|
||||
export TARGET_MACHINE srcdir SHELL MACRO_LIST && \
|
||||
cd $(build_objdir)/fixincludes && \
|
||||
$(SHELL) ./fixinc.sh ../../gcc/include \
|
||||
$(SYSTEM_HEADER_DIR) $(OTHER_FIXINCLUDES_DIRS) ); \
|
||||
rm -f include/syslimits.h; \
|
||||
if [ -f include/limits.h ]; then \
|
||||
mv include/limits.h include/syslimits.h; \
|
||||
else \
|
||||
cp $(srcdir)/gsyslimits.h include/syslimits.h; \
|
||||
fi; \
|
||||
fi
|
||||
chmod a+r include/syslimits.h
|
||||
$(STAMP) stmp-fixinc
|
||||
@ -4239,12 +4246,19 @@ bubblestrap:
|
||||
$(MAKE) $(REMAKEFLAGS) stage4_build || exit 1; \
|
||||
fi
|
||||
|
||||
BOOTSTRAPPING := $(shell if test -f ../stage_last; then echo yes; else echo no; fi)
|
||||
ifeq ($(BOOTSTRAPPING),yes)
|
||||
# Provide quickstrap as a target that people can type into the gcc directory,
|
||||
# and that fails if you're not into it.
|
||||
quickstrap: all
|
||||
else
|
||||
quickstrap:
|
||||
if test -f stage_last ; then \
|
||||
LAST=`cat stage_last`; rm $$LAST; $(MAKE) $(REMAKEFLAGS) $$LAST; \
|
||||
else \
|
||||
$(MAKE) $(REMAKEFLAGS) stage1_build; \
|
||||
fi
|
||||
endif
|
||||
|
||||
cleanstrap:
|
||||
-$(MAKE) clean
|
||||
|
155
gcc/configure
vendored
155
gcc/configure
vendored
@ -309,7 +309,7 @@ ac_includes_default="\
|
||||
# include <unistd.h>
|
||||
#endif"
|
||||
|
||||
ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS build build_cpu build_vendor build_os host host_cpu host_vendor host_os target target_cpu target_vendor target_os target_noncanonical build_subdir host_subdir target_subdir GENINSRC CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT NO_MINUS_C_MINUS_O OUTPUT_OPTION CPP EGREP strict1_warn cxx_compat_warn warn_cflags WERROR nocommon_flag TREEBROWSER valgrind_path valgrind_path_defines valgrind_command coverage_flags enable_multilib enable_decimal_float enable_shared TARGET_SYSTEM_ROOT TARGET_SYSTEM_ROOT_DEFINE CROSS_SYSTEM_HEADER_DIR onestep SET_MAKE AWK LN_S LN RANLIB ac_ct_RANLIB ranlib_flags INSTALL INSTALL_PROGRAM INSTALL_DATA make_compare_target have_mktemp_command MAKEINFO BUILD_INFO GENERATED_MANPAGES FLEX BISON NM AR stage1_cflags COLLECT2_LIBS GNAT_LIBEXC LDEXP_LIB TARGET_GETGROUPS_T LIBICONV LTLIBICONV LIBICONV_DEP manext objext gthread_flags extra_modes_file extra_opt_files USE_NLS LIBINTL LIBINTL_DEP INCINTL XGETTEXT GMSGFMT POSUB CATALOGS host_cc_for_libada CROSS ALL SYSTEM_HEADER_DIR inhibit_libc CC_FOR_BUILD BUILD_CFLAGS STMP_FIXINC STMP_FIXPROTO collect2 gcc_cv_as ORIGINAL_AS_FOR_TARGET gcc_cv_ld ORIGINAL_LD_FOR_TARGET gcc_cv_nm ORIGINAL_NM_FOR_TARGET gcc_cv_objdump libgcc_visibility GGC zlibdir zlibinc MAINT gcc_tooldir dollar slibdir objdir subdirs srcdir all_boot_languages all_compilers all_gtfiles all_gtfiles_files_langs all_gtfiles_files_files all_lang_makefrags all_lang_makefiles all_languages all_stagestuff build_exeext build_install_headers_dir build_xm_file_list build_xm_include_list build_xm_defines check_languages cc_set_by_configure quoted_cc_set_by_configure cpp_install_dir xmake_file tmake_file extra_gcc_objs extra_headers_list extra_objs extra_parts extra_passes extra_programs float_h_file gcc_config_arguments gcc_gxx_include_dir libstdcxx_incdir host_exeext host_xm_file_list host_xm_include_list host_xm_defines out_host_hook_obj install lang_opt_files lang_specs_files lang_tree_files local_prefix md_file objc_boehm_gc out_file out_object_file stage_prefix_set_by_configure quoted_stage_prefix_set_by_configure thread_file tm_file_list tm_include_list tm_defines tm_p_file_list tm_p_include_list xm_file_list xm_include_list xm_defines c_target_objs cxx_target_objs target_cpu_default GMPLIBS GMPINC LIBOBJS LTLIBOBJS'
|
||||
ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS build build_cpu build_vendor build_os host host_cpu host_vendor host_os target target_cpu target_vendor target_os target_noncanonical build_subdir host_subdir target_subdir GENINSRC CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT NO_MINUS_C_MINUS_O OUTPUT_OPTION CPP EGREP strict1_warn cxx_compat_warn warn_cflags WERROR nocommon_flag TREEBROWSER valgrind_path valgrind_path_defines valgrind_command coverage_flags enable_multilib enable_decimal_float enable_shared TARGET_SYSTEM_ROOT TARGET_SYSTEM_ROOT_DEFINE CROSS_SYSTEM_HEADER_DIR onestep SET_MAKE AWK LN_S LN RANLIB ac_ct_RANLIB ranlib_flags INSTALL INSTALL_PROGRAM INSTALL_DATA make_compare_target have_mktemp_command MAKEINFO BUILD_INFO GENERATED_MANPAGES FLEX BISON NM AR stage1_cflags COLLECT2_LIBS GNAT_LIBEXC LDEXP_LIB TARGET_GETGROUPS_T LIBICONV LTLIBICONV LIBICONV_DEP manext objext gthread_flags extra_modes_file extra_opt_files USE_NLS LIBINTL LIBINTL_DEP INCINTL XGETTEXT GMSGFMT POSUB CATALOGS host_cc_for_libada CROSS ALL SYSTEM_HEADER_DIR inhibit_libc CC_FOR_BUILD BUILD_CFLAGS STMP_FIXINC STMP_FIXPROTO collect2 gcc_cv_as ORIGINAL_AS_FOR_TARGET gcc_cv_ld ORIGINAL_LD_FOR_TARGET gcc_cv_nm ORIGINAL_NM_FOR_TARGET gcc_cv_objdump libgcc_visibility GGC zlibdir zlibinc MAINT gcc_tooldir dollar slibdir objdir subdirs srcdir all_boot_languages all_compilers all_gtfiles all_gtfiles_files_langs all_gtfiles_files_files all_lang_makefrags all_lang_makefiles all_languages all_selected_languages all_stagestuff build_exeext build_install_headers_dir build_xm_file_list build_xm_include_list build_xm_defines check_languages cc_set_by_configure quoted_cc_set_by_configure cpp_install_dir xmake_file tmake_file extra_gcc_objs extra_headers_list extra_objs extra_parts extra_passes extra_programs float_h_file gcc_config_arguments gcc_gxx_include_dir libstdcxx_incdir host_exeext host_xm_file_list host_xm_include_list host_xm_defines out_host_hook_obj install lang_opt_files lang_specs_files lang_tree_files local_prefix md_file objc_boehm_gc out_file out_object_file stage_prefix_set_by_configure quoted_stage_prefix_set_by_configure thread_file tm_file_list tm_include_list tm_defines tm_p_file_list tm_p_include_list xm_file_list xm_include_list xm_defines c_target_objs cxx_target_objs target_cpu_default GMPLIBS GMPINC LIBOBJS LTLIBOBJS'
|
||||
ac_subst_files='language_hooks'
|
||||
|
||||
# Initialize some variables set by options.
|
||||
@ -7184,28 +7184,6 @@ else
|
||||
enable_languages=c
|
||||
fi;
|
||||
|
||||
subdirs=
|
||||
for lang in ${srcdir}/*/config-lang.in
|
||||
do
|
||||
case $lang in
|
||||
# The odd quoting in the next line works around
|
||||
# an apparent bug in bash 1.12 on linux.
|
||||
${srcdir}/[*]/config-lang.in) ;;
|
||||
*)
|
||||
lang_alias=`sed -n -e 's,^language=['"'"'"'"]\(.*\)["'"'"'"'].*$,\1,p' -e 's,^language=\([^ ]*\).*$,\1,p' $lang`
|
||||
if test "x$lang_alias" = x
|
||||
then
|
||||
echo "$lang doesn't set \$language." 1>&2
|
||||
exit 1
|
||||
fi
|
||||
case ",$enable_languages," in
|
||||
*,$lang_alias,*)
|
||||
subdirs="$subdirs `echo $lang | sed -e 's,^.*/\([^/]*\)/config-lang.in$,\1,'`" ;;
|
||||
esac
|
||||
;;
|
||||
esac
|
||||
done
|
||||
|
||||
|
||||
# -------------------------
|
||||
# Checks for other programs
|
||||
@ -7634,7 +7612,7 @@ if test "${gcc_cv_prog_makeinfo_modern+set}" = set; then
|
||||
else
|
||||
ac_prog_version=`$MAKEINFO --version 2>&1 |
|
||||
sed -n 's/^.*GNU texinfo.* \([0-9][0-9.]*\).*$/\1/p'`
|
||||
echo "configure:7637: version of makeinfo is $ac_prog_version" >&5
|
||||
echo "configure:7615: version of makeinfo is $ac_prog_version" >&5
|
||||
case $ac_prog_version in
|
||||
'') gcc_cv_prog_makeinfo_modern=no;;
|
||||
4.[4-9]*)
|
||||
@ -15767,22 +15745,10 @@ fi
|
||||
# Make empty files to contain the specs and options for each language.
|
||||
# Then add #include lines to for a compiler that has specs and/or options.
|
||||
|
||||
subdirs=
|
||||
lang_opt_files=
|
||||
lang_specs_files=
|
||||
lang_tree_files=
|
||||
for subdir in . $subdirs
|
||||
do
|
||||
if test -f $srcdir/$subdir/lang.opt; then
|
||||
lang_opt_files="$lang_opt_files $srcdir/$subdir/lang.opt"
|
||||
fi
|
||||
if test -f $srcdir/$subdir/lang-specs.h; then
|
||||
lang_specs_files="$lang_specs_files $srcdir/$subdir/lang-specs.h"
|
||||
fi
|
||||
if test -f $srcdir/$subdir/$subdir-tree.def; then
|
||||
lang_tree_files="$lang_tree_files $srcdir/$subdir/$subdir-tree.def"
|
||||
fi
|
||||
done
|
||||
|
||||
# These (without "all_") are set in each config-lang.in.
|
||||
# `language' must be a single word so is spelled singularly.
|
||||
all_languages=
|
||||
@ -15800,6 +15766,10 @@ all_gtfiles="$target_gtfiles"
|
||||
all_gtfiles_files_langs=
|
||||
all_gtfiles_files_files=
|
||||
|
||||
# These are the languages that are set in --enable-languages,
|
||||
# and are available in the GCC tree.
|
||||
all_selected_languages=
|
||||
|
||||
# Add the language fragments.
|
||||
# Languages are added via two mechanisms. Some information must be
|
||||
# recorded in makefile variables, these are defined in config-lang.in.
|
||||
@ -15809,59 +15779,91 @@ all_gtfiles_files_files=
|
||||
|
||||
language_hooks="Make-hooks"
|
||||
|
||||
for s in $subdirs
|
||||
for lang in ${srcdir}/*/config-lang.in
|
||||
do
|
||||
language=
|
||||
boot_language=
|
||||
compilers=
|
||||
stagestuff=
|
||||
outputs=
|
||||
gtfiles=
|
||||
. ${srcdir}/$s/config-lang.in
|
||||
if test "x$language" = x
|
||||
then
|
||||
echo "${srcdir}/$s/config-lang.in doesn't set \$language." 1>&2
|
||||
exit 1
|
||||
fi
|
||||
all_lang_makefrags="$all_lang_makefrags \$(srcdir)/$s/Make-lang.in"
|
||||
if test -f ${srcdir}/$s/Makefile.in
|
||||
then all_lang_makefiles="$s/Makefile"
|
||||
fi
|
||||
all_languages="$all_languages $language"
|
||||
if test "x$boot_language" = xyes
|
||||
then
|
||||
all_boot_languages="$all_boot_languages $language"
|
||||
fi
|
||||
all_compilers="$all_compilers $compilers"
|
||||
all_stagestuff="$all_stagestuff $stagestuff"
|
||||
all_outputs="$all_outputs $outputs"
|
||||
all_gtfiles="$all_gtfiles $gtfiles"
|
||||
for f in $gtfiles
|
||||
do
|
||||
all_gtfiles_files_langs="$all_gtfiles_files_langs ${s} "
|
||||
all_gtfiles_files_files="$all_gtfiles_files_files ${f} "
|
||||
done
|
||||
case $lang in
|
||||
# The odd quoting in the next line works around
|
||||
# an apparent bug in bash 1.12 on linux.
|
||||
${srcdir}/[*]/config-lang.in)
|
||||
continue ;;
|
||||
*)
|
||||
lang_alias=`sed -n -e 's,^language=['"'"'"'"]\(.*\)["'"'"'"'].*$,\1,p' -e 's,^language=\([^ ]*\).*$,\1,p' $lang`
|
||||
if test "x$lang_alias" = x
|
||||
then
|
||||
echo "$lang doesn't set \$language." 1>&2
|
||||
exit 1
|
||||
fi
|
||||
subdir="`echo $lang | sed -e 's,^.*/\([^/]*\)/config-lang.in$,\1,'`"
|
||||
subdirs="$subdirs $subdir"
|
||||
case ",$enable_languages," in
|
||||
*,$lang_alias,*)
|
||||
all_selected_languages="$all_selected_languages $lang_alias"
|
||||
if test -f $srcdir/$subdir/lang-specs.h; then
|
||||
lang_specs_files="$lang_specs_files $srcdir/$subdir/lang-specs.h"
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
|
||||
if test -f $srcdir/$subdir/lang.opt; then
|
||||
lang_opt_files="$lang_opt_files $srcdir/$subdir/lang.opt"
|
||||
fi
|
||||
if test -f $srcdir/$subdir/$subdir-tree.def; then
|
||||
lang_tree_files="$lang_tree_files $srcdir/$subdir/$subdir-tree.def"
|
||||
fi
|
||||
|
||||
language=
|
||||
boot_language=
|
||||
compilers=
|
||||
stagestuff=
|
||||
outputs=
|
||||
gtfiles=
|
||||
. ${srcdir}/$subdir/config-lang.in
|
||||
if test "x$language" = x
|
||||
then
|
||||
echo "${srcdir}/$subdir/config-lang.in doesn't set \$language." 1>&2
|
||||
exit 1
|
||||
fi
|
||||
all_lang_makefrags="$all_lang_makefrags \$(srcdir)/$subdir/Make-lang.in"
|
||||
if test -f ${srcdir}/$subdir/Makefile.in
|
||||
then all_lang_makefiles="$subdir/Makefile"
|
||||
fi
|
||||
all_languages="$all_languages $language"
|
||||
if test "x$boot_language" = xyes
|
||||
then
|
||||
all_boot_languages="$all_boot_languages $language"
|
||||
fi
|
||||
all_compilers="$all_compilers $compilers"
|
||||
all_stagestuff="$all_stagestuff $stagestuff"
|
||||
all_outputs="$all_outputs $outputs"
|
||||
all_gtfiles="$all_gtfiles $gtfiles"
|
||||
for f in $gtfiles
|
||||
do
|
||||
all_gtfiles_files_langs="$all_gtfiles_files_langs ${subdir} "
|
||||
all_gtfiles_files_files="$all_gtfiles_files_files ${f} "
|
||||
done
|
||||
;;
|
||||
esac
|
||||
done
|
||||
|
||||
# Pick up gtfiles for c
|
||||
gtfiles=
|
||||
s="c"
|
||||
subdir="c"
|
||||
. ${srcdir}/c-config-lang.in
|
||||
all_gtfiles="$all_gtfiles $gtfiles"
|
||||
for f in $gtfiles
|
||||
do
|
||||
all_gtfiles_files_langs="$all_gtfiles_files_langs ${s} "
|
||||
all_gtfiles_files_langs="$all_gtfiles_files_langs ${subdir} "
|
||||
all_gtfiles_files_files="$all_gtfiles_files_files ${f} "
|
||||
done
|
||||
|
||||
check_languages=
|
||||
for language in $all_languages
|
||||
for language in $all_selected_languages
|
||||
do
|
||||
check_languages="$check_languages check-$language"
|
||||
check_languages="$check_languages check-$language"
|
||||
done
|
||||
|
||||
# We link each language in with a set of hooks, reached indirectly via
|
||||
# lang.${target}.
|
||||
# lang.${target}. Only do so for selected languages.
|
||||
|
||||
rm -f Make-hooks
|
||||
touch Make-hooks
|
||||
@ -15870,12 +15872,13 @@ target_list="all.cross start.encap rest.encap tags \
|
||||
uninstall info man srcextra srcman srcinfo \
|
||||
mostlyclean clean distclean maintainer-clean \
|
||||
stage1 stage2 stage3 stage4 stageprofile stagefeedback"
|
||||
|
||||
for t in $target_list
|
||||
do
|
||||
x=
|
||||
for lang in $all_languages
|
||||
for lang in $all_selected_languages
|
||||
do
|
||||
x="$x $lang.$t"
|
||||
x="$x $lang.$t"
|
||||
done
|
||||
echo "lang.$t: $x" >> Make-hooks
|
||||
done
|
||||
@ -16026,6 +16029,7 @@ objdir=`${PWDCMD-pwd}`
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
# Echo link setup.
|
||||
@ -16802,6 +16806,7 @@ s,@all_gtfiles_files_files@,$all_gtfiles_files_files,;t t
|
||||
s,@all_lang_makefrags@,$all_lang_makefrags,;t t
|
||||
s,@all_lang_makefiles@,$all_lang_makefiles,;t t
|
||||
s,@all_languages@,$all_languages,;t t
|
||||
s,@all_selected_languages@,$all_selected_languages,;t t
|
||||
s,@all_stagestuff@,$all_stagestuff,;t t
|
||||
s,@build_exeext@,$build_exeext,;t t
|
||||
s,@build_install_headers_dir@,$build_install_headers_dir,;t t
|
||||
|
154
gcc/configure.ac
154
gcc/configure.ac
@ -817,30 +817,6 @@ AC_ARG_ENABLE(languages,
|
||||
esac],
|
||||
[enable_languages=c])
|
||||
|
||||
subdirs=
|
||||
for lang in ${srcdir}/*/config-lang.in
|
||||
do
|
||||
case $lang in
|
||||
# The odd quoting in the next line works around
|
||||
# an apparent bug in bash 1.12 on linux.
|
||||
changequote(,)dnl
|
||||
${srcdir}/[*]/config-lang.in) ;;
|
||||
*)
|
||||
lang_alias=`sed -n -e 's,^language=['"'"'"'"]\(.*\)["'"'"'"'].*$,\1,p' -e 's,^language=\([^ ]*\).*$,\1,p' $lang`
|
||||
if test "x$lang_alias" = x
|
||||
then
|
||||
echo "$lang doesn't set \$language." 1>&2
|
||||
exit 1
|
||||
fi
|
||||
case ",$enable_languages," in
|
||||
*,$lang_alias,*)
|
||||
subdirs="$subdirs `echo $lang | sed -e 's,^.*/\([^/]*\)/config-lang.in$,\1,'`" ;;
|
||||
esac
|
||||
;;
|
||||
changequote([,])dnl
|
||||
esac
|
||||
done
|
||||
|
||||
|
||||
# -------------------------
|
||||
# Checks for other programs
|
||||
@ -3258,22 +3234,10 @@ AC_SUBST(MAINT)dnl
|
||||
# Make empty files to contain the specs and options for each language.
|
||||
# Then add #include lines to for a compiler that has specs and/or options.
|
||||
|
||||
subdirs=
|
||||
lang_opt_files=
|
||||
lang_specs_files=
|
||||
lang_tree_files=
|
||||
for subdir in . $subdirs
|
||||
do
|
||||
if test -f $srcdir/$subdir/lang.opt; then
|
||||
lang_opt_files="$lang_opt_files $srcdir/$subdir/lang.opt"
|
||||
fi
|
||||
if test -f $srcdir/$subdir/lang-specs.h; then
|
||||
lang_specs_files="$lang_specs_files $srcdir/$subdir/lang-specs.h"
|
||||
fi
|
||||
if test -f $srcdir/$subdir/$subdir-tree.def; then
|
||||
lang_tree_files="$lang_tree_files $srcdir/$subdir/$subdir-tree.def"
|
||||
fi
|
||||
done
|
||||
|
||||
# These (without "all_") are set in each config-lang.in.
|
||||
# `language' must be a single word so is spelled singularly.
|
||||
all_languages=
|
||||
@ -3291,6 +3255,10 @@ all_gtfiles="$target_gtfiles"
|
||||
all_gtfiles_files_langs=
|
||||
all_gtfiles_files_files=
|
||||
|
||||
# These are the languages that are set in --enable-languages,
|
||||
# and are available in the GCC tree.
|
||||
all_selected_languages=
|
||||
|
||||
# Add the language fragments.
|
||||
# Languages are added via two mechanisms. Some information must be
|
||||
# recorded in makefile variables, these are defined in config-lang.in.
|
||||
@ -3300,59 +3268,93 @@ all_gtfiles_files_files=
|
||||
|
||||
language_hooks="Make-hooks"
|
||||
|
||||
for s in $subdirs
|
||||
for lang in ${srcdir}/*/config-lang.in
|
||||
do
|
||||
language=
|
||||
boot_language=
|
||||
compilers=
|
||||
stagestuff=
|
||||
outputs=
|
||||
gtfiles=
|
||||
. ${srcdir}/$s/config-lang.in
|
||||
if test "x$language" = x
|
||||
then
|
||||
echo "${srcdir}/$s/config-lang.in doesn't set \$language." 1>&2
|
||||
exit 1
|
||||
fi
|
||||
all_lang_makefrags="$all_lang_makefrags \$(srcdir)/$s/Make-lang.in"
|
||||
if test -f ${srcdir}/$s/Makefile.in
|
||||
then all_lang_makefiles="$s/Makefile"
|
||||
fi
|
||||
all_languages="$all_languages $language"
|
||||
if test "x$boot_language" = xyes
|
||||
then
|
||||
all_boot_languages="$all_boot_languages $language"
|
||||
fi
|
||||
all_compilers="$all_compilers $compilers"
|
||||
all_stagestuff="$all_stagestuff $stagestuff"
|
||||
all_outputs="$all_outputs $outputs"
|
||||
all_gtfiles="$all_gtfiles $gtfiles"
|
||||
for f in $gtfiles
|
||||
do
|
||||
all_gtfiles_files_langs="$all_gtfiles_files_langs ${s} "
|
||||
all_gtfiles_files_files="$all_gtfiles_files_files ${f} "
|
||||
done
|
||||
case $lang in
|
||||
# The odd quoting in the next line works around
|
||||
# an apparent bug in bash 1.12 on linux.
|
||||
changequote(,)dnl
|
||||
${srcdir}/[*]/config-lang.in)
|
||||
continue ;;
|
||||
*)
|
||||
lang_alias=`sed -n -e 's,^language=['"'"'"'"]\(.*\)["'"'"'"'].*$,\1,p' -e 's,^language=\([^ ]*\).*$,\1,p' $lang`
|
||||
if test "x$lang_alias" = x
|
||||
then
|
||||
echo "$lang doesn't set \$language." 1>&2
|
||||
exit 1
|
||||
fi
|
||||
subdir="`echo $lang | sed -e 's,^.*/\([^/]*\)/config-lang.in$,\1,'`"
|
||||
subdirs="$subdirs $subdir"
|
||||
case ",$enable_languages," in
|
||||
*,$lang_alias,*)
|
||||
all_selected_languages="$all_selected_languages $lang_alias"
|
||||
if test -f $srcdir/$subdir/lang-specs.h; then
|
||||
lang_specs_files="$lang_specs_files $srcdir/$subdir/lang-specs.h"
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
changequote([,])dnl
|
||||
|
||||
if test -f $srcdir/$subdir/lang.opt; then
|
||||
lang_opt_files="$lang_opt_files $srcdir/$subdir/lang.opt"
|
||||
fi
|
||||
if test -f $srcdir/$subdir/$subdir-tree.def; then
|
||||
lang_tree_files="$lang_tree_files $srcdir/$subdir/$subdir-tree.def"
|
||||
fi
|
||||
|
||||
language=
|
||||
boot_language=
|
||||
compilers=
|
||||
stagestuff=
|
||||
outputs=
|
||||
gtfiles=
|
||||
. ${srcdir}/$subdir/config-lang.in
|
||||
if test "x$language" = x
|
||||
then
|
||||
echo "${srcdir}/$subdir/config-lang.in doesn't set \$language." 1>&2
|
||||
exit 1
|
||||
fi
|
||||
all_lang_makefrags="$all_lang_makefrags \$(srcdir)/$subdir/Make-lang.in"
|
||||
if test -f ${srcdir}/$subdir/Makefile.in
|
||||
then all_lang_makefiles="$subdir/Makefile"
|
||||
fi
|
||||
all_languages="$all_languages $language"
|
||||
if test "x$boot_language" = xyes
|
||||
then
|
||||
all_boot_languages="$all_boot_languages $language"
|
||||
fi
|
||||
all_compilers="$all_compilers $compilers"
|
||||
all_stagestuff="$all_stagestuff $stagestuff"
|
||||
all_outputs="$all_outputs $outputs"
|
||||
all_gtfiles="$all_gtfiles $gtfiles"
|
||||
for f in $gtfiles
|
||||
do
|
||||
all_gtfiles_files_langs="$all_gtfiles_files_langs ${subdir} "
|
||||
all_gtfiles_files_files="$all_gtfiles_files_files ${f} "
|
||||
done
|
||||
;;
|
||||
esac
|
||||
done
|
||||
|
||||
# Pick up gtfiles for c
|
||||
gtfiles=
|
||||
s="c"
|
||||
subdir="c"
|
||||
. ${srcdir}/c-config-lang.in
|
||||
all_gtfiles="$all_gtfiles $gtfiles"
|
||||
for f in $gtfiles
|
||||
do
|
||||
all_gtfiles_files_langs="$all_gtfiles_files_langs ${s} "
|
||||
all_gtfiles_files_langs="$all_gtfiles_files_langs ${subdir} "
|
||||
all_gtfiles_files_files="$all_gtfiles_files_files ${f} "
|
||||
done
|
||||
|
||||
check_languages=
|
||||
for language in $all_languages
|
||||
for language in $all_selected_languages
|
||||
do
|
||||
check_languages="$check_languages check-$language"
|
||||
check_languages="$check_languages check-$language"
|
||||
done
|
||||
|
||||
# We link each language in with a set of hooks, reached indirectly via
|
||||
# lang.${target}.
|
||||
# lang.${target}. Only do so for selected languages.
|
||||
|
||||
rm -f Make-hooks
|
||||
touch Make-hooks
|
||||
@ -3361,12 +3363,13 @@ target_list="all.cross start.encap rest.encap tags \
|
||||
uninstall info man srcextra srcman srcinfo \
|
||||
mostlyclean clean distclean maintainer-clean \
|
||||
stage1 stage2 stage3 stage4 stageprofile stagefeedback"
|
||||
|
||||
for t in $target_list
|
||||
do
|
||||
x=
|
||||
for lang in $all_languages
|
||||
for lang in $all_selected_languages
|
||||
do
|
||||
x="$x $lang.$t"
|
||||
x="$x $lang.$t"
|
||||
done
|
||||
echo "lang.$t: $x" >> Make-hooks
|
||||
done
|
||||
@ -3463,6 +3466,7 @@ AC_SUBST(all_gtfiles_files_files)
|
||||
AC_SUBST(all_lang_makefrags)
|
||||
AC_SUBST(all_lang_makefiles)
|
||||
AC_SUBST(all_languages)
|
||||
AC_SUBST(all_selected_languages)
|
||||
AC_SUBST(all_stagestuff)
|
||||
AC_SUBST(build_exeext)
|
||||
AC_SUBST(build_install_headers_dir)
|
||||
|
@ -527,6 +527,7 @@ Second, when configuring a native system, either @command{cc} or
|
||||
your environment before running configure. Otherwise the configuration
|
||||
scripts may fail.
|
||||
|
||||
@ignore
|
||||
Note that the bootstrap compiler and the resulting GCC must be link
|
||||
compatible, else the bootstrap will fail with linker errors about
|
||||
incompatible object file formats. Several multilibed targets are
|
||||
@ -537,6 +538,7 @@ affected by this requirement, see
|
||||
@ifhtml
|
||||
@uref{specific.html,,host/target specific installation notes}.
|
||||
@end ifhtml
|
||||
@end ignore
|
||||
|
||||
To configure GCC:
|
||||
|
||||
@ -777,7 +779,8 @@ assembler found is not actually the GNU assembler. (Confusion may also
|
||||
result if the compiler finds the GNU assembler but has not been
|
||||
configured with @option{--with-gnu-as}.) If you have more than one
|
||||
assembler installed on your system, you may want to use this option in
|
||||
connection with @option{--with-as=@var{pathname}}.
|
||||
connection with @option{--with-as=@var{pathname}} or
|
||||
@option{--with-build-time-tools=@var{pathname}}.
|
||||
|
||||
The following systems are the only ones where it makes a difference
|
||||
whether you use the GNU assembler. On any other system,
|
||||
@ -800,28 +803,40 @@ the 386, if you use the GNU assembler, you should also use the GNU linker
|
||||
(and specify @option{--with-gnu-ld}).
|
||||
|
||||
@item @anchor{with-as}--with-as=@var{pathname}
|
||||
Specify that the
|
||||
compiler should use the assembler pointed to by @var{pathname}, rather
|
||||
than the one found by the standard rules to find an assembler, which
|
||||
are:
|
||||
Specify that the compiler should use the assembler pointed to by
|
||||
@var{pathname}, rather than the one found by the standard rules to find
|
||||
an assembler, which are:
|
||||
@itemize @bullet
|
||||
@item
|
||||
Check the @file{@var{libexec}/gcc/@var{target}/@var{version}}
|
||||
directory, where @var{libexec} defaults to
|
||||
@file{@var{exec-prefix}/libexec} and @var{exec-prefix} defaults to
|
||||
@var{prefix} which defaults to @file{/usr/local} unless overridden by
|
||||
the @option{--prefix=@var{pathname}} switch described
|
||||
above. @var{target} is the target system triple, such as
|
||||
@samp{sparc-sun-solaris2.7}, and @var{version} denotes the GCC
|
||||
version, such as 3.0.
|
||||
Unless GCC is being built with a cross compiler, check the
|
||||
@file{@var{libexec}/gcc/@var{target}/@var{version}} directory.
|
||||
@var{libexec} defaults to @file{@var{exec-prefix}/libexec};
|
||||
@var{exec-prefix} defaults to @var{prefix}, which
|
||||
defaults to @file{/usr/local} unless overridden by the
|
||||
@option{--prefix=@var{pathname}} switch described above. @var{target}
|
||||
is the target system triple, such as @samp{sparc-sun-solaris2.7}, and
|
||||
@var{version} denotes the GCC version, such as 3.0.
|
||||
|
||||
@item
|
||||
Check operating system specific directories (e.g.@: @file{/usr/ccs/bin} on
|
||||
If the target system is the same that you are building on, check
|
||||
operating system specific directories (e.g.@: @file{/usr/ccs/bin} on
|
||||
Sun Solaris 2).
|
||||
|
||||
@item
|
||||
Check in the @env{PATH} for a tool whose name is prefixed by the
|
||||
target system triple.
|
||||
|
||||
@item
|
||||
Check in the @env{PATH} for a tool whose name is not prefixed by the
|
||||
target system triple, if the host and target system triple are
|
||||
the same (in other words, we use a host tool if it can be used for
|
||||
the target as well).
|
||||
@end itemize
|
||||
Note that these rules do not check for the value of @env{PATH}. You may
|
||||
want to use @option{--with-as} if no assembler is installed in the
|
||||
directories listed above, or if you have multiple assemblers installed
|
||||
and want to choose one that is not found by the above rules.
|
||||
|
||||
You may want to use @option{--with-as} if no assembler
|
||||
is installed in the directories listed above, or if you have multiple
|
||||
assemblers installed and want to choose one that is not found by the
|
||||
above rules.
|
||||
|
||||
@item @anchor{with-gnu-ld}--with-gnu-ld
|
||||
Same as @uref{#with-gnu-as,,@option{--with-gnu-as}}
|
||||
@ -1072,9 +1087,9 @@ Building the Ada compiler has special requirements, see below.
|
||||
If you do not pass this flag, or specify the option @code{all}, then all
|
||||
default languages available in the @file{gcc} sub-tree will be configured.
|
||||
Ada, Objective-C++, and treelang are not default languages; the rest are.
|
||||
Re-defining @code{LANGUAGES} when calling @samp{make bootstrap}
|
||||
@strong{does not} work anymore, as those language sub-directories might
|
||||
not have been configured!
|
||||
Re-defining @code{LANGUAGES} when calling @samp{make} @strong{does not}
|
||||
work anymore, as those language sub-directories might not have been
|
||||
configured!
|
||||
|
||||
@item --disable-libada
|
||||
Specify that the run-time libraries and tools used by GNAT should not
|
||||
@ -1294,11 +1309,29 @@ Specifies a list of directories which contain the target runtime
|
||||
libraries. These libraries will be copied into the @file{gcc} install
|
||||
directory. If the directory list is omitted, this option has no
|
||||
effect.
|
||||
|
||||
@item --with-newlib
|
||||
Specifies that @samp{newlib} is
|
||||
being used as the target C library. This causes @code{__eprintf} to be
|
||||
omitted from @file{libgcc.a} on the assumption that it will be provided by
|
||||
@samp{newlib}.
|
||||
|
||||
@item --with-build-time-tools=@var{dir}
|
||||
Specifies where to find the set of target tools (assembler, linker, etc.)
|
||||
that will be used while building GCC itself. This option can be useful
|
||||
if the directory layouts are different between the system you are building
|
||||
GCC on, and the system where you will deploy it.
|
||||
|
||||
For example, on a @option{ia64-hp-hpux} system, you may have the GNU
|
||||
assembler and linker in @file{/usr/bin}, and the native tools in a
|
||||
different path, and build a toolchain that expects to find the
|
||||
native tools in @file{/usr/bin}.
|
||||
|
||||
When you use this option, you should ensure that @var{dir} includes
|
||||
@command{ar}, @command{as}, @command{ld}, @command{nm},
|
||||
@command{ranlib} and @command{strip} if necessary, and possibly
|
||||
@command{objdump}. Otherwise, GCC may use an inconsistent set of
|
||||
tools.
|
||||
@end table
|
||||
|
||||
@subheading Fortran-Specific Options
|
||||
@ -1521,22 +1554,22 @@ documentation pre-built for the unmodified documentation in the release.
|
||||
|
||||
@section Building a native compiler
|
||||
|
||||
For a native build issue the command @samp{make bootstrap}. This
|
||||
will build the entire GCC system, which includes the following steps:
|
||||
For a native build, the command @samp{make} will trigger a 3-stage
|
||||
bootstrap of the compiler. This will build the entire GCC system
|
||||
and ensure that it compiles itself correctly, by doing the
|
||||
following steps:
|
||||
|
||||
@itemize @bullet
|
||||
@item
|
||||
Build host tools necessary to build the compiler such as texinfo, bison,
|
||||
Build tools necessary to build the compiler such as texinfo, bison,
|
||||
gperf.
|
||||
|
||||
@item
|
||||
Build target tools for use by the compiler such as binutils (bfd,
|
||||
binutils, gas, gprof, ld, and opcodes)
|
||||
if they have been individually linked
|
||||
or moved into the top level GCC source tree before configuring.
|
||||
|
||||
@item
|
||||
Perform a 3-stage bootstrap of the compiler.
|
||||
Perform a 3-stage bootstrap of the compiler. This includes building
|
||||
three times the target tools for use by the compiler such as binutils
|
||||
(bfd, binutils, gas, gprof, ld, and opcodes) if they have been
|
||||
individually linked or moved into the top level GCC source tree before
|
||||
configuring.
|
||||
|
||||
@item
|
||||
Perform a comparison test of the stage2 and stage3 compilers.
|
||||
@ -1547,8 +1580,8 @@ Build runtime libraries using the stage3 compiler from the previous step.
|
||||
@end itemize
|
||||
|
||||
If you are short on disk space you might consider @samp{make
|
||||
bootstrap-lean} instead. This is identical to @samp{make
|
||||
bootstrap} except that object files from the stage1 and
|
||||
bootstrap-lean} instead. The sequence of compilation is the
|
||||
same described above, but object files from the stage1 and
|
||||
stage2 of the 3-stage bootstrap of the compiler are deleted as
|
||||
soon as they are no longer needed.
|
||||
|
||||
@ -1565,7 +1598,7 @@ roughly 40% of disk space both for the bootstrap and the final installation.
|
||||
|
||||
If you wish to use non-default GCC flags when compiling the stage2 and
|
||||
stage3 compilers, set @code{BOOT_CFLAGS} on the command line when doing
|
||||
@samp{make bootstrap}. Non-default optimization flags are less well
|
||||
@samp{make}. Non-default optimization flags are less well
|
||||
tested here than the default of @samp{-g -O2}, but should still work.
|
||||
In a few cases, you may find that you need to specify special flags such
|
||||
as @option{-msoft-float} here to complete the bootstrap; or, if the
|
||||
@ -1574,17 +1607,17 @@ around this, by choosing @code{BOOT_CFLAGS} to avoid the parts of the
|
||||
stage1 compiler that were miscompiled, or by using @samp{make
|
||||
bootstrap4} to increase the number of stages of bootstrap.
|
||||
|
||||
Note that using non-standard @code{CFLAGS} can cause bootstrap to fail in
|
||||
@file{libiberty}, if these trigger a warning with the new compiler. For
|
||||
example using @samp{-O2 -g -mcpu=i686} on @code{i686-pc-linux-gnu} will
|
||||
cause bootstrap failure as @option{-mcpu=} is deprecated in 3.4.0 and above.
|
||||
Note that using non-standard @code{CFLAGS} can cause bootstrap to fail
|
||||
if these trigger a warning with the new compiler. For example using
|
||||
@samp{-O2 -g -mcpu=i686} on @code{i686-pc-linux-gnu} will cause bootstrap
|
||||
failure as @option{-mcpu=} is deprecated in 3.4.0 and above.
|
||||
|
||||
|
||||
If you used the flag @option{--enable-languages=@dots{}} to restrict
|
||||
the compilers to be built, only those you've actually enabled will be
|
||||
built. This will of course only build those runtime libraries, for
|
||||
which the particular compiler has been built. Please note,
|
||||
that re-defining @env{LANGUAGES} when calling @samp{make bootstrap}
|
||||
that re-defining @env{LANGUAGES} when calling @samp{make}
|
||||
@strong{does not} work anymore!
|
||||
|
||||
If the comparison of stage2 and stage3 fails, this normally indicates
|
||||
@ -1594,6 +1627,15 @@ a few systems, meaningful comparison of object files is impossible; they
|
||||
always appear ``different''. If you encounter this problem, you will
|
||||
need to disable comparison in the @file{Makefile}.)
|
||||
|
||||
If you do not want to bootstrap your compiler, you can configure with
|
||||
@option{--disable-bootstrap}. In particular cases, you may want to
|
||||
bootstrap your compiler even if the target system is not the same as
|
||||
the one you are building on: for example, you could build a
|
||||
@code{powerpc-unknown-linux-gnu} toolchain on a
|
||||
@code{powerpc64-unknown-linux-gnu} host. In this case, pass
|
||||
@option{--enable-bootstrap} to the configure script.
|
||||
|
||||
|
||||
@section Building a cross compiler
|
||||
|
||||
We recommend reading the
|
||||
@ -1678,21 +1720,25 @@ compilation options. Check your target's definition of
|
||||
|
||||
@section Building in parallel
|
||||
|
||||
You can use @samp{make bootstrap MAKE="make -j 2" -j 2}, or just
|
||||
@samp{make -j 2 bootstrap} for GNU Make 3.79 and above, instead of
|
||||
@samp{make bootstrap} to build GCC in parallel.
|
||||
You can also specify a bigger number, and in most cases using a value
|
||||
greater than the number of processors in your machine will result in
|
||||
fewer and shorter I/O latency hits, thus improving overall throughput;
|
||||
this is especially true for slow drives and network filesystems.
|
||||
You can use @samp{make -j 2}@footnote{Only supported by GNU Make 3.79
|
||||
and above, which is anyway necessary to build GCC.}, instead of @samp{make},
|
||||
to build GCC in parallel. You can also specify a bigger number, and
|
||||
in most cases using a value greater than the number of processors in
|
||||
your machine will result in fewer and shorter I/O latency hits, thus
|
||||
improving overall throughput; this is especially true for slow drives
|
||||
and network filesystems.
|
||||
|
||||
@section Building the Ada compiler
|
||||
|
||||
In order to build GNAT, the Ada compiler, you need a working GNAT
|
||||
compiler (GNAT version 3.14 or later, or GCC version 3.1 or later),
|
||||
including GNAT tools such as @command{gnatmake} and @command{gnatlink},
|
||||
since the Ada front end is written in Ada (with some
|
||||
GNAT-specific extensions), and GNU make.
|
||||
compiler (GNAT version 3.14 or later, or GCC version 3.1 or later).
|
||||
This includes GNAT tools such as @command{gnatmake} and
|
||||
@command{gnatlink}, since the Ada front end is written in Ada and
|
||||
uses some GNAT-specific extensions.
|
||||
|
||||
In order to build a cross compiler, it is suggested to install
|
||||
the new compiler as native first, and then use it to build the cross
|
||||
compiler.
|
||||
|
||||
@command{configure} does not test whether the GNAT installation works
|
||||
and has a sufficiently recent version; if too old a GNAT version is
|
||||
@ -1704,7 +1750,7 @@ used to disable building the Ada front end.
|
||||
It is possible to use profile feedback to optimize the compiler itself. This
|
||||
should result in a faster compiler binary. Experiments done on x86 using gcc
|
||||
3.3 showed approximately 7 percent speedup on compiling C programs. To
|
||||
bootstrap compiler with profile feedback, use @code{make profiledbootstrap}.
|
||||
bootstrap the compiler with profile feedback, use @code{make profiledbootstrap}.
|
||||
|
||||
When @samp{make profiledbootstrap} is run, it will first build a @code{stage1}
|
||||
compiler. This compiler is used to build a @code{stageprofile} compiler
|
||||
@ -1712,7 +1758,7 @@ instrumented to collect execution counts of instruction and branch
|
||||
probabilities. Then runtime libraries are compiled with profile collected.
|
||||
Finally a @code{stagefeedback} compiler is built using the information collected.
|
||||
|
||||
Unlike @samp{make bootstrap} several additional restrictions apply. The
|
||||
Unlike standard bootstrap, several additional restrictions apply. The
|
||||
compiler used to build @code{stage1} needs to support a 64-bit integral type.
|
||||
It is recommended to only use GCC for this. Also parallel make is currently
|
||||
not supported since collisions in profile collecting may occur.
|
||||
@ -2018,7 +2064,7 @@ it will not be created otherwise. This is regarded as a feature,
|
||||
not as a bug, because it gives slightly more control to the packagers
|
||||
using the @code{DESTDIR} feature.
|
||||
|
||||
If you built a released version of GCC using @samp{make bootstrap} then please
|
||||
If you are bootstrapping a released version of GCC then please
|
||||
quickly review the build status page for your release, available from
|
||||
@uref{http://gcc.gnu.org/buildstat.html}.
|
||||
If your system is not listed for the version of GCC that you built,
|
||||
@ -2476,17 +2522,16 @@ and it is not possible to build parallel applications. Cray modules are not
|
||||
supported; in particular, Craylibs are assumed to be in
|
||||
@file{/opt/ctl/craylibs/craylibs}.
|
||||
|
||||
You absolutely @strong{must} use GNU make on this platform. Also, you
|
||||
need to tell GCC where to find the assembler and the linker. The
|
||||
simplest way to do so is by providing @option{--with-as} and
|
||||
@option{--with-ld} to @file{configure}, e.g.@:
|
||||
On this platform, you need to tell GCC where to find the assembler and
|
||||
the linker. The simplest way to do so is by providing @option{--with-as}
|
||||
and @option{--with-ld} to @file{configure}, e.g.@:
|
||||
|
||||
@smallexample
|
||||
configure --with-as=/opt/ctl/bin/cam --with-ld=/opt/ctl/bin/cld \
|
||||
--enable-languages=c
|
||||
@end smallexample
|
||||
|
||||
The comparison test during @samp{make bootstrap} fails on Unicos/Mk
|
||||
The comparison test at the end of the bootstrapping process fails on Unicos/Mk
|
||||
because the assembler inserts timestamps into object files. You should
|
||||
be able to work around this by doing @samp{make all} after getting this
|
||||
failure.
|
||||
@ -2824,9 +2869,9 @@ and Latin-America.
|
||||
|
||||
The HP assembler on these systems has some problems. Most notably the
|
||||
assembler inserts timestamps into each object file it creates, causing
|
||||
the 3-stage comparison test to fail during a @samp{make bootstrap}.
|
||||
You should be able to continue by saying @samp{make all} after getting
|
||||
the failure from @samp{make bootstrap}.
|
||||
the 3-stage comparison test to fail during a bootstrap.
|
||||
You should be able to continue by saying @samp{make all-host all-target}
|
||||
after getting the failure from @samp{make}.
|
||||
|
||||
GCC 4.0 requires CVS binutils as of April 28, 2004 or later. Earlier
|
||||
versions require binutils 2.8 or later.
|
||||
@ -2912,10 +2957,10 @@ many limitations. For example, it does not support weak symbols or alias
|
||||
definitions. As a result, explicit template instantiations are required
|
||||
when using C++. This makes it difficult if not impossible to build many
|
||||
C++ applications. You can't generate debugging information when using
|
||||
the HP assembler. Finally, @samp{make bootstrap} fails in the final
|
||||
the HP assembler. Finally, bootstrapping fails in the final
|
||||
comparison of object modules due to the time stamps that it inserts into
|
||||
the modules. The bootstrap can be continued from this point with
|
||||
@samp{make all}.
|
||||
@samp{make all-host all-target}.
|
||||
|
||||
A recent linker patch must be installed for the correct operation of
|
||||
GCC 3.3 and later. @code{PHSS_26559} and @code{PHSS_24304} are the
|
||||
@ -3080,7 +3125,7 @@ command like this:
|
||||
@emph{You should substitute @samp{i686} in the above command with the appropriate
|
||||
processor for your host.}
|
||||
|
||||
After the usual @samp{make bootstrap} and
|
||||
After the usual @samp{make} and
|
||||
@samp{make install}, you can then access the UDK-targeted GCC
|
||||
tools by adding @command{udk-} before the commonly known name. For
|
||||
example, to invoke the C compiler, you would use @command{udk-gcc}.
|
||||
@ -3129,9 +3174,6 @@ removed and the system libunwind library will always be used.
|
||||
@heading @anchor{x-ibm-aix}*-ibm-aix*
|
||||
Support for AIX version 3 and older was discontinued in GCC 3.4.
|
||||
|
||||
AIX Make frequently has problems with GCC makefiles. GNU Make 3.79.1 or
|
||||
newer is recommended to build on this platform.
|
||||
|
||||
``out of memory'' bootstrap failures may indicate a problem with
|
||||
process resource limits (ulimit). Hard limits are configured in the
|
||||
@file{/etc/security/limits} system configuration file.
|
||||
@ -3144,8 +3186,8 @@ one may use GNU Bash instead of AIX @command{/bin/sh}, e.g.,
|
||||
% export CONFIG_SHELL
|
||||
@end smallexample
|
||||
|
||||
and then proceed as described in @uref{build.html,,the build instructions},
|
||||
where we strongly recommend using GNU make and specifying an absolute path
|
||||
and then proceed as described in @uref{build.html,,the build
|
||||
instructions}, where we strongly recommend specifying an absolute path
|
||||
to invoke @var{srcdir}/configure.
|
||||
|
||||
Errors involving @code{alloca} when building GCC generally are due
|
||||
|
@ -7,6 +7,8 @@
|
||||
@cindex makefile targets
|
||||
@cindex targets, makefile
|
||||
|
||||
These targets are available from the @samp{gcc} directory:
|
||||
|
||||
@table @code
|
||||
@item all
|
||||
This is the default target. Depending on what your build/host/target
|
||||
@ -72,49 +74,59 @@ make check-gcc RUNTESTFLAGS="execute.exp=19980413-*"
|
||||
|
||||
Note that running the testsuite may require additional tools be
|
||||
installed, such as TCL or dejagnu.
|
||||
@end table
|
||||
|
||||
@item bootstrap
|
||||
Builds GCC three times---once with the native compiler, once with the
|
||||
native-built compiler it just built, and once with the compiler it built
|
||||
the second time. In theory, the last two should produce the same
|
||||
results, which @samp{make compare} can check. Each step of this process
|
||||
is called a ``stage'', and the results of each stage @var{N}
|
||||
(@var{N} = 1@dots{}3) are copied to a subdirectory @file{stage@var{N}/}.
|
||||
The toplevel tree from which you start GCC compilation is not
|
||||
the GCC directory, but rather a complex Makefile that coordinates
|
||||
the various steps of the build, including bootstrapping the compiler
|
||||
and using the new compiler to build target libraries.
|
||||
|
||||
When GCC is configured for a native configuration, the default action
|
||||
for @command{make} is to do a full three-stage bootstrap. This means
|
||||
that GCC is built three times---once with the native compiler, once with
|
||||
the native-built compiler it just built, and once with the compiler it
|
||||
built the second time. In theory, the last two should produce the same
|
||||
results, which @samp{make compare} can check. Each stage is configured
|
||||
separately and compiled into a separate directory, to minimize problems
|
||||
due to ABI incompatibilities between the native compiler and GCC.
|
||||
|
||||
If you do a change, rebuilding will also start from the first stage
|
||||
and ``bubble'' up the change through the three stages. Each stage
|
||||
is taken from its build directory (if it had been built previously),
|
||||
rebuilt, and copied to its subdirectory. This will allow you to, for
|
||||
example, continue a bootstrap after fixing a bug which causes the
|
||||
stage2 build to crash. It does not provide as good coverage of the
|
||||
compiler as bootstrapping from scratch, but it ensures that the new
|
||||
code is syntactically correct (e.g. that you did not use GCC extensions
|
||||
by mistake), and avoids spurious bootstrap comparison
|
||||
failures@footnote{Except if the compiler was buggy and miscompiled
|
||||
some of the files that were not modified. In this case, it's best
|
||||
to use @command{make restrap}.}.
|
||||
|
||||
Other targets available from the top level include:
|
||||
|
||||
@table @code
|
||||
@item bootstrap-lean
|
||||
Like @code{bootstrap}, except that the various stages are removed once
|
||||
they're no longer needed. This saves disk space.
|
||||
|
||||
@item bubblestrap
|
||||
This incrementally rebuilds each of the three stages, one at a time.
|
||||
It does this by ``bubbling'' the stages up from their subdirectories
|
||||
(if they had been built previously), rebuilding them, and copying them
|
||||
back to their subdirectories. This will allow you to, for example,
|
||||
continue a bootstrap after fixing a bug which causes the stage2 build
|
||||
to crash.
|
||||
@item bootstrap2
|
||||
@itemx bootstrap2-lean
|
||||
Performs only the first two stages of bootstrap. Unlike a three-stage
|
||||
bootstrap, this does not perform a comparison to test that the compiler
|
||||
is running properly. Note that the disk space required by a ``lean''
|
||||
bootstrap is approximately independent of the number of stages.
|
||||
|
||||
@item quickstrap
|
||||
Rebuilds the most recently built stage. Since each stage requires
|
||||
special invocation, using this target means you don't have to keep
|
||||
track of which stage you're on or what invocation that stage needs.
|
||||
@item stage@var{N}-bubble (@var{N} = 1@dots{}4)
|
||||
Rebuild all the stages up to @var{N}, with the appropriate flags,
|
||||
``bubbling'' the changes as described above.
|
||||
|
||||
@item all-stage@var{N} (@var{N} = 1@dots{}4)
|
||||
Assuming that stage @var{N} has already been built, rebuild it with the
|
||||
appropriate flags. This is rarely needed.
|
||||
|
||||
@item cleanstrap
|
||||
Removed everything (@samp{make clean}) and rebuilds (@samp{make bootstrap}).
|
||||
|
||||
@item restrap
|
||||
Like @code{cleanstrap}, except that the process starts from the first
|
||||
stage build, not from scratch.
|
||||
|
||||
@item stage@var{N} (@var{N} = 1@dots{}4)
|
||||
For each stage, moves the appropriate files to the @file{stage@var{N}}
|
||||
subdirectory.
|
||||
|
||||
@item unstage@var{N} (@var{N} = 1@dots{}4)
|
||||
Undoes the corresponding @code{stage@var{N}}.
|
||||
|
||||
@item restage@var{N} (@var{N} = 1@dots{}4)
|
||||
Undoes the corresponding @code{stage@var{N}} and rebuilds it with the
|
||||
appropriate flags.
|
||||
Remove everything (@samp{make clean}) and rebuilds (@samp{make bootstrap}).
|
||||
|
||||
@item compare
|
||||
Compares the results of stages 2 and 3. This ensures that the compiler
|
||||
@ -125,7 +137,53 @@ regardless of how it itself was compiled.
|
||||
Builds a compiler with profiling feedback information. For more
|
||||
information, see
|
||||
@ref{Building,,Building with profile feedback,gccinstall,Installing GCC}.
|
||||
This is actually a target in the top-level directory, which then
|
||||
recurses into the @file{gcc} subdirectory multiple times.
|
||||
|
||||
@item restrap
|
||||
Restart a bootstrap, so that everything that was not built with
|
||||
the system compiler is rebuilt.
|
||||
|
||||
@item stage@var{N}-start (@var{N} = 1@dots{}4)
|
||||
For each package that is bootstrapped, rename directories so that,
|
||||
for example, @file{gcc} points to the stage@var{N} GCC, compiled
|
||||
with the stage@var{N-1} GCC@footnote{Customarily, the system compiler
|
||||
is also termed the @file{stage0} GCC.}.
|
||||
|
||||
You will invoke this target if you need to test or debug the
|
||||
stage@var{N} GCC. If you only need to execute GCC (but you need
|
||||
not run @samp{make} either to rebuild it or to run test suites),
|
||||
you should be able to work directly in the @file{stage@var{N}-gcc}
|
||||
directory. This makes it easier to debug multiple stages in
|
||||
parallel.
|
||||
|
||||
@item stage
|
||||
For each package that is bootstrapped, relocate its build directory
|
||||
to indicate its stage. For example, if the @file{gcc} directory
|
||||
points to the stage2 GCC, after invoking this target it will be
|
||||
renamed to @file{stage2-gcc}.
|
||||
|
||||
@end table
|
||||
|
||||
If you wish to use non-default GCC flags when compiling the stage2 and
|
||||
stage3 compilers, set @code{BOOT_CFLAGS} on the command line when doing
|
||||
@samp{make}.
|
||||
|
||||
Usually, the first stage only builds the languages that the compiler
|
||||
is written in: typically, C and maybe Ada. If you are debugging a
|
||||
miscompilation of a different stage2 front-end (for example, of the
|
||||
Fortran front-end), you may want to have front-ends for other languages
|
||||
in the first stage as well. To do so, set @code{STAGE1_LANGUAGES}
|
||||
on the command line when doing @samp{make}.
|
||||
|
||||
For example, in the aforementioned scenario of debugging a Fortran
|
||||
front-end miscompilation caused by the stage1 compiler, you may need a
|
||||
command like
|
||||
|
||||
@example
|
||||
make stage2-bubble STAGE1_LANGUAGES=c,fortran
|
||||
@end example
|
||||
|
||||
Alternatively, you can use per-language targets to build and test
|
||||
languages that are not enabled by default in stage1. For example,
|
||||
@command{make f951} will build a Fortran compiler even in the stage1
|
||||
build directory.
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user