From patchwork Wed Aug 9 17:58:04 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arne Fitzenreiter X-Patchwork-Id: 7084 Return-Path: Received: from mail01.ipfire.org (mail01.haj.ipfire.org [172.28.1.202]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1) client-signature ECDSA (secp384r1)) (Client CN "mail01.haj.ipfire.org", Issuer "R3" (verified OK)) by web04.haj.ipfire.org (Postfix) with ESMTPS id 4RLd8J1Lqqz3wtL for ; Wed, 9 Aug 2023 17:58:24 +0000 (UTC) Received: from mail02.haj.ipfire.org (mail02.haj.ipfire.org [172.28.1.201]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1) client-signature ECDSA (secp384r1)) (Client CN "mail02.haj.ipfire.org", Issuer "R3" (verified OK)) by mail01.ipfire.org (Postfix) with ESMTPS id 4RLd8B6zp7z2fJ; Wed, 9 Aug 2023 17:58:18 +0000 (UTC) Received: from mail02.haj.ipfire.org (localhost [127.0.0.1]) by mail02.haj.ipfire.org (Postfix) with ESMTP id 4RLd8B3RxDz30BD; Wed, 9 Aug 2023 17:58:18 +0000 (UTC) Received: from mail01.ipfire.org (mail01.haj.ipfire.org [172.28.1.202]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384) server-digest SHA384 client-signature ECDSA (P-384) client-digest SHA384) (Client CN "mail01.haj.ipfire.org", Issuer "R3" (verified OK)) by mail02.haj.ipfire.org (Postfix) with ESMTPS id 4RLd885SMzz2xpf for ; Wed, 9 Aug 2023 17:58:16 +0000 (UTC) Received: from [127.0.0.1] (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1) server-digest SHA384) (No client certificate requested) by mail01.ipfire.org (Postfix) with ESMTPSA id 4RLd880JYYzsT; Wed, 9 Aug 2023 17:58:16 +0000 (UTC) DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=ipfire.org; s=202003ed25519; t=1691603896; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=YJuOMhHG+kq7XI/MnzME7mFfcj1g2c5SV310Qia34xM=; b=1u3/QWbjrTufW04rOQApgffAU3J5vF9FdLV+hJVISdVBbGJAVgaHGfekGARGTxtLSixJkZ 9nIbX7Z64Qv/YWDA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ipfire.org; s=202003rsa; t=1691603896; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=YJuOMhHG+kq7XI/MnzME7mFfcj1g2c5SV310Qia34xM=; b=BFaSyEsi3Qb/D71jQfADsODI3ErlBUOS0UMIvlglGhktQEyL+nvD2Qy0Tg9+GpYUHR/X6L mvTwMmYXzjvQoShDft4yMVETu3omwIBbYGWLekuQgk6flF/MVPhF5QA4feS9dSFjRRKARr xoCZcWKImBlQmM7oO74yZCZ0RiWbxE0oACOH/CEj9AwTiP8ZbrnaZklNjhGWrn+EJKyxyX dNb2BSlfIeAxzbJiGvY06SmPBHfWGHSCK/M3MggfhYs6GDIRpZ8zC6J9x8yFppj7AGldEV Zqo/MkTNay2FyE2BNw5hKKFSeMYYlf5YeCGxo7kn+wGyUNkzI0I1PTtlmCEP7Q== From: Arne Fitzenreiter To: development@lists.ipfire.org Subject: [PATCH 2/4] gcc: fix build on riscv64 Date: Wed, 9 Aug 2023 19:58:04 +0200 Message-Id: <20230809175806.2624-2-arne_f@ipfire.org> In-Reply-To: <20230809175806.2624-1-arne_f@ipfire.org> References: <20230809175806.2624-1-arne_f@ipfire.org> MIME-Version: 1.0 X-BeenThere: development@lists.ipfire.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: IPFire development talk List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Arne Fitzenreiter Errors-To: development-bounces@lists.ipfire.org Sender: "Development" Signed-off-by: Arne Fitzenreiter --- lfs/gcc | 2 ++ ..._use_log2_from_cheader_without_namespace.patch | 15 +++++++++++++++ 2 files changed, 17 insertions(+) create mode 100644 src/patches/gcc/gcc-13.1.0-riscv_use_log2_from_cheader_without_namespace.patch diff --git a/lfs/gcc b/lfs/gcc index 2468e6c85..0e01fe660 100644 --- a/lfs/gcc +++ b/lfs/gcc @@ -212,6 +212,8 @@ $(subst %,%_BLAKE2,$(objects)) : $(TARGET) : $(patsubst %,$(DIR_DL)/%,$(objects)) @$(PREBUILD) @rm -rf $(DIR_APP) $(DIR_SRC)/gcc-build && cd $(DIR_SRC) && tar axf $(DIR_DL)/$(DL_FILE) + cd $(DIR_APP) && patch -Np1 < $(DIR_SRC)/src/patches/gcc/gcc-13.1.0-riscv_use_log2_from_cheader_without_namespace.patch + @mkdir $(DIR_SRC)/gcc-build cd $(DIR_APP) && sed -i 's/install_to_$$(INSTALL_DEST) //' libiberty/Makefile.in diff --git a/src/patches/gcc/gcc-13.1.0-riscv_use_log2_from_cheader_without_namespace.patch b/src/patches/gcc/gcc-13.1.0-riscv_use_log2_from_cheader_without_namespace.patch new file mode 100644 index 000000000..346817952 --- /dev/null +++ b/src/patches/gcc/gcc-13.1.0-riscv_use_log2_from_cheader_without_namespace.patch @@ -0,0 +1,15 @@ +diff -Naur gcc-13.1.0.org/gcc/config/riscv/genrvv-type-indexer.cc gcc-13.1.0/gcc/config/riscv/genrvv-type-indexer.cc +--- gcc-13.1.0.org/gcc/config/riscv/genrvv-type-indexer.cc 2023-04-26 09:09:39.000000000 +0200 ++++ gcc-13.1.0/gcc/config/riscv/genrvv-type-indexer.cc 2023-08-02 11:28:53.615913583 +0200 +@@ -115,9 +115,9 @@ + if (sew == eew) + elmul_log2 = lmul_log2; + else if (sew > eew) +- elmul_log2 = lmul_log2 - std::log2 (sew / eew); ++ elmul_log2 = lmul_log2 - log2 (sew / eew); + else /* sew < eew */ +- elmul_log2 = lmul_log2 + std::log2 (eew / sew); ++ elmul_log2 = lmul_log2 + log2 (eew / sew); + + if (float_p) + return floattype (eew, elmul_log2);