+C void gmp_x86check_workaround_apple_ld_bug() +C +C Apple ld has an annoying bug that causes it to only load members from +C static archives that satisfy text symbol dependencies. This procedure +C creates a bogus dependency on a text symbol in x86check.o (in libtests.a) +C to ensure that ld loads it, also making all of the needed non-text +C symbols available. + +PROLOGUE(gmp_x86check_workaround_apple_ld_bug) + jmp *G(calling_conventions_check) +EPILOGUE()
これを当てれば、./configure && make && make check が問題なく通るようになりました。 これから、このgmpを使ってgfortranを作って、SADの方を試してみます。
% cat test.sad % % ./gs GNU gdb 6.3.50-20050815 (Apple version gdb-467) (Wed Mar 22 19:04:00 GMT 2006) Copyright 2004 Free Software Foundation, Inc. GDB is free software, covered by the GNU General Public License, and you are welcome to change it and/or distribute copies of it under certain conditions. Type "show copying" to see the conditions. There is absolutely no warranty for GDB. Type "show warranty" for details. This GDB was configured as "i386-apple-darwin"...Reading symbols for shared libraries .... done
(gdb) run -c test.sad Starting program: /Users/yosimoto/SAD/src/oldsad-amorita-snapshot-557/obj/i386-Darwin8/sad1.exe -c test.sad Reading symbols for shared libraries .++ done
Program received signal EXC_BAD_INSTRUCTION, Illegal instruction/operand. 0x8fe136e4 in __dyld_stub_binding_helper_interface () (gdb) bt #0 0x8fe136e4 in __dyld_stub_binding_helper_interface () #1 0x00001000 in ?? () #2 0x001ac9d2 in main (argc=3, argv=0xbffff624) at ../../../gcc/libgfortran/fmain.c:18 (gdb) up #1 0x00001000 in ?? () (gdb) up #2 0x001ac9d2 in main (argc=3, argv=0xbffff624) at ../../../gcc/libgfortran/fmain.c:18 18 MAIN__ (); (gdb) l 13 /* Set up the runtime environment. */ 14 set_args (argc, argv); 15 16 /* Call the Fortran main program. Internally this is a function 17 called MAIN__ */ 18 MAIN__ (); 19 20 /* Bye-bye! */ 21 return 0; 22 } (gdb) quit The program is running. Exit anyway? (y or n) y
% make check-f95 Making a new config file... echo "set tmpdir /Users/yosimoto/src/obj/gcc/testsuite" >> ./tmp0 test -d testsuite || mkdir testsuite test -d testsuite/gfortran || mkdir testsuite/gfortran (rootme=`${PWDCMD-pwd}`; export rootme; \ srcdir=`cd ../../gcc/gcc; ${PWDCMD-pwd}` ; export srcdir ; \ cd testsuite/gfortran; \ rm -f tmp-site.exp; \ sed '/set tmpdir/ s|testsuite|testsuite/gfortran|' \ < ../../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 gfortran ) WARNING: Couldn't find the global config file. Test Run By yosimoto on Thu Apr 20 14:07:42 2006 Native configuration is i386-apple-darwin8.6.1
=== gfortran tests ===
Schedule of variations: unix
Running target unix Using /usr/pkg/share/dejagnu/baseboards/unix.exp as board description file for target. Using /usr/pkg/share/dejagnu/config/unix.exp as generic interface file for target. Using /Users/yosimoto/src/gcc/gcc/testsuite/config/default.exp as tool-and-target-specific interface file. Running /Users/yosimoto/src/gcc/gcc/testsuite/gfortran.dg/dg.exp ... FAIL: gfortran.dg/assign_2.f90 -O0 (test for excess errors) Running /Users/yosimoto/src/gcc/gcc/testsuite/gfortran.dg/gomp/gomp.exp ... Running /Users/yosimoto/src/gcc/gcc/testsuite/gfortran.dg/vect/vect.exp ... Running /Users/yosimoto/src/gcc/gcc/testsuite/gfortran.fortran-torture/compile/compile.exp ... Running /Users/yosimoto/src/gcc/gcc/testsuite/gfortran.fortran-torture/execute/execute.exp ...
=== gfortran Summary ===
# of expected passes 12821 # of unexpected failures 1 # of expected failures 7 # of unresolved testcases 1 # of unsupported tests 46 /Users/yosimoto/src/obj/gcc/testsuite/gfortran/../../gfortran version 4.2.0 20060420 (experimental)