]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
Fix MIPS __mips_isa_rev -Werror=undef build.
authorJoseph Myers <joseph@codesourcery.com>
Mon, 16 Feb 2015 22:12:15 +0000 (22:12 +0000)
committerJoseph Myers <joseph@codesourcery.com>
Mon, 16 Feb 2015 22:12:15 +0000 (22:12 +0000)
I see an error

In file included from ../sysdeps/mips/include/sys/asm.h:20:0,
                 from ../sysdeps/mips/start.S:39:
../sysdeps/mips/sys/asm.h:421:5: error: "__mips_isa_rev" is not defined [-Werror=undef]
 #if __mips_isa_rev < 6
     ^
cc1: some warnings being treated as errors

in MIPS builds.  As sys/asm.h is an installed header, it seems better
to test for !defined __mips_isa_rev here, instead of defining it to 0
as done in sysdeps/unix/mips/sysdep.h, to avoid perturbing any code
outside glibc that tests whether __mips_isa_rev is defined; this patch
does so.

* sysdeps/mips/sys/asm.h [__mips_isa_rev < 6]: Change condition to
[!defined __mips_isa_rev || __mips_isa_rev < 6].

ChangeLog
sysdeps/mips/sys/asm.h

index 78fe389f28ed679fe7060f00a306fabe3a5e1889..d4a72d8a5b434c554263566014f31152e9ec3afd 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2015-02-16  Joseph Myers  <joseph@codesourcery.com>
+
+       * sysdeps/mips/sys/asm.h [__mips_isa_rev < 6]: Change condition to
+       [!defined __mips_isa_rev || __mips_isa_rev < 6].
+
 2015-02-16  Torvald Riegel  <triegel@redhat.com>
 
        * nptl/tst-cond25.c (cleanup): Explicitly check that the mutex is
index 6c94cee5d7a62028fc357b05923fe17819c06e51..0ff88027db26f4efd6b1f3ed2e0586d2f942eb86 100644 (file)
@@ -418,7 +418,7 @@ symbol              =       value
 # define PTR_ADDI      addi
 # define PTR_SUB       sub
 # define PTR_SUBI      subi
-#if __mips_isa_rev < 6
+#if !defined __mips_isa_rev || __mips_isa_rev < 6
 # define PTR_ADDU      add /* no u */
 # define PTR_ADDIU     addi /* no u */
 # define PTR_SUBU      sub /* no u */