diff mbox

PowerPC: Guard CALL_ELF check for ppc64 only in link.h

Message ID 53A98904.2040508@linux.vnet.ibm.com
State New
Headers show

Commit Message

Adhemerval Zanella June 24, 2014, 2:19 p.m. UTC
This patch fixes undef compiler warnings for _CALL_ELF, since it is
defined only for powerpc64.

Checked on powerpc32-fpu, ok to apply?

--

	* sysdeps/powerpc/bits/link.h [_CALL_ELF]: Guard check for
	__ELF_NATIVE_CLASS equal to 64.

---

Comments

Andreas Schwab June 24, 2014, 3:59 p.m. UTC | #1
Adhemerval Zanella <azanella@linux.vnet.ibm.com> writes:

> This patch fixes undef compiler warnings for _CALL_ELF, since it is
> defined only for powerpc64.

What about older compilers?

Andreas.
Adhemerval Zanella June 24, 2014, 5:30 p.m. UTC | #2
On 24-06-2014 12:59, Andreas Schwab wrote:
> Adhemerval Zanella <azanella@linux.vnet.ibm.com> writes:
>
>> This patch fixes undef compiler warnings for _CALL_ELF, since it is
>> defined only for powerpc64.
> What about older compilers?
>
> Andreas.
>
I forgot to add this warning is showing up just for powerpc32.  For powerpc64
I have fixed all the warnings for _CALL_ELF on 7ffa9423020fe331b45a56b804c95929a0398e8b
For older compilers with powerpc32 it will be guarded too.
diff mbox

Patch

diff --git a/sysdeps/powerpc/bits/link.h b/sysdeps/powerpc/bits/link.h
index c8f876b..373b6d5 100644
--- a/sysdeps/powerpc/bits/link.h
+++ b/sysdeps/powerpc/bits/link.h
@@ -63,7 +63,8 @@  extern unsigned int la_ppc32_gnu_pltexit (Elf32_Sym *__sym,
 
 __END_DECLS
 
-#elif _CALL_ELF != 2
+#elif __ELF_NATIVE_CLASS == 64
+# if _CALL_ELF != 2
 
 /* Registers for entry into PLT on PPC64.  */
 typedef struct La_ppc64_regs
@@ -107,7 +108,7 @@  extern unsigned int la_ppc64_gnu_pltexit (Elf64_Sym *__sym,
 
 __END_DECLS
 
-#else
+# else
 
 /* Registers for entry into PLT on PPC64 in the ELFv2 ABI.  */
 typedef struct La_ppc64v2_regs
@@ -151,4 +152,5 @@  extern unsigned int la_ppc64v2_gnu_pltexit (Elf64_Sym *__sym,
 
 __END_DECLS
 
+# endif
 #endif