diff --git a/changes.txt b/changes.txt new file mode 100644 index 0000000000..978644c382 --- /dev/null +++ b/changes.txt @@ -0,0 +1,25 @@ +/third-party/sysdeps/linux/amd-mesa/CMakeLists.txt +/third-party/sysdeps/linux/libdrm/CMakeLists.txt +/third-party/sysdeps/linux/libpciaccess/CMakeLists.txt + #Remove this line + -Wl,--version-script=${CMAKE_CURRENT_SOURCE_DIR}/version.lds + + +/core/CMakeLists.txt + # This provides the precise parent boundary path for + "-DCMAKE_CXX_FLAGS=-I${CMAKE_BINARY_DIR}/third-party/simde/source" + "-DCMAKE_C_FLAGS=-I${CMAKE_BINARY_DIR}/third-party/simde/source" + + +/rocm-systems/projects/rocr-runtime/runtime/hsa-runtime/core/inc/amd_gpu_agent.h +/rocm-systems/projects/rocr-runtime/runtime/hsa-runtime/core/inc/signal.h +/rocm-systems/projects/rocr-runtime/runtime/hsa-runtime/core/util/atomic_helpers.h +/rocm-systems/projects/rocr-runtime/runtime/hsa-runtime/core/util/locks.h +/rocm-systems/projects/rocr-runtime/runtime/hsa-runtime/core/util/utils.h + + #if defined(__aarch64__) && defined(__linux__) + #ifndef SIMDE_ENABLE_NATIVE_ALIASES + #define SIMDE_ENABLE_NATIVE_ALIASES + #endif + #include + #endif \ No newline at end of file diff --git a/core/CMakeLists.txt b/core/CMakeLists.txt index c54ee32709..36a1a3d376 100644 --- a/core/CMakeLists.txt +++ b/core/CMakeLists.txt @@ -128,6 +128,9 @@ if(_therock_enable_hsa_runtime) "${_system_toolchain}" CMAKE_ARGS "-DBUILD_SHARED_LIBS=ON" + # This provides the precise parent boundary path for + "-DCMAKE_CXX_FLAGS=-I${CMAKE_BINARY_DIR}/third-party/simde/source" + "-DCMAKE_C_FLAGS=-I${CMAKE_BINARY_DIR}/third-party/simde/source" BUILD_DEPS amd-llvm therock-simde diff --git a/dockerfile b/dockerfile index 68d029b017..96492e6627 100644 --- a/dockerfile +++ b/dockerfile @@ -117,9 +117,6 @@ RUN env INSTALL_PREFIX=/usr/local ./dockerfiles/install_pinned_patchelf.sh && \ -DTHEROCK_ENABLE_SYSDEPS=ON \ -DTHEROCK_BUILD_SYSDEPS=ON \ -DCMAKE_INSTALL_PREFIX=./install && \ - sed -i 's|-Wl,--version-script=\${CMAKE_CURRENT_SOURCE_DIR}/version.lds||' /build/therock/third-party/sysdeps/linux/amd-mesa/CMakeLists.txt && \ - sed -i 's|-Wl,--version-script=\${CMAKE_CURRENT_SOURCE_DIR}/version.lds||' /build/therock/third-party/sysdeps/linux/libdrm/CMakeLists.txt && \ - sed -i 's|-Wl,--version-script=\${CMAKE_CURRENT_SOURCE_DIR}/version.lds||' /build/therock/third-party/sysdeps/linux/libpciaccess/CMakeLists.txt && \ cmake --build build --parallel 1 # Work in progress [ Breaking due to x86 intrinsics not ported to Aarch64 ] diff --git a/rocm-systems/projects/rocr-runtime/runtime/hsa-runtime/core/inc/amd_gpu_agent.h b/rocm-systems/projects/rocr-runtime/runtime/hsa-runtime/core/inc/amd_gpu_agent.h index b98dce9748..4c16a9bb58 100644 --- a/rocm-systems/projects/rocr-runtime/runtime/hsa-runtime/core/inc/amd_gpu_agent.h +++ b/rocm-systems/projects/rocr-runtime/runtime/hsa-runtime/core/inc/amd_gpu_agent.h @@ -69,8 +69,10 @@ #include "pcs/pcs_runtime.h" #include "core/inc/counted_queue_manager.h" -#if defined(__aarch64__) - #define SIMDE_ENABLE_NATIVE_ALIASES +#if defined(__aarch64__) && defined(__linux__) + #ifndef SIMDE_ENABLE_NATIVE_ALIASES + #define SIMDE_ENABLE_NATIVE_ALIASES + #endif #include #endif diff --git a/rocm-systems/projects/rocr-runtime/runtime/hsa-runtime/core/inc/signal.h b/rocm-systems/projects/rocr-runtime/runtime/hsa-runtime/core/inc/signal.h index f0891acd14..70d706e589 100644 --- a/rocm-systems/projects/rocr-runtime/runtime/hsa-runtime/core/inc/signal.h +++ b/rocm-systems/projects/rocr-runtime/runtime/hsa-runtime/core/inc/signal.h @@ -72,8 +72,10 @@ #endif #endif -#if defined(__aarch64__) - #define SIMDE_ENABLE_NATIVE_ALIASES +#if defined(__aarch64__) && defined(__linux__) + #ifndef SIMDE_ENABLE_NATIVE_ALIASES + #define SIMDE_ENABLE_NATIVE_ALIASES + #endif #include #endif diff --git a/rocm-systems/projects/rocr-runtime/runtime/hsa-runtime/core/util/atomic_helpers.h b/rocm-systems/projects/rocr-runtime/runtime/hsa-runtime/core/util/atomic_helpers.h index a82c6e451c..51914dc118 100644 --- a/rocm-systems/projects/rocr-runtime/runtime/hsa-runtime/core/util/atomic_helpers.h +++ b/rocm-systems/projects/rocr-runtime/runtime/hsa-runtime/core/util/atomic_helpers.h @@ -48,8 +48,10 @@ #ifndef HSA_RUNTIME_CORE_UTIL_ATOMIC_HELPERS_H_ #define HSA_RUNTIME_CORE_UTIL_ATOMIC_HELPERS_H_ -#if defined(__aarch64__) - #define SIMDE_ENABLE_NATIVE_ALIASES +#if defined(__aarch64__) && defined(__linux__) + #ifndef SIMDE_ENABLE_NATIVE_ALIASES + #define SIMDE_ENABLE_NATIVE_ALIASES + #endif #include #endif diff --git a/rocm-systems/projects/rocr-runtime/runtime/hsa-runtime/core/util/locks.h b/rocm-systems/projects/rocr-runtime/runtime/hsa-runtime/core/util/locks.h index da82ceac6d..195f4b390b 100644 --- a/rocm-systems/projects/rocr-runtime/runtime/hsa-runtime/core/util/locks.h +++ b/rocm-systems/projects/rocr-runtime/runtime/hsa-runtime/core/util/locks.h @@ -48,8 +48,10 @@ #include "utils.h" #include "os.h" -#if defined(__aarch64__) - #define SIMDE_ENABLE_NATIVE_ALIASES +#if defined(__aarch64__) && defined(__linux__) + #ifndef SIMDE_ENABLE_NATIVE_ALIASES + #define SIMDE_ENABLE_NATIVE_ALIASES + #endif #include #endif diff --git a/rocm-systems/projects/rocr-runtime/runtime/hsa-runtime/core/util/utils.h b/rocm-systems/projects/rocr-runtime/runtime/hsa-runtime/core/util/utils.h index 820b388659..60429d0f6f 100644 --- a/rocm-systems/projects/rocr-runtime/runtime/hsa-runtime/core/util/utils.h +++ b/rocm-systems/projects/rocr-runtime/runtime/hsa-runtime/core/util/utils.h @@ -73,8 +73,10 @@ #include "intrin.h" #endif -#if defined(__aarch64__) - #define SIMDE_ENABLE_NATIVE_ALIASES +#if defined(__aarch64__) && defined(__linux__) + #ifndef SIMDE_ENABLE_NATIVE_ALIASES + #define SIMDE_ENABLE_NATIVE_ALIASES + #endif #include #endif diff --git a/third-party/sysdeps/linux/amd-mesa/CMakeLists.txt b/third-party/sysdeps/linux/amd-mesa/CMakeLists.txt index f85f6b7957..d51f42b3ba 100644 --- a/third-party/sysdeps/linux/amd-mesa/CMakeLists.txt +++ b/third-party/sysdeps/linux/amd-mesa/CMakeLists.txt @@ -111,7 +111,7 @@ add_custom_target( # Step 3: Reconfigure meson to build from patched source # This ensures the build system uses the modified source files "${CMAKE_COMMAND}" -E env - "LDFLAGS=-Wl,-rpath='$$ORIGIN' -Wl,--version-script=${CMAKE_CURRENT_SOURCE_DIR}/version.lds" + "LDFLAGS=-Wl,-rpath='$$ORIGIN'" "CC=${_meson_cc}" "CXX=${_meson_cxx}" --