I'm unable to get gcc to compile in ubuntu 10.04LTS.
Anybody know how to fix this without mucking with the header files?
Code:
gcc -g -O2 -DIN_GCC -DCROSS_COMPILE -W -Wall -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -Wtraditional -pedantic -Wno-long-long -DHAVE_CONFIG_H -I. -I. -I../../gcc-3.3.4/gcc -I../../gcc-3.3.4/gcc/. -I../../gcc-3.3.4/gcc/config -I../../gcc-3.3.4/gcc/../include \
-DTARGET_MACHINE=\"mips-TiVo-linux\" \
-c ../../gcc-3.3.4/gcc/collect2.c -o collect2.o
../../gcc-3.3.4/gcc/collect2.c: In function ‘notice’:
../../gcc-3.3.4/gcc/collect2.c:362: warning: traditional C rejects ISO C style function definitions
../../gcc-3.3.4/gcc/collect2.c: In function ‘fatal_perror’:
../../gcc-3.3.4/gcc/collect2.c:374: warning: traditional C rejects ISO C style function definitions
../../gcc-3.3.4/gcc/collect2.c: In function ‘fatal’:
../../gcc-3.3.4/gcc/collect2.c:392: warning: traditional C rejects ISO C style function definitions
../../gcc-3.3.4/gcc/collect2.c: In function ‘error’:
../../gcc-3.3.4/gcc/collect2.c:408: warning: traditional C rejects ISO C style function definitions
../../gcc-3.3.4/gcc/collect2.c: In function ‘dump_file’:
../../gcc-3.3.4/gcc/collect2.c:515: warning: comparison of unsigned expression < 0 is always false
In file included from /usr/include/fcntl.h:205,
from ../../gcc-3.3.4/gcc/system.h:208,
from ../../gcc-3.3.4/gcc/collect2.c:30:
In function ‘open’,
inlined from ‘collect_execute’ at ../../gcc-3.3.4/gcc/collect2.c:1575:
/usr/include/bits/fcntl2.h:51: error: call to ‘__open_missing_mode’ declared with attribute error: open with O_CREAT in second argument needs 3 arguments
make[1]: *** [collect2.o] Error 1
make[1]: *** Waiting for unfinished jobs....
make[1]: Leaving directory `/home/jjd/tivodev/toolchain/build-gcc/gcc'
make: *** [all-gcc] Error 2
**** gcc (stage 1) compile failed
Just starting to learn C and wanting to play around.