Andrew, I think I have this puzzled out now. The correct patch is... Index: lib/obj-c++.exp =================================================================== --- lib/obj-c++.exp (revision 117423) +++ lib/obj-c++.exp (working copy) @@ -282,8 +282,16 @@ proc obj-c++_target_compile { source des global ALWAYS_OBJCXXFLAGS global OBJCXX_UNDER_TEST global shlib_ext + global compiler_flags + if { [istarget "powerpc-apple-darwin8"] && \ + [string match "*-m64 *" $compiler_flags] } { + lappend options "libs=-fgnu-runtime" + lappend options "libs=-lobjc-gnu" + } else { lappend options "libs=-lobjc" + } + set shlib_ext [get_shlib_extension] verbose "shared lib extension: $shlib_ext" Index: lib/objc.exp =================================================================== --- lib/objc.exp (revision 117423) +++ lib/objc.exp (working copy) @@ -128,9 +128,18 @@ proc objc_target_compile { source dest t global ld_library_path global objc_libgcc_s_path global shlib_ext + global compiler_flags set ld_library_path ".:${objc_libgcc_s_path}" + + if { [istarget "powerpc-apple-darwin8"] && \ + [string match "*-m64 *" $compiler_flags] } { + lappend options "libs=-fgnu-runtime" + lappend options "libs=-lobjc-gnu" + } else { lappend options "libs=-lobjc" + } + set shlib_ext [get_shlib_extension] verbose "shared lib extension: $shlib_ext"
Note that the placement of -fgnu-runtime on the libs flags is by design. Otherwise for those tests that null out the compiler flags, the -fgnu-runtime flag is lost. With these patches, I get the following on my G5... # make -k check-objc RUNTESTFLAGS="--target_board=unix'{-m64}'" test -d testsuite || mkdir testsuite test -d testsuite/objc || mkdir testsuite/objc (rootme=`${PWDCMD-pwd}`; export rootme; \ srcdir=`cd ../../gcc-4.2-20060930/gcc; ${PWDCMD-pwd}` ; export srcdir ; \ cd testsuite/objc; \ rm -f tmp-site.exp; \ sed '/set tmpdir/ s|testsuite|testsuite/objc|' \ < ../../site.exp > tmp-site.exp; \ /bin/sh ${srcdir}/../move-if-change tmp-site.exp site.exp; \ EXPECT=`if [ -f ${rootme}/../expect/expect ] ; then echo ${rootme}/../expect/expect ; else echo expect ; fi` ; export EXPECT ; \ if [ -f ${rootme}/../expect/expect ] ; then \ TCL_LIBRARY=`cd .. ; cd ${srcdir}/../tcl/library ; ${PWDCMD-pwd}` ; \ export TCL_LIBRARY ; fi ; \ `if [ -f ${srcdir}/../dejagnu/runtest ] ; then echo ${srcdir}/../dejagnu/runtest ; else echo runtest; fi` --tool objc --target_board=unix'{-m64}') WARNING: Couldn't find the global config file. Test Run By root on Tue Oct 3 23:31:10 2006 Native configuration is powerpc-apple-darwin8 === objc tests === Schedule of variations: unix/-m64 Running target unix/-m64 Using /sw/share/dejagnu/baseboards/unix.exp as board description file for target. Using /sw/share/dejagnu/config/unix.exp as generic interface file for target. Using /sw/src/fink.build/gcc4-4.1.9999-20060930/gcc-4.2-20060930/gcc/testsuite/config/default.exp as tool-and-target-specific interface file. Running /sw/src/fink.build/gcc4-4.1.9999-20060930/gcc-4.2-20060930/gcc/testsuite/objc/compile/compile.exp ... Running /sw/src/fink.build/gcc4-4.1.9999-20060930/gcc-4.2-20060930/gcc/testsuite/objc/execute/exceptions/exceptions.exp ... Running /sw/src/fink.build/gcc4-4.1.9999-20060930/gcc-4.2-20060930/gcc/testsuite/objc/execute/execute.exp ... Running /sw/src/fink.build/gcc4-4.1.9999-20060930/gcc-4.2-20060930/gcc/testsuite/objc.dg/dg.exp ... FAIL: objc.dg/bitfield-2.m execution test FAIL: objc.dg/const-str-10.m scan-assembler .long\t__NSConstantStringClassReference\n\t.long\t.*\n\t.long\t5\n\t.data FAIL: objc.dg/const-str-11.m scan-assembler .long\t__XStrClassReference\n\t.long\t.*\n\t.long\t5\n\t.data FAIL: objc.dg/const-str-3.m (test for excess errors) WARNING: objc.dg/const-str-3.m compilation failed to produce executable FAIL: objc.dg/const-str-9.m scan-assembler .long\t__NSConstantStringClassReference\n\t.long\t.*\n\t.long\t5\n\t.data FAIL: objc.dg/encode-1.m execution test FAIL: objc.dg/encode-5.m (test for excess errors) FAIL: objc.dg/encode-8.m execution test FAIL: objc.dg/headers.m (test for excess errors) FAIL: objc.dg/isa-field-1.m (test for excess errors) FAIL: objc.dg/lookup-1.m (test for excess errors) FAIL: objc.dg/next-runtime-1.m scan-assembler L_OBJC_MODULES:\n[ \t]*.long\t6\n FAIL: objc.dg/no-extra-load.m (test for excess errors) ERROR: objc.dg/no-extra-load.m: error executing dg-final: couldn't open "no-extra-load.s": no such file or directory FAIL: objc.dg/stret-2.m scan-assembler objc_msgSend_stret FAIL: objc.dg/stret-2.m scan-assembler objc_msgSendSuper_stret FAIL: objc.dg/stret-2.m scan-assembler-not objc_msgSend[^_S] FAIL: objc.dg/stret-2.m scan-assembler-not objc_msgSendSuper[^_] FAIL: objc.dg/symtab-1.m scan-assembler L_OBJC_SYMBOLS.*:\n\t.long\t0\n\t.long\t0\n\t.short\t2\n\t.short\t0\n\t.long\tL_OBJC_CLASS_Derived.*\n\t.long\tL_OBJC_CLASS_Base.*\n Running /sw/src/fink.build/gcc4-4.1.9999-20060930/gcc-4.2-20060930/gcc/testsuite/objc.dg/gnu-encoding/gnu-encoding.exp ... FAIL: objc.dg-struct-layout-encoding-1/t001_main.m execution test FAIL: objc.dg-struct-layout-encoding-1/t002_main.m execution test FAIL: objc.dg-struct-layout-encoding-1/t003_main.m execution test FAIL: objc.dg-struct-layout-encoding-1/t004_main.m execution test FAIL: objc.dg-struct-layout-encoding-1/t005_main.m execution test FAIL: objc.dg-struct-layout-encoding-1/t006_main.m execution test FAIL: objc.dg-struct-layout-encoding-1/t007_main.m execution test FAIL: objc.dg-struct-layout-encoding-1/t008_main.m execution test FAIL: objc.dg-struct-layout-encoding-1/t009_main.m execution test FAIL: objc.dg-struct-layout-encoding-1/t010_main.m execution test FAIL: objc.dg-struct-layout-encoding-1/t011_main.m execution test FAIL: objc.dg-struct-layout-encoding-1/t012_main.m execution test FAIL: objc.dg-struct-layout-encoding-1/t013_main.m execution test FAIL: objc.dg-struct-layout-encoding-1/t014_main.m execution test FAIL: objc.dg-struct-layout-encoding-1/t015_main.m execution test FAIL: objc.dg-struct-layout-encoding-1/t016_main.m execution test FAIL: objc.dg-struct-layout-encoding-1/t017_main.m execution test FAIL: objc.dg-struct-layout-encoding-1/t018_main.m execution test FAIL: objc.dg-struct-layout-encoding-1/t019_main.m execution test FAIL: objc.dg-struct-layout-encoding-1/t020_main.m execution test FAIL: objc.dg-struct-layout-encoding-1/t021_main.m execution test FAIL: objc.dg-struct-layout-encoding-1/t022_main.m execution test FAIL: objc.dg-struct-layout-encoding-1/t023_main.m execution test FAIL: objc.dg-struct-layout-encoding-1/t024_main.m execution test Running /sw/src/fink.build/gcc4-4.1.9999-20060930/gcc-4.2-20060930/gcc/testsuite/objc.dg/special/special.exp ... FAIL: objc.dg/special/unclaimed-category-1.m unclaimed-category-1a.o execution test === objc Summary === # of expected passes 2942 # of unexpected failures 43 # of expected failures 7 # of unresolved testcases 1 # of unsupported tests 2 /sw/src/fink.build/gcc4-4.1.9999-20060930/darwin_objdir/gcc/xgcc version 4.2.0 20060930 (experimental) Not to shabby for a first pass. Jack