about summary refs log tree commit diff
path: root/sysdeps/mips
diff options
context:
space:
mode:
authorJoseph Myers <joseph@codesourcery.com>2015-02-16 22:12:15 +0000
committerJoseph Myers <joseph@codesourcery.com>2015-02-16 22:12:15 +0000
commit86c56b164ced14cadd054a37613fbddf896194da (patch)
tree833ac8cf4e2fd6ef911a4b27edd68208a4a10b2c /sysdeps/mips
parent35264d14426e1e3ca7b595db1de76208374b56e3 (diff)
downloadglibc-86c56b164ced14cadd054a37613fbddf896194da.tar.gz
glibc-86c56b164ced14cadd054a37613fbddf896194da.tar.xz
glibc-86c56b164ced14cadd054a37613fbddf896194da.zip
Fix MIPS __mips_isa_rev -Werror=undef build.
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].
Diffstat (limited to 'sysdeps/mips')
-rw-r--r--sysdeps/mips/sys/asm.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/sysdeps/mips/sys/asm.h b/sysdeps/mips/sys/asm.h
index 6c94cee5d7..0ff88027db 100644
--- a/sysdeps/mips/sys/asm.h
+++ b/sysdeps/mips/sys/asm.h
@@ -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 */