From patchwork Thu Feb 13 09:34:38 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Stefan Liebler X-Patchwork-Id: 1237362 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=sourceware.org (client-ip=209.132.180.131; helo=sourceware.org; envelope-from=libc-alpha-return-109653-incoming=patchwork.ozlabs.org@sourceware.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=linux.ibm.com Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; secure) header.d=sourceware.org header.i=@sourceware.org header.a=rsa-sha1 header.s=default header.b=O3WtZIJH; dkim-atps=neutral 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 48JBF223gPz9sP7 for ; Thu, 13 Feb 2020 20:35:02 +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:from:to:cc:subject:date:mime-version :content-type:content-transfer-encoding:message-id; q=dns; s= default; b=g8bdOB6eUn2Fux+8DVZ/DwnHu8pZxgHzGOYoKilYg+W3sUT/s7KOm lEQ02KZyzzSbCaqPn1RpBRdgllSGVgS2NSXT+Hv8zOlkhsz6b0/8qpIf0/Wep61C 6QhJId46XvooJcjC6gc7wAXetfNlTUFw5jHCwlTisWeg31qUPPufuU= 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:from:to:cc:subject:date:mime-version :content-type:content-transfer-encoding:message-id; s=default; bh=zXQxrMj2qpP9EG+hr3/Mfj+XrjE=; b=O3WtZIJHkN6AdA5mZglsZudahjiN 16W/38Vu+YhfowjwPw0YDFAEcqCWprhp3P6938SGRjGALLYnfwir3qizj0voznGh FZbays6zTG9T7hrqEEH5LMGis5n8v30WXJBWZd7SC1OX/aMLSpfh5jOA2lL83Fvr zmXZ9AOEQiHtvIA= Received: (qmail 29425 invoked by alias); 13 Feb 2020 09:34:55 -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 29414 invoked by uid 89); 13 Feb 2020 09:34:55 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-22.6 required=5.0 tests=AWL, BAYES_00, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, RCVD_IN_DNSWL_LOW, SPF_PASS autolearn=ham version=3.3.1 spammy=HX-Languages-Length:3926 X-HELO: mx0a-001b2d01.pphosted.com From: Stefan Liebler To: libc-alpha@sourceware.org Cc: Stefan Liebler Subject: [PATCH v2] Use gcc -finput-charset=ascii for check-installed-headers. Date: Thu, 13 Feb 2020 10:34:38 +0100 MIME-Version: 1.0 x-cbid: 20021309-0020-0000-0000-000003A9BA05 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 20021309-0021-0000-0000-00002201A3F7 Message-Id: <20200213093438.52242-1-stli@linux.ibm.com> A non-ascii character in the installed headers leads now to: error: failure to convert ascii to UTF-8 Such a finding in s390 specific fenv.h leads to fails in GCC testsuite. See glibc commit 08aea89ef67c5780ae734073494df0a451bce20f. Adding this gcc option also to our tests was proposed by Florian Weimer. This change also found a hit in resource.h where now "microseconds" is used. I've adjusted all the resource.h files. I've used the following command to check for further hits in headers. LC_ALL=C find -name "*.h" -exec grep -PHn "[\x80-\xFF]" {} \; Tested on s390x and x86_64. Reviewed-by: Zack Weinberg --- scripts/check-installed-headers.sh | 3 ++- sysdeps/unix/sysv/linux/alpha/bits/resource.h | 2 +- sysdeps/unix/sysv/linux/bits/resource.h | 2 +- sysdeps/unix/sysv/linux/mips/bits/resource.h | 2 +- sysdeps/unix/sysv/linux/sparc/bits/resource.h | 2 +- 5 files changed, 6 insertions(+), 5 deletions(-) diff --git a/scripts/check-installed-headers.sh b/scripts/check-installed-headers.sh index 0ed572ce0d..f70340f098 100644 --- a/scripts/check-installed-headers.sh +++ b/scripts/check-installed-headers.sh @@ -123,7 +123,8 @@ $expanded_lib_mode #include <$header> int avoid_empty_translation_unit; EOF - if $cc_cmd -fsyntax-only $lang_mode "$cih_test_c" 2>&1 + if $cc_cmd -finput-charset=ascii -fsyntax-only $lang_mode \ + "$cih_test_c" 2>&1 then : else failed=1 fi diff --git a/sysdeps/unix/sysv/linux/alpha/bits/resource.h b/sysdeps/unix/sysv/linux/alpha/bits/resource.h index 7210bc7ea3..8b80906f27 100644 --- a/sysdeps/unix/sysv/linux/alpha/bits/resource.h +++ b/sysdeps/unix/sysv/linux/alpha/bits/resource.h @@ -98,7 +98,7 @@ enum __rlimit_resource __RLIMIT_RTPRIO = 14, #define RLIMIT_RTPRIO __RLIMIT_RTPRIO - /* Maximum CPU time in µs that a process scheduled under a real-time + /* Maximum CPU time in microseconds that a process scheduled under a real-time scheduling policy may consume without making a blocking system call before being forcibly descheduled. */ __RLIMIT_RTTIME = 15, diff --git a/sysdeps/unix/sysv/linux/bits/resource.h b/sysdeps/unix/sysv/linux/bits/resource.h index 3cc3eedcc3..8745234ed9 100644 --- a/sysdeps/unix/sysv/linux/bits/resource.h +++ b/sysdeps/unix/sysv/linux/bits/resource.h @@ -98,7 +98,7 @@ enum __rlimit_resource __RLIMIT_RTPRIO = 14, #define RLIMIT_RTPRIO __RLIMIT_RTPRIO - /* Maximum CPU time in µs that a process scheduled under a real-time + /* Maximum CPU time in microseconds that a process scheduled under a real-time scheduling policy may consume without making a blocking system call before being forcibly descheduled. */ __RLIMIT_RTTIME = 15, diff --git a/sysdeps/unix/sysv/linux/mips/bits/resource.h b/sysdeps/unix/sysv/linux/mips/bits/resource.h index f423ff8fc2..4600d08ade 100644 --- a/sysdeps/unix/sysv/linux/mips/bits/resource.h +++ b/sysdeps/unix/sysv/linux/mips/bits/resource.h @@ -98,7 +98,7 @@ enum __rlimit_resource __RLIMIT_RTPRIO = 14, #define RLIMIT_RTPRIO __RLIMIT_RTPRIO - /* Maximum CPU time in µs that a process scheduled under a real-time + /* Maximum CPU time in microseconds that a process scheduled under a real-time scheduling policy may consume without making a blocking system call before being forcibly descheduled. */ __RLIMIT_RTTIME = 15, diff --git a/sysdeps/unix/sysv/linux/sparc/bits/resource.h b/sysdeps/unix/sysv/linux/sparc/bits/resource.h index 714f30fd73..5d5762fab0 100644 --- a/sysdeps/unix/sysv/linux/sparc/bits/resource.h +++ b/sysdeps/unix/sysv/linux/sparc/bits/resource.h @@ -98,7 +98,7 @@ enum __rlimit_resource __RLIMIT_RTPRIO = 14, #define RLIMIT_RTPRIO __RLIMIT_RTPRIO - /* Maximum CPU time in µs that a process scheduled under a real-time + /* Maximum CPU time in microseconds that a process scheduled under a real-time scheduling policy may consume without making a blocking system call before being forcibly descheduled. */ __RLIMIT_RTTIME = 15,