public inbox for java-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* libtool update for powerpc64le-linux
@ 2013-08-16  8:48 Alan Modra
  2013-08-23  0:36 ` Alan Modra
  0 siblings, 1 reply; 5+ messages in thread
From: Alan Modra @ 2013-08-16  8:48 UTC (permalink / raw)
  To: gcc-patches, java-patches, golang-nuts

I'd like to apply the following patch to the gcc repository (well,
excluding the libgo part which I'm hoping someone will apply for me to
the master go repository).  I know the normal procedure for autotools
is to submit upstream then update when the patch is in the upstream
autotools repository, but this simple libtool patch has been awaiting
review for over two months.

This adds support for building gcc on little-endian powerpc linux
hosts, and tidies the existing host match for powerpc.  config.sub
won't return ppc*-*linux* so there isn't much point in matching that.

	* libtool.m4 (ld -m flags): Remove non-canonical ppc host match.
	Support little-endian powerpc linux hosts.
libgo/
	* config/libtool.m4 (ld -m flags): Remove non-canonical ppc host
	match.  Support little-endian powerpc linux hosts.
	* libgo/configure: Regenerate.
libjava/libltdl/
	* acinclude.m4 (ld -m flags): Remove non-canonical ppc host
	match.  Support little-endian powerpc linux hosts.
	* configure: Regenerate.
gcc/
	* configure: Regenerate.
libobjc/
	* configure: Regenerate.
libgfortran/
	* configure: Regenerate.
libffi/
	* configure: Regenerate.
libssp/
	* configure: Regenerate.
libitm/
	* configure: Regenerate.
libgomp/
	* configure: Regenerate.
libquadmath/
	* configure: Regenerate.
libsanitizer/
	* configure: Regenerate.
zlib/
	* configure: Regenerate.
libstdc++-v3/
	* configure: Regenerate.
libmudflap/
	* configure: Regenerate.
boehm-gc/
	* configure: Regenerate.
lto-plugin/
	* configure: Regenerate.
libatomic/
	* configure: Regenerate.
libbacktrace/
	* configure: Regenerate.
libjava/
	* configure: Regenerate.
libjava/classpath/
	* configure: Regenerate.

Index: libtool.m4
===================================================================
--- libtool.m4	(revision 200501)
+++ libtool.m4	(working copy)
@@ -1220,7 +1220,7 @@
   rm -rf conftest*
   ;;
 
-x86_64-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \
+x86_64-*kfreebsd*-gnu|x86_64-*linux*|powerpc*-*linux*| \
 s390*-*linux*|s390*-*tpf*|sparc*-*linux*)
   # Find out which ABI we are using.
   echo 'int i;' > conftest.$ac_ext
@@ -1241,7 +1241,10 @@
 		;;
 	    esac
 	    ;;
-	  ppc64-*linux*|powerpc64-*linux*)
+	  powerpc64le-*)
+	    LD="${LD-ld} -m elf32lppclinux"
+	    ;;
+	  powerpc64-*)
 	    LD="${LD-ld} -m elf32ppclinux"
 	    ;;
 	  s390x-*linux*)
@@ -1260,7 +1263,10 @@
 	  x86_64-*linux*)
 	    LD="${LD-ld} -m elf_x86_64"
 	    ;;
-	  ppc*-*linux*|powerpc*-*linux*)
+	  powerpcle-*)
+	    LD="${LD-ld} -m elf64lppc"
+	    ;;
+	  powerpc-*)
 	    LD="${LD-ld} -m elf64ppc"
 	    ;;
 	  s390*-*linux*|s390*-*tpf*)
Index: libgo/config/libtool.m4
===================================================================
--- libgo/config/libtool.m4	(revision 200501)
+++ libgo/config/libtool.m4	(working copy)
@@ -1225,7 +1225,7 @@
   rm -rf conftest*
   ;;
 
-x86_64-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \
+x86_64-*kfreebsd*-gnu|x86_64-*linux*|powerpc*-*linux*| \
 s390*-*linux*|s390*-*tpf*|sparc*-*linux*)
   # Find out which ABI we are using.
   echo 'int i;' > conftest.$ac_ext
@@ -1239,7 +1239,10 @@
 	  x86_64-*linux*)
 	    LD="${LD-ld} -m elf_i386"
 	    ;;
-	  ppc64-*linux*|powerpc64-*linux*)
+	  powerpc64le-*)
+	    LD="${LD-ld} -m elf32lppclinux"
+	    ;;
+	  powerpc64-*)
 	    LD="${LD-ld} -m elf32ppclinux"
 	    ;;
 	  s390x-*linux*)
@@ -1258,7 +1261,10 @@
 	  x86_64-*linux*)
 	    LD="${LD-ld} -m elf_x86_64"
 	    ;;
-	  ppc*-*linux*|powerpc*-*linux*)
+	  powerpcle-*)
+	    LD="${LD-ld} -m elf64lppc"
+	    ;;
+	  powerpc-*)
 	    LD="${LD-ld} -m elf64ppc"
 	    ;;
 	  s390*-*linux*|s390*-*tpf*)
Index: libjava/libltdl/acinclude.m4
===================================================================
--- libjava/libltdl/acinclude.m4	(revision 200501)
+++ libjava/libltdl/acinclude.m4	(working copy)
@@ -519,7 +519,7 @@
   rm -rf conftest*
   ;;
 
-x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*|s390*-*linux*|sparc*-*linux*)
+x86_64-*linux*|powerpc*-*linux*|s390*-*linux*|sparc*-*linux*)
   # Find out which ABI we are using.
   echo 'int i;' > conftest.$ac_ext
   if AC_TRY_EVAL(ac_compile); then
@@ -529,7 +529,10 @@
         x86_64-*linux*)
           LD="${LD-ld} -m elf_i386"
           ;;
-        ppc64-*linux*|powerpc64-*linux*)
+        powerpc64le-*)
+          LD="${LD-ld} -m elf32lppclinux"
+          ;;
+        powerpc64-*)
           LD="${LD-ld} -m elf32ppclinux"
           ;;
         s390x-*linux*)
@@ -545,7 +548,10 @@
         x86_64-*linux*)
           LD="${LD-ld} -m elf_x86_64"
           ;;
-        ppc*-*linux*|powerpc*-*linux*)
+        powerpcle-*)
+          LD="${LD-ld} -m elf64lppc"
+          ;;
+        powerpc-*)
           LD="${LD-ld} -m elf64ppc"
           ;;
         s390*-*linux*)

-- 
Alan Modra
Australia Development Lab, IBM

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

* Re: libtool update for powerpc64le-linux
  2013-08-16  8:48 libtool update for powerpc64le-linux Alan Modra
@ 2013-08-23  0:36 ` Alan Modra
  2013-08-23 22:08   ` Joseph S. Myers
  0 siblings, 1 reply; 5+ messages in thread
From: Alan Modra @ 2013-08-23  0:36 UTC (permalink / raw)
  To: gcc-patches, java-patches, golang-nuts

On Fri, Aug 16, 2013 at 06:18:05PM +0930, Alan Modra wrote:
> I'd like to apply the following patch to the gcc repository (well,
> excluding the libgo part which I'm hoping someone will apply for me to
> the master go repository).  I know the normal procedure for autotools
> is to submit upstream then update when the patch is in the upstream
> autotools repository, but this simple libtool patch has been awaiting
> review for over two months.

The libtool.m4 patch has finally been reviewed and accepted upstream.

I'd like to import upstream libtool into gcc to support powerpc64le,
and please, can someone do the same for upstream libgo?  The reason we
need this patch is that on a powerpc64le linux host where the compiler
defaulted to producing 64-bit objects (which is how we generally build
compilers nowadays) libtool added -m elf64ppc to $LD.  Being the
option for 64-bit big-endian, that caused complete failure for
64-bit little-endian.

libjava is using a rather old version of libtool.  Importing doesn't
seem an option there, so for libjava patch acinclude.m4.  Please don't
ask me to modify libjava configure and makefiles to use current
libtool.  I tried, and failed.

 	* libtool.m4: Import upstream version.
libgo/
 	* config/libtool.m4: Import upstream version.
 	* libgo/configure: Regenerate.
libjava/libltdl/
 	* acinclude.m4 (_LT_ENABLE_LOCK <ld -m flags>): Remove non-canonical
	ppc host match.  Support little-endian powerpc linux hosts.
 	* configure: Regenerate.
gcc/
	* configure: Regenerate.
libobjc/
	* configure: Regenerate.
libgfortran/
	* configure: Regenerate.
libffi/
	* configure: Regenerate.
libssp/
	* configure: Regenerate.
libitm/
	* configure: Regenerate.
libgomp/
	* configure: Regenerate.
libquadmath/
	* configure: Regenerate.
libsanitizer/
	* configure: Regenerate.
zlib/
	* configure: Regenerate.
libstdc++-v3/
	* configure: Regenerate.
libmudflap/
	* configure: Regenerate.
boehm-gc/
	* configure: Regenerate.
lto-plugin/
	* configure: Regenerate.
libatomic/
	* configure: Regenerate.
libbacktrace/
	* configure: Regenerate.
libjava/
	* configure: Regenerate.
libjava/classpath/
	* configure: Regenerate.

Index: libjava/libltdl/acinclude.m4
===================================================================
--- libjava/libltdl/acinclude.m4	(revision 200501)
+++ libjava/libltdl/acinclude.m4	(working copy)
@@ -519,7 +519,7 @@
   rm -rf conftest*
   ;;
 
-x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*|s390*-*linux*|sparc*-*linux*)
+x86_64-*linux*|powerpc*-*linux*|s390*-*linux*|sparc*-*linux*)
   # Find out which ABI we are using.
   echo 'int i;' > conftest.$ac_ext
   if AC_TRY_EVAL(ac_compile); then
@@ -529,7 +529,10 @@
         x86_64-*linux*)
           LD="${LD-ld} -m elf_i386"
           ;;
-        ppc64-*linux*|powerpc64-*linux*)
+        powerpc64le-*linux*)
+          LD="${LD-ld} -m elf32lppclinux"
+          ;;
+        powerpc64-*linux*)
           LD="${LD-ld} -m elf32ppclinux"
           ;;
         s390x-*linux*)
@@ -545,7 +548,10 @@
         x86_64-*linux*)
           LD="${LD-ld} -m elf_x86_64"
           ;;
-        ppc*-*linux*|powerpc*-*linux*)
+        powerpcle-*linux*)
+          LD="${LD-ld} -m elf64lppc"
+          ;;
+        powerpc-*linux*)
           LD="${LD-ld} -m elf64ppc"
           ;;
         s390*-*linux*)

-- 
Alan Modra
Australia Development Lab, IBM

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

* Re: libtool update for powerpc64le-linux
  2013-08-23  0:36 ` Alan Modra
@ 2013-08-23 22:08   ` Joseph S. Myers
  2013-08-26  3:45     ` Alan Modra
  0 siblings, 1 reply; 5+ messages in thread
From: Joseph S. Myers @ 2013-08-23 22:08 UTC (permalink / raw)
  To: Alan Modra; +Cc: gcc-patches, java-patches, golang-nuts

On Fri, 23 Aug 2013, Alan Modra wrote:

> I'd like to import upstream libtool into gcc to support powerpc64le,

Has the sysroot semantics issue been resolved in upstream libtool, or do 
you mean "import with 3334f7ed5851ef1e96b052f2984c4acdbf39e20c reverted"?

-- 
Joseph S. Myers
joseph@codesourcery.com

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

* Re: libtool update for powerpc64le-linux
  2013-08-23 22:08   ` Joseph S. Myers
@ 2013-08-26  3:45     ` Alan Modra
  2013-09-16  7:17       ` Alan Modra
  0 siblings, 1 reply; 5+ messages in thread
From: Alan Modra @ 2013-08-26  3:45 UTC (permalink / raw)
  To: Joseph S. Myers; +Cc: gcc-patches, java-patches, golang-nuts

On Fri, Aug 23, 2013 at 10:08:29PM +0000, Joseph S. Myers wrote:
> On Fri, 23 Aug 2013, Alan Modra wrote:
> 
> > I'd like to import upstream libtool into gcc to support powerpc64le,
> 
> Has the sysroot semantics issue been resolved in upstream libtool, or do 
> you mean "import with 3334f7ed5851ef1e96b052f2984c4acdbf39e20c reverted"?

As far as I can tell, upstream libtool hasn't changed its sysroot
support since that patch went in.  I wasn't even aware of the issue..

How did the gcc project get to the place where we aren't following our
own rules http://gcc.gnu.org/codingconventions.html regarding libtool?
We're supposed to get a patch reviewed upstream, applied, then import
the whole lot.  From the top-level ChangeLog, that hasn't happened
since 2009-12-05!  It must be a little disheartening to be a libtool
maintainer, when a major GNU project like gcc treats your work like
this.

-- 
Alan Modra
Australia Development Lab, IBM

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

* Re: libtool update for powerpc64le-linux
  2013-08-26  3:45     ` Alan Modra
@ 2013-09-16  7:17       ` Alan Modra
  0 siblings, 0 replies; 5+ messages in thread
From: Alan Modra @ 2013-09-16  7:17 UTC (permalink / raw)
  To: gcc-patches, java-patches

I guess I can't really expect to gain an approval to import the
upstream libtool into gcc.  Even *I* don't really trust me, although
having looked at it a little I think I could even update
libjava/libltdl.  So how about just continuing the status quo and
applying a libtool patch that is already upstream?  Bootstrapped
powerpc64le-linux and powerpc64-linux.  OK to apply?

 	* libtool.m4 (_LT_ENABLE_LOCK <ld -m flags>): Remove non-canonical
	ppc host match.  Support little-endian powerpc linux hosts.
libjava/libltdl/
 	* acinclude.m4 (_LT_ENABLE_LOCK <ld -m flags>): Remove non-canonical
	ppc host match.  Support little-endian powerpc linux hosts.
 	* configure: Regenerate.
boehm-gc/
	* configure: Regenerate.
gcc/
	* configure: Regenerate.
	* aclocal.m4: Regenerate.
fixincludes/
	* configure: Regenerate.
libatomic/
	* configure: Regenerate.
libbacktrace/
	* configure: Regenerate.
libffi/
	* configure: Regenerate.
libgfortran/
	* configure: Regenerate.
libgomp/
	* configure: Regenerate.
libitm/
	* configure: Regenerate.
libjava/
	* configure: Regenerate.
libjava/classpath/
	* configure: Regenerate.
libmudflap/
	* configure: Regenerate.
libobjc/
	* configure: Regenerate.
libquadmath/
	* configure: Regenerate.
libsanitizer/
	* configure: Regenerate.
libssp/
	* configure: Regenerate.
libstdc++-v3/
	* configure: Regenerate.
libvtv/
	* configure: Regenerate.
lto-plugin/
	* configure: Regenerate.
zlib/
	* configure: Regenerate.

Index: libtool.m4
===================================================================
--- libtool.m4	(revision 202428)
+++ libtool.m4	(working copy)
@@ -1220,7 +1220,7 @@ ia64-*-hpux*)
   rm -rf conftest*
   ;;
 
-x86_64-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \
+x86_64-*kfreebsd*-gnu|x86_64-*linux*|powerpc*-*linux*| \
 s390*-*linux*|s390*-*tpf*|sparc*-*linux*)
   # Find out which ABI we are using.
   echo 'int i;' > conftest.$ac_ext
@@ -1241,7 +1241,10 @@ s390*-*linux*|s390*-*tpf*|sparc*-*linux*)
 		;;
 	    esac
 	    ;;
-	  ppc64-*linux*|powerpc64-*linux*)
+	  powerpc64le-*linux*)
+	    LD="${LD-ld} -m elf32lppclinux"
+	    ;;
+	  powerpc64-*linux*)
 	    LD="${LD-ld} -m elf32ppclinux"
 	    ;;
 	  s390x-*linux*)
@@ -1260,7 +1263,10 @@ s390*-*linux*|s390*-*tpf*|sparc*-*linux*)
 	  x86_64-*linux*)
 	    LD="${LD-ld} -m elf_x86_64"
 	    ;;
-	  ppc*-*linux*|powerpc*-*linux*)
+	  powerpcle-*linux*)
+	    LD="${LD-ld} -m elf64lppc"
+	    ;;
+	  powerpc-*linux*)
 	    LD="${LD-ld} -m elf64ppc"
 	    ;;
 	  s390*-*linux*|s390*-*tpf*)
Index: libjava/libltdl/acinclude.m4
===================================================================
--- libjava/libltdl/acinclude.m4	(revision 202428)
+++ libjava/libltdl/acinclude.m4	(working copy)
@@ -519,7 +519,7 @@ ia64-*-hpux*)
   rm -rf conftest*
   ;;
 
-x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*|s390*-*linux*|sparc*-*linux*)
+x86_64-*linux*|powerpc*-*linux*|s390*-*linux*|sparc*-*linux*)
   # Find out which ABI we are using.
   echo 'int i;' > conftest.$ac_ext
   if AC_TRY_EVAL(ac_compile); then
@@ -529,7 +529,10 @@ ia64-*-hpux*)
         x86_64-*linux*)
           LD="${LD-ld} -m elf_i386"
           ;;
-        ppc64-*linux*|powerpc64-*linux*)
+        powerpc64le-*linux*)
+          LD="${LD-ld} -m elf32lppclinux"
+          ;;
+        powerpc64-*linux*)
           LD="${LD-ld} -m elf32ppclinux"
           ;;
         s390x-*linux*)
@@ -545,7 +548,10 @@ ia64-*-hpux*)
         x86_64-*linux*)
           LD="${LD-ld} -m elf_x86_64"
           ;;
-        ppc*-*linux*|powerpc*-*linux*)
+        powerpcle-*linux*)
+          LD="${LD-ld} -m elf64lppc"
+          ;;
+        powerpc-*linux*)
           LD="${LD-ld} -m elf64ppc"
           ;;
         s390*-*linux*)
 
-- 
Alan Modra
Australia Development Lab, IBM

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

end of thread, other threads:[~2013-09-16  7:17 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-08-16  8:48 libtool update for powerpc64le-linux Alan Modra
2013-08-23  0:36 ` Alan Modra
2013-08-23 22:08   ` Joseph S. Myers
2013-08-26  3:45     ` Alan Modra
2013-09-16  7:17       ` Alan Modra

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