[Patch] Fix MIPS build failure caused by -Werror=undef
Maciej W. Rozycki
macro@linux-mips.org
Sat Feb 14 14:33:00 GMT 2015
On Fri, 13 Feb 2015, Steve Ellcey wrote:
> The recent change to use -Werror=undef on assembly language files
> caused a build failure on MIPS. GCC defines __MIPSEB only in
> big-endian mode and leaves it undefined in little endian mode (where
> it defines __MIPSEL instead).
[...]
> 2015-02-13 Steve Ellcey <sellcey@imgtec.com>
>
> * sysdeps/mips/bits/endian.h (__MIPSEB): Use #ifdef instead of #if.
> * sysdeps/mips/memcpy.S (__MIPSEB): Ditto.
> * sysdeps/mips/memset.S (__MIPSEB): Ditto.
>
>
> diff --git a/sysdeps/mips/bits/endian.h b/sysdeps/mips/bits/endian.h
> index 9586104..43ce009 100644
> --- a/sysdeps/mips/bits/endian.h
> +++ b/sysdeps/mips/bits/endian.h
> @@ -5,7 +5,7 @@
> # error "Never use <bits/endian.h> directly; include <endian.h> instead."
> #endif
>
> -#if __MIPSEB
> +#ifdef __MIPSEB
> # define __BYTE_ORDER __BIG_ENDIAN
> #endif
> #if __MIPSEL
^^^^^^^^^^^^
Don't we need a complementing change for __MIPSEL here then too?
Maciej
More information about the Libc-alpha
mailing list