From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-lf1-x12f.google.com (mail-lf1-x12f.google.com [IPv6:2a00:1450:4864:20::12f]) by sourceware.org (Postfix) with ESMTPS id 3A25D3858D3C for ; Wed, 1 Sep 2021 00:16:55 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 3A25D3858D3C Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=sifive.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=sifive.com Received: by mail-lf1-x12f.google.com with SMTP id m28so2648806lfj.6 for ; Tue, 31 Aug 2021 17:16:55 -0700 (PDT) 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=OSthoOHb+eccPZooYVxlRULEB2jzYHjwlXnOqQ+tJxA=; b=jbYn/2qbyUWDGN7z77zM9Bk6VhC2lot6F21j2+lZHTFaKJDJ9DtLVoTHIDVCXEsB7u +/yZcS/uI51Q5glaUXgbnGryL0Adp9DaQEV+Lvs4ByjRclCbpkHWN4vqgJgvyeqJGx1W ApoBZhFE/lqQIjHunbb0JoqkvHGL0kOJcxWoVANFMddCcwtZSWKk1ezzW5D7ypry1Spk 1qHOCcXWZJDAuNvTr/uIxV8G5JZIGTP2MoQxYkUhUiSKiVJytULGq0/6miydwSIw3sGG 0U6tCh41zkQr45dcrUnOtmxjGCNKFZhAwhmA34Dc2CF2N1eUp7wkrYKRAgxBpDn5I/Y+ BiQA== 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=OSthoOHb+eccPZooYVxlRULEB2jzYHjwlXnOqQ+tJxA=; b=Swnhh9/MPNzGiZczRj3fZCK93A2AVXpkURw4lHoOBsvuNAOQlrguGS067ph7hwW0hl N4hCotuSrh7E3Ba0i3PTT+OED+dVxWJg2nHvCFnyO7n32XNcOfjNmbgxOQmPEe/KoNXI pevPc/vl4PT5ngr+sQb6FBTImSpoHI5DBKbjp/WHTzyET+aINqEE5u7SiMyFuw6S5nAg ANqHspFK8fNWoXHEljkZg4vAeftM0DBY6aVI+ZP5GM2oE8w//hGrduaC0X/us4TtyFIW q4uGTnujxugKoKLQ6QlVV99Bzo0iE0yE6t3tUWgYk9jmhcwZnZmecnOhhHLU7hKfNzSt xgFA== X-Gm-Message-State: AOAM531z2GDNgu3sc50rTeusk1WFZtYXUm56+au1euTNzMk9z5qJmvA8 2s+plALVE1hvZcsHyjtb4U5ZVJvQBc8ZXfP02uNlvg== X-Google-Smtp-Source: ABdhPJwK4hO+AS0oyW8DmATurkOJxZCyck8AoM70Jcu4rZv61G+gKX78RaIfOJhRDuSy6bwi4IYpA40Pmd2nTxZCtPQ= X-Received: by 2002:a05:6512:c27:: with SMTP id z39mr23927465lfu.335.1630455413726; Tue, 31 Aug 2021 17:16:53 -0700 (PDT) MIME-Version: 1.0 References: <20210721092810.66070-1-kito.cheng@sifive.com> <20210721092810.66070-2-kito.cheng@sifive.com> In-Reply-To: <20210721092810.66070-2-kito.cheng@sifive.com> From: Jim Wilson Date: Tue, 31 Aug 2021 17:16:42 -0700 Message-ID: Subject: Re: [PATCH 1/2] Add TARGET_COMPUTE_MULTILIB hook to override multi-lib result. To: Kito Cheng Cc: GCC Patches , Kito Cheng X-Spam-Status: No, score=-1.9 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.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) 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, 01 Sep 2021 00:17:08 -0000 On Wed, Jul 21, 2021 at 2:28 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. > This looks OK to me, though I would rewrite the docs a bit. > +DEFHOOK > +(compute_multilib, > + "Some target like RISC-V might have complicated multilib reuse rule > which is\ > + hard to implemented on current multilib scheme, this hook allow target > to\ > + override the result from built-in multilib mechanism.\ > + @var{switches} is the raw option list with @var{n_switches} items;\ > + @var{multilib_dir} is the multi-lib result which compute by the > built-in\ > + multi-lib mechanism;\ > + @var{multilib_defaults} is the default options list for multi-lib; \ > + @var{multilib_select} is the string contain the list of supported > multi-lib, \ > + and the option checking list. \ > + @var{multilib_matches}, @var{multilib_exclusions}, and > @var{multilib_reuse} \ > + are corresponding to @var{MULTILIB_MATCHES}, @var{MULTILIB_EXCLUSIONS} \ > + @var{MULTILIB_REUSE}. \ > + The default definition does nothing but return @var{multilib_dir} > directly.", > I'd suggest instead "Some targets like RISC-V might have complicated multilib reuse rules which\n\ are hard to implement with the current multilib scheme. This hook allows\n\ targets to override the result from the built-in multilib mechanism.\n\ @var{switches} is the raw option list with @var{n_switches} items;\n\ @var{multilib_dir} is the multi-lib result which is computed by the built-in\n\ multi-lib mechanism;\n\ @var{multilib_defaults} is the default options list for multi-lib;\n\ @var{multilib_select} is the string containing the list of supported\n\ multi-libs, and the option checking list.\n\ @var{multilib_matches}, @var{multilib_exclusions}, and @var{multilib_reuse}\n\ are corresponding to @var{MULTILIB_MATCHES}, @var{MULTILIB_EXCLUSIONS},\n\ and @var{MULTILIB_REUSE}.\n\ The default definition does nothing but return @var{multilib_dir} directly." Jim