diff options
author | Doug Evans <dje@google.com> | 2014-04-07 14:14:03 -0700 |
---|---|---|
committer | Doug Evans <dje@google.com> | 2014-04-07 14:14:03 -0700 |
commit | 5e703181143d5eb3724115e5cbb59a6b294e6222 (patch) | |
tree | abd3727a2da11bfdd512fce453387e9e4001fafe | |
parent | 17c34b8f3d79369cfb3a3f9d37109a7051bd8ea4 (diff) | |
download | fsf-binutils-gdb-5e703181143d5eb3724115e5cbb59a6b294e6222.zip fsf-binutils-gdb-5e703181143d5eb3724115e5cbb59a6b294e6222.tar.gz fsf-binutils-gdb-5e703181143d5eb3724115e5cbb59a6b294e6222.tar.bz2 |
Add support to recognize clang.
* lib/compiler.c: Identify the clang compiler.
* lib/compiler.cc: Ditto.
-rw-r--r-- | gdb/testsuite/ChangeLog | 5 | ||||
-rw-r--r-- | gdb/testsuite/lib/compiler.c | 4 | ||||
-rw-r--r-- | gdb/testsuite/lib/compiler.cc | 4 |
3 files changed, 13 insertions, 0 deletions
diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog index bf7c7a6..991c4e8 100644 --- a/gdb/testsuite/ChangeLog +++ b/gdb/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2014-04-07 David Blaikie <dblaikie@gmail.com> + + * lib/compiler.c: Identify the clang compiler. + * lib/compiler.cc: Ditto. + 2014-04-03 Yao Qi <yao@codesourcery.com> * gdb.base/setshow.exp: Invoke string_to_regexp to HOME and PWD. diff --git a/gdb/testsuite/lib/compiler.c b/gdb/testsuite/lib/compiler.c index afa0e59..c28367b 100644 --- a/gdb/testsuite/lib/compiler.c +++ b/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 a/gdb/testsuite/lib/compiler.cc b/gdb/testsuite/lib/compiler.cc index ee251bc..79c68b4 100644 --- a/gdb/testsuite/lib/compiler.cc +++ b/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 |