From patchwork Tue Oct 25 05:01:02 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Martin_Li=C5=A1ka?= X-Patchwork-Id: 10485 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:6687:0:0:0:0:0 with SMTP id l7csp809567wru; Mon, 24 Oct 2022 22:01:38 -0700 (PDT) X-Google-Smtp-Source: AMsMyM4vrFsi2Zc5BMNAAoKQIlRGqikOVPw8VdfwZePJJfos2+9UISJ+ss9p4QK4Tcn4eQ9cxoef X-Received: by 2002:aa7:cfda:0:b0:461:9d22:3484 with SMTP id r26-20020aa7cfda000000b004619d223484mr11746112edy.142.1666674098197; Mon, 24 Oct 2022 22:01:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666674098; cv=none; d=google.com; s=arc-20160816; b=HWqP5sRC9AVKpq8drHxqJUTVsFzYOIlnUpljSie0YaZuYkLiimvs0CFGJW/VqDeU3S WzHRo9N+JGpByV//CYV43qHWzxiNigV6ilLw57JdIFHtoOEqDH9Yz4Qtbevr5s0PIiw+ 2R2w4TMMasHzIjVjcCcEQLctr1h1tdyLmQgRSOD7r9qtK+uMBddruoPoRZJo+YhLTfwu FDTt1o3s2uU/Of0LeeRoGPyyi+a5Dxrq3dq77cXZFi8U1iKT4KRt9pGlUSz95paEf6OZ mueq6pO/fcUMo3luNCfAaxeS7A+X5o7nRrtOqPDqitHQM6bGTqlArmzR0E4QmLYNIKb0 tymg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:cc:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :in-reply-to:content-language:references:to:subject:from:user-agent :mime-version:date:message-id:dkim-signature:dkim-signature :dmarc-filter:delivered-to; bh=QOrtJcCzm6pmCcWIYQcsLe+r6nSB6CldT1HGlM/ZvfM=; b=PWIlpErsaqeQHEKRnqd3S+G7YxlzF6YrcKQ96kilsDEuX0xjF4oBBY8/FctsSeSktP Y5kMeQqPS1Gv5DSwgj0BzBguWRrHRbtH1DZD9IoWgQb4QvjO//RuOmSsXB9y5WSmDcwl uz5M0Y43M5mL3gK9yUGbnsnVmjchd2MCoum/69tTmyKBUMPy//Zmujz+jk+q1onO2sig Y+6c4rnenximLmnaDl7ai+074TJRLtjYmJmKi1inS8UkwH7fUwY+PiXrSHWpdvsPUg15 d156ZiCLn0V7P1GoR8LbOZt7/y0kZok2zJpMqw3lwgzvLJlIjXqZ+tiUNIDkjhsidFt8 9Kcg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@suse.cz header.s=susede2_rsa header.b=PzVvfhYh; dkim=neutral (no key) header.i=@suse.cz header.s=susede2_ed25519; spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 8.43.85.97 as permitted sender) smtp.mailfrom="gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org" Received: from sourceware.org (ip-8-43-85-97.sourceware.org. [8.43.85.97]) by mx.google.com with ESMTPS id q4-20020a056402040400b00461891a8138si1520607edv.446.2022.10.24.22.01.38 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 24 Oct 2022 22:01:38 -0700 (PDT) Received-SPF: pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 8.43.85.97 as permitted sender) client-ip=8.43.85.97; Authentication-Results: mx.google.com; dkim=pass header.i=@suse.cz header.s=susede2_rsa header.b=PzVvfhYh; dkim=neutral (no key) header.i=@suse.cz header.s=susede2_ed25519; spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 8.43.85.97 as permitted sender) smtp.mailfrom="gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org" Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 11BEB3857BAE for ; Tue, 25 Oct 2022 05:01:36 +0000 (GMT) X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from smtp-out2.suse.de (smtp-out2.suse.de [IPv6:2001:67c:2178:6::1d]) by sourceware.org (Postfix) with ESMTPS id 9D7A4385841F for ; Tue, 25 Oct 2022 05:01:04 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 9D7A4385841F Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=suse.cz Authentication-Results: sourceware.org; spf=fail smtp.mailfrom=suse.cz Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by smtp-out2.suse.de (Postfix) with ESMTPS id 2B5411F461; Tue, 25 Oct 2022 05:01:03 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_rsa; t=1666674063; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=QOrtJcCzm6pmCcWIYQcsLe+r6nSB6CldT1HGlM/ZvfM=; b=PzVvfhYh1Q7aFsjT03m86GaeX2G0hRkjI0P9qPgh5sWwh6JIFAeSP7Bdv5uyzilhvQm99m hTflXdBxrtHx8jCxU8AdmhzJdOHzvjC0r/svIfyk2n7VM74scVX5oXMMdMnlR56Lh+teLw nIa23FEsYgBQPX2e6Heh/x0IWlHdZEE= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_ed25519; t=1666674063; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=QOrtJcCzm6pmCcWIYQcsLe+r6nSB6CldT1HGlM/ZvfM=; b=uD2k0VNhuNqj8btPKUHePwuqR2K9EEjriAT6A7oGZdSlTGzV1FwPL/GuoBnRcs78WXfOO7 TQUocfsXekfzfTAQ== Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by imap2.suse-dmz.suse.de (Postfix) with ESMTPS id 165F0134CA; Tue, 25 Oct 2022 05:01:03 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id TDxjBI9tV2NmPQAAMHmgww (envelope-from ); Tue, 25 Oct 2022 05:01:03 +0000 Message-ID: <1842f47d-a6e7-8a9e-3ec7-82c7f7d33f57@suse.cz> Date: Tue, 25 Oct 2022 07:01:02 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.4.0 From: =?utf-8?q?Martin_Li=C5=A1ka?= Subject: [PATCH] riscv: fix cross compiler To: gcc-patches@gcc.gnu.org References: Content-Language: en-US In-Reply-To: X-Spam-Status: No, score=-12.1 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, RCVD_IN_DNSWL_LOW, SPF_HELO_NONE, SPF_SOFTFAIL, TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) 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+ouuuleilei=gmail.com@gcc.gnu.org Sender: "Gcc-patches" X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1747634459418758453?= X-GMAIL-MSGID: =?utf-8?q?1747634459418758453?= More riscv_get_valid_option_values out of Fixes: riscv/riscv-common.cc:1748:40: error: ‘riscv_get_valid_option_values’ was not declared in this scope Now I get: ./xgcc -B. --completion=-mcp -mcpu=sifive-e20 -mcpu=sifive-e21 -mcpu=sifive-e24 -mcpu=sifive-e31 -mcpu=sifive-e34 -mcpu=sifive-e76 -mcpu=sifive-s21 -mcpu=sifive-s51 -mcpu=sifive-s54 -mcpu=sifive-s76 -mcpu=sifive-u54 -mcpu=sifive-u74 ./xgcc -B. --completion=-mtune -mtune=rocket -mtune=sifive-3-series -mtune=sifive-5-series -mtune=sifive-7-series -mtune=thead-c906 -mtune=size -mtune=sifive-e20 -mtune=sifive-e21 -mtune=sifive-e24 -mtune=sifive-e31 -mtune=sifive-e34 -mtune=sifive-e76 -mtune=sifive-s21 -mtune=sifive-s51 -mtune=sifive-s54 -mtune=sifive-s76 -mtune=sifive-u54 -mtune=sifive-u74 Ready for master? Thanks, Martin gcc/ChangeLog: * common/config/riscv/riscv-common.cc (riscv_get_valid_option_values): Get out of ifdef. --- gcc/common/config/riscv/riscv-common.cc | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/gcc/common/config/riscv/riscv-common.cc b/gcc/common/config/riscv/riscv-common.cc index 697bfe435c8..dead3802f83 100644 --- a/gcc/common/config/riscv/riscv-common.cc +++ b/gcc/common/config/riscv/riscv-common.cc @@ -1691,6 +1691,10 @@ riscv_compute_multilib ( return xstrdup (multilib_infos[best_match_multi_lib].path.c_str ()); } +#undef TARGET_COMPUTE_MULTILIB +#define TARGET_COMPUTE_MULTILIB riscv_compute_multilib +#endif + vec riscv_get_valid_option_values (int option_code, const char *prefix ATTRIBUTE_UNUSED) @@ -1726,10 +1730,6 @@ riscv_get_valid_option_values (int option_code, return v; } -#undef TARGET_COMPUTE_MULTILIB -#define TARGET_COMPUTE_MULTILIB riscv_compute_multilib -#endif - /* Implement TARGET_OPTION_OPTIMIZATION_TABLE. */ static const struct default_options riscv_option_optimization_table[] = {