From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-ed1-x544.google.com (mail-ed1-x544.google.com [IPv6:2a00:1450:4864:20::544]) by sourceware.org (Postfix) with ESMTPS id 6B0DC3857813 for ; Fri, 20 Nov 2020 22:10:44 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 6B0DC3857813 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=sifive.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=jimw@sifive.com Received: by mail-ed1-x544.google.com with SMTP id d18so11060674edt.7 for ; Fri, 20 Nov 2020 14:10:44 -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=mCYHOjYoATL5H/UsWuq84wK548n4WBVklfKvAy9CuIs=; b=O9qBOtjXIppBYgGxapNuAR/KAWDIetcbBYRmoVjgwiTs+1Kb1q3JJmpheE9G1hmO4W G9WiEgbzyW2mg8jwqcuKfQeBT86nZFwMhlsevwiieeq+tPxI8VJxzPFrJVM69DS0/JbA +XJwHnZUbFvZNwyE5PNYvnQxaHXoceXER21OdNIOoeQrhYa6WVpBQnhtDHgxE2UEoSHP 61+iqQWcKm9gREF5FlyeCPmW8dYzXH4bmHpVfEupUDHKXmVfw2N3Kn3UuJ5VEPQ6x558 30qwHzdLDs/DqAWnCeL1avxlpZ+NqA2UrHZ8bm4F1Q3V2A5KboYUtE1Xsk9Mo6git/+O 1Lcw== 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=mCYHOjYoATL5H/UsWuq84wK548n4WBVklfKvAy9CuIs=; b=gPyTBJFD1YYsLYBdj4FK1jyNH638qWlyZQzQAt6RyBTbQujoTjnXoUoyH/suBjKh74 v8tOEYRaOSyJovAB/OO5aOcViXbv20KjPXUuJYVDIbjTGsuvQ4Y1Wa8DOTtMFt1x0qVU dJJv7I4x3sgMBE3PvDAhFmD1UMM2C+EVNe17m+nQOecgaV0owYcLbMeJ4MY4n3gihQ/K 6HcZeAaeTQ88l8gKWDUrAehTNRyVpRVhFBKByV1fdSB+MT01UiMmemgfZHVHYirMLZlO yrZV4V4p5Gcp4grXp/wfj2PHY7e/EX+twgly3XG/9//JzmE5F+SDldpiDs8yVZnMdk1b j09w== X-Gm-Message-State: AOAM53213+WcuEGt0T91aZ3GNr8SmvQgT9V9pngG4O3rDdwJ5Efzf5Pr viNQ1bh6o/lqyJvz+XLeWfiqeTzP7dr+m/oYi7dz7g== X-Google-Smtp-Source: ABdhPJz9r6Zvz1SvSc6l6FDBfvsjC4eHo3695cLX0W2HoWO5h8QZe02YHq3/oyOcuD+PGl4nMJQROc7KPu8JC2L0xRk= X-Received: by 2002:aa7:cb58:: with SMTP id w24mr37441670edt.35.1605910243512; Fri, 20 Nov 2020 14:10:43 -0800 (PST) MIME-Version: 1.0 References: <20201120083357.118470-1-kito.cheng@sifive.com> In-Reply-To: <20201120083357.118470-1-kito.cheng@sifive.com> From: Jim Wilson Date: Fri, 20 Nov 2020 14:10:32 -0800 Message-ID: Subject: Re: [PATCH] RISC-V: Always define MULTILIB_DEFAULTS 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.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: Fri, 20 Nov 2020 22:10:46 -0000 On Fri, Nov 20, 2020 at 12:34 AM Kito Cheng wrote: > - Define MULTILIB_DEFAULTS can reduce the total number of multilib if > the default arch and ABI are listed in the multilib config. > It looks like a good idea, but it doesn't seem to work. A toolchain configured without specifying arch/abi gives me rohan:2149$ riscv64-unknown-elf-gcc --print-multi-lib .; rv32i/ilp32;@march=rv32i@mabi=ilp32 rv32im/ilp32;@march=rv32im@mabi=ilp32 rv32iac/ilp32;@march=rv32iac@mabi=ilp32 rv32imac/ilp32;@march=rv32imac@mabi=ilp32 rv32imafc/ilp32f;@march=rv32imafc@mabi=ilp32f rv64imac/lp64;@march=rv64imac@mabi=lp64 rv64imafdc/lp64d;@march=rv64imafdc@mabi=lp64d The rv64imafdc/lp64d is actually built twice, as it is the default and is built explicitly. But otherwise the list is correct. If I configure a toolchain with the patch using --with-arch=rv32i --with-abi=ilp32 --enable-multilib then I get rohan:2151$ ./xgcc -B./ --print-multi-lib .; rv32imafc/ilp32f;@march=rv32imafc@mabi=ilp32f rv64imac/lp64;@march=rv64imac@mabi=lp64 rv64imafdc/lp64d;@march=rv64imafdc@mabi=lp64d and notice that 3 multilibs have mysteriously disappeared. We have four multilibs with -mabi=ilp32. The rv32i/ilp32 multilib is gone as it is now the default, but the other 3 should still be there. The gcc/multilib.h file in the gcc build dir looks correct. I think that there is something wrong with the processing of the default args against the multilib list. if you have just one default arg, and an entry matches then obviously you don't build it. But if you have two default args, then both must match before you choose to not build it, and I think the code has never supported this case. This works for the --with-multilib-list case because we currently only support one arch/abi with this configure option, so there can be no confusion with matching multiple default arguments. Jim