From patchwork Fri Dec 19 13:42:16 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: "H.J. Lu" X-Patchwork-Id: 422886 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 10784140082 for ; Sat, 20 Dec 2014 00:59:51 +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:date:from:to:subject:message-id:mime-version :content-type:content-transfer-encoding; q=dns; s=default; b=LQu 2Wd7nmdgWyt7s1RyQjcP0tjbtPRevuVvIwF0ANpevqA4OE/vQHZse+03lWSZOtAc bDvcEWTS+Q3mpqzQwjSvC7FjOkqrgj1NeykBf8P3r04+X84Tjt6qxFxhJiy2EScT 63r1kEl6xeMO3XRxkb4j8VbcsKC74evPeG/KNm9Y= 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:date:from:to:subject:message-id:mime-version :content-type:content-transfer-encoding; s=default; bh=tT+1xxHaP NTfeU+qsRNv5g6jS+g=; b=knmcFzMzSAbgAnY7lMdEGsPw/ukQcF1iCHP4qUyro ZNJCNr2fcmpfepzPzsJKJP716aQg+J9C+JJoxOrX/Zz2t0sj6oF146JTBMoeafg4 AEE4L901xnf/UqHPmW0oDJReC8uPugSjFNKCrafpXQ1LXk74KdMYb4BYrngft4ty IA= Received: (qmail 20718 invoked by alias); 19 Dec 2014 13:48:32 -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 20026 invoked by uid 89); 19 Dec 2014 13:42:21 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.5 required=5.0 tests=AWL, BAYES_00, FREEMAIL_FROM, RCVD_IN_DNSWL_LOW, SPF_PASS autolearn=ham version=3.3.2 X-HELO: mail-yk0-f182.google.com X-Received: by 10.236.220.194 with SMTP id o62mr6384053yhp.32.1418996538222; Fri, 19 Dec 2014 05:42:18 -0800 (PST) Date: Fri, 19 Dec 2014 05:42:16 -0800 From: "H.J. Lu" To: GNU C Library Subject: [PATCH] Compile s_llround.c with -Wno-error for x32 build Message-ID: <20141219134216.GA5739@gmail.com> MIME-Version: 1.0 Content-Disposition: inline User-Agent: Mutt/1.5.23 (2014-03-12) On x32, I got ../sysdeps/ieee754/dbl-64/wordsize-64/s_llround.c:75:24: error: conflicting types for built-in function ‘lround’ [-Werror] weak_alias (__llround, lround) ^ ./../include/libc-symbols.h:128:26: note: in definition of macro ‘_weak_alias’ extern __typeof (name) aliasname __attribute__ ((weak, alias (#name))); ^ ../sysdeps/ieee754/dbl-64/wordsize-64/s_llround.c:75:1: note: in expansion of macro ‘weak_alias’ weak_alias (__llround, lround) ^ cc1: all warnings being treated as errors Since x32 returns 32-bit long int and 64-bit long long int in the same 64-bit register, we make the 32b-bit lround an alias of the 64-bit llround. This patch adds -Wno-error for x32 build to silence the compiler. Verified on x32, i686 and x86-64 with GCC 4.8.3. I checked it in as an obvious fix. H.J. --- ChangeLog | 4 ++++ sysdeps/x86_64/x32/Makefile | 6 ++++++ 2 files changed, 10 insertions(+) create mode 100644 sysdeps/x86_64/x32/Makefile diff --git a/ChangeLog b/ChangeLog index eda51f8..4c6a304 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,9 @@ 2014-12-19 H.J. Lu + * sysdeps/x86_64/x32/Makefile: New file. + +2014-12-19 H.J. Lu + * sysdeps/i386/ldbl2mpn.c (__mpn_extract_long_double): Replace 1L with (mp_limb_t) 1. diff --git a/sysdeps/x86_64/x32/Makefile b/sysdeps/x86_64/x32/Makefile new file mode 100644 index 0000000..47e567c --- /dev/null +++ b/sysdeps/x86_64/x32/Makefile @@ -0,0 +1,6 @@ +ifeq ($(subdir),math) +# Since x32 returns 32-bit long int and 64-bit long long int in the +# same 64-bit register, we make the 32b-bit lround an alias of the +# 64-bit llround. Add -Wno-error to silence the compiler. +CFLAGS-s_llround.c += -Wno-error +endif