From patchwork Mon Feb 16 22:12:56 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Joseph Myers X-Patchwork-Id: 5092 Received: (qmail 2064 invoked by alias); 16 Feb 2015 22:13:04 -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 2052 invoked by uid 89); 16 Feb 2015 22:13:03 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.3 required=5.0 tests=AWL, BAYES_20, RCVD_IN_DNSWL_LOW, SPF_PASS autolearn=ham version=3.3.2 X-HELO: relay1.mentorg.com Date: Mon, 16 Feb 2015 22:12:56 +0000 From: Joseph Myers To: Subject: Fix MIPS __mips_isa_rev -Werror=undef build [committed] Message-ID: User-Agent: Alpine 2.10 (DEB 1266 2009-07-14) MIME-Version: 1.0 I see an error In file included from ../sysdeps/mips/include/sys/asm.h:20:0, from ../sysdeps/mips/start.S:39: ../sysdeps/mips/sys/asm.h:421:5: error: "__mips_isa_rev" is not defined [-Werror=undef] #if __mips_isa_rev < 6 ^ cc1: some warnings being treated as errors in MIPS builds. As sys/asm.h is an installed header, it seems better to test for !defined __mips_isa_rev here, instead of defining it to 0 as done in sysdeps/unix/mips/sysdep.h, to avoid perturbing any code outside glibc that tests whether __mips_isa_rev is defined; this patch does so. Committed. 2015-02-16 Joseph Myers * sysdeps/mips/sys/asm.h [__mips_isa_rev < 6]: Change condition to [!defined __mips_isa_rev || __mips_isa_rev < 6]. diff --git a/sysdeps/mips/sys/asm.h b/sysdeps/mips/sys/asm.h index 6c94cee..0ff8802 100644 --- a/sysdeps/mips/sys/asm.h +++ b/sysdeps/mips/sys/asm.h @@ -418,7 +418,7 @@ symbol = value # define PTR_ADDI addi # define PTR_SUB sub # define PTR_SUBI subi -#if __mips_isa_rev < 6 +#if !defined __mips_isa_rev || __mips_isa_rev < 6 # define PTR_ADDU add /* no u */ # define PTR_ADDIU addi /* no u */ # define PTR_SUBU sub /* no u */