Re: Compiling gcc-3.4.6 with gcc-4.4.1

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

 



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.

[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux