Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
* gdb/testsuite/compiler.c[c]: Identify clang
@ 2014-04-07 20:39 David Blaikie
  2014-04-07 20:54 ` Doug Evans
  0 siblings, 1 reply; 4+ messages in thread
From: David Blaikie @ 2014-04-07 20:39 UTC (permalink / raw)
  To: gdb-patches, Eric Christopher, Doug Evans

[-- Attachment #1: Type: text/plain, Size: 503 bytes --]

Adding support for the testsuite to correctly identify the clang
compiler (previously it caught the generic GCC detection and was
identified as GCC 4.2).

This reduces some of the test failures when running the suite with
Clang - for example the macro tests no longer run or fail (since
they're only enabled for GCC).

    * compiler.c: identify the clang compiler

(do I need a separate ChangeLog line for compiler.cc too? should the
ChangeLog entry have the full path (gdb/testsuite/lib/compiler.c)?)

[-- Attachment #2: gdb-clang-ver.diff --]
[-- Type: text/plain, Size: 946 bytes --]

diff --git gdb/testsuite/lib/compiler.c gdb/testsuite/lib/compiler.c
index afa0e59..c28367b 100644
--- gdb/testsuite/lib/compiler.c
+++ gdb/testsuite/lib/compiler.c
@@ -73,3 +73,7 @@ set need_a_set [regsub -all {\.} [join {xlc __xlc__} -] - compiler_info]
 #if defined (__ARMCC_VERSION)
 set compiler_info [join {armcc __ARMCC_VERSION} -]
 #endif
+
+#if defined (__clang__)
+set compiler_info [join {clang __clang_major__ __clang_minor__ __clang_patchlevel__} -]
+#endif
diff --git gdb/testsuite/lib/compiler.cc gdb/testsuite/lib/compiler.cc
index ee251bc..79c68b4 100644
--- gdb/testsuite/lib/compiler.cc
+++ gdb/testsuite/lib/compiler.cc
@@ -61,3 +61,7 @@ set need_a_set [regsub -all {\.} [join {xlc __xlc__} -] - compiler_info]
 #if defined (__ARMCC_VERSION)
 set compiler_info [join {armcc __ARMCC_VERSION} -]
 #endif
+
+#if defined (__clang__)
+set compiler_info [join {clang __clang_major__ __clang_minor__ __clang_patchlevel__} -]
+#endif

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2014-04-07 21:16 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-04-07 20:39 gdb/testsuite/compiler.c[c]: Identify clang David Blaikie
2014-04-07 20:54 ` Doug Evans
2014-04-07 21:07   ` David Blaikie
2014-04-07 21:16     ` Doug Evans

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox