diff mbox

Fix LTO compilation failure on Solaris 8

Message ID 201010140103.45243.ebotcazou@adacore.com
State New
Headers show

Commit Message

Eric Botcazou Oct. 13, 2010, 11:03 p.m. UTC
Hi,

we have an old version of Solaris 8 for x86 that needs this patchlet to build 
the compiler with LTO enabled; the results are otherwise nominal.

Also tested on x86_64-suse-linux.  OK for mainline?


2010-10-13  Eric Botcazou  <ebotcazou@adacore.com>

	* lto-elf.c (SHN_XINDEX): Define if not already defined.

Comments

Richard Biener Oct. 14, 2010, 8:48 a.m. UTC | #1
On Thu, Oct 14, 2010 at 1:03 AM, Eric Botcazou <ebotcazou@adacore.com> wrote:
> Hi,
>
> we have an old version of Solaris 8 for x86 that needs this patchlet to build
> the compiler with LTO enabled; the results are otherwise nominal.
>
> Also tested on x86_64-suse-linux.  OK for mainline?

Ok.

Thanks,
Richard.

>
> 2010-10-13  Eric Botcazou  <ebotcazou@adacore.com>
>
>        * lto-elf.c (SHN_XINDEX): Define if not already defined.
>
> --
> Eric Botcazou
>
diff mbox

Patch

Index: lto-elf.c
===================================================================
--- lto-elf.c	(revision 165411)
+++ lto-elf.c	(working copy)
@@ -42,10 +42,15 @@  along with GCC; see the file COPYING3.
 #ifndef ELFOSABI_NONE
 # define ELFOSABI_NONE 0
 #endif
+
 #ifndef ELFOSABI_LINUX
 # define ELFOSABI_LINUX 3
 #endif
 
+#ifndef SHN_XINDEX
+# define SHN_XINDEX 0xffff
+#endif
+
 
 /* Handle opening elf files on hosts, such as Windows, that may use 
    text file handling that will break binary access.  */