I have been trying to install lcc on a 64-bit version of UBUNTU
without much success.
The system build gives lots of warnings, particularly:
conflicting types for built-in function 'execv'
The ABI of passing union with long double has changed in GCC 4.4
incompatible implicit declaration of of built-in function
'malloc' (also realloc and free)
However, it does build a version of lcc, rcc etc
It fails all compiler tests with the following messages:
make CC=gcc TARGET=x86/linux test
/usr/tmp/lcc-4.2/x86/linux/rcc -target=x86/linux /usr/tmp/lcc-4.2/x86/
linux/x86/linux/tst/8q.s:
/usr/tmp/lcc-4.2/x86/linux/lcc: /usr/tmp/lcc-4.2/x86/linux/gcc/cpp: No
such file or directory
diff: /usr/tmp/lcc-4.2/x86/linux/x86/linux/tst/8q.2: No such file or
directory
diff: /usr/tmp/lcc-4.2/x86/linux/x86/linux/tst/8q.s: No such file or
directory
.......
I use a link to UBUNTU's cpp than than lcc's cpp because lcc's version
of cpp gives the following errors:
dja:~/lcc>/usr/local/lib/lcc-4.2/cpp ../test.c
cpp: ../test.c:1 Could not find include file <stdio.h>
#line 1 "../test.c"
int main()
{
printf("hello world");
return 1;
}
but a simple "hello world" gives
dja:~>lcc -o test test.c
<command-line>: warning: "__STDC__" redefined
<built-in>: warning: this is the location of the previous definition
/tmp/lcc43351.s: Assembler messages:
/tmp/lcc43351.s:6: Error: suffix or operands invalid for `push'
/tmp/lcc43351.s:7: Error: suffix or operands invalid for `push'
/tmp/lcc43351.s:8: Error: suffix or operands invalid for `push'
/tmp/lcc43351.s:9: Error: suffix or operands invalid for `push'
/tmp/lcc43351.s:11: Error: suffix or operands invalid for `push'
/tmp/lcc43351.s:17: Error: suffix or operands invalid for `pop'
/tmp/lcc43351.s:18: Error: suffix or operands invalid for `pop'
/tmp/lcc43351.s:19: Error: suffix or operands invalid for `pop'
/tmp/lcc43351.s:20: Error: suffix or operands invalid for `pop'
dja:~>
I have tried to build it manually and also to run the shell BUILD-
LCC.sh,
which I edited for lcc.4.2 (from lcc 4.1)
I also changed the gcc search code so that it finds gcc, as previously
it was finding gcc89
If anyone has been able to build lcc successfully on UBUNTU or has an
up-to-date script, that would be really helpful.
Many thanks
Dave Allerton
|
|
0
|
|
|
|
Reply
|
d.j.allerton (1)
|
12/7/2010 10:19:14 AM |
|