From: Doug Evans Date: Mon, 7 Apr 2014 21:14:03 +0000 (-0700) Subject: Add support to recognize clang. X-Git-Tag: gdb-7.8-release~642 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=5e703181143d5eb3724115e5cbb59a6b294e6222;p=thirdparty%2Fbinutils-gdb.git Add support to recognize clang. * lib/compiler.c: Identify the clang compiler. * lib/compiler.cc: Ditto. --- diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog index bf7c7a65d66..991c4e81485 100644 --- a/gdb/testsuite/ChangeLog +++ b/gdb/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2014-04-07 David Blaikie + + * lib/compiler.c: Identify the clang compiler. + * lib/compiler.cc: Ditto. + 2014-04-03 Yao Qi * 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 afa0e59952c..c28367b209a 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 ee251bc0ff3..79c68b49702 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