On Tue, Aug 10, 2010 at 07:42:05PM -0400, Alexander Hansen wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
> 
> On 8/10/10 12:08 PM, Jack Howarth wrote:
> > On Tue, Aug 10, 2010 at 09:51:30AM -0400, Alexander Hansen wrote:
> > 
> >>>> I posted the build log and build directory at
> >>>>
> >>>> http://akhmac.blogdns.net/~hansen/finklogs/gcc-4.5.1-1000/
> >>>>
> >>>>> This machine appears to be inaccessible.
> >>>>
> >>>>
> > 
> > Yeah, I rebooted it into 10.4 and I don't have the server mirrored.
> > 
> > It looks like my current gmp installation on 10.4 is from the Todai
> > binary distribution and therefore built on a G5--I'd forgotten to check
> > that before testing.  I'll rebuild gmp and then try gcc45 again.
> > 
> >> Try adding --with-dwarf2 to configure in the gcc45-10.4.info script
> >> for the darwin8 ppc builds. I am told this is required for 10.4
> >> only.
> >>            Jack
> > 
> That worked for me.  Jack F (cc'ed) reported that he wound up having
> this version of gcc45 not build on 10.4/Intel.  I don't know if he had
> the same build error as I did on PowerPC.  I've rebooted the machine so
> that the logs are accessible again.

Alexander,
   Try the attached gcc45-10.4.info and gcc45.patch which contains
an alternative fix of patching configure.ac to automatically invoke
--with-dwarf2 on darwin8.
            Jack

> - -- 
> Alexander Hansen
> Fink User Liaison
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.10 (Darwin)
> Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
> 
> iEYEARECAAYFAkxh48wACgkQB8UpO3rKjQ93hgCfcHl4MSpVb6ti3cFzV31lDzXl
> U+0AoJskBfyttyx3eWU/RlQIVcRmKjHx
> =P8po
> -----END PGP SIGNATURE-----
Info2: <<
Package: gcc45
Version: 4.5.1
Revision: 1000
Source: ftp://gcc.gnu.org/pub/gcc/releases/gcc-%v/gcc-%v.tar.bz2
Source-MD5: 48231a8e33ed6e058a341c53b819de1a
Source2: ftp://sourceware.org/pub/java/ecj-latest.jar
Source2-MD5: fd299f26c02268878b5d6c0e86f57c43
PatchFile: %n.patch
PatchFile-MD5: dd05120ca330499c9d201ad1190a8cea
Distribution: 10.4
Type: -64bit -64bit
Architecture: powerpc, i386
NoSetCPPFLAGS: True
NoSetLDFLAGS: True
Conflicts: gcc42, gcc43, gcc44, gcc46
Replaces: gcc42, gcc43, gcc44, gcc46
Depends: %N-compiler (= %v-%r)
BuildDepends: gmp (>= 4.3.2-1), libmpfr1 (>= 2.4.2-2), libiconv-dev, 
gettext-tools, libgettext8-dev, libmpc2 (>= 0.8.1-1),  xcode (>= 2.5), fink (>= 
0.27.2)
ConfigureParams: <<
 --prefix=%p/lib/gcc4.5 --mandir=%p/share/man --infodir=%p/lib/gcc4.5/info  
--enable-languages=c,c++,fortran,objc,obj-c++,java \
 --with-gmp=%p --with-libiconv-prefix=%p --with-mpc=%p --with-system-zlib \
 --x-includes=/usr/X11R6/include --x-libraries=/usr/X11R6/lib 
--program-suffix=-fsf-4.5
<<
InfoTest: <<
   TestDepends: autogen, dejagnu
   TestScript: cd ../darwin_objdir; make -k check || :
<<
InfoDocs: cp-tools.info gcc.info gfortran.info cpp.info gccinstall.info 
libgomp.info cppinternals.info gccint.info gcj.info
CompileScript: <<
 #!/bin/bash -ev
 set +x
 if [ -e /usr/local/lib/libgmp.a ] || [ -e /usr/local/lib/libgmp.dylib ]; then
    echo "-----WARNING-----WARNING-----WARNING-----"
    echo "You seem to have GMP installed in /usr/local."
    echo "This is known to cause %N to fail to build."
    echo "Please move aside /usr/local and try again."
    echo "-----WARNING-----WARNING-----WARNING-----"
    exit 1
 fi
 set -x
 ulimit -s `ulimit -s`
 mv ../ecj-latest.jar ecj.jar
 mkdir ../darwin_objdir
 cd ../darwin_objdir
 ../gcc-%v/configure %c --disable-libjava-multilib
 num_cpu=$(echo `sysctl -n hw.ncpu`)
 make -j $num_cpu
 ##  make check requires autogen, dejagnu and expect, and should be run, in 
darwin_objdir, after install.
 ##  on 32-bit processors use
 # make -k check
 ##  on 64-bit processors use
 # make -k check RUNTESTFLAGS="--target_board=unix'{-m32,-m64}'"
<<
InstallScript: <<
 #!/bin/sh -ev
 darwinvers=`uname -r`
 cd ../darwin_objdir
 make install DESTDIR=%d
 mkdir -p %i/bin

 # Add symlinks to recreate previous naming of executables in %p/bin
 # as well as %p/lib/gcc4.5/bin and new -fsf-4.5 naming in %p/bin.
 binfiles="gcc g++ c++ cpp gcov"
 for binfile in $binfiles ; do
   ln -s %p/lib/gcc4.5/bin/$binfile-fsf-4.5 %i/lib/gcc4.5/bin/$binfile-4
   ln -s %p/lib/gcc4.5/bin/$binfile-fsf-4.5 %i/bin/$binfile-4
   ln -s %p/lib/gcc4.5/bin/$binfile-fsf-4.5 %i/bin/$binfile-fsf-4.5
 done
 binfiles="gfortran gcj gcj-dbtool gcjh gij gjnih grmiregistry grmic jcf-dump 
jv-convert jv-scan"
 for binfile in $binfiles ; do
   ln -s %p/lib/gcc4.5/bin/$binfile-fsf-4.5 %i/lib/gcc4.5/bin/$binfile
   ln -s %p/lib/gcc4.5/bin/$binfile-fsf-4.5 %i/bin/$binfile
   ln -s %p/lib/gcc4.5/bin/$binfile-fsf-4.5 %i/bin/$binfile-fsf-4.5
 done

 # Add symlinks for manpages under old names.
  man1files="cpp g++ gcc gcov"
  for man1file in $man1files ; do
    ln -s %p/share/man/man1/$man1file-fsf-4.5.1 %i/share/man/man1/$man1file-4.1
  done
  man1files="aot-compile gappletviewer gc-analyze gcj-dbtool gcj gcjh gfortran 
gij gjar gjarsigner gjavah gjdoc gkeytool gnative2ascii gorbd grmic grmid 
grmiregistry gserialver gtnameserv jcf-dump jv-convert rebuild-gcj-db"
  for man1file in $man1files ; do
    ln -s %p/share/man/man1/$man1file-fsf-4.5.1 %i/share/man/man1/$man1file.1
  done

 # Rename manpages with -fsf-4.5 suffix and create symlinks to old names.
 man7files="fsf-funding gfdl gpl"
 for man7file in $man7files ; do
   mv %i/share/man/man7/$man7file.7 %i/share/man/man7/$man7file-fsf-4.5.7
   ln -s %p/share/man/man7/$man7file-fsf-4.5.7 %i/share/man/man7/$man7file.7
 done

 # Add dir for installed info files, and link them to %i/share/info.
 # the %i/lib/gcc4.5/info/* files will go into the -compiler package
 # and the files in %i/share/info go into the main package, this allows
 # the info files for specific compiler versions to be accessed with
 # e.g. `info -d /fink_install_dir/lib/gcc4.5/info gcc', but the "main" info 
files will
 # be available for the install gcc4N package in %p/share/info, as usual
 install -d -m 755 %i/share/info
 for infofile in $(find %i/lib/gcc4.5/info -name '*.info*'); do
   infobase=$(basename $infofile)
   case $infofile in
   *info) /usr/bin/install-info --infodir=%i/lib/gcc4.5/info ${infofile} ;;
   esac
   ln -s %p/lib/gcc4.5/info/$infobase %i/share/info/$infobase
 done

 if [ "%m" != "powerpc" ] ; then
 cp %b/gcc/config/darwin-sections.def 
%i/lib/gcc4.5/lib/gcc/%m-apple-darwin${darwinvers}/%v/plugin/include/config
 fi

 # remove build path from .la files
 perl -pi -e "s, \-L[^ ']*/%n-%v-%r/darwin_objdir/[^ ']*,,g" `find 
%i/lib/gcc4.5/lib -name '*.la'`
<<
SplitOff: <<
  Package: %N-shlibs
  Replaces: gcc4 (<= 20050130-4), gfortran-shlibs
  Provides: gfortran-shlibs
  Description: Shared libraries for gcc4
  DocFiles: gcc/COPYING gcc/COPYING.LIB
  Homepage: http://gcc.gnu.org/
  Files: <<
    lib/gcc4.5/lib/libgfortran.3*.dylib
    lib/gcc4.5/lib/libffi.4*.dylib
    lib/gcc4.5/lib/libstdc++.6*.dylib
    lib/gcc4.5/lib/libgcc_s.1*.dylib
    lib/gcc4.5/lib/libgcc_ext.1*.dylib
    lib/gcc4.5/lib/libgcj.11*.dylib
    lib/gcc4.5/lib/libgcj-tools.11*.dylib
    lib/gcc4.5/lib/libgij.11*.dylib
    lib/gcc4.5/lib/libssp.0*.dylib
    lib/gcc4.5/lib/libobjc-gnu.2*.dylib
    lib/gcc4.5/lib/libgomp.1*.dylib
    lib/gcc4.5/lib/gcj-4.5.1-11
    lib/gcc4.5/%lib/libgfortran.3*.dylib
    lib/gcc4.5/%lib/libffi.4*.dylib
    lib/gcc4.5/%lib/libstdc++.6*.dylib
    lib/gcc4.5/%lib/libssp.0*.dylib
    lib/gcc4.5/%lib/libobjc-gnu.2*.dylib
    lib/gcc4.5/%lib/libgomp.1*.dylib
  <<
  Shlibs: <<
    %p/lib/gcc4.5/lib/libgfortran.3.dylib 4.0.0 %n (>= 4.5-1)
    %p/lib/gcc4.5/lib/libffi.4.dylib 5.0.0 %n (>= 4.5-1)
    %p/lib/gcc4.5/lib/libstdc++.6.dylib 7.0.0 %n (>= 4.5-1)
    %p/lib/gcc4.5/lib/libgcc_s.1.dylib 1.0.0 %n (>= 4.5-1)
    %p/lib/gcc4.5/lib/libgcj.11.dylib 12.0.0 %n (>= 4.5-1)
    %p/lib/gcc4.5/lib/libgcj-tools.11.dylib  12.0.0 %n (>= 4.5-1)
    %p/lib/gcc4.5/lib/libgij.11.dylib 12.0.0 %n (>= 4.5-1)
    %p/lib/gcc4.5/lib/libssp.0.dylib 1.0.0 %n (>= 4.5-1)
    %p/lib/gcc4.5/lib/libobjc-gnu.2.dylib 3.0.0 %n (>= 4.5-1)
    %p/lib/gcc4.5/lib/libgomp.1.dylib 2.0.0 %n (>= 4.5-1)
    %p/lib/gcc4.5/lib/gcj-4.5.1-11/libjvm.dylib 0.0.0 %n (>= 4.5-1)
    %p/lib/gcc4.5/%lib/libgfortran.3.dylib 4.0.0 %n (>= 4.5-1) 64 
    %p/lib/gcc4.5/%lib/libffi.4.dylib 5.0.0 %n (>= 4.5-1) 64
    %p/lib/gcc4.5/%lib/libstdc++.6.dylib 7.0.0 %n (>= 4.5-1) 64
    %p/lib/gcc4.5/%lib/libssp.0.dylib 1.0.0 %n (>= 4.5-1) 64
    %p/lib/gcc4.5/%lib/libobjc-gnu.2.dylib 3.0.0 %n (>= 4.5-1) 64
    %p/lib/gcc4.5/%lib/libgomp.1.dylib 2.0.0 %n (>= 4.5-1) 64
  <<
<<
SplitOff2: <<
  Package: %N-compiler
  Depends: gmp-shlibs (>= 4.3.2-1), libgmpxx-shlibs (>= 4.3.2-1), 
libmpfr1-shlibs (>= 2.4.2-2), %N-shlibs (= %v-%r), libiconv, 
libgettext8-shlibs, libmpc2-shlibs (>= 0.8.1-1), xcode (>= 2.5)
  Description: Compiler Binaries for gcc45.
  DocFiles: gcc/COPYING gcc/COPYING.LIB
  Homepage: http://gcc.gnu.org/
  Files: <<
    bin/*-fsf-4.5
    lib/gcc4.5
    share/man/man1/*-fsf-4.5.1
    share/man/man3/*-fsf-4.5.3
    share/man/man7/*-fsf-4.5.7
  <<
<<
PostInstScript: <<
  update-alternatives --install %p/share/man/man3/ffi.3 ffi 
%p/share/man/man3/%N_ffi.3 60 \
        --slave %p/share/man/man3/ffi_call.3 ffi_call 
%p/share/man/man3/%N_ffi_call.3 \
        --slave %p/share/man/man3/ffi_prep_cif.3 ffi_prep_cif 
%p/share/man/man3/%N_ffi_prep_cif.3
<<
PreRmScript: <<
  if [ $1 != "upgrade" ]; then
    update-alternatives --remove ffi %p/share/man/man3/%N_ffi.3
  fi
<<
License: GPL
Description: GNU Compiler Collection Version 4.5
DescDetail: <<
 GCC, the GNU Compiler Collection, includes front ends for
 C, C++, Objective-C, Objective-C++, Fortran, Java, and Ada.
 .
 C, C++, Objective C and Fortran and Java are included in this package.
 .
 The C and C++ compilers are named gcc-4 and g++-4 to avoid
 conflicts with gcc and g++ installed by the Apple Developer Tools
<<
DescPackaging: <<
 The multilib build of libjava is disabled for PowerPC since the
 64-bit support is incomplete on Darwin for libffi.
 Build with -fsf-4.5 suffix and place non-overlapping files into new 
gcc45-compiler
 package which can co-exist with other gcc4x-compiler packages. Overlapping 
files
 are left in main gcc45 package which still conflicts with other gcc4x packages.
<<
Homepage: http://gcc.gnu.org/
Maintainer: Jack Howarth <howa...@bromo.med.uc.edu>
<<
diff -uNr gcc-4.5.1/configure gcc-4.5.1.patched/configure
--- gcc-4.5.1/configure 2010-06-24 17:06:37.000000000 -0400
+++ gcc-4.5.1.patched/configure 2010-08-10 19:18:44.000000000 -0400
@@ -7431,6 +7431,16 @@
   esac
 fi
 
+# Default to using --with-dwarf2 on certain targets
+if test x${with_dwarf2} = x ; then
+  case "${target}" in
+  *-*-darwin8*)
+    with_dwarf2=yes;
+    extra_host_args="${extra_host_args} --with-dwarf2"
+   ;;
+  esac
+fi
+
 # hpux11 in 64bit mode has libraries in a weird place.  Arrange to find
 # them automatically.
 case "${host}" in
diff -uNr gcc-4.5.1/configure.ac gcc-4.5.1.patched/configure.ac
--- gcc-4.5.1/configure.ac      2010-06-24 17:06:37.000000000 -0400
+++ gcc-4.5.1.patched/configure.ac      2010-08-10 19:18:31.000000000 -0400
@@ -2493,6 +2493,16 @@
   esac
 fi
 
+# Default to using --with-dwarf2 on certain targets
+if test x${with_dwarf2} = x ; then
+  case "${target}" in
+  *-*-darwin8*)
+    with_dwarf2=yes;
+    extra_host_args="${extra_host_args} --with-dwarf2"
+   ;;
+  esac
+fi
+
 # hpux11 in 64bit mode has libraries in a weird place.  Arrange to find
 # them automatically.
 case "${host}" in
diff -uNr gcc-4.5.1/gcc/config/i386/i386.c 
gcc-4.5.1.patched/gcc/config/i386/i386.c
--- gcc-4.5.1/gcc/config/i386/i386.c    2010-07-22 02:42:02.000000000 -0400
+++ gcc-4.5.1.patched/gcc/config/i386/i386.c    2010-08-10 19:16:23.000000000 
-0400
@@ -4991,7 +4991,8 @@
    case, we return the original mode and warn ABI change if CUM isn't
    NULL.  */
 
-static enum machine_mode
+enum machine_mode type_natural_mode (const_tree, CUMULATIVE_ARGS *);
+enum machine_mode
 type_natural_mode (const_tree type, CUMULATIVE_ARGS *cum)
 {
   enum machine_mode mode = TYPE_MODE (type);
@@ -5122,7 +5123,9 @@
    See the x86-64 PS ABI for details.
 */
 
-static int
+int classify_argument (enum machine_mode, const_tree,
+                       enum x86_64_reg_class [MAX_CLASSES], int);
+int
 classify_argument (enum machine_mode mode, const_tree type,
                   enum x86_64_reg_class classes[MAX_CLASSES], int bit_offset)
 {
@@ -5503,7 +5506,8 @@
 
 /* Examine the argument and return set number of register required in each
    class.  Return 0 iff parameter should be passed in memory.  */
-static int
+int examine_argument (enum machine_mode, const_tree, int, int *, int *);
+int
 examine_argument (enum machine_mode mode, const_tree type, int in_return,
                  int *int_nregs, int *sse_nregs)
 {
@@ -6184,7 +6188,8 @@
 
 /* Return true when TYPE should be 128bit aligned for 32bit argument passing
    ABI.  */
-static bool
+bool contains_aligned_value_p (const_tree);
+bool
 contains_aligned_value_p (const_tree type)
 {
   enum machine_mode mode = TYPE_MODE (type);
diff -uNr gcc-4.5.1/gcc/configure gcc-4.5.1.patched/gcc/configure
--- gcc-4.5.1/gcc/configure     2010-06-14 06:38:18.000000000 -0400
+++ gcc-4.5.1.patched/gcc/configure     2010-08-10 19:16:23.000000000 -0400
@@ -25456,17 +25456,25 @@
 pluginlibs=
 if test x"$enable_plugin" = x"yes"; then
 
+  case "${host}" in
+    *-*-darwin*)
+      export_sym_check="$gcc_cv_nm -g"
+    ;;
+    *)
+      export_sym_check="$gcc_cv_objdump -T"
+    ;;
+  esac
   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for exported symbols" >&5
 $as_echo_n "checking for exported symbols... " >&6; }
   echo "int main() {return 0;} int foobar() {return 0;}" > conftest.c
   ${CC} ${CFLAGS} ${LDFLAGS} conftest.c -o conftest > /dev/null 2>&1
-  if $gcc_cv_objdump -T conftest | grep foobar > /dev/null; then
+  if $export_sym_check conftest | grep foobar > /dev/null; then
     : # No need to use a flag
   else
     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -rdynamic" >&5
 $as_echo_n "checking for -rdynamic... " >&6; }
     ${CC} ${CFLAGS} ${LDFLAGS} -rdynamic conftest.c -o conftest > /dev/null 
2>&1
-    if $gcc_cv_objdump -T conftest | grep foobar > /dev/null; then
+    if $export_sym_check conftest | grep foobar > /dev/null; then
       plugin_rdynamic=yes
       pluginlibs="-rdynamic"
     else
@@ -25542,7 +25550,14 @@
 
   # Check that we can build shared objects with -fPIC -shared
   saved_LDFLAGS="$LDFLAGS"
-  LDFLAGS="$LDFLAGS -fPIC -shared"
+  case "${host}" in
+    *-*-darwin*)
+      LDFLAGS="$LDFLAGS -fPIC -shared -undefined dynamic_lookup"
+    ;;
+    *)
+      LDFLAGS="$LDFLAGS -fPIC -shared"
+    ;;
+  esac
   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -fPIC -shared" >&5
 $as_echo_n "checking for -fPIC -shared... " >&6; }
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
diff -uNr gcc-4.5.1/gcc/configure.ac gcc-4.5.1.patched/gcc/configure.ac
--- gcc-4.5.1/gcc/configure.ac  2010-06-14 06:38:18.000000000 -0400
+++ gcc-4.5.1.patched/gcc/configure.ac  2010-08-10 19:16:23.000000000 -0400
@@ -4544,15 +4544,23 @@
 pluginlibs=
 if test x"$enable_plugin" = x"yes"; then
 
+  case "${host}" in
+    *-*-darwin*)
+      export_sym_check="$gcc_cv_nm -g"
+    ;;
+    *)
+      export_sym_check="$gcc_cv_objdump -T"
+    ;;
+  esac
   AC_MSG_CHECKING([for exported symbols])
   echo "int main() {return 0;} int foobar() {return 0;}" > conftest.c
   ${CC} ${CFLAGS} ${LDFLAGS} conftest.c -o conftest > /dev/null 2>&1
-  if $gcc_cv_objdump -T conftest | grep foobar > /dev/null; then
+  if $export_sym_check conftest | grep foobar > /dev/null; then
     : # No need to use a flag
   else
     AC_MSG_CHECKING([for -rdynamic])
     ${CC} ${CFLAGS} ${LDFLAGS} -rdynamic conftest.c -o conftest > /dev/null 
2>&1
-    if $gcc_cv_objdump -T conftest | grep foobar > /dev/null; then
+    if $export_sym_check conftest | grep foobar > /dev/null; then
       plugin_rdynamic=yes
       pluginlibs="-rdynamic"
     else
@@ -4572,7 +4580,14 @@
 
   # Check that we can build shared objects with -fPIC -shared
   saved_LDFLAGS="$LDFLAGS"
-  LDFLAGS="$LDFLAGS -fPIC -shared"
+  case "${host}" in
+    *-*-darwin*)
+      LDFLAGS="$LDFLAGS -fPIC -shared -undefined dynamic_lookup"
+    ;;
+    *)
+      LDFLAGS="$LDFLAGS -fPIC -shared"
+    ;;
+  esac
   AC_MSG_CHECKING([for -fPIC -shared])
   AC_TRY_LINK(
     [extern int X;],[return X == 0;],
diff -uNr gcc-4.5.1/gcc/testsuite/lib/plugin-support.exp 
gcc-4.5.1.patched/gcc/testsuite/lib/plugin-support.exp
--- gcc-4.5.1/gcc/testsuite/lib/plugin-support.exp      2010-03-05 
17:52:02.000000000 -0500
+++ gcc-4.5.1.patched/gcc/testsuite/lib/plugin-support.exp      2010-08-10 
19:16:23.000000000 -0400
@@ -88,6 +88,10 @@
 
     set optstr "$includes $extra_flags -DIN_GCC -fPIC -shared"
 
+    if { [ ishost *-*-darwin* ] } {
+        set optstr [concat $optstr "-undefined dynamic_lookup"]
+    }
+
     # Temporarily switch to the environment for the plugin compiler.
     restore_ld_library_path_env_vars
     set status [remote_exec build "$PLUGINCC $PLUGINCFLAGS $plugin_src $optstr 
-o $plugin_lib"]
diff -uNr gcc-4.5.1/libjava/configure gcc-4.5.1.patched/libjava/configure
--- gcc-4.5.1/libjava/configure 2010-07-31 05:34:58.000000000 -0400
+++ gcc-4.5.1.patched/libjava/configure 2010-08-10 19:16:23.000000000 -0400
@@ -1610,6 +1610,8 @@
                           default=yes
   --enable-java-maintainer-mode
                           allow rebuilding of .class and .h files
+  --enable-libjava-multilib
+                          build libjava as multilib
   --disable-dependency-tracking  speeds up one-time build
   --enable-dependency-tracking   do not reject slow dependency extractors
   --enable-maintainer-mode  enable make rules and dependencies not useful
@@ -3347,6 +3349,16 @@
 fi
 
 
+# Check whether --enable-libjava-multilib was given.
+if test "${enable_libjava_multilib+set}" = set; then
+  enableval=$enable_libjava_multilib;
+fi
+
+if test "$enable_libjava_multilib" = no; then
+  multilib=no
+  ac_configure_args="$ac_configure_args --disable-multilib"
+fi
+
 # It may not be safe to run linking tests in AC_PROG_CC/AC_PROG_CXX.
 
 
diff -uNr gcc-4.5.1/libjava/configure.ac gcc-4.5.1.patched/libjava/configure.ac
--- gcc-4.5.1/libjava/configure.ac      2010-07-15 08:05:56.000000000 -0400
+++ gcc-4.5.1.patched/libjava/configure.ac      2010-08-10 19:16:23.000000000 
-0400
@@ -139,6 +139,13 @@
        [allow rebuilding of .class and .h files]))
 AM_CONDITIONAL(JAVA_MAINTAINER_MODE, test "$enable_java_maintainer_mode" = yes)
 
+AC_ARG_ENABLE(libjava-multilib,
+       AS_HELP_STRING([--enable-libjava-multilib], [build libjava as 
multilib]))
+if test "$enable_libjava_multilib" = no; then
+  multilib=no
+  ac_configure_args="$ac_configure_args --disable-multilib"
+fi
+
 # It may not be safe to run linking tests in AC_PROG_CC/AC_PROG_CXX.
 GCC_NO_EXECUTABLES
 
diff -uNr gcc-4.5.1/libjava/testsuite/Makefile.am 
gcc-4.5.1.patched/libjava/testsuite/Makefile.am
--- gcc-4.5.1/libjava/testsuite/Makefile.am     2007-12-17 12:06:44.000000000 
-0500
+++ gcc-4.5.1.patched/libjava/testsuite/Makefile.am     2010-08-10 
19:16:23.000000000 -0400
@@ -24,6 +24,27 @@
 
 .PHONY: compile-tests
 
+# We need more things in site.exp, but automake completely controls the
+# creation of that file; there's no way to append to it without messing up
+# the dependency chains.  So we overrule automake.  This rule is exactly
+# what it would have generated, plus our own additions.
+site.exp: Makefile
+       @echo '# edit the last section' >>site.tmp
+       @echo "set objdir `pwd`" >>site.tmp
+       @echo 'set build_alias "$(build_alias)"' >>site.tmp
+       @echo 'set build_triplet $(build_triplet)' >>site.tmp
+       @echo 'set host_alias "$(host_alias)"' >>site.tmp
+       @echo 'set host_triplet $(host_triplet)' >>site.tmp
+       @echo 'set target_alias "$(target_alias)"' >>site.tmp
+       @echo 'set target_triplet $(target_triplet)' >>site.tmp
+       @echo 'set libiconv "$(LIBICONV)"' >>site.tmp
+       @echo '## All variables above are generated by configure. Do Not Edit 
##' >>site.tmp
+       @test ! -f site.exp || \
+         sed '1,/^## All variables above are.*##/ d' site.exp >> site.tmp
+       @-rm -f site.bak
+       @test ! -f site.exp || mv site.exp site.bak
+       @mv site.tmp site.exp
+
 check-am: compile-tests
 
 compile-tests:
diff -uNr gcc-4.5.1/libjava/testsuite/Makefile.in 
gcc-4.5.1.patched/libjava/testsuite/Makefile.in
--- gcc-4.5.1/libjava/testsuite/Makefile.in     2010-04-02 14:18:06.000000000 
-0400
+++ gcc-4.5.1.patched/libjava/testsuite/Makefile.in     2010-08-10 
19:16:23.000000000 -0400
@@ -388,25 +388,6 @@
        else echo "WARNING: could not find \`runtest'" 1>&2; :;\
        fi; \
        exit $$exit_status
-site.exp: Makefile
-       @echo 'Making a new site.exp file...'
-       @echo '## these variables are automatically generated by make ##' 
>site.tmp
-       @echo '# Do not edit here.  If you wish to override these values' 
>>site.tmp
-       @echo '# edit the last section' >>site.tmp
-       @echo 'set srcdir $(srcdir)' >>site.tmp
-       @echo "set objdir `pwd`" >>site.tmp
-       @echo 'set build_alias "$(build_alias)"' >>site.tmp
-       @echo 'set build_triplet $(build_triplet)' >>site.tmp
-       @echo 'set host_alias "$(host_alias)"' >>site.tmp
-       @echo 'set host_triplet $(host_triplet)' >>site.tmp
-       @echo 'set target_alias "$(target_alias)"' >>site.tmp
-       @echo 'set target_triplet $(target_triplet)' >>site.tmp
-       @echo '## All variables above are generated by configure. Do Not Edit 
##' >>site.tmp
-       @test ! -f site.exp || \
-         sed '1,/^## All variables above are.*##/ d' site.exp >> site.tmp
-       @-rm -f site.bak
-       @test ! -f site.exp || mv site.exp site.bak
-       @mv site.tmp site.exp
 
 distclean-DEJAGNU:
        -rm -f site.exp site.bak
@@ -557,6 +538,27 @@
 
 .PHONY: compile-tests
 
+# We need more things in site.exp, but automake completely controls the
+# creation of that file; there's no way to append to it without messing up
+# the dependency chains.  So we overrule automake.  This rule is exactly
+# what it would have generated, plus our own additions.
+site.exp: Makefile
+       @echo '# edit the last section' >>site.tmp
+       @echo "set objdir `pwd`" >>site.tmp
+       @echo 'set build_alias "$(build_alias)"' >>site.tmp
+       @echo 'set build_triplet $(build_triplet)' >>site.tmp
+       @echo 'set host_alias "$(host_alias)"' >>site.tmp
+       @echo 'set host_triplet $(host_triplet)' >>site.tmp
+       @echo 'set target_alias "$(target_alias)"' >>site.tmp
+       @echo 'set target_triplet $(target_triplet)' >>site.tmp
+       @echo 'set libiconv "$(LIBICONV)"' >>site.tmp
+       @echo '## All variables above are generated by configure. Do Not Edit 
##' >>site.tmp
+       @test ! -f site.exp || \
+         sed '1,/^## All variables above are.*##/ d' site.exp >> site.tmp
+       @-rm -f site.bak
+       @test ! -f site.exp || mv site.exp site.bak
+       @mv site.tmp site.exp
+
 check-am: compile-tests
 
 compile-tests:
diff -uNr gcc-4.5.1/libjava/testsuite/libjava.jni/jni.exp 
gcc-4.5.1.patched/libjava/testsuite/libjava.jni/jni.exp
--- gcc-4.5.1/libjava/testsuite/libjava.jni/jni.exp     2009-08-12 
12:34:00.000000000 -0400
+++ gcc-4.5.1.patched/libjava/testsuite/libjava.jni/jni.exp     2010-08-10 
19:16:23.000000000 -0400
@@ -251,7 +251,11 @@
 }
 
 proc gcj_jni_get_cxxflags_invocation {} {
+  global libiconv
   global LIBJAVA
+  if {$libiconv == ""} {
+      set libiconv "-liconv"
+  }
   if [info exists LIBJAVA] {
       set libjava $LIBJAVA;
   } else {
@@ -267,7 +271,7 @@
   # to just make the linker find libgcc using -L options.
   # Similar logic applies to libgcj.
   if { [istarget "*-*-darwin*"] } {
-    lappend cxxflags -shared-libgcc -lgcj -liconv
+    eval lappend cxxflags "-shared-libgcc -lgcj $libiconv"
   }
 
   if { [istarget "*-*-solaris*"] } {
------------------------------------------------------------------------------
This SF.net email is sponsored by 

Make an app they can't live without
Enter the BlackBerry Developer Challenge
http://p.sf.net/sfu/RIM-dev2dev 
_______________________________________________
Fink-devel mailing list
Fink-devel@lists.sourceforge.net
http://news.gmane.org/gmane.os.apple.fink.devel
Subscription management:
https://lists.sourceforge.net/lists/listinfo/fink-devel

Reply via email to