From patchwork Tue Mar 18 12:47:52 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stefan Liebler X-Patchwork-Id: 141 Return-Path: X-Original-To: siddhesh@wilcox.dreamhost.com Delivered-To: siddhesh@wilcox.dreamhost.com Received: from homiemail-mx21.g.dreamhost.com (caibbdcaaahb.dreamhost.com [208.113.200.71]) by wilcox.dreamhost.com (Postfix) with ESMTP id B7BDB360068 for ; Tue, 18 Mar 2014 05:48:47 -0700 (PDT) Received: by homiemail-mx21.g.dreamhost.com (Postfix, from userid 14307373) id 6C6281F91998; Tue, 18 Mar 2014 05:48:47 -0700 (PDT) X-Original-To: glibc@patchwork.siddhesh.in Delivered-To: x14307373@homiemail-mx21.g.dreamhost.com 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 homiemail-mx21.g.dreamhost.com (Postfix) with ESMTPS id 333E31F919B4 for ; Tue, 18 Mar 2014 05:48:47 -0700 (PDT) DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:to:from:subject:date:message-id:references :mime-version:content-type:in-reply-to; q=dns; s=default; b=ORH+ QFF5M9pYGFHCbusmVNkYfC/vNpkZr1o126IVzMYFHzda5uUO5mmuqZXKaCNoUAgS nPduQU8g1/iMW6X61qc7eBihHPv0jHvYGhIBW1YPZt+3db/HX36pFvs3KycKnNPG EMnUM9iDPJUNOW1QJJ05gG10YL5I9kUI8sH3N/s= 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:to:from:subject:date:message-id:references :mime-version:content-type:in-reply-to; s=default; bh=PIt75xSkBI xFGXn1Xfigz9mDiGA=; b=NEx0Kf1PTJq1kD18mWpBl/Vossm7kva285Qml+WsUc 0i6vGe6HqFOxgNqSPMlNr8deL4Bi0+2tQtSc5QDBGg62un5Vurj13Mc+E1dFm/zd +4DZQmMw1hSDlou9Z91FuOH7pQX2+PXPySBBNVmbjGH172QbJCZqwcZ2yfhsk4Rg c= Received: (qmail 18168 invoked by alias); 18 Mar 2014 12:48:44 -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 18150 invoked by uid 89); 18 Mar 2014 12:48:43 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.0 required=5.0 tests=AWL, BAYES_00, RCVD_IN_DNSWL_NONE, SPF_HELO_PASS, SPF_PASS, T_RP_MATCHES_RCVD autolearn=ham version=3.3.2 X-HELO: plane.gmane.org To: libc-alpha@sourceware.org From: Stefan Liebler Subject: Re: [PATCH] S/390: Date: Tue, 18 Mar 2014 13:47:52 +0100 Lines: 116 Message-ID: References: Mime-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.3.0 In-Reply-To: X-DH-Original-To: glibc@patchwork.siddhesh.in On 03/14/2014 03:18 PM, Joseph S. Myers wrote: > On Fri, 14 Mar 2014, Stefan Liebler wrote: > >> Hi, >> >> The conformance tests for ISO99, ISO11, XOPEN2K, POSIX2008 and XOPEN2K8 >> are failing on S390 for the inttypes.h and stdint.h headers. >> The problem is that on S390 size_t / __SIZE_TYPE__ >> are defined as long unsigned int, >> which has the same size as unsigned int (on S390). >> SIZE_MAX is defined in sysdeps/generic/stdint.h as 4294967295U. >> The conformance-test checks the type of SIZE_MAX, >> which should be promoted to __SIZE_TYPE__, but it is unsigned int. > > You should fix the header rather than marking these tests as expected to > fail. (Of course, file a bug in Bugzilla before fixing it, as usual.) To > avoid duplicating the whole header, maybe add a macro > can define such as __WORDSIZE32_SIZE_ULONG, and then test that macro in > . > > (You have two identical bits/wordsize.h files for S/390. Just one should > suffice.) > I fixed the header as mentioned. The tests pass on s390/s390x. Unifying s390/s390-32/bits/wordsize.h and s390/s390-64/wordsize.h to s390/bits/wordsize.h leads to a build error: gcc -shared -static-libgcc -Wl,-O1 -Wl,-z,defs -Wl,-dynamic-linker=/lib/ld.so.1 -Bglibc-build/csu/ -Wl,--version-script=glibc-build/libm.map -Wl,-soname=libm.so.6 -Wl,-z,combreloc -Wl,-z,relro -Wl,--hash-style=both -Lglibc-build -Lglibc-build/math -Lglibc-build/elf -Lglibc-build/dlfcn -Lglibc-build/nss -Lglibc-build/nis -Lglibc-build/rt -Lglibc-build/resolv -Lglibc-build/crypt -Lglibc-build/nptl -Wl,-rpath-link=glibc-build:glibc-build/math:glibc-build/elf:glibc-build/dlfcn:glibc-build/nss:glibc-build/nis:glibc-build/rt:glibc-build/resolv:glibc-build/crypt:glibc-build/nptl -o glibc-build/math/libm.so -T glibc-build/shlib.lds glibc-build/csu/abi-note.o -Wl,--whole-archive glibc-build/math/libm_pic.a -Wl,--no-whole-archive glibc-build/elf/interp.os -Wl,--start-group glibc-build/libc.so glibc-build/libc_nonshared.a -Wl,--as-needed glibc-build/elf/ld.so -Wl,--no-as-needed -Wl,--end-group glibc-build/math/libm_pic.a(s_nanl.os): In function `nanl@@GLIBC_2.4': s_nanl.c:(.text+0xb4): undefined reference to `strtold' collect2: error: ld returned 1 exit status make[2]: *** [glibc-build/math/libm.so] Error 1 Bye. --- 2014-03-18 Stefan Liebler [BZ #16712] * sysdeps/s390/s390-32/bits/wordsize.h (__WORDSIZE32_SIZE_ULONG): New define. * sysdeps/s390/s390-64/bits/wordsize.h (__WORDSIZE32_SIZE_ULONG): Likewise. * sysdeps/generic/stdint.h (SIZE_MAX): Define as UL if __WORDSIZE32_SIZE_ULONG. --- diff --git a/sysdeps/generic/stdint.h b/sysdeps/generic/stdint.h index 4660748..f5d9556 100644 --- a/sysdeps/generic/stdint.h +++ b/sysdeps/generic/stdint.h @@ -260,7 +260,11 @@ typedef unsigned long long int uintmax_t; # if __WORDSIZE == 64 # define SIZE_MAX (18446744073709551615UL) # else -# define SIZE_MAX (4294967295U) +# ifdef __WORDSIZE32_SIZE_ULONG +# define SIZE_MAX (4294967295UL) +# else +# define SIZE_MAX (4294967295U) +# endif # endif /* Limits of `wchar_t'. */ diff --git a/sysdeps/s390/s390-32/bits/wordsize.h b/sysdeps/s390/s390-32/bits/wordsize.h index b416612..da791fa 100644 --- a/sysdeps/s390/s390-32/bits/wordsize.h +++ b/sysdeps/s390/s390-32/bits/wordsize.h @@ -4,6 +4,7 @@ # define __WORDSIZE 64 #else # define __WORDSIZE 32 +# define __WORDSIZE32_SIZE_ULONG 1 #endif #if !defined __NO_LONG_DOUBLE_MATH && !defined __LONG_DOUBLE_MATH_OPTIONAL diff --git a/sysdeps/s390/s390-64/bits/wordsize.h b/sysdeps/s390/s390-64/bits/wordsize.h index b416612..da791fa 100644 --- a/sysdeps/s390/s390-64/bits/wordsize.h +++ b/sysdeps/s390/s390-64/bits/wordsize.h @@ -4,6 +4,7 @@ # define __WORDSIZE 64 #else # define __WORDSIZE 32 +# define __WORDSIZE32_SIZE_ULONG 1 #endif #if !defined __NO_LONG_DOUBLE_MATH && !defined __LONG_DOUBLE_MATH_OPTIONAL