From patchwork Sat Feb 14 00:06:01 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Steve Ellcey X-Patchwork-Id: 5075 Received: (qmail 20881 invoked by alias); 14 Feb 2015 00:06:10 -0000 Mailing-List: contact libc-alpha-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: libc-alpha-owner@sourceware.org Delivered-To: mailing list libc-alpha@sourceware.org Received: (qmail 20869 invoked by uid 89); 14 Feb 2015 00:06:09 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.9 required=5.0 tests=AWL, BAYES_00, SPF_PASS, T_RP_MATCHES_RCVD autolearn=ham version=3.3.2 X-HELO: mailapp01.imgtec.com From: "Steve Ellcey " Date: Fri, 13 Feb 2015 16:06:01 -0800 To: Subject: [Patch] Fix MIPS build failure caused by -Werror=undef User-Agent: Heirloom mailx 12.5 6/20/10 MIME-Version: 1.0 Message-ID: <04dee4c5-a06d-447e-8174-ab39f52a4b48@BAMAIL02.ba.imgtec.org> 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). Is the following patch OK for checkin? Tested with mips-mti-linux-gnu. Steve Ellcey sellcey@imgtec.com 2015-02-13 Steve Ellcey * 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 directly; include instead." #endif -#if __MIPSEB +#ifdef __MIPSEB # define __BYTE_ORDER __BIG_ENDIAN #endif #if __MIPSEL diff --git a/sysdeps/mips/memcpy.S b/sysdeps/mips/memcpy.S index fcd7c03..715abcf 100644 --- a/sysdeps/mips/memcpy.S +++ b/sysdeps/mips/memcpy.S @@ -225,7 +225,7 @@ #ifdef USE_DOUBLE # define C_ST sd # define C_LD ld -# if __MIPSEB +# ifdef __MIPSEB # define C_LDHI ldl /* high part is left in big-endian */ # define C_STHI sdl /* high part is left in big-endian */ # define C_LDLO ldr /* low part is right in big-endian */ @@ -240,7 +240,7 @@ #else # define C_ST sw # define C_LD lw -# if __MIPSEB +# ifdef __MIPSEB # define C_LDHI lwl /* high part is left in big-endian */ # define C_STHI swl /* high part is left in big-endian */ # define C_LDLO lwr /* low part is right in big-endian */ @@ -767,7 +767,7 @@ L(ua_smallCopy_loop): #else /* R6_CODE */ -# if __MIPSEB +# ifdef __MIPSEB # define SWAP_REGS(X,Y) X, Y # define ALIGN_OFFSET(N) (N) # else diff --git a/sysdeps/mips/memset.S b/sysdeps/mips/memset.S index 0a9b5ca..940a225 100644 --- a/sysdeps/mips/memset.S +++ b/sysdeps/mips/memset.S @@ -170,14 +170,14 @@ #ifdef USE_DOUBLE # define C_ST sd -# if __MIPSEB +# ifdef __MIPSEB # define C_STHI sdl /* high part is left in big-endian */ # else # define C_STHI sdr /* high part is right in little-endian */ # endif #else # define C_ST sw -# if __MIPSEB +# ifdef __MIPSEB # define C_STHI swl /* high part is left in big-endian */ # else # define C_STHI swr /* high part is right in little-endian */