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
コミット f2e5ef5617
2個のファイルの変更10行の追加1行の削除
+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*/