public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [PATCH] cygwin: Don't try to support multilibs [PR107998]
@ 2023-02-22  9:25 Jakub Jelinek
  2023-02-22 13:00 ` Jonathan Yong
  2023-02-22 13:02 ` Jonathan Yong
  0 siblings, 2 replies; 6+ messages in thread
From: Jakub Jelinek @ 2023-02-22  9:25 UTC (permalink / raw)
  To: Jonathan Yong; +Cc: gcc-patches

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  <jakub@redhat.com>

	PR target/107998
	* config.gcc (x86_64-*-cygwin*): Don't add i386/t-cygwin-w64 into
	$tmake_file.
	* config/i386/t-cygwin-w64: Remove.

--- 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

	Jakub


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] cygwin: Don't try to support multilibs [PR107998]
  2023-02-22  9:25 [PATCH] cygwin: Don't try to support multilibs [PR107998] Jakub Jelinek
@ 2023-02-22 13:00 ` Jonathan Yong
  2023-02-22 13:02 ` Jonathan Yong
  1 sibling, 0 replies; 6+ messages in thread
From: Jonathan Yong @ 2023-02-22 13:00 UTC (permalink / raw)
  To: Stromeko; +Cc: gcc-patches, Jakub Jelinek

On 2/22/23 09:25, Jakub Jelinek wrote:
> 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  <jakub@redhat.com>
> 
> 	PR target/107998
> 	* config.gcc (x86_64-*-cygwin*): Don't add i386/t-cygwin-w64 into
> 	$tmake_file.
> 	* config/i386/t-cygwin-w64: Remove.
> 
> --- 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
> 
> 	Jakub
> 

Achim,

Mind checking this out?


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] cygwin: Don't try to support multilibs [PR107998]
  2023-02-22  9:25 [PATCH] cygwin: Don't try to support multilibs [PR107998] Jakub Jelinek
  2023-02-22 13:00 ` Jonathan Yong
@ 2023-02-22 13:02 ` Jonathan Yong
  2023-03-03 18:44   ` Jakub Jelinek
  1 sibling, 1 reply; 6+ messages in thread
From: Jonathan Yong @ 2023-02-22 13:02 UTC (permalink / raw)
  To: Jakub Jelinek, Stromeko; +Cc: gcc-patches

On 2/22/23 09:25, Jakub Jelinek wrote:
> 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  <jakub@redhat.com>
> 
> 	PR target/107998
> 	* config.gcc (x86_64-*-cygwin*): Don't add i386/t-cygwin-w64 into
> 	$tmake_file.
> 	* config/i386/t-cygwin-w64: Remove.
> 
> --- 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
> 
> 	Jakub
> 

Achim, mind looking at this?
Resending due to mail client problems, hopefully not a duplicate.

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] cygwin: Don't try to support multilibs [PR107998]
  2023-02-22 13:02 ` Jonathan Yong
@ 2023-03-03 18:44   ` Jakub Jelinek
  2023-03-10  9:37     ` Patch ping: " Jakub Jelinek
  0 siblings, 1 reply; 6+ messages in thread
From: Jakub Jelinek @ 2023-03-03 18:44 UTC (permalink / raw)
  To: Jonathan Yong, NightStrike; +Cc: Stromeko, gcc-patches

On Wed, Feb 22, 2023 at 01:02:58PM +0000, Jonathan Yong wrote:
> On 2/22/23 09:25, Jakub Jelinek wrote:
> > 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  <jakub@redhat.com>
> > 
> > 	PR target/107998
> > 	* config.gcc (x86_64-*-cygwin*): Don't add i386/t-cygwin-w64 into
> > 	$tmake_file.
> > 	* config/i386/t-cygwin-w64: Remove.
> > 
> > --- 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
> 
> Achim, mind looking at this?
> Resending due to mail client problems, hopefully not a duplicate.

NightStrike on IRC said he has tested the patch and it worked fine.

Is the patch ok for trunk then?

	Jakub


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Patch ping: [PATCH] cygwin: Don't try to support multilibs [PR107998]
  2023-03-03 18:44   ` Jakub Jelinek
@ 2023-03-10  9:37     ` Jakub Jelinek
  2023-03-10 10:19       ` Jonathan Yong
  0 siblings, 1 reply; 6+ messages in thread
From: Jakub Jelinek @ 2023-03-10  9:37 UTC (permalink / raw)
  To: Jonathan Yong; +Cc: gcc-patches, NightStrike, Stromeko

Hi!

I'd like to ping this patch (as I wrote a week ago, NightStrike has tested
it):

On Fri, Mar 03, 2023 at 07:44:47PM +0100, Jakub Jelinek via Gcc-patches wrote:
> > > 2023-02-22  Jakub Jelinek  <jakub@redhat.com>
> > > 
> > > 	PR target/107998
> > > 	* config.gcc (x86_64-*-cygwin*): Don't add i386/t-cygwin-w64 into
> > > 	$tmake_file.
> > > 	* config/i386/t-cygwin-w64: Remove.
> > > 
> > > --- 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
> > 
> > Achim, mind looking at this?
> > Resending due to mail client problems, hopefully not a duplicate.
> 
> NightStrike on IRC said he has tested the patch and it worked fine.
> 
> Is the patch ok for trunk then?

	Jakub


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Patch ping: [PATCH] cygwin: Don't try to support multilibs [PR107998]
  2023-03-10  9:37     ` Patch ping: " Jakub Jelinek
@ 2023-03-10 10:19       ` Jonathan Yong
  0 siblings, 0 replies; 6+ messages in thread
From: Jonathan Yong @ 2023-03-10 10:19 UTC (permalink / raw)
  To: Jakub Jelinek; +Cc: gcc-patches, NightStrike, Stromeko

On 3/10/23 09:37, Jakub Jelinek wrote:
> Hi!
> 
> I'd like to ping this patch (as I wrote a week ago, NightStrike has tested
> it):
> 

Thanks, pushed to master branch.



^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2023-03-10 10:19 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-02-22  9:25 [PATCH] cygwin: Don't try to support multilibs [PR107998] Jakub Jelinek
2023-02-22 13:00 ` Jonathan Yong
2023-02-22 13:02 ` Jonathan Yong
2023-03-03 18:44   ` Jakub Jelinek
2023-03-10  9:37     ` Patch ping: " Jakub Jelinek
2023-03-10 10:19       ` Jonathan Yong

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).