From patchwork Thu Dec 24 03:02:42 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kito Cheng X-Patchwork-Id: 1420369 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=gcc.gnu.org (client-ip=8.43.85.97; helo=sourceware.org; envelope-from=gcc-patches-bounces@gcc.gnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=sifive.com Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=sifive.com header.i=@sifive.com header.a=rsa-sha256 header.s=google header.b=clBlXyMF; dkim-atps=neutral Received: from sourceware.org (server2.sourceware.org [8.43.85.97]) (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 4D1ZdF6dc0z9sWk for ; Thu, 24 Dec 2020 14:02:55 +1100 (AEDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id A53A7386F411; Thu, 24 Dec 2020 03:02:52 +0000 (GMT) X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from mail-pl1-x632.google.com (mail-pl1-x632.google.com [IPv6:2607:f8b0:4864:20::632]) by sourceware.org (Postfix) with ESMTPS id 8FDEA3850426 for ; Thu, 24 Dec 2020 03:02:48 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 8FDEA3850426 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=sifive.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=kito.cheng@sifive.com Received: by mail-pl1-x632.google.com with SMTP id be12so659198plb.4 for ; Wed, 23 Dec 2020 19:02:48 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sifive.com; s=google; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=VfW5SjEZGvHHILWDK1ObcBJxoZjyRa4PAj9uS9/P9Ao=; b=clBlXyMFfJOMpWzMUrxNvpiT5+5dF2thsdF9cojyyk8RbNfxQ7N2G+O9/Ok0mI4r/D ZPbMRwmuOUXV6nWVDydV2OX5g4akpwfWJhJxeiGbVe0LxSh2oMFFmb9aHcHUIAvA4OmS /LL5xGYr+2gA/19l7I2C/foY99EIch9MEFIF3hZFXm0IxiqQ2RsMKiylEvjLpI/HPEqH UXvEP2Fk/nRhh4U4x566MAE1ign4NAadmchvxR/eQAJR/eVP03qhfWmfm1lQUdqfVrS0 1YDzVvq2AAX/tdmsgjuEZeHR/BxZPNKhbIwp9kqBZk4UUDEVpIXciH3wGKV1DA0DH205 oPLQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=VfW5SjEZGvHHILWDK1ObcBJxoZjyRa4PAj9uS9/P9Ao=; b=g5raIdrEMelb9Trhl0PDWp/lyNbgzrdCcapMVf2an7rHs8sJk4h2CmfDmvMMsChoYd ax8sYtJVDOVV8+f9LrDmNgWfLMV+bOA2GnRFV2TGxNXKI8YFvwZNaHxxc1BaGFSiSYbZ uGdnMR6HsnVEj3ku8BO/J8gcX33BwqdD4q7v4ehjpgSVlCHZfsUtRXJNoq26xWXhY0YT ApHBMcKX7dWwWfILV/nUP4oQsqZKSrQdOF0tMMB5VWzNlre1+zLa2iDHyJmAOI4pFCw6 Ozg0iB95Ss4iOCej7wmFM8mrPfe4/eA+usau4FNOVBw+mgZBHL0zL3Zs3dvSpujRtfbV G9DA== X-Gm-Message-State: AOAM530fjkt7CIP9G8ufrR3EOOJDd21NHNeRwxSUjETK8rvIdxOtPP5I znRbdVUnAD0sKrDyOktghyC/JNXfpIwmHgI3 X-Google-Smtp-Source: ABdhPJwwsOnNLvaoE/BA7Kw10QkZc2JkkZQTbI4geAX99WltUO1NiKrXBp7nuShQRMXNweNv4lpwNA== X-Received: by 2002:a17:90a:e551:: with SMTP id ei17mr2335375pjb.187.1608778967272; Wed, 23 Dec 2020 19:02:47 -0800 (PST) Received: from hsinchu02.internal.sifive.com (114-34-229-221.HINET-IP.hinet.net. [114.34.229.221]) by smtp.gmail.com with ESMTPSA id u3sm905772pjf.52.2020.12.23.19.02.45 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 23 Dec 2020 19:02:46 -0800 (PST) From: Kito Cheng To: gcc-patches@gcc.gnu.org, kito.cheng@gmail.com, jimw@sifive.com Subject: [committed] RISC-V: Fix python3 compatibility for multilib-generator Date: Thu, 24 Dec 2020 11:02:42 +0800 Message-Id: <20201224030242.84938-1-kito.cheng@sifive.com> X-Mailer: git-send-email 2.29.2 MIME-Version: 1.0 X-Spam-Status: No, score=-13.9 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org X-BeenThere: gcc-patches@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Kito Cheng Errors-To: gcc-patches-bounces@gcc.gnu.org Sender: "Gcc-patches" The subprocess return string is raw bytes in python3, it must decode before used as string, verifed with python2 and python3. gcc/ChangeLog: * config/riscv/multilib-generator (arch_canonicalize): Call decode for the subprocess return value. --- gcc/config/riscv/multilib-generator | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gcc/config/riscv/multilib-generator b/gcc/config/riscv/multilib-generator index ccfd9ea18ea..64ff15f449b 100755 --- a/gcc/config/riscv/multilib-generator +++ b/gcc/config/riscv/multilib-generator @@ -57,7 +57,7 @@ def arch_canonicalize(arch): proc = subprocess.Popen([sys.executable, arch_can_script, arch], stdout=subprocess.PIPE) out, err = proc.communicate() - return out.strip() + return out.decode().strip() # # Handle expansion operation.