[OpenMP][cmake] Add SPARC support (#142364)
This patch adds SPARC infrastructure to the `openmp` `cmake` files, matching what is done for other architectures. Tested on `sparc-sun-solaris2.11`, `sparcv9-sun-solaris2.11`, `sparc-unknown-linux-gnu`, `sparc64-unknown-linux-gnu`, `i386-pc-solaris2.11`, `amd64-pc-solaris2.11`, `i686-pc-linux-gnu`, and `x86_64-pc-linux-gnu`.
This commit is contained in:
parent
692c5cdb56
commit
3f8827eaba
@ -190,6 +190,8 @@ set(VE FALSE)
|
||||
set(S390X FALSE)
|
||||
set(WASM FALSE)
|
||||
set(PPC FALSE)
|
||||
set(SPARC FALSE)
|
||||
set(SPARCV9 FALSE)
|
||||
if("${LIBOMP_ARCH}" STREQUAL "i386" OR "${LIBOMP_ARCH}" STREQUAL "32") # IA-32 architecture
|
||||
set(IA32 TRUE)
|
||||
elseif("${LIBOMP_ARCH}" STREQUAL "x86_64" OR "${LIBOMP_ARCH}" STREQUAL "32e") # Intel(R) 64 architecture
|
||||
@ -226,6 +228,10 @@ elseif("${LIBOMP_ARCH}" STREQUAL "s390x") # S390x (Z) architecture
|
||||
set(S390X TRUE)
|
||||
elseif("${LIBOMP_ARCH}" STREQUAL "wasm32") # WebAssembly architecture
|
||||
set(WASM TRUE)
|
||||
elseif("${LIBOMP_ARCH}" STREQUAL "sparc") # SPARC architecture
|
||||
set(SPARC TRUE)
|
||||
elseif("${LIBOMP_ARCH}" STREQUAL "sparcv9") # SPARC V9 architecture
|
||||
set(SPARCV9 TRUE)
|
||||
endif()
|
||||
|
||||
# Set some flags based on build_type
|
||||
|
@ -117,6 +117,10 @@ function(libomp_get_legal_arch return_arch_string)
|
||||
set(${return_arch_string} "VE" PARENT_SCOPE)
|
||||
elseif(${S390X})
|
||||
set(${return_arch_string} "S390X" PARENT_SCOPE)
|
||||
elseif(${SPARC})
|
||||
set(${return_arch_string} "SPARC" PARENT_SCOPE)
|
||||
elseif(${SPARCV9})
|
||||
set(${return_arch_string} "SPARCV9" PARENT_SCOPE)
|
||||
else()
|
||||
set(${return_arch_string} "${LIBOMP_ARCH}" PARENT_SCOPE)
|
||||
libomp_warning_say("libomp_get_legal_arch(): Warning: Unknown architecture: Using ${LIBOMP_ARCH}")
|
||||
|
Loading…
x
Reference in New Issue
Block a user