diff mbox

Fix bootstrap with --enable-languages=all,go

Message ID 20160930185531.GE7282@tucnak.redhat.com
State New
Headers show

Commit Message

Jakub Jelinek Sept. 30, 2016, 6:55 p.m. UTC
Hi!

On Fri, Sep 30, 2016 at 01:48:12PM +0100, Andrew Haley wrote:
> On 30/09/16 11:27, Marek Polacek wrote:
> > Can we move forward with this patch, then?
> 
> I've been travelling for several weeks.  However, I'm back at my desk
> now, so I can move this forward.  I have all the approvals and
> everybody has had time to respond.  However, I'll need to pull some
> more recent changes into my tree and merge again.

Unfortunately this broke bootstrap, because libgo needs libffi (at least on
lots of targets) and target libffi is no longer built.

This patch restores what we had before for target-libffi, it can be
incrementally tweaked by individual target maintainers.

I haven't tried to readd the boehm-gc objc support that has also been
disabled, don't know about anybody using that.

Bootstrapped on i686-linux, bootstrap pending on x86_64-linux (both fail to
bootstrap without it), ok for trunk?

2016-09-30  Jakub Jelinek  <jakub@redhat.com>

	* configure.ac: Add target-libffi to target_libraries.
	Readd libgcj target disablings, modified to only target-libffi.
	Readd target addition of go to unsupported languages.
	* configure: Regenerated.



	Jakub

Comments

Eric Gallager Sept. 30, 2016, 7:52 p.m. UTC | #1
On 9/30/16, Jakub Jelinek <jakub@redhat.com> wrote:
> Hi!
>
> On Fri, Sep 30, 2016 at 01:48:12PM +0100, Andrew Haley wrote:
>> On 30/09/16 11:27, Marek Polacek wrote:
>> > Can we move forward with this patch, then?
>>
>> I've been travelling for several weeks.  However, I'm back at my desk
>> now, so I can move this forward.  I have all the approvals and
>> everybody has had time to respond.  However, I'll need to pull some
>> more recent changes into my tree and merge again.
>
> Unfortunately this broke bootstrap, because libgo needs libffi (at least on
> lots of targets) and target libffi is no longer built.
>
> This patch restores what we had before for target-libffi, it can be
> incrementally tweaked by individual target maintainers.
>
> I haven't tried to readd the boehm-gc objc support that has also been
> disabled, don't know about anybody using that.
>


I always configure with --enable-objc-gc. The only reason Apple
deprecated garbage collection for Objective C is because they replaced
it with Automated Reference Counting in clang, which GCC doesn't
support yet. So, until GCC supports Automated Reference Counting,
please keep boehm-gc support for objc.

Thanks,
Eric
Ian Lance Taylor Sept. 30, 2016, 10:22 p.m. UTC | #2
Jakub Jelinek <jakub@redhat.com> writes:

> 2016-09-30  Jakub Jelinek  <jakub@redhat.com>
>
> 	* configure.ac: Add target-libffi to target_libraries.
> 	Readd libgcj target disablings, modified to only target-libffi.
> 	Readd target addition of go to unsupported languages.
> 	* configure: Regenerated.

This is OK.  Thanks.

I saw that the discussion was clear that libffi was needed for libgo,
and the patch I saw did not remove the libffi configury.  I don't know
what happened.

Ian
diff mbox

Patch

--- configure.ac.jj	2016-09-30 18:40:58.000000000 +0200
+++ configure.ac	2016-09-30 20:10:19.461760861 +0200
@@ -161,6 +161,7 @@  target_libraries="target-libgcc \
 		target-libssp \
 		target-libquadmath \
 		target-libgfortran \
+		target-libffi \
 		target-libobjc \
 		target-libada \
 		target-libgo"
@@ -696,6 +697,101 @@  case "${target}" in
     ;;
 esac
 
+# Disable libffi for some systems.
+case "${target}" in
+  powerpc-*-darwin*)
+    ;;
+  i[[3456789]]86-*-darwin*)
+    ;;
+  x86_64-*-darwin[[912]]*)
+    ;;
+  *-*-darwin*)
+    noconfigdirs="$noconfigdirs target-libffi"
+    ;;
+  *-*-netware*)
+    noconfigdirs="$noconfigdirs target-libffi"
+    ;;
+  *-*-phoenix*)
+    noconfigdirs="$noconfigdirs target-libffi"
+    ;;
+  *-*-rtems*)
+    noconfigdirs="$noconfigdirs target-libffi"
+    ;;
+  *-*-tpf*)
+    noconfigdirs="$noconfigdirs target-libffi"
+    ;;
+  *-*-uclinux*)
+    noconfigdirs="$noconfigdirs target-libffi"
+    ;;
+  *-*-vxworks*)
+    noconfigdirs="$noconfigdirs target-libffi"
+    ;;
+  alpha*-*-*vms*)
+    noconfigdirs="$noconfigdirs target-libffi"
+    ;;
+  arm*-*-freebsd*)
+    noconfigdirs="$noconfigdirs target-libffi"
+    ;;
+  arm-wince-pe)
+    noconfigdirs="$noconfigdirs target-libffi"
+    ;;
+  arm*-*-symbianelf*)
+    noconfigdirs="$noconfigdirs target-libffi"
+    ;;
+  cris-*-* | crisv32-*-*)
+    case "${target}" in
+      *-*-linux*)
+	;;
+      *) # See PR46792 regarding target-libffi.
+	noconfigdirs="$noconfigdirs target-libffi";;
+    esac
+    ;;
+  hppa*64*-*-hpux*)
+    noconfigdirs="$noconfigdirs target-libffi"
+    ;;
+  hppa*-hp-hpux11*)
+    ;;
+  hppa*-*-hpux*)
+    noconfigdirs="$noconfigdirs target-libffi"
+    ;;
+  ia64*-*-*vms*)
+    noconfigdirs="$noconfigdirs target-libffi"
+    ;;
+  i[[3456789]]86-w64-mingw*)
+    noconfigdirs="$noconfigdirs target-libffi"
+    ;;
+  i[[3456789]]86-*-mingw*)
+    noconfigdirs="$noconfigdirs target-libffi"
+    ;;
+  x86_64-*-mingw*)
+    noconfigdirs="$noconfigdirs target-libffi"
+    ;;
+  mmix-*-*)
+    noconfigdirs="$noconfigdirs target-libffi"
+    ;;
+  powerpc-*-aix*)
+    # copied from rs6000-*-* entry
+    noconfigdirs="$noconfigdirs target-libffi"
+    ;;
+  rs6000-*-aix*)
+    noconfigdirs="$noconfigdirs target-libffi"
+    ;;
+  ft32-*-*)
+    noconfigdirs="$noconfigdirs target-libffi"
+    ;;
+  *-*-lynxos*)
+    noconfigdirs="$noconfigdirs target-libffi"
+    ;;
+esac
+
+# Disable the go frontend on systems where it is known to not work. Please keep
+# this in sync with contrib/config-list.mk.
+case "${target}" in
+*-*-darwin* | *-*-cygwin* | *-*-mingw* | *-*-aix*)
+    unsupported_languages="$unsupported_languages go"
+    ;;
+esac
+
 # Disable libgo for some systems where it is known to not work.
 # For testing, you can easily override this with --enable-libgo.
 if test x$enable_libgo = x; then
--- configure.jj	2016-09-30 18:40:58.000000000 +0200
+++ configure	2016-09-30 20:11:16.063041690 +0200
@@ -2748,6 +2748,7 @@  target_libraries="target-libgcc \
 		target-libssp \
 		target-libquadmath \
 		target-libgfortran \
+		target-libffi \
 		target-libobjc \
 		target-libada \
 		target-libgo"
@@ -3351,6 +3352,101 @@  case "${target}" in
     ;;
 esac
 
+# Disable libffi for some systems.
+case "${target}" in
+  powerpc-*-darwin*)
+    ;;
+  i[3456789]86-*-darwin*)
+    ;;
+  x86_64-*-darwin[912]*)
+    ;;
+  *-*-darwin*)
+    noconfigdirs="$noconfigdirs target-libffi"
+    ;;
+  *-*-netware*)
+    noconfigdirs="$noconfigdirs target-libffi"
+    ;;
+  *-*-phoenix*)
+    noconfigdirs="$noconfigdirs target-libffi"
+    ;;
+  *-*-rtems*)
+    noconfigdirs="$noconfigdirs target-libffi"
+    ;;
+  *-*-tpf*)
+    noconfigdirs="$noconfigdirs target-libffi"
+    ;;
+  *-*-uclinux*)
+    noconfigdirs="$noconfigdirs target-libffi"
+    ;;
+  *-*-vxworks*)
+    noconfigdirs="$noconfigdirs target-libffi"
+    ;;
+  alpha*-*-*vms*)
+    noconfigdirs="$noconfigdirs target-libffi"
+    ;;
+  arm*-*-freebsd*)
+    noconfigdirs="$noconfigdirs target-libffi"
+    ;;
+  arm-wince-pe)
+    noconfigdirs="$noconfigdirs target-libffi"
+    ;;
+  arm*-*-symbianelf*)
+    noconfigdirs="$noconfigdirs target-libffi"
+    ;;
+  cris-*-* | crisv32-*-*)
+    case "${target}" in
+      *-*-linux*)
+	;;
+      *) # See PR46792 regarding target-libffi.
+	noconfigdirs="$noconfigdirs target-libffi";;
+    esac
+    ;;
+  hppa*64*-*-hpux*)
+    noconfigdirs="$noconfigdirs target-libffi"
+    ;;
+  hppa*-hp-hpux11*)
+    ;;
+  hppa*-*-hpux*)
+    noconfigdirs="$noconfigdirs target-libffi"
+    ;;
+  ia64*-*-*vms*)
+    noconfigdirs="$noconfigdirs target-libffi"
+    ;;
+  i[3456789]86-w64-mingw*)
+    noconfigdirs="$noconfigdirs target-libffi"
+    ;;
+  i[3456789]86-*-mingw*)
+    noconfigdirs="$noconfigdirs target-libffi"
+    ;;
+  x86_64-*-mingw*)
+    noconfigdirs="$noconfigdirs target-libffi"
+    ;;
+  mmix-*-*)
+    noconfigdirs="$noconfigdirs target-libffi"
+    ;;
+  powerpc-*-aix*)
+    # copied from rs6000-*-* entry
+    noconfigdirs="$noconfigdirs target-libffi"
+    ;;
+  rs6000-*-aix*)
+    noconfigdirs="$noconfigdirs target-libffi"
+    ;;
+  ft32-*-*)
+    noconfigdirs="$noconfigdirs target-libffi"
+    ;;
+  *-*-lynxos*)
+    noconfigdirs="$noconfigdirs target-libffi"
+    ;;
+esac
+
+# Disable the go frontend on systems where it is known to not work. Please keep
+# this in sync with contrib/config-list.mk.
+case "${target}" in
+*-*-darwin* | *-*-cygwin* | *-*-mingw* | *-*-aix*)
+    unsupported_languages="$unsupported_languages go"
+    ;;
+esac
+
 # Disable libgo for some systems where it is known to not work.
 # For testing, you can easily override this with --enable-libgo.
 if test x$enable_libgo = x; then
@@ -13977,51 +14073,6 @@  $as_echo "pre-installed in $ac_dir" >&6;
     { $as_echo "$as_me:${as_lineno-$LINENO}: result: host tool" >&5
 $as_echo "host tool" >&6; }
   else
-    # We need a cross tool
-    { $as_echo "$as_me:${as_lineno-$LINENO}: result: pre-installed" >&5
-$as_echo "pre-installed" >&6; }
-  fi
-fi
-
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking where to find the target gcj" >&5
-$as_echo_n "checking where to find the target gcj... " >&6; }
-if test "x${build}" != "x${host}" ; then
-  if expr "x$GCJ_FOR_TARGET" : "x/" > /dev/null; then
-    # We already found the complete path
-    ac_dir=`dirname $GCJ_FOR_TARGET`
-    { $as_echo "$as_me:${as_lineno-$LINENO}: result: pre-installed in $ac_dir" >&5
-$as_echo "pre-installed in $ac_dir" >&6; }
-  else
-    # Canadian cross, just use what we found
-    { $as_echo "$as_me:${as_lineno-$LINENO}: result: pre-installed" >&5
-$as_echo "pre-installed" >&6; }
-  fi
-else
-  ok=yes
-  case " ${configdirs} " in
-    *" gcc "*) ;;
-    *) ok=no ;;
-  esac
-  case ,${enable_languages}, in
-    *,java,*) ;;
-    *) ok=no ;;
-  esac
-  if test $ok = yes; then
-    # An in-tree tool is available and we can use it
-    GCJ_FOR_TARGET='$$r/$(HOST_SUBDIR)/gcc/gcj -B$$r/$(HOST_SUBDIR)/gcc/'
-    { $as_echo "$as_me:${as_lineno-$LINENO}: result: just compiled" >&5
-$as_echo "just compiled" >&6; }
-  elif expr "x$GCJ_FOR_TARGET" : "x/" > /dev/null; then
-    # We already found the complete path
-    ac_dir=`dirname $GCJ_FOR_TARGET`
-    { $as_echo "$as_me:${as_lineno-$LINENO}: result: pre-installed in $ac_dir" >&5
-$as_echo "pre-installed in $ac_dir" >&6; }
-  elif test "x$target" = "x$host"; then
-    # We can use an host tool
-    GCJ_FOR_TARGET='$(GCJ)'
-    { $as_echo "$as_me:${as_lineno-$LINENO}: result: host tool" >&5
-$as_echo "host tool" >&6; }
-  else
     # We need a cross tool
     { $as_echo "$as_me:${as_lineno-$LINENO}: result: pre-installed" >&5
 $as_echo "pre-installed" >&6; }