From patchwork Wed Feb 18 18:28:39 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Steve Ellcey X-Patchwork-Id: 441031 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 58F9514007F for ; Thu, 19 Feb 2015 05:29:06 +1100 (AEDT) DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:message-id:subject:from:reply-to:to:cc:date :content-type:content-transfer-encoding:mime-version; q=dns; s= default; b=qsnxftcZ7FazQErbTxvMGXDDq1A3btv3qeh3pxpY8jdbOcyCsX+u4 NZ84Asxx3k422B91ARQc98/ghxmLcqXLk2+anumdZuC9UCnzwJaMCztrB6hwmF2o d9jzqHy2EJreAqLxByx7wnc2Dy6Xxvd9BSmwTwND91aANYsyedluZs= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:message-id:subject:from:reply-to:to:cc:date :content-type:content-transfer-encoding:mime-version; s=default; bh=NL7DrrF41gR1wytqRavrzTXmIs4=; b=R/cKQJpIhcJmhG/SZlBfGPjpwy8N Yn142JaEif0dAYiN6axRwCL4ExY1hNuKwg2u1sXKa9Zg3Wok9CIa1EuTA5PmNLvJ w2QGPWIlp1DjBqOqMasHPnYwjBA1IRnvmrOkpJq6YKM84Ze3aDj7e/JL7tjIKIj3 IeSmbvaln/gRrvA= Received: (qmail 13064 invoked by alias); 18 Feb 2015 18:29:00 -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 13048 invoked by uid 89); 18 Feb 2015 18:28:59 -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 Message-ID: <1424284119.27855.105.camel@ubuntu-sellcey> Subject: [Patch] Remove extra bits/endian.h file for MIPS From: Steve Ellcey Reply-To: To: GNU C Library CC: "Joseph S. Myers" , "Maciej W. Rozycki" Date: Wed, 18 Feb 2015 10:28:39 -0800 MIME-Version: 1.0 Here is my proposed patch to remove the extra bits/endian.h file for MIPS. I removed the linux specific one and used the generic one after fixing the comment. My earlier patches already changed the #if's to #ifdef's in that file. This means that for linux we will now check __MIPSEB/__MIPSEL instead of __MIPSEB__/__MIPSEL__ but that seem reasonable since we are setting __BYTE_ORDER (with no trailing underscores). Both versions of the MIPS macros are set by GCC. I did not add any error checking to verify that one and only one of __MIPSEB/__MIPSEL are set. The compiler will only set one of these and if the user does something weird with -D/-U flags then I think they are on their own. There are lots of places in glibc where we assume the compiler defined macros are in a rational state without explicitly checking them. Tested with mips-mti-linux-gnu. Ok for checkin? Steve Ellcey sellcey@imgtec.com 2015-02-18 Steve Ellcey * sysdeps/unix/sysv/linux/mips/bits/endian.h: Remove. * sysdeps/mips/bits/endian.h: Fix comments. diff --git a/sysdeps/mips/bits/endian.h b/sysdeps/mips/bits/endian.h index 92e97c7..8699321 100644 --- a/sysdeps/mips/bits/endian.h +++ b/sysdeps/mips/bits/endian.h @@ -1,5 +1,7 @@ /* The MIPS architecture has selectable endianness. - This file is for a machine using big-endian mode. */ + It exists in both little and big endian flavours and we + want to be able to share the installed headerfiles between both, + so we define __BYTE_ORDER based on GCC's predefines. */ #ifndef _ENDIAN_H # error "Never use directly; include instead."