This is the mail archive of the 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]

[PATCH] Fix objc testsuite and non installed libobjc on darwin

When testing with -fgnu-runtime, the testsuite will not pick up the just compiled 
libobjc because it looks for libobjc.a instead of libobjc-gnu.a which is what
GNU libobjc is called on Darwin.  This patch looks for libobjc-gnu.a also
when -fgnu-runtime is passed in.

OK?  Tested on powerpc-apple-darwin with all my previous patches applied with
no regressions in objc plus now you do not have installed libobjc before testing
the GNU runtime.

Here is the GNU runtime results on darwin (the failures are all due to the fact the
tests are invalid for the GNU runtime but enabled for unconditionally for *-*-darwin*).

                === objc tests ===

Running target unix/-fgnu-runtime
FAIL: objc.dg/bitfield-2.m execution test
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-4.m execution test
FAIL: objc.dg/encode-1.m execution test
FAIL: objc.dg/image-info.m (test for excess errors)
ERROR: objc.dg/image-info.m: error executing dg-final: couldn't open "image-info.s": no such file or directory
UNRESOLVED: objc.dg/image-info.m: error executing dg-final: couldn't open "image-info.s": no such file or directory
FAIL: objc.dg/method-4.m scan-assembler _OBJC_CLASS_REFERENCES_0
FAIL: objc.dg/selector-1.m  (test for warnings, line 22)
FAIL: objc.dg/selector-1.m (test for excess errors)
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/try-catch-1.m (test for excess errors)
FAIL: objc.dg/try-catch-2.m  (test for warnings, line 75)
FAIL: objc.dg/try-catch-2.m (test for excess errors)
WARNING: objc.dg/try-catch-2.m compilation failed to produce executable
FAIL: objc.dg/try-catch-3.m (test for excess errors)
FAIL: objc.dg/try-catch-4.m (test for excess errors)
FAIL: objc.dg/zero-link-1.m scan-assembler objc_getClass
FAIL: objc.dg/zero-link-2.m scan-assembler _OBJC_CLASS_REFERENCES_0

                === objc Summary ===

# of expected passes            1398
# of unexpected failures        17
# of unresolved testcases       1

Andrew Pinski

        * lib/objc.exp (objc_target_compile): Look for libobjc-gnu.a also when
        -fgnu-runtime is passed.


Index: objc.exp
RCS file: /cvs/gcc/gcc/gcc/testsuite/lib/objc.exp,v
retrieving revision 1.23
diff -u -p -r1.23 objc.exp
--- objc.exp    7 Jun 2004 08:48:31 -0000       1.23
+++ objc.exp    14 Jun 2004 14:24:25 -0000
@@ -173,7 +173,14 @@ proc objc_target_compile { source dest t
     # at it (and associated headers).
     set objcpath "[get_multilibs]"
     set libobjc_dir [lookfor_file ${objcpath} libobjc/.libs/libobjc.a]
+    if { $libobjc_dir == ""} {
+      verbose "see if we have -fgnu-runtime in [target_info name]"
+      if [regexp ".*-fgnu-runtime.*" [target_info name]] {
+        set libobjc_dir [lookfor_file ${objcpath} libobjc/.libs/libobjc-gnu.a]
+      }
+    }
     if { $libobjc_dir != "" } {
        set objc_include_dir "${srcdir}/../../libobjc"
        lappend options "additional_flags=-I${objc_include_dir}"

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