Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

stage0 gcc3 needs patching in order to build in gcc >=4.3 #28

Closed
roytam1 opened this Issue Apr 18, 2012 · 5 comments

Comments

Projects
None yet
2 participants

roytam1 commented Apr 18, 2012

Otherwise error message will block building gcc3:
/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

see also: https://bugs.launchpad.net/ubuntu/+source/hdf5/+bug/286565/comments/6

Owner

rofl0r commented Apr 18, 2012

can you be more specific? what are you trying to achieve ?
it this some filesystem-related bug ?

roytam1 commented Apr 19, 2012

It fails to build stage0 gcc-3.4.6 without following patch

--- collect2.c.orig 2012-04-19 08:22:57.378915948 +0800
+++ collect2.c  2012-04-18 21:00:42.246534966 +0800
@@ -1529,17 +1529,17 @@
      since we might not end up needing something that we could not find.  */

   if (argv[0] == 0)
     fatal ("cannot find `%s'", prog);

   if (redir)
     {
       /* Open response file.  */
-      redir_handle = open (redir, O_WRONLY | O_TRUNC | O_CREAT);
+      redir_handle = open (redir, O_WRONLY | O_TRUNC | O_CREAT, S_IRWXU);

       /* Duplicate the stdout and stderr file handles
     so they can be restored later.  */
       stdout_save = dup (STDOUT_FILENO);
       if (stdout_save == -1)
    fatal_perror ("redirecting stdout: %s", redir);
       stderr_save = dup (STDERR_FILENO);
       if (stderr_save == -1)
Owner

rofl0r commented Apr 19, 2012

from what i can tell this patch will create whatever files it creates using mode 0700, which is definitely not the default for stuff like .so and .o, where it makes sense when at least the group can read it as well.

so please, explain your issue and why you need this patch.

roytam1 commented Apr 19, 2012

so please, explain your issue and why you need this patch.

It shows error message in log:
/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

and gcc-3.4.6 failed to compile.
Host: ubuntu 10.04, gcc 4.5.3.

Owner

rofl0r commented Apr 19, 2012

it seems you're using a pretty funky toolchain to build.
anyway, should be fixed by 945a8e4

@rofl0r rofl0r closed this Apr 19, 2012

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment