From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 1814) id 0CCA53858C54; Fri, 10 Mar 2023 10:18:52 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 0CCA53858C54 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1678443532; bh=0r82kiijmCMjgjSzcHHBmqFH3h7XhZ60x0I/eOVk8f0=; h=From:To:Subject:Date:From; b=vpzC5ICO9zq285ifK/uznj/UJt8RBLM3bB4s1gXvJXGeKpg3CnRdLCTPKZqUK+kuS 91ha0wKnfzlA7eeiQbXk8CTta582xayn0lrof3RGH2JZy4gdnxDGapIB/Mk0pndIEW EFEF0UFRl75onwUY2jnId/dpnaTQyahWEPyRd/Uo= MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="utf-8" From: Jonathan Yong To: gcc-cvs@gcc.gnu.org Subject: [gcc r13-6578] cygwin: Don't try to support multilibs [PR107998] X-Act-Checkin: gcc X-Git-Author: Jakub Jelinek X-Git-Refname: refs/heads/master X-Git-Oldrev: 4c599ae6e081496466cada6f97b0d4687a6d765a X-Git-Newrev: e3f8dfcd885d19d322b10fb4e36d50b60da2576b Message-Id: <20230310101852.0CCA53858C54@sourceware.org> Date: Fri, 10 Mar 2023 10:18:52 +0000 (GMT) List-Id: https://gcc.gnu.org/g:e3f8dfcd885d19d322b10fb4e36d50b60da2576b commit r13-6578-ge3f8dfcd885d19d322b10fb4e36d50b60da2576b Author: Jakub Jelinek Date: Wed Feb 22 10:25:04 2023 +0100 cygwin: Don't try to support multilibs [PR107998] 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 gcc/ChangeLog: PR target/107998 * config.gcc (x86_64-*-cygwin*): Don't add i386/t-cygwin-w64 into $tmake_file. * config/i386/t-cygwin-w64: Remove. Signed-off-by: Jonathan Yong <10walls@gmail.com> Diff: --- gcc/config.gcc | 2 +- gcc/config/i386/t-cygwin-w64 | 3 --- 2 files changed, 1 insertion(+), 4 deletions(-) diff --git a/gcc/config.gcc b/gcc/config.gcc index da3a6d3ba1f..f986224817a 100644 --- a/gcc/config.gcc +++ b/gcc/config.gcc @@ -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" diff --git a/gcc/config/i386/t-cygwin-w64 b/gcc/config/i386/t-cygwin-w64 index 01968fd88c3..e69de29bb2d 100644 --- a/gcc/config/i386/t-cygwin-w64 +++ b/gcc/config/i386/t-cygwin-w64 @@ -1,3 +0,0 @@ -MULTILIB_OPTIONS = m64/m32 -MULTILIB_DIRNAMES = 64 -MULTILIB_OSDIRNAMES = ../lib ../lib32