]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
Fix MIPS -Wundef warnings for __mips_isa_rev.
authorJoseph Myers <joseph@codesourcery.com>
Tue, 18 Aug 2015 21:52:22 +0000 (21:52 +0000)
committerJoseph Myers <joseph@codesourcery.com>
Tue, 18 Aug 2015 21:52:22 +0000 (21:52 +0000)
This patch fixes -Wundef warnings relating to __mips_isa_rev being
undefined.

Tested for mips64 (all three ABIs) that there is a clean build and
testsuite run with -Wno-error=undef removed (and my other -Wundef
patches applied).

* sysdeps/mips/dl-machine.h [__mips_isa_rev < 6]: Change
conditionals to [!defined __mips_isa_rev || __mips_isa_rev < 6].
* sysdeps/mips/machine-gmon.h [__mips_isa_rev < 6]: Likewise.

ChangeLog
sysdeps/mips/dl-machine.h
sysdeps/mips/machine-gmon.h

index 4b893a07cb8f590f0f2acbe2be81217911e54bdf..0daf15eeb9a6e32baa99fcc61d147d3656b040ea 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2015-08-18  Joseph Myers  <joseph@codesourcery.com>
+
+       * sysdeps/mips/dl-machine.h [__mips_isa_rev < 6]: Change
+       conditionals to [!defined __mips_isa_rev || __mips_isa_rev < 6].
+       * sysdeps/mips/machine-gmon.h [__mips_isa_rev < 6]: Likewise.
+
 2015-08-18  Carlos Eduardo Seo  <cseo@linux.vnet.ibm.com>
 
        * sysdeps/powerpc/dl-procinfo.c:
index 8738564241e48e33ad62a0c6235d349b7cc7d222..52cd742056cc6d547492cd618de578662b4e2422 100644 (file)
@@ -151,7 +151,7 @@ elf_machine_load_address (void)
 #ifndef __mips16
   asm ("       .set noreorder\n"
        "       " STRINGXP (PTR_LA) " %0, 0f\n"
-# if __mips_isa_rev < 6
+# if !defined __mips_isa_rev || __mips_isa_rev < 6
        "       bltzal $0, 0f\n"
        "       nop\n"
        "0:     " STRINGXP (PTR_SUBU) " %0, $31, %0\n"
@@ -259,7 +259,7 @@ do {                                                                        \
       and not just plain _start.  */
 
 #ifndef __mips16
-# if __mips_isa_rev < 6
+# if !defined __mips_isa_rev || __mips_isa_rev < 6
 #  define LCOFF STRINGXP(.Lcof2)
 #  define LOAD_31 STRINGXP(bltzal $8) "," STRINGXP(.Lcof2)
 # else
index ee2e3ea09961512eda00a7f6f4b8efe04fcfbb2c..b661fd851c4a09e3b96218abfc41e76bc5876d1c 100644 (file)
@@ -83,7 +83,7 @@ static void __attribute_used__ __mcount (u_long frompc, u_long selfpc)
 #endif
 
 #if _MIPS_SIM == _ABIN32
-# if __mips_isa_rev < 6
+# if !defined __mips_isa_rev || __mips_isa_rev < 6
 #  define PTR_ADDU_STRING "add" /* no u */
 #  define PTR_SUBU_STRING "sub" /* no u */
 # else