diff mbox

target/65286 - Disable multilib for ppc64le

Message ID 54F7696A.3040307@redhat.com
State New
Headers show

Commit Message

Martin Sebor March 4, 2015, 8:22 p.m. UTC
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

+MULTILIB_EXTRA_OPTS :=

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

Comments

Alan Modra March 5, 2015, 4:06 a.m. UTC | #1
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?
diff mbox

Patch

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
+