Hello, > I last built the mcode version of ghdl on a Mac on December 4, 2013 > against the -r150 svn image on gna.org . I last used the build > script to build a linux version (lubuntu 12.04) on 12 December 2013. > > > The build quit in a different place for me today against the current > hg archive from SourceForge: > > > mcode/dwarf.ads > gcc -c -I./ -I../../ortho/mcode -I../../ortho -gnaty3befhkmr -gnata > -gnatwae -I../.. -I.. -I../../psl -I../grt -g -gnatf -gnat05 -I- > /opt/test/build/ghdl/ortho/mcode/ortho_code-x86-flags_macosx.ads > gnatbind -aI../../ortho/mcode -aI../../ortho -aI../.. -aI.. > -aI../../psl -aI../grt -aO.. -E -x ghdl_mcode.ali > gnatlink ghdl_mcode.ali -g memsegs_c.o chkstk.o i386.o linux.o > times.o grt-cbinding.o grt-cvpi.o > ld: warning: could not create compact unwind for > __Unwind_ForcedUnwind: non-standard register 0 being saved in prolog > ld: warning: could not create compact unwind for __Unwind_Resume: > non-standard register 0 being saved in prolog > ld: warning: could not create compact unwind for > __Unwind_RaiseException: non-standard register 0 being saved in > prolog > ld: warning: could not create compact unwind for > __Unwind_Resume_or_Rethrow: non-standard register 0 being saved in > prolog > david_koontz@Macbook: > > > It looks like a linking error from doing something ineligible > register allocation wise that someone has checked in recently. It's > likely something not compatible with version of the compiler used > (an ABI issue for something done in assembly language?).
That's only a warning, but that will prevent exceptions to work. Compile with -Wl,-no_compact_unwind. > The hg revision -r145 failed too, with even more information: > > > gnatbind -aI../../ortho/mcode -aI../../ortho -aI../.. -aI.. > -aI../../psl -aI../grt -aO.. -E -x ghdl_mcode.ali > gnatlink ghdl_mcode.ali -g memsegs_c.o chkstk.o i386.o linux.o > times.o grt-cbinding.o grt-cvpi.o > ld: warning: could not create compact unwind for > __Unwind_ForcedUnwind: non-standard register 0 being saved in prolog > ld: warning: could not create compact unwind for __Unwind_Resume: > non-standard register 0 being saved in prolog > ld: warning: could not create compact unwind for > __Unwind_RaiseException: non-standard register 0 being saved in > prolog > ld: warning: could not create compact unwind for > __Unwind_Resume_or_Rethrow: non-standard register 0 being saved in > prolog > ld: warning: PIE disabled. Absolute addressing (perhaps > -mdynamic-no-pic) not allowed in code signed PIE, but used in > _grt_stack_create from i386.o. To fix this warning, don't compile > with -mdynamic-no-pic or link with -Wl,-no_pie > > > Which says there's something predating wrong. Yes, that was fixed. > Playing with the flags shown doesn't do anything interesting. > I tried hg -r1, then the svn -r145 from gna.org at got the same bit > which says something likely about switching to Mac OS X 10.9.1 (done > since the last OS X build of the mcode version). > > > For grins I tried executing !make and it didn't do anything. > > > So tried again with: > > > hg clone http://hg.code.sf.net/p/ghdl-updates/code ghdl_mcode1 > cd ghdl_mcode1/translate/ghdldrv > rm ortho_code-x86-flags.ads > make target=darwin-i686 > > > > > gnatbind -aI../../ortho/mcode -aI../../ortho -aI../.. -aI.. > -aI../../psl -aI../grt -aO.. -E -x ghdl_mcode.ali > gnatlink ghdl_mcode.ali -g memsegs_c.o chkstk.o i386.o linux.o > times.o grt-cbinding.o grt-cvpi.o > ld: warning: could not create compact unwind for > __Unwind_ForcedUnwind: non-standard register 0 being saved in prolog > ld: warning: could not create compact unwind for __Unwind_Resume: > non-standard register 0 being saved in prolog > ld: warning: could not create compact unwind for > __Unwind_RaiseException: non-standard register 0 being saved in > prolog > ld: warning: could not create compact unwind for > __Unwind_Resume_or_Rethrow: non-standard register 0 being saved in > prolog > > > And looked a bit harder. ghdl_mcode exists. This would be enough for > the script to bomb out but you can amend the script to ignore the > make error followed by a check to see ghdl_mcode exists. > > > ln -s ghdl_mcode ghdl > make install.mcode # and it built. > > > david_koontz@Macbook: ghdl --version > GHDL 0.31dev (20132311) [Dunoon edition] > Compiled with GNAT Version: 4.4.0 20080314 (experimental) > mcode code generator > Written by Tristan Gingold. > > > ln -s $cwd/ghdl_mcode ~/bin/ghdl > > > (to get the new ghdl_mcode version first in my PATH) > > > > > david_koontz@Macbook: which ghdl > /Users/david_koontz/bin/ghdl > david_koontz@Macbook: ghdl --version > GHDL 0.31dev (20132311) [Dunoon edition] > Compiled with GNAT Version: 4.4.0 20080314 (experimental) > mcode code generator > Written by Tristan Gingold > > > In a directory containing a DES chip model: > > > david_koontz@Macbook: make -f Makefile.ghdl ghwview > /usr/bin/open des_tb_ghw.gtkw & > david_koontz@Macbook: make -f Makefile.ghdl ghw > ghdl -a bidir.vhdl inbuf.vhdl invbuf.vhdl clkbuf.vhdl outbuf.vhdl > ghdl -a reg8s.vhdl sr4.vhdl sr8.vhdl reg6.vhdl > ghdl -a sbox1.vhdl sbox2.vhdl sbox3.vhdl sbox4.vhdl sbox5.vhdl > sbox6.vhdl sbox7.vhdl sbox8.vhdl > ghdl -a statem.vhdl > ghdl -a cd_reg.vhdl > ghdl -a dslice0.vhdl dslice1.vhdl dslice2.vhdl dslice3.vhdl > ghdl -a des.vhdl > ghdl -a key_vector.vhdl plain_vector.vhdl cipher_vector.vhdl > encrypt_vector.vhdl > ghdl -a des_tb.vhdl > ghdl -e des_tb > ghdl -r des_tb --stop-time=587200ns --wave=des_tb.ghw > ghdl:info: simulation stopped by --stop-time > touch ghw > david_koontz@Macbook: make -f Makefile.ghdl ghwview > > > > > > > > So there's something now broken in the build process, but it's not > the same problem you exhibit. > > > It looks like either your source code image is damaged or you have a > tool chain issue. > > > david_koontz@Macbook: which gnatlink > /usr/local/Ada-4.3/bin/gnatlink > > > david_koontz@Macbook: echo $PATH > /usr/local/Ada-4.3/bin:.:/Users/david_koontz/bin:/Users/david_koontz/share/clang+llvm-3.3-x86_64-apple-darwin12/bin:/usr/bin:/usr/sbin:/bin:/sbin:/usr/local/bin:/usr/X11/bin/:/usr/libexec > > > The consequence of the path is that it uses both gcc and gnat from > Ada-4.3. > > > You could notice the distinct lack of /opt/local/bin (no Macports in > path). > > > I verified the i386 version of the gcc/gnat tools is the one > referenced. > > > http://www.macada.org/macada/Downloads_files/Gnati386-4.3.dmg > > > I downloaded it again, expanded it and compared contents to my > installed copy. I think this version of gnat is slightly too old, that's the reason why you need to link with -no_compact_unwind. Tristan. _______________________________________________ Ghdl-discuss mailing list [email protected] https://mail.gna.org/listinfo/ghdl-discuss
