This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] target/65286 - Disable multilib for ppc64le
- From: Markus Trippelsdorf <markus at trippelsdorf dot de>
- To: Jakub Jelinek <jakub at redhat dot com>
- Cc: David Edelsohn <dje dot gcc at gmail dot com>, Martin Sebor <msebor at redhat dot com>, Andreas Schwab <schwab at suse dot de>, Jeff Law <law at redhat dot com>, Gcc Patch List <gcc-patches at gcc dot gnu dot org>
- Date: Tue, 10 Mar 2015 12:08:50 +0100
- Subject: Re: [PATCH] target/65286 - Disable multilib for ppc64le
- Authentication-results: sourceware.org; auth=none
- References: <54F73594 dot 6000601 at redhat dot com> <87a8zsy95u dot fsf at igel dot home> <54F7696A dot 3040307 at redhat dot com> <20150305040604 dot GA25172 at bubble dot grove dot modra dot org> <20150305231402 dot GD25172 at bubble dot grove dot modra dot org> <CAGWvnyn66GgbHHj=S0t+amLwJcyA1QnTdqzSK91J8xp67z_G8g at mail dot gmail dot com> <20150310061348 dot GA342 at x4> <20150310072844 dot GD11451 at bubble dot grove dot modra dot org> <20150310073259 dot GA351 at x4> <20150310075601 dot GA1746 at tucnak dot redhat dot com>
On 2015.03.10 at 08:56 +0100, Jakub Jelinek wrote:
> On Tue, Mar 10, 2015 at 08:32:59AM +0100, Markus Trippelsdorf wrote:
> > On 2015.03.10 at 17:58 +1030, Alan Modra wrote:
> > > On Tue, Mar 10, 2015 at 07:13:48AM +0100, Markus Trippelsdorf wrote:
> > > > This patch breaks the build on ppc64le:
> > >
> > > Works for me with your configure options.
> > >
> > > > trippels@gcc2-power8 gcc_build_dir % ../gcc/configure --with-cpu=power8 --disable-libsanitizer --disable-bootstrap --disable-libstdcxx-pch --disable-libvtv --disable-libitm --disable-libcilkrts --disable-libssp --disable-libgomp --disable-werror --disable-multilib --enable-languages=c,c++
> > >
> > > At a guess, you're trying to build without glibc installed. If so,
> > > you'll also need --disable-shared. I'm a bit surprised if you could
> > > do that before my patch.
> >
> > No, glibc is installed.
> >
> > > > There is a ppc64le compile farm machine available @gcc2-2-power8.osuosl.org.
> > >
> > > I would be greedy to load the compile farm when I can use internal IBM
> > > machines. :)
> >
> > I mentioned the machine, because it runs Fedora 21 and you have tested
> > only on Ubuntu.
>
> Yeah, please see
> https://gcc.gnu.org/ml/gcc-patches/2013-03/msg00288.html
> for similar issue on aarch64.
> You really don't want to use MULTIARCH_DIRNAME for the powerpc64le* case,
> as that will work only with the Debian/Ubuntu mess.
> You want to define MULTILIB_OSDIRNAMES instead.
>
> So perhaps something like completely untested following patch?
>
> --- gcc/config/rs6000/t-linux.jj 2015-03-10 07:27:43.734454250 +0100
> +++ gcc/config/rs6000/t-linux 2015-03-10 08:52:54.268126702 +0100
> @@ -2,7 +2,7 @@
> # or soft-float.
> ifeq (,$(filter $(with_cpu),$(SOFT_FLOAT_CPUS))$(findstring soft,$(with_float)))
> ifneq (,$(findstring powerpc64,$(target)))
> -MULTIARCH_DIRNAME := powerpc64-linux-gnu
> +MULTILIB_OSDIRNAMES := .=../lib64$(call if_multiarch,:powerpc64-linux-gnu)
> else
> ifneq (,$(findstring spe,$(target)))
> MULTIARCH_DIRNAME := powerpc-linux-gnuspe$(if $(findstring 8548,$(with_cpu)),,v1)
> @@ -10,9 +10,12 @@ else
> MULTIARCH_DIRNAME := powerpc-linux-gnu
> endif
> endif
> -ifneq (,$(findstring powerpcle,$(target))$(findstring powerpc64le,$(target)))
> +ifneq (,$(findstring powerpcle,$(target)))
> MULTIARCH_DIRNAME := $(subst -linux,le-linux,$(MULTIARCH_DIRNAME))
> endif
> +ifneq (,$(findstring powerpc64le,$(target)))
> +MULTILIB_OSDIRNAMES := $(subst -linux,le-linux,$(MULTILIB_OSDIRNAMES))
> +endif
> endif
>
> rs6000-linux.o: $(srcdir)/config/rs6000/rs6000-linux.c
>
> Of course, needs testing on standard multilib distros and Debian/Ubuntu
> multiarch.
The patch fixes the issue for me.
Thanks.
--
Markus