$OpenBSD: patch-configure,v 1.1.1.1 2012/04/23 15:56:42 pascal Exp $
--- configure.orig	Thu Feb  2 11:20:32 2012
+++ configure	Sat Apr 14 18:50:05 2012
@@ -2677,8 +2677,7 @@ host_libs="intl libiberty opcodes bfd readline tcl tk 
 host_tools="texinfo flex bison binutils gas ld fixincludes gcc cgen sid sim gdb gprof etc expect dejagnu m4 utils guile fastjar gnattools"
 
 # libgcj represents the runtime libraries only used by gcj.
-libgcj="target-libffi \
-	target-zlib \
+libgcj="target-zlib \
 	target-libjava"
 
 # these libraries are built for the target environment, and are built after
@@ -2695,6 +2694,7 @@ target_libraries="target-libgcc \
 		target-libquadmath \
 		target-libgfortran \
 		target-boehm-gc \
+		target-libffi \
 		${libgcj} \
 		target-libobjc \
 		target-libada \
@@ -2995,7 +2995,7 @@ fi
 
 # Save it here so that, even in case of --enable-libgcj, if the Java
 # front-end isn't enabled, we still get libgcj disabled.
-libgcj_saved=$libgcj
+libgcj_saved="target-libffi ${libgcj}"
 case $enable_libgcj in
 yes)
   # If we reset it here, it won't get added to noconfigdirs in the
@@ -3006,7 +3006,7 @@ yes)
 no)
   # Make sure we get it printed in the list of not supported target libs.
   # Don't disable libffi, though, other languages use it.
-  noconfigdirs="$noconfigdirs `echo ${libgcj} | sed -e 's/target-libffi//'`"
+  noconfigdirs="$noconfigdirs ${libgcj}"
   # Clear libgcj_saved so that even if java is enabled libffi won't be
   # built.
   libgcj_saved=
