From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pf1-x42c.google.com (mail-pf1-x42c.google.com [IPv6:2607:f8b0:4864:20::42c]) by sourceware.org (Postfix) with ESMTPS id C1B6E3858D20 for ; Tue, 30 May 2023 23:39:40 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org C1B6E3858D20 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-pf1-x42c.google.com with SMTP id d2e1a72fcca58-64d30ab1f89so3471555b3a.3 for ; Tue, 30 May 2023 16:39:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1685489980; x=1688081980; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=C0vIkKLh0hB6lF2HzmUCHicdZVD3T7DKQn6J6wBu9dk=; b=LGGZ6Ja9GEJai+DHRZluKL55mFJ6B6Lff56t64ei/Ozi9vAPvJrpo/hGlhGv5kJF34 FnbQHjnk7+09bqzIczBUvSqlBWNtmb9MrsV/4K1WiBXUU9AqtcjD+XkUv2F7LXyyjWha 4cJVHaHBmbnp6toJE9HIPoC0L8X+hiLm6jh5oUnYaqAGRPIzmL1APd/M/iUi157EQIy3 0lvNM4ndhIyLeOMueOvlsDqDef5pv2TimJ2qon/34Oe3qBAcmht8yBpZuGjRgyM1wd2U k3EbeFsiQw43CItsGE/m0JkRhiQeKT/wCK/4+14GJjpZTUv/gH+lCONctfliL0VWmyKo GuaQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1685489980; x=1688081980; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=C0vIkKLh0hB6lF2HzmUCHicdZVD3T7DKQn6J6wBu9dk=; b=IIMitFzdSsqxAHFLOOob/ljGPvLSrpXUJO6WMCKVKU8eFLqKKgKHSqvMRsP8u35EJB sHNtFsNqAC8WDPDHHYYdImA22RvfF9w2Ay2GCpxNd9Uxwcv/5xzwE/Ze1SiF/xunKzV9 BMCS5vrRKKa8oMJmdc8fbPYM5HggfHbIvF6VY280Wfq8QD+DK3zeIsoKlGwhiPpfL++8 03Bjn8D9nH/a914F7OjSVrCrq21BhMBmdEyMCC3Bvq8cUeLcAle1lkKwaYAlT9UPaQPh 8DOALxz0wIpuvjcNuYi4gCPg+zbu28kL3l+E2CpbTsxwCJbOxIdZ8+y09moxjtCI+A0i bPkw== X-Gm-Message-State: AC+VfDxgXoy3Yc3NIY5gg/8IsKL6/FADeDITR3BuBogutc7EF3OBfVmg cHlTFV3EhW4di9IARaN+N7k= X-Google-Smtp-Source: ACHHUZ5inR0FQKJDLw5npQAa21L+trEubSCgRHWsHOVTT8L+4M6gVKIAsTGyj1oGv0xkbiq0F7zHhA== X-Received: by 2002:a05:6a21:100f:b0:10e:a8e6:35c5 with SMTP id nk15-20020a056a21100f00b0010ea8e635c5mr3405532pzb.59.1685489979681; Tue, 30 May 2023 16:39:39 -0700 (PDT) Received: from ?IPV6:2601:681:8d00:265::f0a? ([2601:681:8d00:265::f0a]) by smtp.gmail.com with ESMTPSA id e2-20020a63ee02000000b00514256c05c2sm9471507pgi.7.2023.05.30.16.39.38 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 30 May 2023 16:39:39 -0700 (PDT) Message-ID: <8e8eaeb7-6494-1a9e-9db6-6fa52e3b4092@gmail.com> Date: Tue, 30 May 2023 17:39:37 -0600 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.9.1 Subject: Re: [PATCH] RISC-V: Add the option "-mdisable-multilib-check" to avoid multilib checks breaking the compilation. Content-Language: en-US To: "Maciej W. Rozycki" , Jin Ma Cc: gcc-patches , "kito.cheng" , "richard.sandiford" , "christoph.muellner" , "jinma.contrib" References: <20230523044202.1201-1-jinma@linux.alibaba.com> From: Jeff Law In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-2.4 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,NICE_REPLY_A,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS,TXREP,T_SCC_BODY_TEXT_LINE 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: On 5/30/23 08:48, Maciej W. Rozycki wrote: > On Mon, 29 May 2023, Jin Ma wrote: > >>> Can you give me a specific example (compilation options and multilibs >>> available) of a failure you refer to? >> >> A simple example: >> 1. Use "--disable-multilib --with-abi =lp64d --with-arch =rv64imafdc_zba_zbb_zbc_zbs" >> to build the toolchain". >> 2. Use the toolchain to test the impact of zba_zbb_zbc_zbs extensions on the >> performance and codesize of some functions or files in the program. >> >> In this case, I may need to use the command "-mabi=lp64d -march=rv64imafdc" for >> the compilation of a specific .c file in the program, which will cause the link to >> fail and throw the following error: "FATAL ERROR: Can't find suitable multilib set for >> '-march=rv64imafdc'/'-mabi=lp64d'". This does not satisfy the purpose of the test. > > Thank you. This is weird and contrary to how things used to work since > forever (not necessarily an argument by itself, but our usual arrangement > seemed reasonable). So whenever `--disable-multilib' has been used for > GCC configuration I would expect all the multilib logic to be suppressed > (as it used to be) and all assembler output just being thrown at the > linker hoping for the best (the linker has its own logic to decide what's > compatible enough and what's not; modulo any bugs of course). > > So has the change in semantics actually been intentional? Just as important, this scenario is not one that we really want to cater the compiler's behavior to. We should not be introducing an unsafe option like this into the compiler sources -- engineers that need to do this kind of testing can carray this kind of patch in their downstream trees. jeff