From 0d64e1fb4bce4023104e2f66aad5ea107afa445d Mon Sep 17 00:00:00 2001 From: ktietz Date: Mon, 4 May 2015 10:16:23 +0000 Subject: [PATCH] PR target/65559 * lto-wrapper.c (run_gcc): Open filename with in binary-mode. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@222759 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/ChangeLog | 6 ++++++ gcc/lto-wrapper.c | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 0a0179d..f2777b0 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2015-05-04 Kai Tietz + + PR target/65559 + * lto-wrapper.c (run_gcc): Open filename + with in binary-mode. + 2015-05-03 Sandra Loosemore * doc/extend.texi (Variable Attributes, Type Attributes): Move diff --git a/gcc/lto-wrapper.c b/gcc/lto-wrapper.c index 404cb68..aa51476 100644 --- a/gcc/lto-wrapper.c +++ b/gcc/lto-wrapper.c @@ -934,7 +934,7 @@ run_gcc (unsigned argc, char *argv[]) filename[p - argv[i]] = '\0'; file_offset = (off_t) loffset; } - fd = open (argv[i], O_RDONLY); + fd = open (filename, O_RDONLY | O_BINARY); if (fd == -1) { lto_argv[lto_argc++] = argv[i]; -- 2.7.4