From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-lf1-x142.google.com (mail-lf1-x142.google.com [IPv6:2a00:1450:4864:20::142]) by sourceware.org (Postfix) with ESMTPS id 731AE3833037 for ; Wed, 2 Dec 2020 05:39:32 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 731AE3833037 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-lf1-x142.google.com with SMTP id z21so1654788lfe.12 for ; Tue, 01 Dec 2020 21:39:32 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sifive.com; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=WV8pZ9hs0gG6GY/0/zn1f6fuv41FY3sQhggDw+4+W0I=; b=H2l/QRp/0so0EqSsNA79KA5LJ+ejEIHZXOMABTUy/DOhmFzbYR/VIlR5Yp4aksqczq 9Nj8Dv8XFezQKSIhcstzmurfYJpssRCDUWKNZkzn+fWOXtu5M+k9lQAs10EQWYy0PzPV 5eUTgAaMrOAbfroO69KRJ2nuBQGjXQp8XW1B5qHUrdrnwu/cMV7j0zpsAjkBhincNMPg JuySOqIOKrAvW51eImyIbftrYjDJ7HUI6bj4FOesztxiZVpf1BrJqctTis/upb6vWc1O PmpTACuf1vsHb4TSSXgkc4wUeLIeNUCCJ8n0Qn/AsWzCCWvHeHn78qryaAT0CYaSTOUP yVRg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=WV8pZ9hs0gG6GY/0/zn1f6fuv41FY3sQhggDw+4+W0I=; b=fgQirAigprDq4VcAt3JuHvekTQjWLzGaJwlsJlPCXsxA8XDh24rRszXdzfpVHJCYDa 2oXAFYyzaH0qlE3nwIrWQfpsZRSVWft1cMDDCs/sBhBsvOc/XZmnK42Ei7uyfZA4lK36 h0lcWvstaUqO0MnIffS9WGbh6TXXd0qI6Q+HO9zdAKEapeMeNiOsUVV7qa6AiMkFkjxK 3uxzyzGjaIaaqvtPx+9shi+uzVjbdKgcCsxUZ9E6A0Elcxo654H2v7CMgWxfzjHIip4c jZ39Rhzij8uYgFRorijQegtpH5Bo9YYIV3UqGMMHxdTN4eYZZR/FU/miK7rf5XJ1z+SX e7Iw== X-Gm-Message-State: AOAM533OR+G8s8/pUK6xi/aDSn0pqKuysg1iCIZW+n2lF7Db+mSLM/wL iOtP9apNiHV2Lo5uqSimpr6YpmiIU0OpnMH//S11WQ== X-Google-Smtp-Source: ABdhPJxtWWw+HdBXOMj5yNmc/vk1PoCUyYZW7MUNpwnxg9XbnPLKPglcYOrcTMU3EY5sK5vepEeym6tuYE+4Fh8jtpc= X-Received: by 2002:a05:6512:c3:: with SMTP id c3mr505446lfp.7.1606887571133; Tue, 01 Dec 2020 21:39:31 -0800 (PST) MIME-Version: 1.0 References: <20201201092920.8677-1-kito.cheng@sifive.com> <4de87b8f-a84a-44b6-d08d-2a6fdba9f2c0@redhat.com> In-Reply-To: <4de87b8f-a84a-44b6-d08d-2a6fdba9f2c0@redhat.com> From: Kito Cheng Date: Wed, 2 Dec 2020 13:39:20 +0800 Message-ID: Subject: Re: [PATCH 1/2] Add TARGET_COMPUTE_MULTILIB hook to override multi-lib result. To: Jeff Law Cc: GCC Patches , Kito Cheng , Jim Wilson X-Spam-Status: No, score=-5.1 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, HTML_MESSAGE, 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 Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.29 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: , X-List-Received-Date: Wed, 02 Dec 2020 05:39:34 -0000 Hi Jeff: Defer to gcc-12 is OK to me, we could hold this on downstream :) On Wed, Dec 2, 2020 at 1:27 PM Jeff Law wrote: > > > On 12/1/20 2:29 AM, Kito Cheng wrote: > > Create a new hook to let target could override the multi-lib result, > > the motivation is RISC-V might have very complicated multi-lib re-use > > rule*, which is hard to maintain and use current multi-lib scripts, > > we even hit the "argument list too long" error when we tried to add more > > multi-lib reuse rule. > > > > So I think it would be great to have a target specific way to determine > > the multi-lib re-use rule, then we could write those rule in C, instead > > of expand every possible case in MULTILIB_REUSE. > > > > * Here is an example for RISC-V multi-lib rules: > > https://gist.github.com/kito-cheng/0289cd42d9a756382e5afeb77b42b73b > > > > gcc/ChangeLog: > > > > * common/common-target.def (compute_multilib): New. > > * common/common-targhooks.c (default_compute_multilib): New. > > * doc/tm.texi.in (TARGET_COMPUTE_MULTILIB): New. > > * doc/tm.texi: Regen. > > * gcc.c: Include common/common-target.h. > > (set_multilib_dir) Call targetm_common.compute_multilib. > > (SWITCH_LIVE): Move to opts.h. > > (SWITCH_FALSE): Ditto. > > (SWITCH_IGNORE): Ditto. > > (SWITCH_IGNORE_PERMANENTLY): Ditto. > > (SWITCH_KEEP_FOR_GCC): Ditto. > > (struct switchstr): Ditto. > > * opts.h (SWITCH_LIVE): Move from gcc.c. > > (SWITCH_FALSE): Ditto. > > (SWITCH_IGNORE): Ditto. > > (SWITCH_IGNORE_PERMANENTLY): Ditto. > > (SWITCH_KEEP_FOR_GCC): Ditto. > > (struct switchstr): Ditto. > Can this defer to gcc-12? We're well into stage3 at this point. > > jeff > >