This is the mail archive of the
gdb-patches@sources.redhat.com
mailing list for the GDB project.
[patch] allow [test_compile_info xlc-*] return true
- From: Paul Gilliam <pgilliam at us dot ibm dot com>
- To: gdb-patches at sources dot redhat dot com
- Date: Thu, 3 Mar 2005 15:23:11 -0800
- Subject: [patch] allow [test_compile_info xlc-*] return true
- Reply-to: pgilliam at us dot ibm dot com
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