gm2
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Gm2] Building gm2-4.7.3 on MacOS 10.5.8/PPC


From: john o goyo
Subject: Re: [Gm2] Building gm2-4.7.3 on MacOS 10.5.8/PPC
Date: Wed, 03 Sep 2014 13:12:17 -0400
User-agent: Mozilla/5.0 (Macintosh; U; PPC Mac OS X 10.5; en-GB; rv:1.9.2.23) Gecko/20110920 Thunderbird/3.1.15

On 02/09/2014 21:59, john o goyo wrote:
On 01/09/2014 05:11, Gaius Mulley wrote:
john o goyo<address@hidden> writes:

The release of 2014-08-30 now passed CFLAGS down to the gm2 area and
builds p2c but then fails to build ppg because it found no main().

Where is the main() associated with ppg?

Hi John,

inside mod_init.c, it is built by the rule in:

gcc-4.7.3+gm2-git-latest/gm2/gcc-versionno/gcc/gm2/Make-lang.in:2267

could it be that say mklink also failed to build and is not creating
the mod_init.c file correctly (empty file?)

The file mod_init.c is in gcc/gm2 and contains main(). It is also
compiled and _main is in mod_init.o. Where is ppg actually linked
so that I may examine the list of objects modules included?

Further to the above, I found the building script in gm2/Make-lang.in:

gm2/ppg$(exeext): gm2/p2c/p2c-src/src/libp2c.a gm2/boot-bin/mklink gm2/boot-bin/p2c \ gm2/gm2-libs-boot/libgm2.a $(GM2-PPG-MODS:%.mod=gm2/gm2-compiler-boot/%.o) \
     gm2/gm2-compiler-boot/ppg.o
        $(QUIAT)echo "building gm2/ppg" ; \
        if [ -f gm2/ppg$(exeext) ] ; then \
            echo "hmm already built" ; \
        fi ; \
        cd gm2 ; \
        ../$(M2LINK) -s ../$(srcdir)/gm2/init/ppginit ; \
        $(CC) $(CFLAGS) -c mod_init.c -o mod_init.o ; \
        M2PATH=". gm2-libs-boot gm2-compiler-boot" ; export M2PATH ; \
../$(M2LINK) -l --lib p2c/p2c-src/src/libp2c.a --lib ../../libiberty/safe-ctype.o ../$(srcdir)/gm2/init/ppginit ; \
        $(SHELL) linkcommand ; \
        $(RM) linkcommand ; \
        if [ -x a$(exeext) ] ; then \
            mv a$(exeext) ppg$(exeext) ; \
        elif [ -x a.out ] ; then \
            mv a.out ppg$(exeext) ; \
        else \
            echo "failed to link $@" ; \
            exit 1; \
        fi

Now mod_init.o is there but could you please explain the linking
instructions above?  A grep for linkcommand found nothing that I understood.

john



reply via email to

[Prev in Thread] Current Thread [Next in Thread]