mirror of
https://github.com/gentoo-mirror/guru.git
synced 2026-07-19 03:53:22 -04:00
dev-util/xrt: new package, add 202610.2.21.21, 999999
See also: https://wiki.gentoo.org/wiki/User:Lockal/AMDXDNA Signed-off-by: Sv. Lockal <lockalsash@gmail.com>
This commit is contained in:
21
dev-util/xrt/files/aiebu-no-downloads.patch
Normal file
21
dev-util/xrt/files/aiebu-no-downloads.patch
Normal file
@@ -0,0 +1,21 @@
|
||||
Fix for network-isolated builds
|
||||
--- a/specification/CMakeLists.txt
|
||||
+++ b/specification/CMakeLists.txt
|
||||
@@ -1,5 +1,6 @@
|
||||
# SPDX-License-Identifier: MIT
|
||||
# Copyright (C) 2023 Advanced Micro Devices, Inc.
|
||||
+if(NOT SPEC_TOOL_DEPS_DOWNLOADED)
|
||||
if (${CMAKE_SYSTEM_NAME} STREQUAL "Linux")
|
||||
add_custom_target(spec-tool-deps
|
||||
COMMAND wget -q -O markdown_graphviz_svg.py
|
||||
@@ -15,6 +16,10 @@ else()
|
||||
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
|
||||
)
|
||||
endif()
|
||||
+else()
|
||||
+ add_custom_target(spec-tool-deps)
|
||||
+endif()
|
||||
+
|
||||
|
||||
set(SPEC_PYTHON_PATH ${CMAKE_CURRENT_BINARY_DIR})
|
||||
|
||||
57
dev-util/xrt/files/xrt-202520.2.20.172-modern-protobuf.patch
Normal file
57
dev-util/xrt/files/xrt-202520.2.20.172-modern-protobuf.patch
Normal file
@@ -0,0 +1,57 @@
|
||||
Use modern way of linking to protobuf, otherwise it fails on abseil.
|
||||
Old way requires to propagate abseil micro-libraries via INTERFACE dependencies.
|
||||
--- a/src/runtime_src/core/tools/xbtracer/CMakeLists.txt
|
||||
+++ b/src/runtime_src/core/tools/xbtracer/CMakeLists.txt
|
||||
@@ -10,7 +10,7 @@ else (POLICY CMP0144)
|
||||
return()
|
||||
endif ()
|
||||
|
||||
-find_package(Protobuf)
|
||||
+find_package(Protobuf CONFIG)
|
||||
if (NOT Protobuf_FOUND)
|
||||
message("Protobuf is not found, skipping xbtracer")
|
||||
return()
|
||||
@@ -31,12 +31,10 @@ file(GLOB PROTO_SRC_FILES
|
||||
"${CMAKE_CURRENT_SOURCE_DIR}/src/*.proto"
|
||||
)
|
||||
|
||||
-PROTOBUF_GENERATE_CPP(ProtoSources ProtoHeaders ${PROTO_SRC_FILES})
|
||||
-
|
||||
-add_custom_target(xbtracer_generated_code DEPENDS ${ProtoSources} ${ProtoHeaders})
|
||||
-
|
||||
-add_library(xbtracer_protobuf STATIC ${ProtoSources} ${ProtoHeaders})
|
||||
-add_dependencies(xbtracer_protobuf xbtracer_generated_code)
|
||||
+add_library(xbtracer_protobuf STATIC ${PROTO_SRC_FILES})
|
||||
+protobuf_generate(TARGET xbtracer_protobuf)
|
||||
+target_link_libraries(xbtracer_protobuf PRIVATE protobuf::libprotobuf)
|
||||
+target_include_directories(xbtracer_protobuf PUBLIC ${CMAKE_CURRENT_BINARY_DIR}/src)
|
||||
if (MSVC)
|
||||
target_compile_options(xbtracer_protobuf PRIVATE /wd4244 /wd4267)
|
||||
endif(MSVC)
|
||||
@@ -63,7 +61,7 @@ add_library(xrt_trace SHARED ${XBTRACER_WRAPPER_SRC_FILES} ${ProtoHeaders})
|
||||
set_target_properties(xrt_trace PROPERTIES VERSION ${XRT_VERSION_STRING} SOVERSION ${XRT_SOVERSION})
|
||||
target_compile_definitions(xrt_trace PRIVATE XRT_ABI_VERSION=${XRT_VERSION_MAJOR})
|
||||
|
||||
-target_link_libraries(xrt_trace PRIVATE xbtracer_common xbtracer_protobuf ${Protobuf_LIBRARIES} xrt_coreutil)
|
||||
+target_link_libraries(xrt_trace PRIVATE xbtracer_common xbtracer_protobuf xrt_coreutil)
|
||||
add_dependencies(xrt_trace xbtracer_common xbtracer_protobuf xrt_coreutil)
|
||||
|
||||
file(GLOB XBTRACER_CAPTURE_SRC_FILES
|
||||
@@ -78,7 +76,7 @@ file(GLOB XBREPLAY_SRC_FILES
|
||||
"${CMAKE_CURRENT_SOURCE_DIR}/src/replay/*.cpp"
|
||||
)
|
||||
add_executable(xrt-replay ${XBREPLAY_SRC_FILES})
|
||||
-target_link_libraries(xrt-replay PRIVATE xbtracer_common xbtracer_protobuf ${Protobuf_LIBRARIES} xrt_coreutil)
|
||||
+target_link_libraries(xrt-replay PRIVATE xbtracer_common xbtracer_protobuf xrt_coreutil)
|
||||
if (NOT WIN32)
|
||||
target_link_libraries(xrt-replay PRIVATE pthread)
|
||||
endif (NOT WIN32)
|
||||
@@ -94,7 +92,7 @@ if (XRT_XBTRACER_ENABLE_JSON)
|
||||
add_executable(xbtracer_dump
|
||||
src/misc/xbtracer_dump.cpp
|
||||
)
|
||||
- target_link_libraries(xbtracer_dump PRIVATE xbtracer_common xbtracer_protobuf ${Protobuf_LIBRARIES})
|
||||
+ target_link_libraries(xbtracer_dump PRIVATE xbtracer_common xbtracer_protobuf)
|
||||
add_dependencies(xbtracer_dump xbtracer_common xbtracer_protobuf xrt_coreutil)
|
||||
endif (XRT_XBTRACER_ENABLE_JSON)
|
||||
|
||||
Reference in New Issue
Block a user