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: Ed Smith-Rowland
Subject: Re: [Gm2] Bootstrapping GM2 on MacOSX Panther
Date: Fri, 18 Mar 2005 09:32:14 -0500
User-agent: Mozilla Thunderbird 1.0 (Macintosh/20041206)

Gaius Mulley wrote:

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

_______________________________________________
gm2 mailing list
address@hidden
http://floppsie.comp.glam.ac.uk/mailman/listinfo/gm2

I get a different set of undefined symbols. Perhaps the first undefined symbol was just hiding these (although I thought ld would complain about ALL the undefined symbols).

MacOSX:~/gcc/obj-3.3.4+gm2-20041222/gcc ed$ 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
ld: Undefined symbols:
_SymbolKey_GetSymKey
_SymbolKey_InitTree
_SymbolKey_PutSymKey

Then I tried to do this:
MacOSX:~/gcc/obj-3.3.4+gm2-20041222/gcc ed$ 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/*.o

and this compile worked (with a bunch of warnings about multiply defined symbols.





reply via email to

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