Well I have made some progress on this front:

I can now build ghdl (the compiler driver) and ghdl1 (the compiler
itself), and they work well enough to compile the (internal) "std"
library. With the help of Thomas S, I have verified that the internal
parse tree ("gimple code") is different but equivalent to his older
compiler.

At this point I believe the compiler probably works.

However, the process of compiling gcc itself now fails in a rather
strange way...
--------------------------------------------------------------------
/home/brian/Projects/ghdl/build472/./gcc/xgcc
-B/home/brian/Projects/ghdl/build472/./gcc/
-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    -g -O2 -m32
-O2  -g -O2 -DIN_GCC   -W -Wall -Wno-narrowing -Wwrite-strings
-Wcast-qual -Wstrict-prototypes -Wmissing-prototypes
-Wold-style-definition  -isystem ./include   -fpic -g -DIN_LIBGCC2
-fbuilding-libgcc -fno-stack-protector   -fpic -I. -I. -I../../.././gcc
-I/home/brian/Projects/ghdl/gcc-4.7.2/libgcc
-I/home/brian/Projects/ghdl/gcc-4.7.2/libgcc/.
-I/home/brian/Projects/ghdl/gcc-4.7.2/libgcc/../gcc
-I/home/brian/Projects/ghdl/gcc-4.7.2/libgcc/../include
-I/home/brian/Projects/ghdl/gcc-4.7.2/libgcc/config/libbid
-DENABLE_DECIMAL_BID_FORMAT -DHAVE_CC_TLS  -DUSE_TLS -o _muldi3.o -MT
_muldi3.o -MD -MP -MF _muldi3.dep -DL_muldi3
-c /home/brian/Projects/ghdl/gcc-4.7.2/libgcc/libgcc2.c
-fvisibility=hidden -DHIDE_EXPORTS

xgcc: fatal error: no input files
compilation terminated.
make[4]: *** [_muldi3.o] Error 1

--------------------------------------------------------------------

That is, the bootstrap gcc compiler is failing to find its input files.
Yes I am configuring with --disable-bootstrap, so I don't understand why
this is happening...

So, the obvious and expected way of building it isn't working (either
with gcc4.7.0rc1 or gcc4.7.2); I have tried to find out why.

1) Create a new copy of the gcc source tree and build it into a new
build directory : works.

2) Ditto but add the vhdl folder to sourcedir/gcc, and it fails as
above; building any library with the first stage gcc compiler (which as
the relevant Makefile explains, "is renamed xgcc to avoid confusion".
NOTE - at this stage, --enable-languages does NOT need to include vhdl!

3) Ditto but renaming sourcedir/gcc/vhdl/config-lang.in to something
else : build works.

4) Restoring sourcedir/gcc/vhdl/config-lang.in, commenting out the line
"outputs=vhdl/Makefile", and renaming sourcedir/gcc/vhdl/Makefile.in
to something else, build fails in the same way.

I believe this will happen with the stock files from gna.org (SVN
revision 143) without any of my changes needed to actually build ghdl
(actually that should be my next experiment!)

So my conclusion is that GCC4.7 has an allergic reaction to some
component of either config-lang.in or Make-lang.in, even WITHOUT VHDL in
the list of enabled languages. 

It is taking a devilishly long time to narrow it down further.

If anyone with experience building gcc or ghdl at this point would like
to comment, or even reproduce the above, please do so...

- Brian



_______________________________________________
Ghdl-discuss mailing list
[email protected]
https://mail.gna.org/listinfo/ghdl-discuss

Reply via email to