From patchwork Wed Feb 22 09:25:04 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jakub Jelinek X-Patchwork-Id: 60379 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:5915:0:0:0:0:0 with SMTP id v21csp472445wrd; Wed, 22 Feb 2023 01:25:57 -0800 (PST) X-Google-Smtp-Source: AK7set+ncCZoB0yGDIRx+8hT46cAuxrHYHsB6pUoM1K6ItulFRElEPEUBrQSoRKkGgl/jnPybzKB X-Received: by 2002:a17:907:98fa:b0:8b1:75a5:4a92 with SMTP id ke26-20020a17090798fa00b008b175a54a92mr23528580ejc.72.1677057957210; Wed, 22 Feb 2023 01:25:57 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1677057957; cv=none; d=google.com; s=arc-20160816; b=y55Ix/9kcpJqjwCqZRWY4fGOvGTrMaUvCmsw1HeKAzR0JZu4O667By5WTaQ7bZezmj 6+u3uGEbkIhPebDIV1FQTRz09THevVYrIZpWiBgUuaxlwZzluzpdMBtyUCUo6QJ9XOSC J2XUNk4kyrCFY9iSQj8E7av5Kx39lF5qvM46Ptq3ObcbWJPM1M0pmkcRslL4kteldSgN pbQrWyzAcOWgnXf2gIhb8/1C/tRbGCSCIxtnFyw82V3ZSgNMF37K82Xaj8zXQBZpquvJ PxnX8apNmWn7w/srsOKuhbR/sEhwPVuEGXYUa46+tbwUr0txI+/Wquoh6n6C4164ErmK aTBQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:reply-to:from:list-subscribe:list-help:list-post :list-archive:list-unsubscribe:list-id:precedence :content-disposition:mime-version:message-id:subject:cc:to:date :dmarc-filter:delivered-to:dkim-signature:dkim-filter; bh=zybwiAzf+pS8VAG1E4KJKAg3QPpXGx5qwQeRLuQ3nww=; b=hEYWNZIn3fG8GS7vCDopn4CG1YXW+i/7rj7sMHvgNt8asm+G0bC4z4/MSzXtQ1M8nA 2ffZnkF6BjvC4rcmXoOnSKV3o7CCvuKQWBDzvcDUcKZ6yw24wgwj67EPt3nO8EkN3s2/ hKMuq2U0zy+PcOS5ZCJIWjMQorsE4moAcD2sI8G1O+ohV981t4BIt+uTHSBUm5vGZFZ2 nEMmyH4aeHMGbiLYJ4KT2Wf34nxjeK5MJqR2fsWhsUus6BfSXQRido+nZUUeUShnkJ34 M8nZYcZrStEFoTdZW3DYiCA9rmXqEXi96QrhSOXkMkbRFTiP1e91cooQ6rEgBwBznuXh iTCQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gcc.gnu.org header.s=default header.b=TCpbkuKT; spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 8.43.85.97 as permitted sender) smtp.mailfrom="gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=gnu.org Received: from sourceware.org (server2.sourceware.org. [8.43.85.97]) by mx.google.com with ESMTPS id c24-20020a17090620d800b008dd40fa813esi6995665ejc.546.2023.02.22.01.25.57 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 22 Feb 2023 01:25:57 -0800 (PST) Received-SPF: pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 8.43.85.97 as permitted sender) client-ip=8.43.85.97; Authentication-Results: mx.google.com; dkim=pass header.i=@gcc.gnu.org header.s=default header.b=TCpbkuKT; spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 8.43.85.97 as permitted sender) smtp.mailfrom="gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=gnu.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 256093858C54 for ; Wed, 22 Feb 2023 09:25:56 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 256093858C54 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1677057956; bh=zybwiAzf+pS8VAG1E4KJKAg3QPpXGx5qwQeRLuQ3nww=; h=Date:To:Cc:Subject:List-Id:List-Unsubscribe:List-Archive: List-Post:List-Help:List-Subscribe:From:Reply-To:From; b=TCpbkuKTTA1nJsbHrTid7VYE5UKZ1MYkFYY6eoW6cqzyW3ceTgV8ZJqPuwQ0bySCR CF+7h+1YuKFAzx6Azdf10+qizXJ0LZ7SZp2vFSZwyCp8JUOskUwe8NbUbREzVnEFCu cNgDPdd2qH4z5FpNXAVeECfd2GX+WeS/5D9aQVdI= X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by sourceware.org (Postfix) with ESMTPS id 3C1C53858C83 for ; Wed, 22 Feb 2023 09:25:11 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 3C1C53858C83 Received: from mimecast-mx02.redhat.com (mx3-rdu2.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-436-lcPNwHcKPZqF1WniFDvkyg-1; Wed, 22 Feb 2023 04:25:08 -0500 X-MC-Unique: lcPNwHcKPZqF1WniFDvkyg-1 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.rdu2.redhat.com [10.11.54.1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 62E971C05AC5; Wed, 22 Feb 2023 09:25:08 +0000 (UTC) Received: from tucnak.zalov.cz (unknown [10.39.192.62]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 21FBF40B4138; Wed, 22 Feb 2023 09:25:08 +0000 (UTC) Received: from tucnak.zalov.cz (localhost [127.0.0.1]) by tucnak.zalov.cz (8.17.1/8.17.1) with ESMTPS id 31M9P5tl4178363 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NOT); Wed, 22 Feb 2023 10:25:06 +0100 Received: (from jakub@localhost) by tucnak.zalov.cz (8.17.1/8.17.1/Submit) id 31M9P5Ja4178362; Wed, 22 Feb 2023 10:25:05 +0100 Date: Wed, 22 Feb 2023 10:25:04 +0100 To: Jonathan Yong <10walls@gmail.com> Cc: gcc-patches@gcc.gnu.org Subject: [PATCH] cygwin: Don't try to support multilibs [PR107998] Message-ID: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.1 on 10.11.54.1 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Disposition: inline X-Spam-Status: No, score=-3.7 required=5.0 tests=BAYES_00, DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2, SPF_HELO_NONE, SPF_NONE, 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 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-Patchwork-Original-From: Jakub Jelinek via Gcc-patches From: Jakub Jelinek Reply-To: Jakub Jelinek Errors-To: gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org Sender: "Gcc-patches" X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1758522724648179699?= X-GMAIL-MSGID: =?utf-8?q?1758522724648179699?= Hi! As discussed in the PR, t-cygwin-w64 file has been introduced in 2013 and has one important problem, two different multilib options -m64 and -m32, but MULTILIB_DIRNAMES with just one word in it. Before the genmultilib sanity checking was added, my understanding is that this essentially resulted in effective --disable-multilib, $ gcc -print-multi-lib .; ;@m32 $ gcc -print-multi-directory . $ gcc -print-multi-directory -m64 . $ gcc -print-multi-directory -m32 $ gcc -print-multi-os-directory ../lib $ gcc -print-multi-os-directory -m64 ../lib $ gcc -print-multi-os-directory -m32 ../lib32 and because of the way e.g. config-ml.in operates multidirs= for i in `${CC-gcc} --print-multi-lib 2>/dev/null`; do dir=`echo $i | sed -e 's/;.*$//'` if [ "${dir}" = "." ]; then true else if [ -z "${multidirs}" ]; then multidirs="${dir}" else multidirs="${multidirs} ${dir}" fi fi done dir was . first time (and so nothing was done) and empty second time, multidirs empty too, so multidirs was set to empty like it would be with --disable-multilib. With the added sanity checking the build fails unless --disable-multilib is used in configure (dunno whether people usually configure that way on cygwin). From what has been said in the PR, multilibs were not meant to be supported and e.g. cygwin headers probably aren't ready for it. So the following patch just removes the file with the (incorrect) multilib stuff instead of fixing it (say by setting MULTILIB_DIRNAMES to 64 32). I have no way to test this though, no Windows around, can anyone please test this? I just would like to get some progress on the P1s we have... 2023-02-22 Jakub Jelinek PR target/107998 * config.gcc (x86_64-*-cygwin*): Don't add i386/t-cygwin-w64 into $tmake_file. * config/i386/t-cygwin-w64: Remove. Jakub --- gcc/config.gcc.jj 2023-02-18 12:38:30.803025062 +0100 +++ gcc/config.gcc 2023-02-21 17:07:12.143164563 +0100 @@ -2105,7 +2105,7 @@ x86_64-*-cygwin*) need_64bit_isa=yes tm_file="${tm_file} i386/unix.h i386/bsd.h i386/gas.h i386/cygming.h i386/cygwin.h i386/cygwin-w64.h i386/cygwin-stdint.h" xm_file=i386/xm-cygwin.h - tmake_file="${tmake_file} i386/t-cygming t-slibgcc i386/t-cygwin-w64" + tmake_file="${tmake_file} i386/t-cygming t-slibgcc" target_gtfiles="$target_gtfiles \$(srcdir)/config/i386/winnt.cc" extra_options="${extra_options} i386/cygming.opt i386/cygwin.opt" extra_objs="${extra_objs} winnt.o winnt-stubs.o" --- gcc/config/i386/t-cygwin-w64.jj 2020-01-12 11:54:36.333414616 +0100 +++ gcc/config/i386/t-cygwin-w64 2023-02-21 17:06:44.121572616 +0100 @@ -1,3 +0,0 @@ -MULTILIB_OPTIONS = m64/m32 -MULTILIB_DIRNAMES = 64 -MULTILIB_OSDIRNAMES = ../lib ../lib32