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

[Patch, testsuite]: use gnu-runtime on 64-bit Darwin8


   The attached patch allows the objc testsuites to be run against
the gnu-runtime at -m64 on Darwin8. This is required because Darwin8
is missing a 64-bit next-runtime for objc. The results when using this
patch have been posted...

http://gcc.gnu.org/ml/gcc/2006-10/msg00077.html

Note that the -fgnu-runtime flag is passed on the libs by design
because some of the objc testcases null out the compiler flags and
would cause this flag to be lost if passed on cflags. Okay for
trunk?
                          Jack
ps I plan on submitting a separate patch to fix those failing
testcases which really should be using -fnext-runtime in the
dg-options.

2006-10-04	Jack Howarth  <howarth@bromo.med.uc.edu>

	* lib/obj-c++.exp (obj-c++_target_compile): Use -fgnu-runtime 
	and -lobjc-gnu on Darwin8 at 64-bit.
	* lib/objc.exp (objc_target_compile): Likewise.


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"
 


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