gcc: fix open() with O_CREATE for version 3.4.3 and 3.4.6
authorwoglinde <heinold@inf.fu-berlin.de>
Sun, 2 Nov 2008 17:34:21 +0000 (18:34 +0100)
committerwoglinde <heinold@inf.fu-berlin.de>
Sun, 2 Nov 2008 17:34:21 +0000 (18:34 +0100)
* on ubuntu the compiler starting with intreprid yells
  at using open() with O_CREATE and not settinge a
  proper filecreationmask
* closes bug 4626 reported by Vladimir Bondar with
  a modified patch
* bump PR on all .bb which are needing it

packages/gcc/gcc-3.4.4.inc
packages/gcc/gcc-3.4.4/gcc-posix.patch [new file with mode: 0644]
packages/gcc/gcc-3.4.6.inc
packages/gcc/gcc-3.4.6/gcc-posix.patch [new file with mode: 0644]
packages/gcc/gcc-cross-sdk_3.4.4.bb
packages/gcc/gcc-cross_3.4.4.bb
packages/gcc/gcc-native_3.4.4.bb
packages/gcc/gcc-native_3.4.6.bb
packages/gcc/gcc_3.4.4.bb

index 34204f1..0b5b714 100644 (file)
@@ -22,5 +22,6 @@ SRC_URI = "${GNU_MIRROR}/gcc/gcc-${PV}/gcc-${PV}.tar.bz2 \
           file://gcc34-configure.in.patch;patch=1 \
           file://gcc34-thumb-support.patch;patch=1 \
           file://gcc-cross-fixincl.patch;patch=1 \
+          file://gcc-posix.patch;patch=1 \
           "
 SRC_URI_append_fail-fast = " file://zecke-no-host-includes.patch;patch=1 "
diff --git a/packages/gcc/gcc-3.4.4/gcc-posix.patch b/packages/gcc/gcc-3.4.4/gcc-posix.patch
new file mode 100644 (file)
index 0000000..99f813e
--- /dev/null
@@ -0,0 +1,11 @@
+--- gcc-3.4.6/gcc/collect2.c   2008-10-04 18:17:17.796750393 +0400
++++ gcc-3.4.6/gcc/collect2.new 2008-10-04 18:24:10.120748711 +0400
+@@ -1534,7 +1534,7 @@ collect_execute (const char *prog, char 
+   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_IWUSR);
+       /* Duplicate the stdout and stderr file handles
+        so they can be restored later.  */
index 1afd7a2..b1f686b 100644 (file)
@@ -16,6 +16,7 @@ SRC_URI = "${GNU_MIRROR}/gcc/gcc-${PV}/gcc-${PV}.tar.bz2 \
           file://always-fixincperm.patch;patch=1 \
           file://GCOV_PREFIX_STRIP-cross-profile_3.4.patch;patch=1 \
           file://zecke-xgcc-cpp.patch;patch=1 \
+          file://gcc-posix.patch;patch=1 \
           file://gcc4-mtune-compat.patch;patch=1"
 
 SRC_URI += "file://gcc34-configure.in.patch;patch=1"
diff --git a/packages/gcc/gcc-3.4.6/gcc-posix.patch b/packages/gcc/gcc-3.4.6/gcc-posix.patch
new file mode 100644 (file)
index 0000000..99f813e
--- /dev/null
@@ -0,0 +1,11 @@
+--- gcc-3.4.6/gcc/collect2.c   2008-10-04 18:17:17.796750393 +0400
++++ gcc-3.4.6/gcc/collect2.new 2008-10-04 18:24:10.120748711 +0400
+@@ -1534,7 +1534,7 @@ collect_execute (const char *prog, char 
+   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_IWUSR);
+       /* Duplicate the stdout and stderr file handles
+        so they can be restored later.  */
index b00c866..7d78ef4 100644 (file)
@@ -1,4 +1,4 @@
-PR = "r5"
+PR = "r6"
 
 require gcc-${PV}.inc
 require gcc-cross-sdk.inc
index 515b416..e2b20df 100644 (file)
@@ -1,4 +1,4 @@
-PR = "r11"
+PR = "r12"
 
 require gcc-${PV}.inc
 require gcc-cross.inc
index 5f39f1b..c3f8106 100644 (file)
@@ -1,4 +1,4 @@
-PR = "r8"
+PR = "r9"
 
 require gcc-${PV}.inc
 require gcc-configure-target.inc
index c3f8106..be84e4a 100644 (file)
@@ -1,4 +1,4 @@
-PR = "r9"
+PR = "r10"
 
 require gcc-${PV}.inc
 require gcc-configure-target.inc
index 5bc3761..43d55fa 100644 (file)
@@ -1,4 +1,4 @@
-PR = "r10"
+PR = "r11"
 
 require gcc-${PV}.inc
 require gcc-configure-target.inc