This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

RE: objc linkage problems on Darwin PPC with -m64


    Another observation regarding the previous failure I
reported in the objc testsuite. If I manually execute...

/sw/src/fink.build/gcc4-4.1.9999-20060915/darwin_objdir/gcc/xgcc -B/sw/src/fink.build/gcc4-4.1.9999-20060915/darwin_objdir/gcc/ /sw/src/fink.build/gcc4-4.1.9999-20060915/gcc-4.2-20060915/gcc/testsuite/objc/execute/exceptions/catchall-1.m -w -O0 -fobjc-exceptions /sw/src/fink.build/gcc4-4.1.9999-20060915/darwin_objdir/powerpc-apple-darwin8/ppc64/libobjc/.libs/libobjc-gnu.2.0.0.dylib -lm -m64 -o catchall-1.x0
Undefined symbols:
  _objc_exception_try_exit, referenced from:
      _test in ccxxZxk2.o
  _objc_exception_extract, referenced from:
      _test in ccxxZxk2.o
      _test in ccxxZxk2.o
  .objc_class_name_Object, referenced from:
      literal-pointer@__OBJC@__cls_refs@Object in ccxxZxk2.o
      .objc_class_name_Frob in ccxxZxk2.o
  _objc_exception_try_enter, referenced from:
      _test in ccxxZxk2.o
      _test in ccxxZxk2.o
  _objc_msgSend, referenced from:
      _test in ccxxZxk2.o
  _objc_exception_match, referenced from:
      _test in ccxxZxk2.o
ld64-59.2 failed: symbol(s) not found
collect2: ld returned 1 exit status

I get that error instead. So while we still end up with a linker error, we at
least end up linking against the libobjc we actually built (which has a different
base name). 
    I do notice that the correct path is provided for linking in -lobjc at -m32,
HOWEVER the ***WRONG**** basename is used. So I think we are currently testing
all of the objc testsuite against the Apple supplied libobjc and NOT the proper
libobjc-gnu one built.

testcase /sw/src/fink.build/gcc4-4.1.9999-20060915/gcc-4.2-20060915/gcc/testsuite/objc/compile/compile.exp completed in 8
 seconds
Running /sw/src/fink.build/gcc4-4.1.9999-20060915/gcc-4.2-20060915/gcc/testsuite/objc/execute/exceptions/exceptions.exp .
..
set_ld_library_path_env_vars: ld_library_path=.::/sw/src/fink.build/gcc4-4.1.9999-20060915/darwin_objdir/gcc:/sw/src/fink
.build/gcc4-4.1.9999-20060915/darwin_objdir/gcc:/sw/src/fink.build/gcc4-4.1.9999-20060915/darwin_objdir/powerpc-apple-dar
win8/./libobjc/.libs
Executing on host: /sw/src/fink.build/gcc4-4.1.9999-20060915/darwin_objdir/gcc/xgcc -B/sw/src/fink.build/gcc4-4.1.9999-20
060915/darwin_objdir/gcc/ /sw/src/fink.build/gcc4-4.1.9999-20060915/gcc-4.2-20060915/gcc/testsuite/objc/execute/exception
s/catchall-1.m  -w  -O0  -fgnu-runtime -fobjc-exceptions -I/sw/src/fink.build/gcc4-4.1.9999-20060915/gcc-4.2-20060915/gcc
/testsuite/../../libobjc -L/sw/src/fink.build/gcc4-4.1.9999-20060915/darwin_objdir/powerpc-apple-darwin8/./libobjc/.libs 
 -lobjc -lm   -m32 -o /sw/src/fink.build/gcc4-4.1.9999-20060915/darwin_objdir/gcc/testsuite/objc/catchall-1.x0    (timeou
t = 300)
PASS: objc/execute/exceptions/catchall-1.m compilation,  -O0  -fgnu-runtime
Setting LD_LIBRARY_PATH to .::/sw/src/fink.build/gcc4-4.1.9999-20060915/darwin_objdir/gcc:/sw/src/fink.build/gcc4-4.1.999
9-20060915/darwin_objdir/gcc:/sw/src/fink.build/gcc4-4.1.9999-20060915/darwin_objdir/powerpc-apple-darwin8/./libobjc/.lib
s:.::/sw/src/fink.build/gcc4-4.1.9999-20060915/darwin_objdir/gcc:/sw/src/fink.build/gcc4-4.1.9999-20060915/darwin_objdir/
gcc:/sw/src/fink.build/gcc4-4.1.9999-20060915/darwin_objdir/powerpc-apple-darwin8/./libobjc/.libs
receivePort = 0x0
sendPort = 0xffffffff
cleanupPorts = 1
---
receivePort = 0xffffffff
sendPort = 0xffffffff
cleanupPorts = 1
---
receivePort = 0x0
sendPort = 0x0
cleanupPorts = 0
---
Exception caught by correct handler.
receivePort = 0x0 (expected 0x0)
sendPort = 0x0 (expected 0x0)
cleanupPorts = 0 (expected 0)
---PASS: objc/execute/exceptions/catchall-1.m execution,  -O0  -fgnu-runtime

I'll file a PR now for both problems.
          Jack


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]