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:18:53 +0000
committerJoseph Myers <joseph@codesourcery.com>2015-02-16 22:18:53 +0000
commite5e72fe9cd17857c198020e847b253045d957e72 (patch)
tree26738cc894c65619a30a9cb146c76c677717f6dd /sysdeps/mips
parent86c56b164ced14cadd054a37613fbddf896194da (diff)
downloadglibc-e5e72fe9cd17857c198020e847b253045d957e72.tar.gz
glibc-e5e72fe9cd17857c198020e847b253045d957e72.tar.xz
glibc-e5e72fe9cd17857c198020e847b253045d957e72.zip
Fix MIPS _COMPILING_NEWLIB -Werror=undef build.
I see an error

../sysdeps/mips/strcmp.S:25:7: error: "_COMPILING_NEWLIB" is not defined [-Werror=undef]
 #elif _COMPILING_NEWLIB
       ^
cc1: some warnings being treated as errors

in MIPS builds.  (This is with GCC 4.9; it's possible that the DR#412
change in GCC 5 - see
<https://gcc.gnu.org/bugzilla/show_bug.cgi?id=60570> - means that
-Wundef diagnostics no longer occur for #elif conditions where a
previous group's condition was true, just as with other errors there.)
This patch duly adjusts the conditionals to test whether
_COMPILING_NEWLIB is defined.

	* sysdeps/mips/memcpy.S [_COMPILING_NEWLIB]: Change condition to
	[defined _COMPILING_NEWLIB].
	* sysdeps/mips/memset.S [_COMPILING_NEWLIB]: Likewise.
	* sysdeps/mips/strcmp.S [_COMPILING_NEWLIB]: Likewise.
Diffstat (limited to 'sysdeps/mips')
-rw-r--r--sysdeps/mips/memcpy.S2
-rw-r--r--sysdeps/mips/memset.S2
-rw-r--r--sysdeps/mips/strcmp.S2
3 files changed, 3 insertions, 3 deletions
diff --git a/sysdeps/mips/memcpy.S b/sysdeps/mips/memcpy.S
index 715abcf172..a9ac059e14 100644
--- a/sysdeps/mips/memcpy.S
+++ b/sysdeps/mips/memcpy.S
@@ -27,7 +27,7 @@
 # include <sys/asm.h>
 # define PREFETCH_LOAD_HINT PREFETCH_HINT_LOAD_STREAMED
 # define PREFETCH_STORE_HINT PREFETCH_HINT_PREPAREFORSTORE
-#elif _COMPILING_NEWLIB
+#elif defined _COMPILING_NEWLIB
 # include "machine/asm.h"
 # include "machine/regdef.h"
 # define PREFETCH_LOAD_HINT PREFETCH_HINT_LOAD_STREAMED
diff --git a/sysdeps/mips/memset.S b/sysdeps/mips/memset.S
index 940a2258db..cf16b2644a 100644
--- a/sysdeps/mips/memset.S
+++ b/sysdeps/mips/memset.S
@@ -24,7 +24,7 @@
 # include <regdef.h>
 # include <sys/asm.h>
 # define PREFETCH_STORE_HINT PREFETCH_HINT_PREPAREFORSTORE
-#elif _COMPILING_NEWLIB
+#elif defined _COMPILING_NEWLIB
 # include "machine/asm.h"
 # include "machine/regdef.h"
 # define PREFETCH_STORE_HINT PREFETCH_HINT_PREPAREFORSTORE
diff --git a/sysdeps/mips/strcmp.S b/sysdeps/mips/strcmp.S
index 66fe06c4ab..7ba79e7a02 100644
--- a/sysdeps/mips/strcmp.S
+++ b/sysdeps/mips/strcmp.S
@@ -22,7 +22,7 @@
 # include <sysdep.h>
 # include <regdef.h>
 # include <sys/asm.h>
-#elif _COMPILING_NEWLIB
+#elif defined _COMPILING_NEWLIB
 # include "machine/asm.h"
 # include "machine/regdef.h"
 #else