This is the mail archive of the gdb-patches@sources.redhat.com mailing list for the GDB 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] allow [test_compile_info xlc-*] return true


The following patch adds a test for IBM's xlc compiler to compiler.c and 
compiler.cc so that xlc will be recognized by 'get_compiler_info' in 
testsuite/lib/gdb.exp.

Ok to commit?

------ cut here ------8<-----------

2004-03-03  Paul Gilliam  <pgilliam@us.ibm.com>

        * lib/compilerc: Add test for IBM's xlc compiler.
        * lib/compiler.cc: Likewise.

diff -Naur testsuite.old/lib/compiler.c testsuite/lib/compiler.c
--- testsuite.old/lib/compiler.c        2005-03-03 15:07:49.361274048 -0800
+++ testsuite/lib/compiler.c    2005-03-03 15:10:24.503253288 -0800
@@ -64,3 +64,9 @@
 #if defined (__HP_aCC)
 set compiler_info [join {hpacc __HP_aCC} -]
 #endif
+
+#if defined (__xlc__)
+/* IBM'x xlc compiler. NOTE:  __xlc__ expands to a double quoted string of 
four
+   numbers seperated by '.'s: currently "7.0.0.0" */
+regsub -all {\.} [join {xlc __xlc__} -] - compiler_info
+#endif
diff -Naur testsuite.old/lib/compiler.cc testsuite/lib/compiler.cc
--- testsuite.old/lib/compiler.cc       2005-03-03 15:07:49.362273896 -0800
+++ testsuite/lib/compiler.cc   2005-03-03 15:10:37.973203216 -0800
@@ -52,3 +52,9 @@
 #if defined (__HP_aCC)
 set compiler_info [join {hpacc __HP_aCC} -]
 #endif
+
+#if defined (__xlc__)
+/* IBM'x xlc compiler. NOTE:  __xlc__ expands to a double quoted string of 
four
+   numbers seperated by '.'s: currently "7.0.0.0" */
+regsub -all {\.} [join {xlc __xlc__} -] - compiler_info
+#endif


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