[Bug lto/48538] New: GCC build fails with -flto in BOOT_CFLAGS

2011-04-10 Thread jafb at tinet dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48538

   Summary: GCC build fails with -flto in BOOT_CFLAGS
   Product: gcc
   Version: 4.6.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: lto
AssignedTo: unassig...@gcc.gnu.org
ReportedBy: j...@tinet.org


I'm trying to build gcc with some nonstandard options and it fails.
The error looks to be a bug in lto.
I'm compiling the sources in gcc-4.6.0.tar.bz2 (the full bundle).
My OS is Fedora 14 linux x86_64, with all packages updated to latest versions.
Some libraries are not the right version, so I compiled the following:

gmp-4.3.2
ppl-0.11.2
polylib-5.22.5
cloog-ppl-0.15.11

My configuration is:
../gcc/configure --enable-threads --with-arch=corei7 --with-tune=corei7
--with-fpmath=sse --enable-__cxa_atexit --enable-indirect-function
--enable-languages=c,c++,java,lto,objc,obj-c++,fortran,ada,go
--enable-libgcj-multifile --enable-java-home --with-arch-directory=x86_64
--enable-aot-compile-rpm --enable-browser-plugin --with-x
--enable-java-awt=gtk,xlib --enable-gtk-cairo --with-gmp=/usr/local
--with-ppl=/usr/local --with-cloog=/usr/local

I'm building with the following options:
make BOOT_CFLAGS='-O3 -march=corei7 -flto' profiledbootstrap

The error I get is the following:
/usr/local/src/gccbuild/./prev-gcc/xgcc -B/usr/local/src/gccbuild/./prev-gcc/
-B/usr/local/x86_64-unknown-linux-gnu/bin/
-B/usr/local/x86_64-unknown-linux-gnu/bin/
-B/usr/local/x86_64-unknown-linux-gnu/lib/ -isystem
/usr/local/x86_64-unknown-linux-gnu/include -isystem
/usr/local/x86_64-unknown-linux-gnu/sys-include-static-libgcc
-static-libstdc++ -static-libgcc  -o gnat1 ada/b_gnat1.o ada/adadecode.o
ada/adaint.o ada/cstreams.o ada/cio.o ada/targtyps.o ada/decl.o ada/misc.o
ada/utils.o ada/utils2.o ada/trans.o ada/cuintp.o ada/argv.o ada/raise.o
ada/init.o ada/tracebak.o ada/initialize.o ada/env.o ada/a-charac.o
ada/a-chlat1.o ada/a-elchha.o ada/a-except.o ada/a-ioexce.o ada/ada.o ada/ali.o
ada/alloc.o ada/aspects.o ada/atree.o ada/butil.o ada/casing.o ada/checks.o
ada/comperr.o ada/csets.o ada/cstand.o ada/debug.o ada/debug_a.o ada/einfo.o
ada/elists.o ada/err_vars.o ada/errout.o ada/erroutc.o ada/eval_fat.o
ada/exp_aggr.o ada/exp_atag.o ada/exp_attr.o ada/exp_cg.o ada/exp_ch11.o
ada/exp_ch12.o ada/exp_ch13.o ada/exp_ch2.o ada/exp_ch3.o ada/exp_ch4.o
ada/exp_ch5.o ada/exp_ch6.o ada/exp_ch7.o ada/exp_ch8.o ada/exp_ch9.o
ada/exp_code.o ada/exp_dbug.o ada/exp_disp.o ada/exp_dist.o ada/exp_fixd.o
ada/exp_imgv.o ada/exp_intr.o ada/exp_pakd.o ada/exp_prag.o ada/exp_sel.o
ada/exp_smem.o ada/exp_strm.o ada/exp_tss.o ada/exp_util.o ada/exp_vfpt.o
ada/expander.o ada/fmap.o ada/fname-uf.o ada/fname.o ada/freeze.o
ada/frontend.o ada/g-byorma.o ada/g-hesora.o ada/g-htable.o ada/g-spchge.o
ada/g-speche.o ada/g-u3spch.o ada/get_scos.o ada/get_targ.o ada/gnat.o
ada/gnatvsn.o ada/hlo.o ada/hostparm.o ada/impunit.o ada/inline.o
ada/interfac.o ada/itypes.o ada/krunch.o ada/layout.o ada/lib-load.o
ada/lib-util.o ada/lib-writ.o ada/lib-xref.o ada/lib.o ada/live.o
ada/namet-sp.o ada/namet.o ada/nlists.o ada/nmake.o ada/opt.o ada/osint-c.o
ada/osint.o ada/output.o ada/par.o ada/par_sco.o ada/prep.o ada/prepcomp.o
ada/put_scos.o ada/repinfo.o ada/restrict.o ada/rident.o ada/rtsfind.o
ada/s-addope.o ada/s-assert.o ada/s-bitops.o ada/s-carun8.o ada/s-casuti.o
ada/s-conca2.o ada/s-conca3.o ada/s-conca4.o ada/s-conca5.o ada/s-conca6.o
ada/s-conca7.o ada/s-conca8.o ada/s-conca9.o ada/s-crc32.o ada/s-crtl.o
ada/s-except.o ada/s-exctab.o ada/s-htable.o ada/s-imenne.o ada/s-imgenu.o
ada/s-mastop.o ada/s-memory.o ada/s-os_lib.o ada/s-parame.o ada/s-purexc.o
ada/s-restri.o ada/s-secsta.o ada/s-soflin.o ada/s-sopco3.o ada/s-sopco4.o
ada/s-sopco5.o ada/s-stache.o ada/s-stalib.o ada/s-stoele.o ada/s-strcom.o
ada/s-strhas.o ada/s-string.o ada/s-strops.o ada/s-traceb.o ada/s-traent.o
ada/s-unstyp.o ada/s-utf_32.o ada/s-wchcnv.o ada/s-wchcon.o ada/s-wchjis.o
ada/scans.o ada/scil_ll.o ada/scn.o ada/scng.o ada/scos.o ada/sdefault.o
ada/seh_init.o ada/sem.o ada/sem_aggr.o ada/sem_attr.o ada/sem_aux.o
ada/sem_case.o ada/sem_cat.o ada/sem_ch10.o ada/sem_ch11.o ada/sem_ch12.o
ada/sem_ch13.o ada/sem_ch2.o ada/sem_ch3.o ada/sem_ch4.o ada/sem_ch5.o
ada/sem_ch6.o ada/sem_ch7.o ada/sem_ch8.o ada/sem_ch9.o ada/sem_disp.o
ada/sem_dist.o ada/sem_elab.o ada/sem_elim.o ada/sem_eval.o ada/sem_intr.o
ada/sem_mech.o ada/sem_prag.o ada/sem_res.o ada/sem_scil.o ada/sem_smem.o
ada/sem_type.o ada/sem_util.o ada/sem_vfpt.o ada/sem_warn.o ada/sinfo-cn.o
ada/sinfo.o ada/sinput-d.o ada/sinput-l.o ada/sinput.o ada/snames.o
ada/sprint.o ada/stand.o ada/stringt.o ada/style.o ada/styleg.o ada/stylesw.o
ada/switch-c.o ada/switch.o ada/system.o ada/table.o ada/targext.o
ada/targparm.o ada/tbuild.o ada/tree_gen.o ada/tree_in.o ada/tree_io.o
ada/treepr.o ada/treeprs.o ada/ttypes.o ada/types.o ada/uintp.o ada/uname.o
ada/urealp.o ada/usage.o ada/validsw.o ada/widechar.o 

[Bug lto/48538] GCC build fails with -flto in BOOT_CFLAGS

2011-04-10 Thread jafb at tinet dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48538

--- Comment #2 from jafb at tinet dot org 2011-04-10 11:45:55 UTC ---
Ok. In the documentation it said that was equivalent to -flto in BOOT_CFLAGS,
that's why I used it.
Now I've checked bootstrap-lto.mk and looks like it disables lto when doing a
profiled bootstrap. Is it right? I wonder what gives better performance: lto or
profiled-driven optimizations...


[Bug lto/48538] GCC build fails with -flto in BOOT_CFLAGS

2011-04-17 Thread jafb at tinet dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48538

--- Comment #4 from jafb at tinet dot org 2011-04-17 09:59:35 UTC ---
Mmmm I'm afraid using --with-build-config=bootstrap-lto crashes at the same
point with the same error.
As a workaround, can I compile the ada frontend after installing the rest,
without lto? How?
I have one doubt about compiling the ada frontend (sorry if I shouldn't be
asking this here). Documentation of --enable-threads config option looks to
tell that the correct option for ada targets is --enable-threads=gnat, but this
is equivalent to single for other targets. Should I compile everything except
ada with default threading library (I guess posix) and separately the ada
frontend with --enable-threads=gnat? Or am I misunderstanding?

By the way, make doesn't look to honor --with-build-config=bootstrap-O3. I'm
not an expert at all in Makefiles, but looking at the generated Makefile, the
file is included after setting STAGE_CFLAGS to the value of BUILD_CFLAGS (and
other variables from STAGE_CFLAGS). Of course, if BUILD_CFLAGS is altered after
that, these variables are not correspondingly altered.

More things I've found in my adventure of trying nonstandard options for
building:

- When using make -jn, when linking it claims to go back to -j1 because
(something about jobserver, if I remember right) and says that '+' should be
added to the top-level rule of the Makefile. Is this on purpose or '+' should
have automatically been added?

- Adding -mcmodel=large to BOOT_CFLAGS crashes (I think it's the assembler).
-mcmodel=medium works. But I don't understand very well how these options work.
Will the compiler have more available memory for data if I use medium model?
Does this afect the heap or only static memory? And more important, will the
compiler work correctly if it's compiled with these options?

Thanks a lot, and sorry again if any of my comments should not be here,

Juan


[Bug lto/48538] GCC build fails with -flto in BOOT_CFLAGS

2011-04-17 Thread jafb at tinet dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48538

--- Comment #6 from jafb at tinet dot org 2011-04-17 11:21:58 UTC ---
(In reply to comment #5)
> > Mmmm I'm afraid using --with-build-config=bootstrap-lto crashes at the 
> > same point with the same error.
> 
> Weird, LTO bootstrap for Ada is supposed to work (with default options).
> 

Well, I don't think it's difficult to reproduce, if you just compile with the
options I described initially.
I believe that it happens when I use profiledbootstrap together with lto, and
for the Ada frontend. But I'm not 100% sure, as the long time it takes to test
it every time prevents me from trying many combinations of options. I also
don't know if things like -O3 or -march=corei7 have something to do with it or
it would fail anyway. If I bound the minimal conditions that trigger this
problem better, I'll let you know.


[Bug lto/48538] profiled LTO bootstrap failure with Ada

2011-04-17 Thread jafb at tinet dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48538

--- Comment #11 from jafb at tinet dot org 2011-04-17 16:01:29 UTC ---
That was fast, thank you :)


[Bug bootstrap/48653] New: Bootstrap comparison failure with bootstrap-lto

2011-04-17 Thread jafb at tinet dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48653

   Summary: Bootstrap comparison failure with bootstrap-lto
   Product: gcc
   Version: 4.6.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: bootstrap
AssignedTo: unassig...@gcc.gnu.org
ReportedBy: j...@tinet.org


I'm trying to bootstrap gcc with the option --with-build-config=bootstrap-lto
and bootstrap comparison fails.
I'm compiling the sources in gcc-4.6.0.tar.bz2 (the full bundle).

My machine is a Core i7 920 (non-AVX)

My OS is Fedora 14 linux x86_64, with all packages updated to latest versions.
Some libraries are not the right version, so I compiled the following:

gmp-4.3.2
ppl-0.11.2
cloog-ppl-0.15.11
mpfr-2.4.2
mpc-0.8.1

My configuration is:

../gcc/configure --enable-threads --with-arch=corei7 --with-tune=corei7
--with-fpmath=sse --enable-__cxa_atexit --enable-indirect-function
--enable-languages=c,c++,java,lto,objc,obj-c++,fortran,go,ada
--enable-libgcj-multifile --enable-java-home --with-arch-directory=x86_64
--enable-aot-compile-rpm --enable-browser-plugin --with-x
--enable-java-awt=gtk,xlib --enable-gtk-cairo --with-gmp=/usr/local
--with-gmp-lib=/usr/local/lib64 --with-ppl=/usr/local
--with-ppl-lib=/usr/local/lib64 --with-cloog=/usr/local
--with-cloog-lib=/usr/local/lib64 --with-mpfr=/usr/local
--with-mpfr-lib=/usr/local/lib64 --with-mpc=/usr/local
--with-mpc-lib=/usr/local/lib64 --with-build-config='bootstrap-O3
bootstrap-lto'

And I'm building with:

make BOOT_CFLAGS=-O2 -j16 bootstrap

The error I get is the following:

Comparing stages 2 and 3
warning: gcc/cc1obj-checksum.o differs
warning: gcc/cc1objplus-checksum.o differs
warning: gcc/cc1plus-checksum.o differs
warning: gcc/cc1-checksum.o differs
Bootstrap comparison failure!
gcc/real.o differs
gcc/graphite-cloog-util.o differs
gcc/graphite-flattening.o differs
gcc/graphite-blocking.o differs
gcc/graphite-interchange.o differs
gcc/builtins.o differs
gcc/tree.o differs
gcc/graphite-dependences.o differs
gcc/fold-const.o differs
gcc/graphite-sese-to-poly.o differs
gcc/graphite-poly.o differs
gcc/double-int.o differs
gcc/graphite-scop-detection.o differs
gcc/tree-ssa-loop-niter.o differs
gcc/fortran/trans-array.o differs
gcc/fortran/constructor.o differs
gcc/fortran/interface.o differs
gcc/fortran/trans-intrinsic.o differs
gcc/fortran/dump-parse-tree.o differs
gcc/fortran/primary.o differs
gcc/fortran/expr.o differs
gcc/fortran/array.o differs
gcc/fortran/iresolve.o differs
gcc/fortran/st.o differs
gcc/fortran/arith.o differs
gcc/fortran/module.o differs
gcc/fortran/check.o differs
gcc/fortran/dependency.o differs
gcc/fortran/trans-decl.o differs
gcc/fortran/simplify.o differs
gcc/fortran/trans-stmt.o differs
gcc/fortran/io.o differs
gcc/fortran/decl.o differs
gcc/fortran/data.o differs
gcc/fortran/trans-const.o differs
gcc/fortran/class.o differs
gcc/fortran/frontend-passes.o differs
gcc/fortran/openmp.o differs
gcc/fortran/parse.o differs
gcc/fortran/match.o differs
gcc/fortran/trans-openmp.o differs
gcc/fortran/intrinsic.o differs
gcc/fortran/trans.o differs
gcc/fortran/misc.o differs
gcc/fortran/matchexp.o differs
gcc/fortran/trans-expr.o differs
gcc/fortran/trans-io.o differs
gcc/fortran/trans-common.o differs
gcc/fortran/trans-types.o differs
gcc/fortran/resolve.o differs
gcc/fortran/symbol.o differs
gcc/fortran/target-memory.o differs
gcc/graphite.o differs
gcc/toplev.o differs
gcc/go/unsafe.o differs
gcc/go/statements.o differs
gcc/go/lex.o differs
gcc/go/go.o differs
gcc/go/dataflow.o differs
gcc/go/gogo.o differs
gcc/go/expressions.o differs
gcc/go/types.o differs
gcc/go/import-archive.o differs
gcc/go/export.o differs
gcc/go/parse.o differs
gcc/go/gogo-tree.o differs
gcc/graphite-clast-to-gimple.o differs
gcc/realmpfr.o differs
gcc/graphite-ppl.o differs

Without bootstrap-lto, comparison succeeds.

Thanks,

Juan


[Bug bootstrap/48653] Bootstrap comparison failure with bootstrap-lto

2011-04-18 Thread jafb at tinet dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48653

--- Comment #2 from jafb at tinet dot org 2011-04-18 08:29:32 UTC ---
Sorry. I thought the default was -g -O2 and omitting -g in BOOT_CFLAGS is even
documented, but I won't file any other bugs for these reasons...