From 654ede98b91d54f1cae410898921ba52545be200 Mon Sep 17 00:00:00 2001 From: Jonas Bonn Date: Sat, 6 Dec 2008 18:19:34 -0500 Subject: gcc, gcc-native 3.4.6 : Fix O_CREAT permissions for -D_FORTIFY_SOURCE On Ubuntu Intrepid, -D_FORTIFY_SOURCE is enabled by default, thus requiring file permissions when the O_CREAT flag is set on open. This patch remedies this for gcc-3.4.6. Signed-off-by: Jonas Bonn --- packages/gcc/gcc-3.4.6.inc | 3 ++- packages/gcc/gcc-3.4.6/O_CREAT-perms.patch | 11 +++++++++++ 2 files changed, 13 insertions(+), 1 deletion(-) create mode 100644 packages/gcc/gcc-3.4.6/O_CREAT-perms.patch diff --git a/packages/gcc/gcc-3.4.6.inc b/packages/gcc/gcc-3.4.6.inc index b1f686b365..a467860e9e 100644 --- a/packages/gcc/gcc-3.4.6.inc +++ b/packages/gcc/gcc-3.4.6.inc @@ -17,7 +17,8 @@ SRC_URI = "${GNU_MIRROR}/gcc/gcc-${PV}/gcc-${PV}.tar.bz2 \ 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" + file://gcc4-mtune-compat.patch;patch=1 \ + file://O_CREAT-perms.patch;patch=1" SRC_URI += "file://gcc34-configure.in.patch;patch=1" SRC_URI += "file://gcc34-thumb-support.patch;patch=1" diff --git a/packages/gcc/gcc-3.4.6/O_CREAT-perms.patch b/packages/gcc/gcc-3.4.6/O_CREAT-perms.patch new file mode 100644 index 0000000000..1c3af2e021 --- /dev/null +++ b/packages/gcc/gcc-3.4.6/O_CREAT-perms.patch @@ -0,0 +1,11 @@ +--- gcc-3.4.6/gcc/collect2.c.orig 2008-10-20 14:47:56.000000000 +0200 ++++ gcc-3.4.6/gcc/collect2.c 2008-10-20 14:48:49.000000000 +0200 +@@ -1534,7 +1534,7 @@ + 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, 0644); + + /* Duplicate the stdout and stderr file handles + so they can be restored later. */ -- cgit v1.2.3