From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: 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 Cc: Kito Cheng In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 List-Id: 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[] = { -- 2.38.0