Hmm ok... finaly i used gcc-3.3.6, it compiles perfectly. Now, i'm trying to compile gcc for SH4 and i've a wierd problem. I successfully compiled: binutils, gcc (without header), newlib. But now when i'm trying to compile gcc with newlib (last step), i got this error: --- mkdir /usr/local/dreamcast-toolchain/sh-elf/include/c++/3.4.6/./sh-elf/bits/stdc++.h.gch for file in ./sh-elf/bits/stdc++.h.gch/*; do \ /usr/bin/install -c -m 644 $file /usr/local/dreamcast-toolchain/sh-elf/include/c++/3.4.6/./sh-elf/bits/stdc++.h.gch; done install: ./sh-elf/bits/stdc++.h.gch/*: No such file or directory gmake[5]: *** [install-pch] Error 71 -- And actually, it's right, there is no file in [...]/sh-elf/bits/stdc++.h.gch/ Andrew Haley wrote: > > bugzilla wrote: >> Hi, >> >> I'm having trouble compiling gcc-3.4.6 with gcc-4.4.1. >> >> It fails at: >> --- >> % ./configure --host=x86_64-pc-linux-gnu --target=x86_64-pc-linux-gnu >> --enable-languages=c,c++ >> % make CC=x86_64-pc-linux-gnu-gcc-4.4.1 >> [...] >> x86_64-pc-linux-gnu-gcc-4.4.1 -g -O2 -DIN_GCC -W -Wall >> -Wwrite-strings >> -Wstrict-prototypes -Wmissing-prototypes -pedantic -Wno-long-long >> -DHAVE_CONFIG_H -I. -I. -I. -I./. -I./../include \ >> -DTARGET_MACHINE=\"x86_64-pc-linux-gnu\" \ >> -c ./collect2.c -o collect2.o >> In file included from /usr/include/fcntl.h:217, >> from ./system.h:214, >> from ./collect2.c:30: >> In function 'open', >> inlined from 'collect_execute' at ./collect2.c:1537: >> /usr/include/bits/fcntl2.h:51: erreur: call to '__open_missing_mode' >> declared with attribute error: open with O_CREAT in second argument needs >> 3 >> arguments > > It's often hard to build old versions of gcc with new ones, because > old versions were often nonstandard. You'll have to look at the code. > > In this case, the error is perfectly correct: > > redir_handle = open (redir, O_WRONLY | O_TRUNC | O_CREAT); > > mode specifies the permissions to use in case a new file is > cre- > ated. This argument must be supplied when O_CREAT is > specified > in flags; if O_CREAT is not specified, then mode is > ignored. > > So you'll have to add a mode, maybe 0666. > > Andrew. > > -- View this message in context: http://www.nabble.com/Compiling-gcc-3.4.6-with-gcc-4.4.1-tp25696933p25835062.html Sent from the gcc - Help mailing list archive at Nabble.com.