tinycc-devel
[Top][All Lists]
Advanced

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

[Tinycc-devel] tcc-0.9.25 woes on 64 bit Red Hat system


From: Robert Starr
Subject: [Tinycc-devel] tcc-0.9.25 woes on 64 bit Red Hat system
Date: Wed, 1 Jul 2009 09:54:00 +0300

Made fine, but test3 fails.

% make test
make -C tests test
make[1]: Entering directory `/slc/gad/GAD/source/tcc-0.9.25/tests'
------------ libtest ------------
./libtcc_test lib_path=..
Hello World!
fib(32) = 2178309
add(32, 64) = 96
------------ test3 ------------
../tcc -B.. -DTCC_TARGET_X86_64 -run ../tcc.c -B.. -DTCC_TARGET_X86_64 -run ../tcc.c -B.. -DTCC_TARGET_X86_64 -run ../tcc.c -B.. -run tcctest.c > test.out3
tcc: undefined symbol 'alloca'
make[1]: *** [test3] Error 255
make[1]: Leaving directory `/slc/gad/GAD/source/tcc-0.9.25/tests'
make: *** [test] Error 2


Then, I try building a shared object,

% tcc foo.c -o libfoo.so -shared
/usr/lib/crti.o: invalid object file
/lib/libc.so.6: bad architecture
/usr/lib/crtn.o: invalid object file

% file foo.o
foo.o: ELF 64-bit LSB relocatable, AMD x86-64, version 1 (SYSV), not stripped

This is Red Hat 4.7 Enterprise.
% uname -a
Linux lnx_eob_7e154 2.6.9-78.0.13.ELsmp #1 SMP Wed Jan 7 17:45:52 EST 2009 x86_64 x86_64 x86_64 GNU/Linux

I don't have a clue what's going on with trying to build a shared object.

I rebuilt tcc from scratch, and here's what I got:

% make
/slc/gad/C/Linux64/bin/gcc -o tcc tcc.c -DTCC_TARGET_X86_64 -O2 -g -Wall -fno-strict-aliasing -Wno-pointer-sign -lm -ldl
In file included from tcc.c:21:
libtcc.c: In function 'tcc_open':
libtcc.c:1104: warning: field width should have type 'int', but argument 3 has type 'long int'
In file included from libtcc.c:1131,
                 from tcc.c:21:
tccgen.c: In function 'block':
tccgen.c:4085: warning: cast to pointer from integer of different size
tccgen.c:4108: warning: cast to pointer from integer of different size
/slc/gad/C/Linux64/bin/gcc -o libtcc1.o -c lib/libtcc1.c -O2 -Wall
ar rcs libtcc1.a libtcc1.o
/slc/gad/C/Linux64/bin/gcc -o libtcc.o -c libtcc.c -DTCC_TARGET_X86_64 -O2 -g -Wall -fno-strict-aliasing -Wno-pointer-sign
libtcc.c: In function 'tcc_open':
libtcc.c:1104: warning: field width should have type 'int', but argument 3 has type 'long int'
In file included from libtcc.c:1131:
tccgen.c: In function 'block':
tccgen.c:4085: warning: cast to pointer from integer of different size
tccgen.c:4108: warning: cast to pointer from integer of different size
ar rcs libtcc.a libtcc.o
/slc/gad/C/Linux64/bin/gcc -o libtcc_test tests/libtcc_test.c libtcc.a -I. -O2 -g -Wall -fno-strict-aliasing -Wno-pointer-sign -lm -ldl
Lnx154(tcc-0.9.25)% make test
make -C tests test
make[1]: Entering directory `/slc/gad/GAD/source/tcc-0.9.25/tests'
/slc/gad/C/Linux64/bin/gcc -o libtcc_test libtcc_test.c ../libtcc.a -I.. -O2 -g-Wall -fno-strict-aliasing -Wno-pointer-sign -lm -ldl
------------ libtest ------------
./libtcc_test lib_path=..
Hello World!
fib(32) = 2178309
add(32, 64) = 96
cp -u ../include/tcclib.h .
/slc/gad/C/Linux64/bin/gcc -o tcctest.gcc tcctest.c -I. -w -O2 -g -Wall -fno-strict-aliasing -Wno-pointer-sign
./tcctest.gcc > test.ref
------------ test3 ------------
../tcc -B.. -DTCC_TARGET_X86_64 -run ../tcc.c -B.. -DTCC_TARGET_X86_64 -run ../tcc.c -B.. -DTCC_TARGET_X86_64 -run ../tcc.c -B.. -run tcctest.c > test.out3
tcc: undefined symbol 'alloca'
make[1]: *** [test3] Error 255
make[1]: Leaving directory `/slc/gad/GAD/source/tcc-0.9.25/tests'
make: *** [test] Error 2
Lnx154(tcc-0.9.25)% tcc -shared -o /tmp/libfoo.so /tmp/foo.c
/usr/lib/crti.o: invalid object file
/lib/libc.so.6: bad architecture
/usr/lib/crtn.o: invalid object file

Any idea where I am messing up?
Thanks,
Bob

reply via email to

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