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.
This commit is contained in:
Joseph Myers 2015-02-16 22:18:53 +00:00
parent 86c56b164c
commit e5e72fe9cd
4 changed files with 8 additions and 3 deletions

View File

@ -1,5 +1,10 @@
2015-02-16 Joseph Myers <joseph@codesourcery.com>
* 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.
* sysdeps/mips/sys/asm.h [__mips_isa_rev < 6]: Change condition to
[!defined __mips_isa_rev || __mips_isa_rev < 6].

View File

@ -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

View File

@ -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

View File

@ -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