skaller wrote:
On Tue, 2006-01-10 at 04:17 +0100, Luzifer Altenberg wrote:
localhost:~/neko undo$ make
cc -Wall -O3 -fPIC -fomit-frame-pointer -I vm -DCOMPACT_TABLE -o vm/
main.o -c vm/main.c
vm/main.c: In function 'executable_path':
vm/main.c:43: warning: passing argument 2 of '_NSGetExecutablePath'
from incompatible pointer type
cc -Wall -O3 -fPIC -fomit-frame-pointer -I vm -DCOMPACT_TABLE -o bin/
neko vm/main.o -L/Users/undo/neko/bin -lneko
(cd src; LD_LIBRARY_PATH=../bin: NEKOPATH=../boot:../bin ../bin/neko
nekoml -v neko/Main.nml nekoml/Main.nml)
Ubuntu Linux AMD64 gcc 4.0, with patch:
# For 64 bit
#
CFLAGS += -D_64BITS
I get:
vm/load.c:31: warning: dereferencing type-punned pointer will break
strict-aliasing rules
(there are 3-4 of these warnings in various places)
Try to replace in neko.h :
typedef struct { int __zero; } *vkind;
by
typedef struct _vkind { int __zero; } *vkind;
And
#define DEFINE_KIND(name) int_val __kind_##name = 0; vkind name =
(vkind)&__kind_##name;
By :
#define DEFINE_KIND(name) struct _vkind __kind_##name; vkind name =
&__kind_##name;
And tell me if it fix the warning.
cc -Wall -O3 -fPIC -fomit-frame-pointer -I vm -DCOMPACT_TABLE -D_64BITS
-o libs/std/string.o -c libs/std/string.c
libs/std/string.c:93: warning: conflicting types for built-in function
‘sprintf’
Hackish fix applied
libs/std/md5.c: In function ‘make_md5_rec’:
libs/std/md5.c:306: warning: pointer targets in passing argument 2 of
‘md5_update’ differ in signedness
Just a safe signed cast to add.
cc -Wall -O3 -fPIC -fomit-frame-pointer -I vm -DCOMPACT_TABLE -D_64BITS
-o libs/std/utf8.o -c libs/std/utf8.c
libs/std/utf8.c:45: warning: dereferencing type-punned pointer will
break strict-aliasing rules
Same as before.
Compiling nekoml/Neko.n
Typing nekoml.Main.compile
Typing done with nekoml/Main.nml
Compiling nekoml/Main.n
(cd src; LD_LIBRARY_PATH=../bin: NEKOPATH=../boot:../bin ../bin/neko
nekoc -link ../bin/nekoc.n neko/Main)
Uncaught exception - load.c(322) : Invalid module : nekoc
make: *** [compiler] Error 1
I tried a build with -O instead of -O3 but it didn't help.
I guess the md5 issue might be relevant to verifying module?
No since the module checker does not require the standard library.
This was just a small endianness issue. Fixed.
Nicolas
--
Neko : One VM to run them all (http://nekovm.org)