From: Bernhard Heckel <bernhard.heckel@intel.com>
To: qiyaoltc@gmail.com
Cc: gdb-patches@sourceware.org, brobecker@adacore.com,
Bernhard Heckel <bernhard.heckel@intel.com>
Subject: [PATCH V4 1/3] testsuite: Support detection of Intel compilers via test_compiler_version.
Date: Mon, 18 Apr 2016 10:08:00 -0000 [thread overview]
Message-ID: <1460974046-1281-2-git-send-email-bernhard.heckel@intel.com> (raw)
In-Reply-To: <1460974046-1281-1-git-send-email-bernhard.heckel@intel.com>
Add Intel specific preprocessor macros to query the version of the compiler.
2016-04-15 Bernhard Heckel <bernhard.heckel@intel.com>
gdb/Testsuite/Changelog:
* lib/compiler.c: Add Intel specific preprocessor macros.
* lib/compiler.cc: Likewise.
---
gdb/testsuite/lib/compiler.c | 12 ++++++++++++
gdb/testsuite/lib/compiler.cc | 12 ++++++++++++
2 files changed, 24 insertions(+)
mode change 100644 => 100755 gdb/testsuite/lib/compiler.c
mode change 100644 => 100755 gdb/testsuite/lib/compiler.cc
diff --git a/gdb/testsuite/lib/compiler.c b/gdb/testsuite/lib/compiler.c
old mode 100644
new mode 100755
index f2e3062..408435d
--- a/gdb/testsuite/lib/compiler.c
+++ b/gdb/testsuite/lib/compiler.c
@@ -56,3 +56,15 @@ set compiler_info [join {armcc __ARMCC_VERSION} -]
#if defined (__clang__)
set compiler_info [join {clang __clang_major__ __clang_minor__ __clang_patchlevel__} -]
#endif
+
+#if defined (__ICC)
+set icc_major [string range __ICC 0 1]
+set icc_minor [format "%d" [string range __ICC 2 [expr {[string length __ICC] -1}]]]
+set icc_update __INTEL_COMPILER_UPDATE
+set compiler_info [join "icc $icc_major $icc_minor $icc_update" -]
+#elif defined (__ICL)
+set icc_major [string range __ICL 0 1]
+set icc_minor [format "%d" [string range __ICL 2 [expr {[string length __ICL] -1}]]]
+set icc_update __INTEL_COMPILER_UPDATE
+set compiler_info [join "icc $icc_major $icc_minor $icc_update" -]
+#endif
diff --git a/gdb/testsuite/lib/compiler.cc b/gdb/testsuite/lib/compiler.cc
old mode 100644
new mode 100755
index 39761ff..dbe2c6f
--- a/gdb/testsuite/lib/compiler.cc
+++ b/gdb/testsuite/lib/compiler.cc
@@ -44,3 +44,15 @@ set compiler_info [join {armcc __ARMCC_VERSION} -]
#if defined (__clang__)
set compiler_info [join {clang __clang_major__ __clang_minor__ __clang_patchlevel__} -]
#endif
+
+#if defined (__ICC)
+set icc_major [string range __ICC 0 1]
+set icc_minor [format "%d" [string range __ICC 2 [expr {[string length __ICC] -1}]]]
+set icc_update __INTEL_COMPILER_UPDATE
+set compiler_info [join "icc $icc_major $icc_minor $icc_update" -]
+#elif defined (__ICL)
+set icc_major [string range __ICL 0 1]
+set icc_minor [format "%d" [string range __ICL 2 [expr {[string length __ICL] -1}]]]
+set icc_update __INTEL_COMPILER_UPDATE
+set compiler_info [join "icc $icc_major $icc_minor $icc_update" -]
+#endif
--
2.7.1.339.g0233b80
next prev parent reply other threads:[~2016-04-18 10:08 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-04-18 10:07 [PATCH V4 0/3] fortran: Testsuite, fix different type naming across compilers Bernhard Heckel
2016-04-18 10:07 ` [PATCH V4 2/3] Testsuite: Fix compiling of shared libraries with ICC Bernhard Heckel
2016-04-18 10:26 ` Yao Qi
2016-04-18 10:07 ` [PATCH V4 3/3] fortran: Testsuite, fix different type naming across compilers Bernhard Heckel
2016-04-18 10:29 ` Yao Qi
2016-04-18 10:08 ` Bernhard Heckel [this message]
2016-04-18 10:26 ` [PATCH V4 1/3] testsuite: Support detection of Intel compilers via test_compiler_version Yao Qi
2016-04-18 12:17 ` [Pushed][PATCH " Heckel, Bernhard
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1460974046-1281-2-git-send-email-bernhard.heckel@intel.com \
--to=bernhard.heckel@intel.com \
--cc=brobecker@adacore.com \
--cc=gdb-patches@sourceware.org \
--cc=qiyaoltc@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox