aboutsummaryrefslogtreecommitdiff
path: root/gcc/lto
diff options
context:
space:
mode:
authorEric Botcazou <ebotcazou@adacore.com>2010-03-09 09:01:56 +0000
committerEric Botcazou <ebotcazou@gcc.gnu.org>2010-03-09 09:01:56 +0000
commit2f9b99e6c664ac542529117b198b6ebc1a56cdf0 (patch)
tree0220bd809d184d73f52c73055c3ff32d9cf08c52 /gcc/lto
parent81ad4ac06edd61b60c7cb4faba7ca58a896a9194 (diff)
downloadgcc-2f9b99e6c664ac542529117b198b6ebc1a56cdf0.zip
gcc-2f9b99e6c664ac542529117b198b6ebc1a56cdf0.tar.gz
gcc-2f9b99e6c664ac542529117b198b6ebc1a56cdf0.tar.bz2
re PR bootstrap/43276 (lto-elf.c:388:10: error: 'EM_SPARC')
PR bootstrap/43276 * lto-elf.c: Define EM_* constants if not already defined. From-SVN: r157305
Diffstat (limited to 'gcc/lto')
-rw-r--r--gcc/lto/ChangeLog5
-rw-r--r--gcc/lto/lto-elf.c18
2 files changed, 20 insertions, 3 deletions
diff --git a/gcc/lto/ChangeLog b/gcc/lto/ChangeLog
index 560539d..c92562f 100644
--- a/gcc/lto/ChangeLog
+++ b/gcc/lto/ChangeLog
@@ -1,3 +1,8 @@
+2010-03-09 Eric Botcazou <ebotcazou@adacore.com>
+
+ PR bootstrap/43276
+ * lto-elf.c: Define EM_* constants if not already defined.
+
2010-03-03 Eric Botcazou <ebotcazou@adacore.com>
* lto-elf.c (is_compatible_architecture): New static function.
diff --git a/gcc/lto/lto-elf.c b/gcc/lto/lto-elf.c
index 0135284..59f7150 100644
--- a/gcc/lto/lto-elf.c
+++ b/gcc/lto/lto-elf.c
@@ -1,5 +1,5 @@
/* LTO routines for ELF object files.
- Copyright 2009 Free Software Foundation, Inc.
+ Copyright 2009, 2010 Free Software Foundation, Inc.
Contributed by CodeSourcery, Inc.
This file is part of GCC.
@@ -29,9 +29,18 @@ along with GCC; see the file COPYING3. If not see
#include "ggc.h"
#include "lto-streamer.h"
+/* Cater to hosts with half-backed <elf.h> file like HP-UX. */
+#ifndef EM_SPARC
+# define EM_SPARC 2
+#endif
+
+#ifndef EM_SPARC32PLUS
+# define EM_SPARC32PLUS 18
+#endif
+
+
/* Handle opening elf files on hosts, such as Windows, that may use
text file handling that will break binary access. */
-
#ifndef O_BINARY
# define O_BINARY 0
#endif
@@ -375,7 +384,10 @@ lto_elf_end_section (void)
/* Return true if ELF_MACHINE is compatible with the cached value of the
- architecture and possibly update the latter. Return false otherwise. */
+ architecture and possibly update the latter. Return false otherwise.
+
+ Note: if you want to add more EM_* cases, you'll need to provide the
+ corresponding definitions at the beginning of the file. */
static bool
is_compatible_architecture (Elf64_Half elf_machine)