From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp0 ([2001:41d0:8:6d80::]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id kMS1NqktgWCHswAAgWs5BA (envelope-from ) for ; Thu, 22 Apr 2021 10:02:49 +0200 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp0 with LMTPS id AGl4MqktgWBjBAAA1q6Kng (envelope-from ) for ; Thu, 22 Apr 2021 08:02:49 +0000 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 985A51164D for ; Thu, 22 Apr 2021 10:02:49 +0200 (CEST) Received: from localhost ([::1]:49724 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lZUIS-0003Jf-NB for larch@yhetil.org; Thu, 22 Apr 2021 04:02:48 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:38294) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lZUIB-00038F-QV for guix-devel@gnu.org; Thu, 22 Apr 2021 04:02:31 -0400 Received: from flashner.co.il ([178.62.234.194]:40248) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lZUI7-0007LE-Dg for guix-devel@gnu.org; Thu, 22 Apr 2021 04:02:31 -0400 Received: from localhost (unknown [31.210.177.125]) by flashner.co.il (Postfix) with ESMTPSA id 26A13403A4; Thu, 22 Apr 2021 08:02:25 +0000 (UTC) From: Efraim Flashner To: 47615@debbugs.gnu.org, guix-devel@gnu.org Subject: [PATCH v2 04/12] gnu: binutils: Fix bug in test suite in libiberty. Date: Thu, 22 Apr 2021 10:59:17 +0300 Message-Id: X-Mailer: git-send-email 2.31.1 In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Received-SPF: pass client-ip=178.62.234.194; envelope-from=efraim@flashner.co.il; helo=flashner.co.il X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: guix-devel@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-devel-bounces+larch=yhetil.org@gnu.org Sender: "Guix-devel" X-Migadu-Flow: FLOW_IN ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1619078569; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=jLs5/NgdilPVUG+ULngsg4SULQ7InIpdYhm/RGrerpQ=; b=pgDMn7ItM/Du7X3kWOQKxC2IckDPwumR+SAKF32OZLEcyDxRyhfeNzhLDO1K9QF+MduDXv 4cN0qrTCBuZz9vd592+QpfUq47NSHduFmIn8W3ADpGwPSLPVN6x/mcnJOqQbKA7OaGNkib HRSATjKkRY3oBe7HX1IIuQ5OGUHa9yJloEotrTwkZBLQGHA1bT0sJyfs2Rl9zw3MdEe5nh AsqMJSCTucYhRzbZlF0PcaEDyLWS+zZZOIS+daV5ZfxHQ+6TujM4QkGHc/JJHzay64wVBy qnz+ncs5Ve2uIJsU6XkM4SuXeB/m6N93ekTeMbgVKxo6ISFnJ2FtyMyHqb8ubQ== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1619078569; a=rsa-sha256; cv=none; b=eAZV4cs1SqaTSNTa1OBpocrU+MQsmVWbR5zvBngxM2bKArL+7AsaU5rxHZ4MlQPLCIO0wT SP7qPTY0Qmg3Q1eIjJB35Dx9U0F3bkTsHa5/yaDWcQfRWHIB02lTcdscjPkN7gJGIigyCF eOZ55zo8VSlsaKJ+xijqLulidBQLPCdykjQ4YGsaCwUruYs+0TPaMrzRHofRVwEiF4eDeO q6Bmm/A7+yESB7uaXV0YfmaTHOdxc/bD+xKlepWb7bJhoMzSzkjz93ag0C89QCevrLvwDm 2oD6QnlVw4ijQWjgC/10uWfClEb/Y8nxPH91nEktUsVDZ1jox3cliqpQ6sSo9A== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=none; dmarc=none; spf=pass (aspmx1.migadu.com: domain of guix-devel-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=guix-devel-bounces@gnu.org X-Migadu-Spam-Score: 2.56 Authentication-Results: aspmx1.migadu.com; dkim=none; dmarc=none; spf=pass (aspmx1.migadu.com: domain of guix-devel-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=guix-devel-bounces@gnu.org X-Migadu-Queue-Id: 985A51164D X-Spam-Score: 2.56 X-Migadu-Scanner: scn0.migadu.com X-TUID: x7Vc1c2cxqDx * gnu/packages/base.scm (binutils)[source]: Add patch. * gnu/packages/patches/binutils-libiberty-endianness-bug.patch: New file. * gnu/local.mk (dist_patch_DATA): Register it. --- gnu/local.mk | 1 + gnu/packages/base.scm | 3 +- .../binutils-libiberty-endianness-bug.patch | 36 +++++++++++++++++++ 3 files changed, 39 insertions(+), 1 deletion(-) create mode 100644 gnu/packages/patches/binutils-libiberty-endianness-bug.patch Completely rewritten. I reported the bug upstream to binutils and after some testing it was determined to be an actual bug in libiberty's test suite affecting big-endian systems. I've tested this on x86_64 and saw no issues with it. diff --git a/gnu/local.mk b/gnu/local.mk index f9996e6fa1..23b768871c 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -865,6 +865,7 @@ dist_patch_DATA = \ %D%/packages/patches/biber-sortinithash.patch \ %D%/packages/patches/bidiv-update-fribidi.patch \ %D%/packages/patches/binutils-boot-2.20.1a.patch \ + %D%/packages/patches/binutils-libiberty-endianness-bug.patch \ %D%/packages/patches/binutils-loongson-workaround.patch \ %D%/packages/patches/binutils-mingw-w64-timestamp.patch \ %D%/packages/patches/binutils-mingw-w64-deterministic.patch \ diff --git a/gnu/packages/base.scm b/gnu/packages/base.scm index ee1ab1bcad..3dd4f2d0be 100644 --- a/gnu/packages/base.scm +++ b/gnu/packages/base.scm @@ -507,7 +507,8 @@ change. GNU make offers many powerful extensions over the standard utility.") (sha256 (base32 "18ypqr5y48vxqg9mkz1c47798jp1xb1d4vfpmfq8vkihkvkx4jsv")) - (patches (search-patches "binutils-loongson-workaround.patch")))) + (patches (search-patches "binutils-libiberty-endianness-bug.patch" + "binutils-loongson-workaround.patch")))) (build-system gnu-build-system) ;; TODO: Add dependency on zlib + those for Gold. diff --git a/gnu/packages/patches/binutils-libiberty-endianness-bug.patch b/gnu/packages/patches/binutils-libiberty-endianness-bug.patch new file mode 100644 index 0000000000..e6c82f704e --- /dev/null +++ b/gnu/packages/patches/binutils-libiberty-endianness-bug.patch @@ -0,0 +1,36 @@ +This patch fixes a bug exposed when running the libiberty test suite on +big-endian machines. + +Original bug report: +https://sourceware.org/bugzilla/show_bug.cgi?id=27751 +Follow-ups: +https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100177 +https://gcc.gnu.org/pipermail/gcc-patches/2021-April/568314.html + +--- + libiberty/rust-demangle.c | 9 ++++++--- + 1 file changed, 6 insertions(+), 3 deletions(-) + +diff --git a/libiberty/rust-demangle.c b/libiberty/rust-demangle.c +index 6fd8f6a4db0..848563fa3c3 100644 +--- a/libiberty/rust-demangle.c ++++ b/libiberty/rust-demangle.c +@@ -1253,9 +1253,12 @@ demangle_const_char (struct rust_demangler *rdm) + else if (value == '\n') + PRINT ("\\n"); + else if (value > ' ' && value < '~') +- /* Rust also considers many non-ASCII codepoints to be printable, but +- that logic is not easily ported to C. */ +- print_str (rdm, (char *) &value, 1); ++ { ++ /* Rust also considers many non-ASCII codepoints to be printable, but ++ that logic is not easily ported to C. */ ++ char c = value; ++ print_str (rdm, &c, 1); ++ } + else + { + PRINT ("\\u{"); +-- +2.31.1 + -- 2.31.1