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
이 커밋은 다음에 포함됨:
Jeremy Newton
2022-02-17 09:05:56 -05:00
부모 c1858dc39e
커밋 f2e5ef5617
2개의 변경된 파일10개의 추가작업 그리고 1개의 파일을 삭제
-1
파일 보기
@@ -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})
+10
파일 보기
@@ -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*/