From patchwork Thu Apr 29 21:28:08 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: David Adair X-Patchwork-Id: 1471865 X-Patchwork-Delegate: ynezz@true.cz Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (no SPF record) smtp.mailfrom=lists.openwrt.org (client-ip=2001:8b0:10b:1:d65d:64ff:fe57:4e05; helo=desiato.infradead.org; envelope-from=openwrt-devel-bounces+incoming=patchwork.ozlabs.org@lists.openwrt.org; receiver=) Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; secure) header.d=lists.infradead.org header.i=@lists.infradead.org header.a=rsa-sha256 header.s=desiato.20200630 header.b=JoMhqmgW; dkim-atps=neutral Received: from desiato.infradead.org (desiato.infradead.org [IPv6:2001:8b0:10b:1:d65d:64ff:fe57:4e05]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4FWTDx0n6mz9sPf for ; Fri, 30 Apr 2021 07:30:24 +1000 (AEST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=desiato.20200630; h=Sender:Content-Type:List-Help: Reply-To:List-Archive:List-Unsubscribe:List-Subscribe:From:List-Post:List-Id: Message-ID:MIME-Version:References:Date:To:Subject:Cc: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To: List-Owner; bh=at3Z8WRMorE2Tc+RW02TCQABL6vnuMNuJvkJm/9iTrI=; b=JoMhqmgWcktmgI /N1PYwG7rzK5y6qpGUlClGn7MG3a1YnyrXiZ8ZcnHujh8IPoSSeDWss9YpCxf2GcdxnB2shHKmv8V XU+Js3pllSWF8R8luYaY3MeZ8FZGe2nkyZOxZEULXGGfPCVTCfUwS04E3VWCsh915r/sSjdNqQtPH Om68uCs2Yev+z5GAwOzHgtPoA//C4Wx6x8dNz5eDYUFW0+T85Zn1omv04ZQw5qFv1eULAgsYTEr3c iRZ26JOTCAxIaynEnD9SlXP6IXC5UGF8tImP0L1FJ9JaicK0QnPO3icSXF/7P7zJj6L5g77hSfn3+ qfAcwfGg/Af/hkSVhmjA==; Received: from localhost ([::1] helo=desiato.infradead.org) by desiato.infradead.org with esmtp (Exim 4.94 #2 (Red Hat Linux)) id 1lcECv-006ZMn-Nt; Thu, 29 Apr 2021 21:28:25 +0000 Subject: [PATCH] ccache: don't use non-ASCII quotes To: openwrt-devel@lists.openwrt.org Date: Thu, 29 Apr 2021 14:28:08 -0700 References: <5317410c8a4f2f52afede08a40d0825d032a0e36.camel.ref@aol.com> MIME-Version: 1.0 Message-ID: List-Id: OpenWrt Development List List-Post: X-Patchwork-Original-From: David Adair via openwrt-devel From: David Adair Precedence: list X-Mailman-Version: 2.1.34 X-BeenThere: openwrt-devel@lists.openwrt.org List-Subscribe: , List-Unsubscribe: , List-Archive: Reply-To: David Adair List-Help: Sender: "openwrt-devel" Errors-To: openwrt-devel-bounces+incoming=patchwork.ozlabs.org@lists.openwrt.org The sender domain has a DMARC Reject/Quarantine policy which disallows sending mailing list messages using the original "From" header. To mitigate this problem, the original message has been wrapped automatically by the mailing list software. Rebased upstream ccache commit: f6202db308e32f9b2 to correct compilation errors with MANUAL.adoc due to non-ascii characters. This change enables building 21.02-rc1 on a RHEL8 host where "LANG=C" is apparently ascii rather than utf8. Original fix: Reported-by: Christophe PEREZ Bug: https://bugs.gentoo.org/762814 Signed-off-by: Sergei Trofimovich Cleaned up backport to version 4.1 and added to ccache/patches Signed-off-by: David Adair --- tools/ccache/patches/020-fix-doc-utf.patch | 96 ++++++++++++++++++++++ 1 file changed, 96 insertions(+) create mode 100644 tools/ccache/patches/020-fix-doc-utf.patch diff --git a/tools/ccache/patches/020-fix-doc-utf.patch b/tools/ccache/patches/020-fix-doc-utf.patch new file mode 100644 index 0000000000..981b1f4473 --- /dev/null +++ b/tools/ccache/patches/020-fix-doc-utf.patch @@ -0,0 +1,96 @@ +From 81e72af1dac607d57c55e40c1187ead52cc45e26 Mon Sep 17 00:00:00 2001 +From: Sergei Trofimovich +Date: Mon, 11 Jan 2021 20:17:47 +0000 +Subject: [PATCH] doc/MANUAL.adoc: Don't use non-ASCII quotes (#761) + +Some locales like "LANG=fr_FR.iso885915@euro make" can't +handle UTF-8 single- and double-quotes: + +$ LANG=fr_FR.iso885915@euro make +... +asciidoc: FAILED: MANUAL.adoc: line 529: unexpected error: +... + File "/usr/lib/python3.8/encodings/iso8859_15.py", line 19, in encode + return codecs.charmap_encode(input,self.errors,encoding_table)[0] +UnicodeEncodeError: 'charmap' codec can't encode character '\u201c' + in position 54: character maps to + +To avoid it the patch uses ASCII equivalents of symbols. + +The patch is generated as: + +$ sed \ + -e 's/\xE2\x80\x99/'\''/g' \ + -e 's/\xE2\x80\x9C/'\`\`'/g' \ + -e 's/\xE2\x80\x9D/'\'\''/g' \ + -i doc/MANUAL.adoc + +Reported-by: Christophe PEREZ +Bug: https://bugs.gentoo.org/762814 +Signed-off-by: Sergei Trofimovich +--- + doc/MANUAL.adoc | 24 ++++++++++++------------ + 1 file changed, 12 insertions(+), 12 deletions(-) + +diff --git a/doc/MANUAL.adoc b/doc/MANUAL.adoc +index b7d89124..ec0c286a 100644 +--- a/doc/MANUAL.adoc ++++ b/doc/MANUAL.adoc +@@ -517,9 +517,9 @@ Semantics of *compression_level*: + ratio. The maximum possible value depends on the libzstd version. + Decompression speed is essentially the same for all levels. + *< 0*:: +- A negative value corresponds to Zstandard's “ultra-fast” compression ++ A negative value corresponds to Zstandard's ``ultra-fast'' compression + levels, which are even faster than level 1 but with less good compression +- ratios. For instance, level *-3* corresponds to “--fast=3” for the *zstd* ++ ratios. For instance, level *-3* corresponds to ``--fast=3'' for the *zstd* + command line tool. + *0* (default):: + The value *0* means that ccache will choose a suitable level, currently +@@ -564,8 +564,8 @@ Semantics of *compression_level*: + + [[config_file_clone]] *file_clone* (*CCACHE_FILECLONE* or *CCACHE_NOFILECLONE*, see <<_boolean_values,Boolean values>> above):: + +- If true, ccache will attempt to use file cloning (also known as “copy on +- write”, “CoW” or “reflinks”) to store and fetch cached compiler results. ++ If true, ccache will attempt to use file cloning (also known as ``copy on ++ write'', ``CoW'' or ``reflinks'') to store and fetch cached compiler results. + *file_clone* has priority over <>. The + default is false. + + +@@ -921,11 +921,11 @@ Incompressible data: 3.5 GB + + Notes: + +-* The “disk blocks” size is the cache size when taking disk block size into +- account. This value should match the “cache size” value from “ccache +- --show-stats”. The other size numbers refer to actual content sizes. +-* “Compressed data” refers to result and manifest files stored in the cache. +-* “Incompressible data” refers to files that are always stored uncompressed ++* The ``disk blocks'' size is the cache size when taking disk block size into ++ account. This value should match the ``cache size'' value from ``ccache ++ --show-stats''. The other size numbers refer to actual content sizes. ++* ``Compressed data'' refers to result and manifest files stored in the cache. ++* ``Incompressible data'' refers to files that are always stored uncompressed + (triggered by enabling <> or + <>) or unknown files (for instance files + created by older ccache versions). +@@ -1238,11 +1238,11 @@ In the direct mode, ccache uses the 160 bit BLAKE3 hash of the + the *ccache-input-c* + *ccache-input-p* data is used in the preprocessor mode. + + The *ccache-input-text* file is a combined text version of the three +-binary input files. It has three sections (“COMMON”, “DIRECT MODE” and +-“PREPROCESSOR MODE”), which is turn contain annotations that say what kind of ++binary input files. It has three sections (``COMMON'', ``DIRECT MODE'' and ++``PREPROCESSOR MODE''), which is turn contain annotations that say what kind of + data comes next. + +-To debug why you don’t get an expected cache hit for an object file, you can do ++To debug why you don't get an expected cache hit for an object file, you can do + something like this: + + 1. Build with debug mode enabled. +-- +2.27.0 +