gm2
[Top][All Lists]
Advanced

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

Re: [Gm2] Bootstrapping GM2 on MacOSX Panther


From: Gaius Mulley
Subject: Re: [Gm2] Bootstrapping GM2 on MacOSX Panther
Date: 18 Mar 2005 10:21:35 +0000
User-agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.2

Ed Smith-Rowland <address@hidden> writes:

> Michael H. Lambert wrote:
> 
> > Ed,
> >
> > Did you ever get this problem figured out?  When I try to build, it
> > appears that stage1/gm2/gm2lcc links, but then I see
> >
> > gcc   -g -DIN_GCC   -W -Wall -Wwrite-strings -Wstrict-prototypes
> > -Wmissing-prototypes    -DHAVE_CONFIG_H  -o stage1/gm2/gm2l \
> >               gm2/gm2-compiler-boot/gm2l_init.o \
> >               gm2/gm2-compiler-boot/m2flex.o \
> >               gm2/gm2-compiler-boot/gm2l.o
> > gm2/gm2-compiler-boot/gm2.a gm2/gm2-libs-boot/libgm2.a
> > gm2/p2c/p2c-src/src/libp2c.a                     ./intl/libintl.a
> > -liconv  ../libiberty/libiberty.a
> > ld: Undefined symbols:
> > _M2Reserved_NulName
> > make[2]: *** [stage1/gm2/gm2l] Error 1



>     find . -name 'M2Reserved.o' -exec nm {} \; -print
> 
> and send him the results.
> 
> I did and there were two files of this name:
> ./gcc/gm2/gm2-compiler/M2Reserved.o which did NOT have the symbol
> _M2Reserved_NulName and
> ./gcc/gm2/gm2-compiler-boot/M2Reserved.o which DID have that symbol.

Hi,

I've performed some further investigation and I get the same results
as yourself. 

The difference in object files w.r.t NulName in M2Reserved.o between
stage1 and stage2 is okay, because p2c ignores the EXPORT QUALIFIED
and automatically exports all identifiers in a definition module using
ModuleName_Identifier whereas during stage2 the gm2 front end sees
that NulName is not actually EXPORT QUALIFIED and therefore does not
prefix the module name to the identifier.

So your file: ./gcc/gm2/gm2-compiler-boot/M2Reserved.o
should declare the _M2Reserved_NulName (which it does). So why is
the gm2l link failing?

Which is odd given that gm2 has successfully built stage1/gm2/cc1gm2
(I assume) as you have .o files in the build/gcc/gm2/gm2-compiler
directory (all which are generated by stage1/gm2/cc1gm2).

I think I would attempt to try manually link `gm2l' by adding
gm2/gm2-compiler-boot/M2Reserved.o to the gcc command:

gcc   -g -DIN_GCC   -W -Wall -Wwrite-strings -Wstrict-prototypes
-Wmissing-prototypes    -DHAVE_CONFIG_H  -o stage1/gm2/gm2l \
              gm2/gm2-compiler-boot/gm2l_init.o \
              gm2/gm2-compiler-boot/m2flex.o \
              gm2/gm2-compiler-boot/gm2l.o gm2/gm2-compiler-boot/gm2.a \
 gm2/gm2-libs-boot/libgm2.a gm2/p2c/p2c-src/src/libp2c.a \
 ./intl/libintl.a  -liconv  ../libiberty/libiberty.a \
 gm2/gm2-compiler-boot/M2Reserved.o

and see whether this works?

Gaius



reply via email to

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