SWDEV-323669 - Fix linux arch detection
CMake assumes we're bundling on x86, but for GNU compatible compilers,
we should rely on the compiler target to set the build arch.
For non-gnu compilers, just fall back to assuming x86 (no change).
Signed-off-by: Jeremy Newton <Jeremy.Newton@amd.com>
Change-Id: Iee9794e6f7c3973c781ddaf740ded77f34712c4f
[ROCm/clr commit: f2e5ef5617]
This commit is contained in:
@@ -100,7 +100,6 @@ if(NOT CMAKE_CL_64)
|
||||
endif()
|
||||
|
||||
target_compile_definitions(rocclr PUBLIC
|
||||
ATI_ARCH_X86
|
||||
LITTLEENDIAN_CPU
|
||||
WITH_LIQUID_FLASH=0
|
||||
${AMD_OPENCL_DEFS})
|
||||
|
||||
@@ -21,6 +21,16 @@
|
||||
#ifndef TOP_HPP_
|
||||
#define TOP_HPP_
|
||||
|
||||
#if defined(__GNUC__)
|
||||
#if defined(__arm__) || defined(__aarch64__)
|
||||
#define ATI_ARCH_ARM
|
||||
#elif defined(__x86__) || defined(__x86_64__)
|
||||
#define ATI_ARCH_X86
|
||||
#endif
|
||||
#else /*!__GNUC__*/
|
||||
#define ATI_ARCH_X86
|
||||
#endif /*!__GNUC__*/
|
||||
|
||||
#if defined(ATI_ARCH_ARM)
|
||||
#define __EXPORTED_HEADERS__ 1
|
||||
#endif /*ATI_ARCH_ARM*/
|
||||
|
||||
Reference in New Issue
Block a user