Commit 2f9b99e6 by Eric Botcazou Committed by Eric Botcazou

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
parent 81ad4ac0
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> 2010-03-03 Eric Botcazou <ebotcazou@adacore.com>
* lto-elf.c (is_compatible_architecture): New static function. * lto-elf.c (is_compatible_architecture): New static function.
......
/* LTO routines for ELF object files. /* LTO routines for ELF object files.
Copyright 2009 Free Software Foundation, Inc. Copyright 2009, 2010 Free Software Foundation, Inc.
Contributed by CodeSourcery, Inc. Contributed by CodeSourcery, Inc.
This file is part of GCC. This file is part of GCC.
...@@ -29,9 +29,18 @@ along with GCC; see the file COPYING3. If not see ...@@ -29,9 +29,18 @@ along with GCC; see the file COPYING3. If not see
#include "ggc.h" #include "ggc.h"
#include "lto-streamer.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 /* Handle opening elf files on hosts, such as Windows, that may use
text file handling that will break binary access. */ text file handling that will break binary access. */
#ifndef O_BINARY #ifndef O_BINARY
# define O_BINARY 0 # define O_BINARY 0
#endif #endif
...@@ -375,7 +384,10 @@ lto_elf_end_section (void) ...@@ -375,7 +384,10 @@ lto_elf_end_section (void)
/* Return true if ELF_MACHINE is compatible with the cached value of the /* 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 static bool
is_compatible_architecture (Elf64_Half elf_machine) is_compatible_architecture (Elf64_Half elf_machine)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment