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]

testsuite exp programming issue


    I am trying to adjust the current gcc/gcc/testsuite/lib/objc.exp
to allow it to build against the gnu-objc runtime library in the 
case of -m64 compiles on Darwin8. Unfortunately, I've hit a brick
wall in terms of catching the instance of '-m64' being passed to
the compiler flags. Normally I do this with...

make -k check RUNTESTFLAGS="--target_board=unix'{-m32,-m64}'"

so it comes in on the variations in runtest. The patch should
look like...

--- /Users/howarth/gcc/gcc/testsuite/lib/objc.exp       2006-08-13 14:20:19.000000000 -0400
+++ objc.exp    2006-10-03 22:29:54.000000000 -0400
@@ -130,7 +130,14 @@
     global shlib_ext
 
     set ld_library_path ".:${objc_libgcc_s_path}"
+    if { [istarget "powerpc-apple-darwin8"] && \ 
+        [regexp ".*-m64.*" "$(options)"] }  {
+           lappend options "cflags=-fgnu-runtime"
+           lappend options "libs=-lobjc-gnu"
+      } else {
     lappend options "libs=-lobjc"
+    }
+
     set shlib_ext [get_shlib_extension]
     verbose "shared lib extension: $shlib_ext"
 

however this doesn't manage to detect when '-m64'
is being used in the compile flags. Does anyone have
any hints on how to change...

+        [regexp ".*-m64.*" "$(options)"] }  {

to properly catch the instances when -m64 is being used
in the compilations? Thanks in advance for any help.
               Jack


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