On Jan 11, 2012, at 5:20 AM, Dave Webb wrote:

> Hi all,
> 
>> https://github.com/nickg/ghdl/tree/nick
> I just forked that
> https://github.com/davewebb8211/ghdl
> and pushed my changes. At least it compiles with gcc-4.6.0.
> 
> As mentioned before, it compiles but now I'm stuck at make install.all
> in ./translate/ghdldrv. I get ghdl1-gcc:*command-line*: cannot find
> "std" library. This is a small improvement to my last post. I haven't
> understand all the gimple tree stuff.
> 

Not exactly crew but I used to do a lot of gcc stuff a few years ago.  I'm also 
working on a Mac, so I figured in share a little more of the cautionaries you 
can run into.  This under OS X 10.7.2, which isn't particularly bad.  
Unfortunately I have 7 gcc tool sets on the the thing (plus two in a VM running 
lubuntu) and it requires setting paths for libgmp,mpfr, etc, because there's 32 
bit set of tools from Adacore I use to build the machine code version sitting 
in /usr/local until I can figure out what to do about the whinging over 
incompatible assembly language and inline code files.

Anyway I uncompressed the distributions involved in building gcc with vhdl 
(only) in a parallel directory to build and gcc-4.6.0 and run this script:

david_koontz@Macbook: more ../archives/script
#!/bin/csh -v
cp -r gcc-4.6.0 ..
cp -r gmp-5.0.2 ../gcc-4.6.0/gmp
cp -r mpc-0.9  ../gcc-4.6.0/mpc
cp -r mpfr-3.1.0 ../gcc-4.6.0/mpfr
cp -r ghdl-0.29/vhdl ../gcc-4.6.0/gcc
mkdir ../build
cd ../build

setenv CC /opt/local/bin/gcc-mp-4.6
setenv GCC /opt/local/bin/gcc-mp-4.6  # actually 4.6.2 from Macports
setenv GNAT /opt/gcc-4.6.0-x86_64/bin

# configure with disabled bootstrap
#just vhdl
../gcc-4.6.0/configure --with-gmp=/opt/local --with-mpfr=/opt/local 
--with-gmp=/opt/local --enable-languages=vhdl --disable-bootstrap 
--target=x86_64-apple-darwin --build=x86_64-apple-darwin 
--host=x86_64-apple-darwin
make -j12
 --
And interestingly enough  according to Lluis Batlle i Rossell 
(http://www.mail-archive.com/ghdl-discuss@gna.org/msg01187.html) gmake can give 
you:

> make[3]: *** No rule to make target `../gcc/gtype-vhdl.h', needed by 
> `ortho-lang.o'.  Stop.

When using the -jN flag.  I can attest to that.  Ya could wonder if someone 
wasn't blocking on sucessive dependencies or something.

(http://rpmfind.net/linux/RPM/epel/6/i386/debug/ghdl-debuginfo-0.29-0.138svn.1.el6.i686.html)

And look, it was doing multilib stuff right before the error:

cho "#define BUILDING_GCC_MINOR `echo 4.6.0 | sed -e 
's/^[0-9]*\.\([0-9]*\).*$/\1/'`" >> bversion.h
echo 'END_OF_BASE_TREE_CODES' >> tmp-all-tree.def
echo '#include "c-family/c-common.def"' >> tmp-all-tree.def
echo timestamp > s-gtyp-input
ltf=""; for f in $ltf; do \
          echo "#include \"$f\""; \
        done | sed 's|../../gcc-4.6.0/gcc/||' >> tmp-all-tree.def
echo "#define BUILDING_GCC_PATCHLEVEL `echo 4.6.0 | sed -e 
's/^[0-9]*\.[0-9]*\.\([0-9]*\)$/\1/'`" >> bversion.h
if test yes = yes \
           || test -n ""; then \
          /bin/sh ../../gcc-4.6.0/gcc/genmultilib \
            "m32" \
            "i386" \
            "" \
            "" \
            "" \
            "" \
            "" \
            "yes" \
            > tmp-mlib.h; \
        else \
          /bin/sh ../../gcc-4.6.0/gcc/genmultilib '' '' '' '' '' '' '' no \
            > tmp-mlib.h; \
        fi
/bin/sh ../../gcc-4.6.0/gcc/../move-if-change tmp-all-tree.def all-tree.def
echo "#define BUILDING_GCC_VERSION (BUILDING_GCC_MAJOR * 1000 + 
BUILDING_GCC_MINOR)" >> bversion.h
lsf="../../gcc-4.6.0/gcc/vhdl/lang-specs.h"; for f in $lsf; do \
            echo "#include \"$f\""; \
        done | sed 's|../../gcc-4.6.0/gcc/||' > tmp-specs.h
/bin/sh ../../gcc-4.6.0/gcc/../move-if-change tmp-specs.h specs.h
echo timestamp > s-bversion
echo timestamp > s-alltree
echo "/opt/local/bin/gcc-mp-4.6   -g -O2 -DIN_GCC   -W -Wall -Wwrite-strings 
-Wcast-qual -Wstrict-prototypes -Wmissing-prototypes -Wmissing-format-attribute 
-pedantic -Wno-long-long -Wno-variadic-macros -Wno-overlength-strings 
-Wold-style-definition -Wc++-compat   -DHAVE_CONFIG_H -L/opt/local/lib" > 
checksum-options.tmp \
        && ../../gcc-4.6.0/gcc/../move-if-change checksum-options.tmp 
checksum-options
echo timestamp > s-specs
awk -f ../../gcc-4.6.0/gcc/config/i386/i386-builtin-types.awk 
../../gcc-4.6.0/gcc/config/i386/i386-builtin-types.def > tmp-bt.inc
make[2]: *** No rule to make target `../gcc/gtype-vhdl.h', needed by 
`ortho-lang.o'.  Stop.
make[2]: *** Waiting for unfinished jobs....
/bin/sh ../../gcc-4.6.0/gcc/../move-if-change tmp-bt.inc i386-builtin-types.inc
echo timestamp > s-i386-bt
/bin/sh ../../gcc-4.6.0/gcc/../move-if-change tmp-mlib.h multilib.h
echo timestamp > s-mlib
/bin/sh ../../gcc-4.6.0/gcc/../move-if-change tmp-optionlist optionlist
echo timestamp > s-options
make[1]: *** [all-gcc] Error 2
make: *** [all] Error 2

 --

Any way, even for not having current club house membership for a gcc guy, I'll 
see how far it goes.  There's a redhat rpm that adds this as part of a debug 
package I think.    

Setting it to -j1 continues for a while and freezes up somewhere else:
 ...

                -o build/gengtype-state.o ../../gcc-4.6.0/gcc/gengtype-state.c
/opt/local/bin/gcc-mp-4.6   -g -O2 -DIN_GCC   -W -Wall -Wwrite-strings 
-Wcast-qual -Wstrict-prototypes -Wmissing-prototypes -Wmissing-format-attribute 
-pedantic -Wno-long-long -Wno-variadic-macros -Wno-overlength-strings 
-Wold-style-definition -Wc++-compat   -DHAVE_CONFIG_H -DGENERATOR_FILE 
-L/opt/local/lib -o build/gengtype \
            build/gengtype.o build/errors.o build/gengtype-lex.o 
build/gengtype-parse.o build/gengtype-state.o build/version.o 
../build-x86_64-apple-darwin/libiberty/libiberty.a
build/gengtype  \
                    -S ../../gcc-4.6.0/gcc -I gtyp-input.list -w gtype.state
../../gcc-4.6.0/gcc/vhdl/ortho-lang.c:766: parse error: GTY must be specified 
before identifier
../../gcc-4.6.0/gcc/vhdl/ortho-lang.c:771: parse error: GTY must be specified 
before identifier
../../gcc-4.6.0/gcc/vhdl/ortho-lang.c:776: parse error: GTY must be specified 
before identifier
../../gcc-4.6.0/gcc/vhdl/ortho-lang.c:781: parse error: GTY must be specified 
before identifier
make[2]: *** [s-gtype] Error 1
make[1]: *** [all-gcc] Error 2
make: *** [all] Error 2

make --debug:

GNU Make 3.81
Copyright (C) 2006  Free Software Foundation, Inc.
This is free software; see the source for copying conditions.
There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A
PARTICULAR PURPOSE.

This program built for i386-apple-darwin11.0
Reading makefiles...
Updating goal targets....
 File `all' does not exist.
   File `all.internal' does not exist.
     File `start.encap' does not exist.
       File `native' does not exist.
         File `build-po' does not exist.
        Must remake target `build-po'.
        Successfully remade target file `build-po'.
         File `c' does not exist.
           File `cc1' does not exist.
             File `c-lang.o' does not exist.
               File `insn-flags.h' does not exist.
                 File `s-flags' does not exist.
                   File `build/genflags' does not exist.
                     File `build/rtl.o' does not exist.
                       File `gtype-desc.h' does not exist.
                         File `s-gtype' does not exist.
                        Must remake target `s-gtype'.
build/gengtype  \
                    -S ../../gcc-4.6.0/gcc -I gtyp-input.list -w gtype.state
../../gcc-4.6.0/gcc/vhdl/ortho-lang.c:766: parse error: GTY must be specified 
before identifier
../../gcc-4.6.0/gcc/vhdl/ortho-lang.c:771: parse error: GTY must be specified 
before identifier
../../gcc-4.6.0/gcc/vhdl/ortho-lang.c:776: parse error: GTY must be specified 
before identifier
../../gcc-4.6.0/gcc/vhdl/ortho-lang.c:781: parse error: GTY must be specified 
before identifier
make[2]: *** [s-gtype] Error 1
make[1]: *** [all-gcc] Error 2

But hey, the nm and as commands it built along the way works!  This seems like 
part of the build just out of sync.

You know once all this is ironed out, it could go in a Portfile.


_______________________________________________
Ghdl-discuss mailing list
Ghdl-discuss@gna.org
https://mail.gna.org/listinfo/ghdl-discuss

Reply via email to