Skip to content
This repository was archived by the owner on Oct 5, 2021. It is now read-only.

Commit 8a280cf

Browse files
committed
[8-2018-q4-major] Patch gcc to fix the Windows LTO with -g
PR lto/88422 * simple-object.c (O_BINARY): Define if not already defined. (simple_object_copy_lto_debug_sections): Create file in binary mode. See https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88422 Signed-off-by: Frederic.Pillon <[email protected]>
1 parent da20080 commit 8a280cf

File tree

2 files changed

+36
-0
lines changed

2 files changed

+36
-0
lines changed
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
diff --git a/src/gcc/libiberty/ChangeLog b/src/gcc/libiberty/ChangeLog
2+
index 9b49747..ea9c1bf 100644
3+
--- a/src/gcc/libiberty/ChangeLog
4+
+++ b/src/gcc/libiberty/ChangeLog
5+
@@ -1,3 +1,9 @@
6+
+
7+
+PR lto/88422
8+
+ * simple-object.c (O_BINARY): Define if not already defined.
9+
+ (simple_object_copy_lto_debug_sections): Create file in binary
10+
+ mode.
11+
+
12+
2018-07-26 Release Manager
13+
14+
* GCC 8.2.0 released.
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
--- a/src/gcc/libiberty/simple-object.c
2+
+++ b/src/gcc/libiberty/simple-object.c
3+
@@ -44,6 +44,10 @@
4+
#define SEEK_SET 0
5+
#endif
6+
7+
+#ifndef O_BINARY
8+
+#define O_BINARY 0
9+
+#endif
10+
+
11+
#include "simple-object-common.h"
12+
13+
/* The known object file formats. */
14+
@@ -326,7 +330,7 @@
15+
return errmsg;
16+
}
17+
18+
- outfd = creat (dest, 00777);
19+
+ outfd = open (dest, O_CREAT|O_WRONLY|O_TRUNC|O_BINARY, 00777);
20+
if (outfd == -1)
21+
{
22+
*err = errno;

0 commit comments

Comments
 (0)