mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-06-18 16:53:50 +08:00
gdb/testsuite: enable __INTEL_LLVM_COMPILER preprocessor in get_compiler_info
Intel Next Gen compiler defines preprocessor __INTEL_LLVM_COMPILER and provides version info in __clang_version__ e.g. value: 12.0.0 (icx 2020.10.0.1113). gdb/testsuite/ChangeLog: 2020-12-07 Abdul Basit Ijaz <abdul.b.ijaz@intel.com> * lib/compiler.c: Add Intel next gen compiler pre-processor check. * lib/compiler.cc: Ditto. * lib/fortran.exp (fortran_main): Check Intel next gen compiler in test_compiler_info.
This commit is contained in:

committed by
Andrew Burgess

parent
ff66e8c5be
commit
2026dcfcc0
@ -67,4 +67,13 @@ set icc_major [string range __ICL 0 1]
|
|||||||
set icc_minor [format "%d" [string range __ICL 2 [expr {[string length __ICL] -1}]]]
|
set icc_minor [format "%d" [string range __ICL 2 [expr {[string length __ICL] -1}]]]
|
||||||
set icc_update __INTEL_COMPILER_UPDATE
|
set icc_update __INTEL_COMPILER_UPDATE
|
||||||
set compiler_info [join "icc $icc_major $icc_minor $icc_update" -]
|
set compiler_info [join "icc $icc_major $icc_minor $icc_update" -]
|
||||||
|
#elif defined(__INTEL_LLVM_COMPILER) && defined(__clang_version__)
|
||||||
|
/* Intel Next Gen compiler defines preprocessor __INTEL_LLVM_COMPILER and
|
||||||
|
provides version info in __clang_version__ e.g. value:
|
||||||
|
"12.0.0 (icx 2020.10.0.1113)". */
|
||||||
|
set total_length [string length __clang_version__]
|
||||||
|
set version_start_index [string last "(" __clang_version__]
|
||||||
|
set version_string [string range __clang_version__ $version_start_index+5 $total_length-2]
|
||||||
|
set version_updated_string [string map {. -} $version_string]
|
||||||
|
set compiler_info "intel-$version_updated_string"
|
||||||
#endif
|
#endif
|
||||||
|
@ -55,4 +55,13 @@ set icc_major [string range __ICL 0 1]
|
|||||||
set icc_minor [format "%d" [string range __ICL 2 [expr {[string length __ICL] -1}]]]
|
set icc_minor [format "%d" [string range __ICL 2 [expr {[string length __ICL] -1}]]]
|
||||||
set icc_update __INTEL_COMPILER_UPDATE
|
set icc_update __INTEL_COMPILER_UPDATE
|
||||||
set compiler_info [join "icc $icc_major $icc_minor $icc_update" -]
|
set compiler_info [join "icc $icc_major $icc_minor $icc_update" -]
|
||||||
|
#elif defined(__INTEL_LLVM_COMPILER) && defined(__clang_version__)
|
||||||
|
/* Intel Next Gen compiler defines preprocessor __INTEL_LLVM_COMPILER and
|
||||||
|
provides version info in __clang_version__ e.g. value:
|
||||||
|
"12.0.0 (icx 2020.10.0.1113)". */
|
||||||
|
set total_length [string length __clang_version__]
|
||||||
|
set version_start_index [string last "(" __clang_version__]
|
||||||
|
set version_string [string range __clang_version__ $version_start_index+5 $total_length-2]
|
||||||
|
set version_updated_string [string map {. -} $version_string]
|
||||||
|
set compiler_info "intel-$version_updated_string"
|
||||||
#endif
|
#endif
|
||||||
|
@ -160,7 +160,8 @@ proc fortran_character1 {} {
|
|||||||
proc fortran_main {} {
|
proc fortran_main {} {
|
||||||
if {[test_compiler_info {gcc-4-[012]-*}]
|
if {[test_compiler_info {gcc-4-[012]-*}]
|
||||||
|| [test_compiler_info {gcc-*}]
|
|| [test_compiler_info {gcc-*}]
|
||||||
|| [test_compiler_info {icc-*}]} {
|
|| [test_compiler_info {icc-*}]
|
||||||
|
|| [test_compiler_info {intel-*}]} {
|
||||||
return "MAIN__"
|
return "MAIN__"
|
||||||
} elseif {[test_compiler_info {clang-*}]} {
|
} elseif {[test_compiler_info {clang-*}]} {
|
||||||
return "MAIN_"
|
return "MAIN_"
|
||||||
|
Reference in New Issue
Block a user