public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [PATCH] target/65286 - Disable multilib for ppc64le
@ 2015-03-04  0:59 Martin Sebor
  2015-03-04 13:20 ` Segher Boessenkool
  2015-03-04 13:43 ` Andreas Schwab
  0 siblings, 2 replies; 19+ messages in thread
From: Martin Sebor @ 2015-03-04  0:59 UTC (permalink / raw)
  To: Gcc Patch List

[-- Attachment #1: Type: text/plain, Size: 113 bytes --]

The attached patch resolves PR 65286 by adding --disable-multilib
when configuring for a ppc64le target.

Martin

[-- Attachment #2: gcc-65286.diff --]
[-- Type: text/x-patch, Size: 1754 bytes --]

diff --git a/ChangeLog b/ChangeLog
index bd43281..46ec13d 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2015-03-03 Martin Sebor  <msebor@redhat.com>
+
+	PR target/65286
+	* configure.ac (powerpc64le-*): Disable multilib.
+	* configure: Regenerate.
+
 2015-03-13  Jeff Law  <law@redhat.com>
 
 	* MAINTAINERS: Remove Paul Brook as a Fortran and ARM
diff --git a/configure b/configure
index 9de7295..168bf4c 100755
--- a/configure
+++ b/configure
@@ -7378,6 +7378,15 @@ if test x${is_cross_compiler} = xyes ; then
   target_configargs="--with-cross-host=${host_noncanonical} ${target_configargs}"
 fi
 
+# There is no multilib support on ppc64le.  Disable it unless it's
+# explicitly enabled.
+case "$target:$have_compiler:$enable_multilib" in
+  powerpc64le-*:yes:)
+    target_configargs="--disable-multilib ${target_configargs}"
+    enable_multilib=no
+    ;;
+esac
+
 # Special user-friendly check for native x86_64-linux build, if
 # multilib is not explicitly enabled.
 case "$target:$have_compiler:$host:$target:$enable_multilib" in
diff --git a/configure.ac b/configure.ac
index 00f7452..5ad3211 100644
--- a/configure.ac
+++ b/configure.ac
@@ -3021,6 +3021,15 @@ if test x${is_cross_compiler} = xyes ; then
   target_configargs="--with-cross-host=${host_noncanonical} ${target_configargs}"
 fi
 
+# There is no multilib support on ppc64le.  Disable it unless it's
+# explicitly enabled.
+case "$target:$have_compiler:$enable_multilib" in
+  powerpc64le-*:yes:)
+    target_configargs="--disable-multilib ${target_configargs}"
+    enable_multilib=no
+    ;;
+esac
+
 # Special user-friendly check for native x86_64-linux build, if
 # multilib is not explicitly enabled.
 case "$target:$have_compiler:$host:$target:$enable_multilib" in

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

* Re: [PATCH] target/65286 - Disable multilib for ppc64le
  2015-03-04  0:59 [PATCH] target/65286 - Disable multilib for ppc64le Martin Sebor
@ 2015-03-04 13:20 ` Segher Boessenkool
  2015-03-04 13:43 ` Andreas Schwab
  1 sibling, 0 replies; 19+ messages in thread
From: Segher Boessenkool @ 2015-03-04 13:20 UTC (permalink / raw)
  To: Martin Sebor; +Cc: Gcc Patch List

On Tue, Mar 03, 2015 at 05:59:07PM -0700, Martin Sebor wrote:
> The attached patch resolves PR 65286 by adding --disable-multilib
> when configuring for a ppc64le target.

Why?  The PR does not say; it suggests there is an error somewhere
that configuring with --disable-multilib papers over.


Segher

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

* Re: [PATCH] target/65286 - Disable multilib for ppc64le
  2015-03-04  0:59 [PATCH] target/65286 - Disable multilib for ppc64le Martin Sebor
  2015-03-04 13:20 ` Segher Boessenkool
@ 2015-03-04 13:43 ` Andreas Schwab
  2015-03-04 16:19   ` Jeff Law
  1 sibling, 1 reply; 19+ messages in thread
From: Andreas Schwab @ 2015-03-04 13:43 UTC (permalink / raw)
  To: Martin Sebor; +Cc: Gcc Patch List

Martin Sebor <msebor@redhat.com> writes:

> The attached patch resolves PR 65286 by adding --disable-multilib
> when configuring for a ppc64le target.

If powerpc64le doesn't want multilib it should not set any multilib
parameters.

Andreas.

-- 
Andreas Schwab, SUSE Labs, schwab@suse.de
GPG Key fingerprint = 0196 BAD8 1CE9 1970 F4BE  1748 E4D4 88E3 0EEA B9D7
"And now for something completely different."

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

* Re: [PATCH] target/65286 - Disable multilib for ppc64le
  2015-03-04 13:43 ` Andreas Schwab
@ 2015-03-04 16:19   ` Jeff Law
  2015-03-04 16:40     ` Martin Sebor
  0 siblings, 1 reply; 19+ messages in thread
From: Jeff Law @ 2015-03-04 16:19 UTC (permalink / raw)
  To: Andreas Schwab, Martin Sebor; +Cc: Gcc Patch List

On 03/04/15 06:43, Andreas Schwab wrote:
> Martin Sebor <msebor@redhat.com> writes:
>
>> The attached patch resolves PR 65286 by adding --disable-multilib
>> when configuring for a ppc64le target.
>
> If powerpc64le doesn't want multilib it should not set any multilib
> parameters.
Agreed, and it's debatable whether or not ppc64le should have any 
multilibs at this time.  That's a decision I leave to the ppc 
maintainers to answer.

I think the concern is that simply disabling the multilib without 
looking at the underlying failure may be papering over a real bug.

jeff

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

* Re: [PATCH] target/65286 - Disable multilib for ppc64le
  2015-03-04 16:19   ` Jeff Law
@ 2015-03-04 16:40     ` Martin Sebor
  2015-03-04 16:47       ` Jeff Law
  2015-03-04 17:17       ` Andreas Schwab
  0 siblings, 2 replies; 19+ messages in thread
From: Martin Sebor @ 2015-03-04 16:40 UTC (permalink / raw)
  To: Jeff Law, Andreas Schwab; +Cc: Gcc Patch List

On 03/04/2015 09:19 AM, Jeff Law wrote:
> On 03/04/15 06:43, Andreas Schwab wrote:
>> Martin Sebor <msebor@redhat.com> writes:
>>
>>> The attached patch resolves PR 65286 by adding --disable-multilib
>>> when configuring for a ppc64le target.
>>
>> If powerpc64le doesn't want multilib it should not set any multilib
>> parameters.
> Agreed, and it's debatable whether or not ppc64le should have any
> multilibs at this time.  That's a decision I leave to the ppc
> maintainers to answer.
>
> I think the concern is that simply disabling the multilib without
> looking at the underlying failure may be papering over a real bug.

The configure script explicitly adds --enable-multilib unless
--disable-multilib is specified. This then results in libraries
being built with the -m32 option, which fails with errors like
the one below:

/usr/include/gnu/stubs.h:8:27: fatal error: gnu/stubs-32.h: No such file 
or directory

Martin

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

* Re: [PATCH] target/65286 - Disable multilib for ppc64le
  2015-03-04 16:40     ` Martin Sebor
@ 2015-03-04 16:47       ` Jeff Law
  2015-03-04 17:17       ` Andreas Schwab
  1 sibling, 0 replies; 19+ messages in thread
From: Jeff Law @ 2015-03-04 16:47 UTC (permalink / raw)
  To: Martin Sebor, Andreas Schwab; +Cc: Gcc Patch List

On 03/04/15 09:40, Martin Sebor wrote:
> On 03/04/2015 09:19 AM, Jeff Law wrote:
>> On 03/04/15 06:43, Andreas Schwab wrote:
>>> Martin Sebor <msebor@redhat.com> writes:
>>>
>>>> The attached patch resolves PR 65286 by adding --disable-multilib
>>>> when configuring for a ppc64le target.
>>>
>>> If powerpc64le doesn't want multilib it should not set any multilib
>>> parameters.
>> Agreed, and it's debatable whether or not ppc64le should have any
>> multilibs at this time.  That's a decision I leave to the ppc
>> maintainers to answer.
>>
>> I think the concern is that simply disabling the multilib without
>> looking at the underlying failure may be papering over a real bug.
>
> The configure script explicitly adds --enable-multilib unless
> --disable-multilib is specified. This then results in libraries
> being built with the -m32 option, which fails with errors like
> the one below:
>
> /usr/include/gnu/stubs.h:8:27: fatal error: gnu/stubs-32.h: No such file
> or directory
Ah, yes, lack of 32bit glibc for ppc64le would cause this.  Unless the 
IBM-ers are planning a 32bit glibc for ppc64le, then this patch makes 
perfect sense.

jeff

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

* Re: [PATCH] target/65286 - Disable multilib for ppc64le
  2015-03-04 16:40     ` Martin Sebor
  2015-03-04 16:47       ` Jeff Law
@ 2015-03-04 17:17       ` Andreas Schwab
  2015-03-04 20:22         ` Martin Sebor
  1 sibling, 1 reply; 19+ messages in thread
From: Andreas Schwab @ 2015-03-04 17:17 UTC (permalink / raw)
  To: Martin Sebor; +Cc: Jeff Law, Gcc Patch List

Martin Sebor <msebor@redhat.com> writes:

> The configure script explicitly adds --enable-multilib unless
> --disable-multilib is specified. This then results in libraries
> being built with the -m32 option, which fails with errors like
> the one below:
>
> /usr/include/gnu/stubs.h:8:27: fatal error: gnu/stubs-32.h: No such file
> or directory

So fix the multilib configuration.

Andreas.

-- 
Andreas Schwab, SUSE Labs, schwab@suse.de
GPG Key fingerprint = 0196 BAD8 1CE9 1970 F4BE  1748 E4D4 88E3 0EEA B9D7
"And now for something completely different."

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

* Re: [PATCH] target/65286 - Disable multilib for ppc64le
  2015-03-04 17:17       ` Andreas Schwab
@ 2015-03-04 20:22         ` Martin Sebor
  2015-03-05  4:06           ` Alan Modra
  0 siblings, 1 reply; 19+ messages in thread
From: Martin Sebor @ 2015-03-04 20:22 UTC (permalink / raw)
  To: Andreas Schwab; +Cc: Jeff Law, Gcc Patch List

On 03/04/2015 10:17 AM, Andreas Schwab wrote:
> Martin Sebor <msebor@redhat.com> writes:
>
>> The configure script explicitly adds --enable-multilib unless
>> --disable-multilib is specified. This then results in libraries
>> being built with the -m32 option, which fails with errors like
>> the one below:
>>
>> /usr/include/gnu/stubs.h:8:27: fatal error: gnu/stubs-32.h: No such file
>> or directory
>
> So fix the multilib configuration.

Makes sense. Does the patch below look closer to what you're
suggesting?

GCC built and installed correctly with it, although it still
accepts the -m32 option which causes build failures. Perhaps
the option should be disabled for this target (if so,
I assume that would be a separate issue and patch.)

Martin

diff --git a/ChangeLog b/ChangeLog
index bd43281..6c20c4b 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2015-03-04 Martin Sebor  <msebor@redhat.com>
+
+       PR target/65286
+       * gcc/config/rs6000/t-linux64: Disable 32-bit configuration
+       for the powerpc64le target.
+
  2015-03-13  Jeff Law  <law@redhat.com>

         * MAINTAINERS: Remove Paul Brook as a Fortran and ARM
diff --git a/gcc/config/rs6000/t-linux64 b/gcc/config/rs6000/t-linux64
index b6b351d..a336b31 100644
--- a/gcc/config/rs6000/t-linux64
+++ b/gcc/config/rs6000/t-linux64
@@ -25,11 +25,18 @@
  # it doesn't tell anything about the 32bit libraries on those systems. 
  Set
  # MULTILIB_OSDIRNAMES according to what is found on the target.

+MULTILIB_OSDIRNAMES := m64=../lib64$(call 
if_multiarch,:powerpc64-linux-gnu)
+
+ifeq ($(findstring 64le,$(target)),)
  MULTILIB_OPTIONS    := m64/m32
  MULTILIB_DIRNAMES   := 64 32
-MULTILIB_EXTRA_OPTS :=
-MULTILIB_OSDIRNAMES := m64=../lib64$(call 
if_multiarch,:powerpc64-linux-gnu)
  MULTILIB_OSDIRNAMES += m32=$(if $(wildcard $(shell echo 
$(SYSTEM_HEADER_DIR))/.
+else
+MULTILIB_OPTIONS    := m64
+MULTILIB_DIRNAMES   := 64
+endif
+
+MULTILIB_EXTRA_OPTS :=

  rs6000-linux.o: $(srcdir)/config/rs6000/rs6000-linux.c
         $(COMPILE) $<

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

* Re: [PATCH] target/65286 - Disable multilib for ppc64le
  2015-03-04 20:22         ` Martin Sebor
@ 2015-03-05  4:06           ` Alan Modra
  2015-03-05 23:14             ` Alan Modra
  0 siblings, 1 reply; 19+ messages in thread
From: Alan Modra @ 2015-03-05  4:06 UTC (permalink / raw)
  To: Martin Sebor; +Cc: Andreas Schwab, Jeff Law, Gcc Patch List

On Wed, Mar 04, 2015 at 01:22:02PM -0700, Martin Sebor wrote:
> On 03/04/2015 10:17 AM, Andreas Schwab wrote:
> >Martin Sebor <msebor@redhat.com> writes:
> >
> >>The configure script explicitly adds --enable-multilib unless
> >>--disable-multilib is specified. This then results in libraries
> >>being built with the -m32 option, which fails with errors like
> >>the one below:
> >>
> >>/usr/include/gnu/stubs.h:8:27: fatal error: gnu/stubs-32.h: No such file
> >>or directory
> >
> >So fix the multilib configuration.
> 
> Makes sense. Does the patch below look closer to what you're
> suggesting?

Um, no.  This will kill off the powerpcle multilib even when I say
--enable-targets=powerpcle-linux.

I think what really should be done is modify config.gcc to not
build a biarch powerpc64le compiler by default.  I'll have a poke at
that.  If that is deemed too risky at this point in development, then
I prefer your original patch (except for the comment about not having
multilibs, which isn't true).

As an aside, as far as I know gnu/stubs.h is there only to notify
configure of functions that are in the C library but return -ENOSYS,
ie. that aren't really supported.  Does a gcc build really depend on
the typical functions that turn up in gnu/stubs.h?  If not, can't gcc
supply the wretched thing?

-- 
Alan Modra
Australia Development Lab, IBM

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

* Re: [PATCH] target/65286 - Disable multilib for ppc64le
  2015-03-05  4:06           ` Alan Modra
@ 2015-03-05 23:14             ` Alan Modra
  2015-03-09 18:00               ` David Edelsohn
  0 siblings, 1 reply; 19+ messages in thread
From: Alan Modra @ 2015-03-05 23:14 UTC (permalink / raw)
  To: David Edelsohn, Martin Sebor, Andreas Schwab, Jeff Law, Gcc Patch List

This arranges to build a powerpc64le-linux compiler without -m32
support by default.  Bootstrapped and regression tested on Ubuntu
powerpc64le-linux without --disable-multilib, and on powerpc64-linux
and powerpc-linux.  OK for mainline and branches?

This part of the config.gcc patch does most of the work
-	case ${maybe_biarch}:${enable_targets}:${cpu_is_64bit} in
-	    always:* | yes:*powerpc64* | yes:all:* | yes:*:yes)
+	case ${target}:${enable_targets}:${maybe_biarch} in
+	    powerpc64-* | powerpc-*:*:yes | *:*powerpc64-*:yes | *:all:yes \
+	    | powerpc64le*:*powerpcle* | powerpc64le*:*powerpc-* \
+	    | powerpcle-*:*powerpc64le*:yes)

always:* becomes powerpc64-*, ie. exclude powerpc64le
yes:*powerpc64* becomes *:*powerpc64-*:yes, excluding powerpc64le so
that --target=powerpc64le-linux --enable-targets=powerpc64le-linux
doesn't accidentally get you a biarch compiler.
yes:all:* becomes *:all:yes, more or less unchanged.
yes:*:yes becomes powerpc-*:*:yes allowing --target=powerpc-linux
--with-cpu=<supports 64-bit> to continue to build a biarch ppc64
compiler.

Some other notes:
t-fprules setting of MULTILIB variables is in every case overridden by
a following t-file, except for the commented out powerpc-*-openbsd*.
Since the aim of this patch is to build powerpc64le without multilibs,
the default setting of these vars needs to go.  t-ppcos needs to be
removed from powerpc64le configurations for the same reason.  Oh, and
adding t-fprules and t-ppcos before previous additions to tmake_file
is no longer necessary.  I checked all the other t-files that might be
added for interactions.

The linux64.h change is so that passing -m32 results in
	error: -m32 not supported in the configuration
rather than the confusing
	error: -m64 requires a PowerPC64 cpu
(Yes, I know using TARGET_64BIT_P would be nicer, but it's probably
better left to a cleanup patch.)

	PR target/65286
	* config.gcc (powerpc*-*-linux*): Arrange for powerpc64le-linux
	to be single-arch by default.  Set cpu_is_64bit for powerpc64
	given --with-cpu=native.
	* config/rs6000/t-fprules: Do not set default MULTILIB vars.
	* config/rs6000/t-linux (MULTIARCH_DIRNAME): Support powerpc64
	and powerpc64le.
	* config/rs6000/linux64.h (SUBSUBTARGET_OVERRIDE_OPTIONS): Test
	rs6000_isa_flags rather than TARGET_64BIT.

Index: gcc/config.gcc
===================================================================
--- gcc/config.gcc	(revision 221164)
+++ gcc/config.gcc	(working copy)
@@ -2337,28 +2337,32 @@
 powerpc*-*-linux*)
 	tm_file="${tm_file} dbxelf.h elfos.h gnu-user.h freebsd-spec.h rs6000/sysv4.h"
 	extra_options="${extra_options} rs6000/sysv4.opt"
-	tmake_file="rs6000/t-fprules rs6000/t-ppcos ${tmake_file} rs6000/t-ppccomm"
+	tmake_file="${tmake_file} rs6000/t-fprules rs6000/t-ppccomm"
 	extra_objs="$extra_objs rs6000-linux.o"
 	case ${target} in
 	    powerpc*le-*-*)
 		tm_file="${tm_file} rs6000/sysv4le.h" ;;
 	esac
-	maybe_biarch=yes
+	case ${target}:${with_cpu} in
+	    powerpc64*: | powerpc64*:native) cpu_is_64bit=yes ;;
+	esac
+	maybe_biarch=${cpu_is_64bit}
+	case ${enable_targets} in
+	    *powerpc64*) maybe_biarch=yes ;;
+	esac
 	case ${target} in
 	    powerpc64*-*-linux*spe* | powerpc64*-*-linux*paired*)
-	    	echo "*** Configuration ${target} not supported" 1>&2
+		echo "*** Configuration ${target} not supported" 1>&2
 		exit 1
 		;;
 	    powerpc*-*-linux*spe* | powerpc*-*-linux*paired*)
 		maybe_biarch=
 		;;
-	    powerpc64*-*-linux*)
-	    	test x$with_cpu != x || cpu_is_64bit=yes
-		maybe_biarch=always
-		;;
 	esac
-	case ${maybe_biarch}:${enable_targets}:${cpu_is_64bit} in
-	    always:* | yes:*powerpc64* | yes:all:* | yes:*:yes)
+	case ${target}:${enable_targets}:${maybe_biarch} in
+	    powerpc64-* | powerpc-*:*:yes | *:*powerpc64-*:yes | *:all:yes \
+	    | powerpc64le*:*powerpcle* | powerpc64le*:*powerpc-* \
+	    | powerpcle-*:*powerpc64le*:yes)
 		if test x$cpu_is_64bit = xyes; then
 		    tm_file="${tm_file} rs6000/default64.h"
 		fi
@@ -2379,9 +2383,14 @@
 		esac
 		extra_options="${extra_options} rs6000/linux64.opt"
 		;;
+	    powerpc64*)
+		tm_file="${tm_file} rs6000/default64.h rs6000/linux64.h glibc-stdint.h"
+		extra_options="${extra_options} rs6000/linux64.opt"
+		tmake_file="${tmake_file} rs6000/t-linux"
+		;;
 	    *)
 		tm_file="${tm_file} rs6000/linux.h glibc-stdint.h"
-		tmake_file="$tmake_file rs6000/t-linux"
+		tmake_file="${tmake_file} rs6000/t-ppcos rs6000/t-linux"
 		;;
 	esac
 	case ${target} in
Index: gcc/config/rs6000/t-fprules
===================================================================
--- gcc/config/rs6000/t-fprules	(revision 221164)
+++ gcc/config/rs6000/t-fprules	(working copy)
@@ -18,9 +18,3 @@
 
 SOFT_FLOAT_CPUS = e300c2 401 403 405 440 464 476 ec603e 801 821 823 860
 MULTILIB_MATCHES_FLOAT = $(foreach cpu, $(SOFT_FLOAT_CPUS), msoft-float=mcpu?$(cpu))
-
-# Build the libraries for both hard and soft floating point by default
-
-MULTILIB_OPTIONS = msoft-float
-MULTILIB_DIRNAMES = soft-float
-MULTILIB_MATCHES	= ${MULTILIB_MATCHES_FLOAT}
Index: gcc/config/rs6000/t-linux
===================================================================
--- gcc/config/rs6000/t-linux	(revision 221164)
+++ gcc/config/rs6000/t-linux	(working copy)
@@ -1,12 +1,19 @@
 # do not define the multiarch name if configured for a soft-float cpu
 # or soft-float.
 ifeq (,$(filter $(with_cpu),$(SOFT_FLOAT_CPUS))$(findstring soft,$(with_float)))
+ifneq (,$(findstring powerpc64,$(target)))
+MULTIARCH_DIRNAME := powerpc64-linux-gnu
+else
 ifneq (,$(findstring spe,$(target)))
-MULTIARCH_DIRNAME = powerpc-linux-gnuspe$(if $(findstring 8548,$(with_cpu)),,v1)
+MULTIARCH_DIRNAME := powerpc-linux-gnuspe$(if $(findstring 8548,$(with_cpu)),,v1)
 else
-MULTIARCH_DIRNAME = powerpc-linux-gnu
+MULTIARCH_DIRNAME := powerpc-linux-gnu
 endif
 endif
+ifneq (,$(findstring powerpcle,$(target))$(findstring powerpc64le,$(target)))
+MULTIARCH_DIRNAME := $(subst -linux,le-linux,$(MULTIARCH_DIRNAME))
+endif
+endif
 
 rs6000-linux.o: $(srcdir)/config/rs6000/rs6000-linux.c
 	$(COMPILE) $<
Index: gcc/config/rs6000/linux64.h
===================================================================
--- gcc/config/rs6000/linux64.h	(revision 221164)
+++ gcc/config/rs6000/linux64.h	(working copy)
@@ -97,7 +97,7 @@
     {								\
       if (!global_options_set.x_rs6000_alignment_flags)		\
 	rs6000_alignment_flags = MASK_ALIGN_NATURAL;		\
-      if (TARGET_64BIT)						\
+      if (rs6000_isa_flags & OPTION_MASK_64BIT)			\
 	{							\
 	  if (DEFAULT_ABI != ABI_AIX)				\
 	    {							\

-- 
Alan Modra
Australia Development Lab, IBM

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

* Re: [PATCH] target/65286 - Disable multilib for ppc64le
  2015-03-05 23:14             ` Alan Modra
@ 2015-03-09 18:00               ` David Edelsohn
  2015-03-10  6:13                 ` Markus Trippelsdorf
  0 siblings, 1 reply; 19+ messages in thread
From: David Edelsohn @ 2015-03-09 18:00 UTC (permalink / raw)
  To: Martin Sebor, Andreas Schwab, Jeff Law, Gcc Patch List, Alan Modra

On Thu, Mar 5, 2015 at 6:14 PM, Alan Modra <amodra@gmail.com> wrote:
> This arranges to build a powerpc64le-linux compiler without -m32
> support by default.  Bootstrapped and regression tested on Ubuntu
> powerpc64le-linux without --disable-multilib, and on powerpc64-linux
> and powerpc-linux.  OK for mainline and branches?
>
> This part of the config.gcc patch does most of the work
> -       case ${maybe_biarch}:${enable_targets}:${cpu_is_64bit} in
> -           always:* | yes:*powerpc64* | yes:all:* | yes:*:yes)
> +       case ${target}:${enable_targets}:${maybe_biarch} in
> +           powerpc64-* | powerpc-*:*:yes | *:*powerpc64-*:yes | *:all:yes \
> +           | powerpc64le*:*powerpcle* | powerpc64le*:*powerpc-* \
> +           | powerpcle-*:*powerpc64le*:yes)
>
> always:* becomes powerpc64-*, ie. exclude powerpc64le
> yes:*powerpc64* becomes *:*powerpc64-*:yes, excluding powerpc64le so
> that --target=powerpc64le-linux --enable-targets=powerpc64le-linux
> doesn't accidentally get you a biarch compiler.
> yes:all:* becomes *:all:yes, more or less unchanged.
> yes:*:yes becomes powerpc-*:*:yes allowing --target=powerpc-linux
> --with-cpu=<supports 64-bit> to continue to build a biarch ppc64
> compiler.
>
> Some other notes:
> t-fprules setting of MULTILIB variables is in every case overridden by
> a following t-file, except for the commented out powerpc-*-openbsd*.
> Since the aim of this patch is to build powerpc64le without multilibs,
> the default setting of these vars needs to go.  t-ppcos needs to be
> removed from powerpc64le configurations for the same reason.  Oh, and
> adding t-fprules and t-ppcos before previous additions to tmake_file
> is no longer necessary.  I checked all the other t-files that might be
> added for interactions.
>
> The linux64.h change is so that passing -m32 results in
>         error: -m32 not supported in the configuration
> rather than the confusing
>         error: -m64 requires a PowerPC64 cpu
> (Yes, I know using TARGET_64BIT_P would be nicer, but it's probably
> better left to a cleanup patch.)
>
>         PR target/65286
>         * config.gcc (powerpc*-*-linux*): Arrange for powerpc64le-linux
>         to be single-arch by default.  Set cpu_is_64bit for powerpc64
>         given --with-cpu=native.
>         * config/rs6000/t-fprules: Do not set default MULTILIB vars.
>         * config/rs6000/t-linux (MULTIARCH_DIRNAME): Support powerpc64
>         and powerpc64le.
>         * config/rs6000/linux64.h (SUBSUBTARGET_OVERRIDE_OPTIONS): Test
>         rs6000_isa_flags rather than TARGET_64BIT.

Okay.

The number of name variations is annoying, but I guess there's no choice now.

Thanks, David

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

* Re: [PATCH] target/65286 - Disable multilib for ppc64le
  2015-03-09 18:00               ` David Edelsohn
@ 2015-03-10  6:13                 ` Markus Trippelsdorf
  2015-03-10  7:28                   ` Alan Modra
  0 siblings, 1 reply; 19+ messages in thread
From: Markus Trippelsdorf @ 2015-03-10  6:13 UTC (permalink / raw)
  To: David Edelsohn
  Cc: Martin Sebor, Andreas Schwab, Jeff Law, Gcc Patch List, Alan Modra

On 2015.03.09 at 14:00 -0400, David Edelsohn wrote:
> On Thu, Mar 5, 2015 at 6:14 PM, Alan Modra <amodra@gmail.com> wrote:
> > This arranges to build a powerpc64le-linux compiler without -m32
> > support by default.  Bootstrapped and regression tested on Ubuntu
> > powerpc64le-linux without --disable-multilib, and on powerpc64-linux
> > and powerpc-linux.  OK for mainline and branches?
> >
> > This part of the config.gcc patch does most of the work
> > -       case ${maybe_biarch}:${enable_targets}:${cpu_is_64bit} in
> > -           always:* | yes:*powerpc64* | yes:all:* | yes:*:yes)
> > +       case ${target}:${enable_targets}:${maybe_biarch} in
> > +           powerpc64-* | powerpc-*:*:yes | *:*powerpc64-*:yes | *:all:yes \
> > +           | powerpc64le*:*powerpcle* | powerpc64le*:*powerpc-* \
> > +           | powerpcle-*:*powerpc64le*:yes)
> >
> > always:* becomes powerpc64-*, ie. exclude powerpc64le
> > yes:*powerpc64* becomes *:*powerpc64-*:yes, excluding powerpc64le so
> > that --target=powerpc64le-linux --enable-targets=powerpc64le-linux
> > doesn't accidentally get you a biarch compiler.
> > yes:all:* becomes *:all:yes, more or less unchanged.
> > yes:*:yes becomes powerpc-*:*:yes allowing --target=powerpc-linux
> > --with-cpu=<supports 64-bit> to continue to build a biarch ppc64
> > compiler.
> >
> > Some other notes:
> > t-fprules setting of MULTILIB variables is in every case overridden by
> > a following t-file, except for the commented out powerpc-*-openbsd*.
> > Since the aim of this patch is to build powerpc64le without multilibs,
> > the default setting of these vars needs to go.  t-ppcos needs to be
> > removed from powerpc64le configurations for the same reason.  Oh, and
> > adding t-fprules and t-ppcos before previous additions to tmake_file
> > is no longer necessary.  I checked all the other t-files that might be
> > added for interactions.
> >
> > The linux64.h change is so that passing -m32 results in
> >         error: -m32 not supported in the configuration
> > rather than the confusing
> >         error: -m64 requires a PowerPC64 cpu
> > (Yes, I know using TARGET_64BIT_P would be nicer, but it's probably
> > better left to a cleanup patch.)
> >
> >         PR target/65286
> >         * config.gcc (powerpc*-*-linux*): Arrange for powerpc64le-linux
> >         to be single-arch by default.  Set cpu_is_64bit for powerpc64
> >         given --with-cpu=native.
> >         * config/rs6000/t-fprules: Do not set default MULTILIB vars.
> >         * config/rs6000/t-linux (MULTIARCH_DIRNAME): Support powerpc64
> >         and powerpc64le.
> >         * config/rs6000/linux64.h (SUBSUBTARGET_OVERRIDE_OPTIONS): Test
> >         rs6000_isa_flags rather than TARGET_64BIT.
> 
> Okay.
> 
> The number of name variations is annoying, but I guess there's no choice now.

This patch breaks the build on ppc64le:

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++
...
ranlib libgcc.a
# @multilib_flags@ is still needed because this may use
# /home/trippels/gcc_build_dir/./gcc/xgcc -B/home/trippels/gcc_build_dir/./gcc/ -B/usr/local/powerpc64le-unknown-linux-gnu/bin/ -B/usr/local/powerpc64le-unknown-linux-gnu/lib/ -isystem /usr/local/powerpc64le-unknown-linux-gnu/include -isystem /usr/local/powerpc64le-unknown-linux-gnu/sys-include    and -O2  -g -O2 -DIN_GCC    -W -Wall -Wno-narrowing -Wwrite-strings -Wcast-qual -Wstrict-prototypes -Wmissing-prototypes -Wold-style-definition  -isystem ./include   -fPIC -mlong-double-128 -mno-minimal-toc -g -DIN_LIBGCC2 -fbuilding-libgcc -fno-stack-protector  directly.
# @multilib_dir@ is not really necessary, but sometimes it has
# more uses than just a directory name.
/bin/sh ../../../gcc/libgcc/../mkinstalldirs .
/home/trippels/gcc_build_dir/./gcc/xgcc -B/home/trippels/gcc_build_dir/./gcc/ -B/usr/local/powerpc64le-unknown-linux-gnu/bin/ -B/usr/local/powerpc64le-unknown-linux-gnu/lib/ -isystem /usr/local/powerpc64le-unknown-linux-gnu/include -isystem /usr/local/powerpc64le-unknown-linux-gnu/sys-include    -O2  -g -O2 -DIN_GCC    -W -Wall -Wno-narrowing -Wwrite-strings -Wcast-qual -Wstrict-prototypes -Wmissing-prototypes -Wold-style-definition  -isystem ./include   -fPIC -mlong-double-128 -mno-minimal-toc -g -DIN_LIBGCC2 -fbuilding-libgcc -fno-stack-protector  -shared -nodefaultlibs -Wl,--soname=libgcc_s.so.1 -Wl,--version-script=libgcc.map -o ./libgcc_s.so.1.tmp -g -O2 -B./ _muldi3_s.o _negdi2_s.o _lshrdi3_s.o _ashldi3_s.o _ashrdi3_s.o _cmpdi2_s.o _ucmpdi2_s.o _clear_cache_s.o _trampoline_s.o __main_s.o _absvsi2_s.o _absvdi2_s.o _addvsi3_s.o _addvdi3_s.o _subvsi3_s.o _subvdi3_s.o _mulvsi3_s.o _mulvdi3_s.o _negvsi2_s.o _negvdi2_s.o _ctors_s.o _ffssi2_s.o _ffsdi2_s.o _clz_s.o _clzsi2_s.o _clzdi2_s.o _ctzsi2_s.o _ctzdi2_s.o _popcount_tab_s.o _popcountsi2_s.o _popcountdi2_s.o _paritysi2_s.o _paritydi2_s.o _powisf2_s.o _powidf2_s.o _powixf2_s.o _powitf2_s.o _mulsc3_s.o _muldc3_s.o _mulxc3_s.o _multc3_s.o _divsc3_s.o _divdc3_s.o _divxc3_s.o _divtc3_s.o _bswapsi2_s.o _bswapdi2_s.o _clrsbsi2_s.o _clrsbdi2_s.o _fixunssfsi_s.o _fixunsdfsi_s.o _fixunsxfsi_s.o _fixsfdi_s.o _fixdfdi_s.o _fixxfdi_s.o _fixtfdi_s.o _fixunssfdi_s.o _fixunsdfdi_s.o _fixunsxfdi_s.o _fixunstfdi_s.o _floatdisf_s.o _floatdidf_s.o _floatdixf_s.o _floatditf_s.o _floatundisf_s.o _floatundidf_s.o _floatundixf_s.o _floatunditf_s.o _divdi3_s.o _moddi3_s.o _udivdi3_s.o _umoddi3_s.o _udiv_w_sdiv_s.o _udivmoddi4_s.o ibm-ldouble_s.o tramp_s.o ppc64-fp_s.o enable-execute-stack_s.o unwind-dw2_s.o unwind-dw2-fde-dip_s.o unwind-sjlj_s.o unwind-c_s.o emutls_s.o libgcc.a -lc && rm -f ./libgcc_s.so && if [ -f ./libgcc_s.so.1 ]; then mv -f ./libgcc_s.so.1 ./libgcc_s.so.1.backup; else true; fi && mv ./libgcc_s.so.1.tmp ./libgcc_s.so.1 && (echo "/* GNU ld script"; echo "   Use the shared library, but some functions are only in"; echo "   the static library.  */"; echo "GROUP ( libgcc_s.so.1 -lgcc )" ) > ./libgcc_s.so
/home/trippels/bin/ld: error: cannot open crti.o: No such file or directory
/home/trippels/bin/ld: error: cannot open crtn.o: No such file or directory
/home/trippels/bin/ld: error: cannot find -lc
collect2: error: ld returned 1 exit status
Makefile:947: recipe for target 'libgcc_s.so' failed
make[2]: *** [libgcc_s.so] Error 1

There is a ppc64le compile farm machine available @gcc2-2-power8.osuosl.org.
 
-- 
Markus

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

* Re: [PATCH] target/65286 - Disable multilib for ppc64le
  2015-03-10  6:13                 ` Markus Trippelsdorf
@ 2015-03-10  7:28                   ` Alan Modra
  2015-03-10  7:33                     ` Markus Trippelsdorf
  0 siblings, 1 reply; 19+ messages in thread
From: Alan Modra @ 2015-03-10  7:28 UTC (permalink / raw)
  To: Markus Trippelsdorf
  Cc: David Edelsohn, Martin Sebor, Andreas Schwab, Jeff Law, Gcc Patch List

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.

> 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.  :)

-- 
Alan Modra
Australia Development Lab, IBM

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

* Re: [PATCH] target/65286 - Disable multilib for ppc64le
  2015-03-10  7:28                   ` Alan Modra
@ 2015-03-10  7:33                     ` Markus Trippelsdorf
  2015-03-10  7:56                       ` Jakub Jelinek
  0 siblings, 1 reply; 19+ messages in thread
From: Markus Trippelsdorf @ 2015-03-10  7:33 UTC (permalink / raw)
  To: David Edelsohn, Martin Sebor, Andreas Schwab, Jeff Law, Gcc Patch List

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.

-- 
Markus

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

* Re: [PATCH] target/65286 - Disable multilib for ppc64le
  2015-03-10  7:33                     ` Markus Trippelsdorf
@ 2015-03-10  7:56                       ` Jakub Jelinek
  2015-03-10 11:08                         ` Markus Trippelsdorf
  0 siblings, 1 reply; 19+ messages in thread
From: Jakub Jelinek @ 2015-03-10  7:56 UTC (permalink / raw)
  To: Markus Trippelsdorf
  Cc: David Edelsohn, Martin Sebor, Andreas Schwab, Jeff Law, Gcc Patch List

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.

	Jakub

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

* Re: [PATCH] target/65286 - Disable multilib for ppc64le
  2015-03-10  7:56                       ` Jakub Jelinek
@ 2015-03-10 11:08                         ` Markus Trippelsdorf
  2015-03-10 12:06                           ` Alan Modra
  0 siblings, 1 reply; 19+ messages in thread
From: Markus Trippelsdorf @ 2015-03-10 11:08 UTC (permalink / raw)
  To: Jakub Jelinek
  Cc: David Edelsohn, Martin Sebor, Andreas Schwab, Jeff Law, Gcc Patch List

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

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

* Re: [PATCH] target/65286 - Disable multilib for ppc64le
  2015-03-10 11:08                         ` Markus Trippelsdorf
@ 2015-03-10 12:06                           ` Alan Modra
  2015-03-10 12:10                             ` Jakub Jelinek
  0 siblings, 1 reply; 19+ messages in thread
From: Alan Modra @ 2015-03-10 12:06 UTC (permalink / raw)
  To: Markus Trippelsdorf
  Cc: Jakub Jelinek, David Edelsohn, Martin Sebor, Andreas Schwab,
	Jeff Law, Gcc Patch List

On Tue, Mar 10, 2015 at 12:08:50PM +0100, Markus Trippelsdorf wrote:
> On 2015.03.10 at 08:56 +0100, Jakub Jelinek wrote:
> > 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.

I see.  Didn't realise Fedora was keeping the old mess.  ;-)

> > So perhaps something like completely untested following patch?
> 
> The patch fixes the issue for me.

It's fine on Ubuntu too.  Thanks!

-- 
Alan Modra
Australia Development Lab, IBM

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

* Re: [PATCH] target/65286 - Disable multilib for ppc64le
  2015-03-10 12:06                           ` Alan Modra
@ 2015-03-10 12:10                             ` Jakub Jelinek
  2015-03-10 13:27                               ` David Edelsohn
  0 siblings, 1 reply; 19+ messages in thread
From: Jakub Jelinek @ 2015-03-10 12:10 UTC (permalink / raw)
  To: Markus Trippelsdorf, David Edelsohn, Martin Sebor,
	Andreas Schwab, Jeff Law, Gcc Patch List

On Tue, Mar 10, 2015 at 10:36:24PM +1030, Alan Modra wrote:
> On Tue, Mar 10, 2015 at 12:08:50PM +0100, Markus Trippelsdorf wrote:
> > On 2015.03.10 at 08:56 +0100, Jakub Jelinek wrote:
> > > 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.
> 
> I see.  Didn't realise Fedora was keeping the old mess.  ;-)

It is not about old vs. new, but rather about Debian/Ubuntu deciding to use
something completely different from anyone else.

> > > So perhaps something like completely untested following patch?
> > 
> > The patch fixes the issue for me.
> 
> It's fine on Ubuntu too.  Thanks!

Thanks.  Here is the patch with ChangeLog entry, ok for trunk?

2015-03-10  Jakub Jelinek  <jakub@redhat.com>

	PR target/65286
	* config/rs6000/t-linux: For powerpc64* target set
	MULTILIB_OSDIRNAMES instead of MULTIARCH_DIRNAME.

--- gcc/config/rs6000/t-linux	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

	Jakub

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

* Re: [PATCH] target/65286 - Disable multilib for ppc64le
  2015-03-10 12:10                             ` Jakub Jelinek
@ 2015-03-10 13:27                               ` David Edelsohn
  0 siblings, 0 replies; 19+ messages in thread
From: David Edelsohn @ 2015-03-10 13:27 UTC (permalink / raw)
  To: Jakub Jelinek
  Cc: Markus Trippelsdorf, Martin Sebor, Andreas Schwab, Jeff Law,
	Gcc Patch List

Okay everywhere.

Thanks, David

On Tue, Mar 10, 2015 at 8:10 AM, Jakub Jelinek <jakub@redhat.com> wrote:
> On Tue, Mar 10, 2015 at 10:36:24PM +1030, Alan Modra wrote:
>> On Tue, Mar 10, 2015 at 12:08:50PM +0100, Markus Trippelsdorf wrote:
>> > On 2015.03.10 at 08:56 +0100, Jakub Jelinek wrote:
>> > > 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.
>>
>> I see.  Didn't realise Fedora was keeping the old mess.  ;-)
>
> It is not about old vs. new, but rather about Debian/Ubuntu deciding to use
> something completely different from anyone else.
>
>> > > So perhaps something like completely untested following patch?
>> >
>> > The patch fixes the issue for me.
>>
>> It's fine on Ubuntu too.  Thanks!
>
> Thanks.  Here is the patch with ChangeLog entry, ok for trunk?
>
> 2015-03-10  Jakub Jelinek  <jakub@redhat.com>
>
>         PR target/65286
>         * config/rs6000/t-linux: For powerpc64* target set
>         MULTILIB_OSDIRNAMES instead of MULTIARCH_DIRNAME.
>
> --- gcc/config/rs6000/t-linux   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
>
>         Jakub

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

end of thread, other threads:[~2015-03-10 13:27 UTC | newest]

Thread overview: 19+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-03-04  0:59 [PATCH] target/65286 - Disable multilib for ppc64le Martin Sebor
2015-03-04 13:20 ` Segher Boessenkool
2015-03-04 13:43 ` Andreas Schwab
2015-03-04 16:19   ` Jeff Law
2015-03-04 16:40     ` Martin Sebor
2015-03-04 16:47       ` Jeff Law
2015-03-04 17:17       ` Andreas Schwab
2015-03-04 20:22         ` Martin Sebor
2015-03-05  4:06           ` Alan Modra
2015-03-05 23:14             ` Alan Modra
2015-03-09 18:00               ` David Edelsohn
2015-03-10  6:13                 ` Markus Trippelsdorf
2015-03-10  7:28                   ` Alan Modra
2015-03-10  7:33                     ` Markus Trippelsdorf
2015-03-10  7:56                       ` Jakub Jelinek
2015-03-10 11:08                         ` Markus Trippelsdorf
2015-03-10 12:06                           ` Alan Modra
2015-03-10 12:10                             ` Jakub Jelinek
2015-03-10 13:27                               ` David Edelsohn

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