This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: combined bootstrap with --enable-gold
> * Andrew Pinski wrote on Sat, Sep 19, 2009 at 11:12:14AM CEST:
> > On Sat, Sep 19, 2009 at 12:54 AM, Ralf Wildenhues wrote:
> > > + ? ?AC_MSG_ERROR([in a combined tree, bootstrapping with --enable-gold requires --enable-build-with-cxx])
> > I think you rather have --enable-stage1-languages=c,c++ instead (I
> > think that is the spelling of the configure option).
> > --enable-build-with-cxx is a different.
Hmm. --enable-stage1-languages=c,c++ is not sufficient, as that won't
cause libstdc++-v3 to be built in stage 1, leading to this error:
make[5]: Entering directory `/tmp/combined/build-gold/gold'
/tmp/combined/build-gold/./prev-gcc/g++ -B/tmp/combined/build-gold/./prev-gcc/ -B/usr/local/x86_64-unknown-linux-gnu/bin/ -nostdinc++ -I/tmp/combined/build-gold/prev-x86_64-unknown-linux-gnu/libstdc++-v3/include/x86_64-unknown-linux-gnu -I/tmp/combined/build-gold/prev-x86_64-unknown-linux-gnu/libstdc++-v3/include -I/tmp/combined/build-gold/../src/libstdc++-v3/libsupc++ -L/tmp/combined/build-gold/prev-x86_64-unknown-linux-gnu/libstdc++-v3/src/.libs -DHAVE_CONFIG_H -I. -I../../src/gold -I../../src/gold -I../../src/gold/../include -I../../src/gold/../elfcpp -DLOCALEDIR="\"/usr/local/share/locale\"" -DBINDIR="\"/usr/local/bin\"" -DTOOLBINDIR="\"/usr/local/x86_64-unknown-linux-gnu/bin\"" -W -Wall -Werror -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -frandom-seed=archive.o -g -O2 -gtoggle -MT archive.o -MD -MP -MF .deps/archive.Tpo -c -o archive.o ../../src/gold/archive.cc
In file included from ../../src/gold/archive.cc:23:0:
../../src/gold/gold.h:29:19: fatal error: cstddef: No such file or directory
compilation terminated.
make[5]: *** [archive.o] Error 1
make[5]: Leaving directory `/tmp/combined/build-gold/gold'
make[4]: *** [all-recursive] Error 1
make[4]: Leaving directory `/tmp/combined/build-gold/gold'
make[3]: *** [all] Error 2
make[3]: Leaving directory `/tmp/combined/build-gold/gold'
make[2]: *** [all-stage2-gold] Error 2
I think it is a bug, in that --enable-stage1-languages=c++ should enable
libstdc++-v3 in stage1, as documented (gcc.info):
| `--enable-stage1-languages=LANG1,LANG2,...'
| Specify that a particular subset of compilers and their runtime
| libraries should be built with the system C compiler during stage
| 1 of the bootstrap process, rather than only in later stages with
| the bootstrapped C compiler. [...]
So here is now a series of two patches to fix both of these issues.
Tested by:
- bootstrapping a combined tree, with
--enable-gold --enable-languages=c,c++ --enable-stage1-languages=c++
(leads to bootstrap comparison failures, as described elsewhere)
- bootstrapping a combined tree, with
--enable-gold --enable-languages=c,c++ --enable-build-with-cxx
(leads to bootstrap comparison failures, as described elsewhere)
- building a combined tree, sucessfully, with
--disable-bootstrap --enable-gold --enable-languages=c,c++
- bootstrapping a noncombined tree, successfully, with
--enable-gold --enable-languages=c,c++
- rightly failing to configure a combined tree with
--enable-gold --enable-languages=c,c++
(no regtesting done; please say so if there is need for that).
OK for trunk and src?
The logic in the first patch is a bit duplicated from the
--enable-stage1-languages chunk further below; I don't see any other way
to cope without doing either that or looping over all config-lang.in
files twice.
Thanks,
Ralf
2009-09-21 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
* configure.ac: Also add target_libs of stage1_languages to
bootstrap_target_libs.
* configure: Regenerate.
diff --git a/configure.ac b/configure.ac
index 4c48349..03ca3be 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1768,10 +1769,13 @@ if test -d ${srcdir}/gcc; then
new_enable_languages="${new_enable_languages}${language},"
potential_languages="${potential_languages}${language},"
missing_languages=`echo "$missing_languages" | sed "s/,$language,/,/"`
- case ${boot_language} in
- yes)
+ case "${boot_language}:,$enable_stage1_languages," in
+ yes:* | *:*,$language,* | *:*,yes, | *:*,all,)
# Add to (comma-separated) list of stage 1 languages.
- stage1_languages="${stage1_languages}${language},"
+ case ",$stage1_languages," in
+ *,$language,* | ,yes, | ,all,) ;;
+ *) stage1_languages="${stage1_languages}${language}," ;;
+ esac
# We need to bootstrap any supporting libraries.
bootstrap_target_libs="${bootstrap_target_libs}${target_libs},"
;;
Require c++ in stage1_languages with --enable-gold in combined bootstrap.
ChangeLog:
2009-09-21 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
* configure.ac: If bootstrapping a combined tree with
--enable-gold, require c++ in stage1_languages.
* configure: Regenerate.
diff --git a/configure.ac b/configure.ac
index 61de320..4c48349 100644
--- a/configure.ac
+++ b/configure.ac
@@ -2472,6 +2472,13 @@ case ",$enable_languages,:$ENABLE_BUILD_WITH_CXX:$enable_bootstrap" in
;;
esac
+case "$enable_bootstrap:$ENABLE_GOLD: $configdirs :,$stage1_languages," in
+ yes:yes:*\ gold\ *:*,c++,*) ;;
+ yes:yes:*\ gold\ *:*)
+ AC_MSG_ERROR([in a combined tree, bootstrapping with --enable-gold requires c++ in stage1_languages])
+ ;;
+esac
+
# Adjust the toplevel makefile according to whether bootstrap was selected.
case $enable_bootstrap in
yes)