Skip to contentSkip to conversation

renderdoc: no need to depend on vim-native

PATCH Applied [email protected] 2 participants 3 messages Dec 21, 2023 – Dec 27, 2023

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 renderdoc: no need to depend on vim-native

From: Ross Burton <[email protected]>

Remove the patch to bring back the user of xxd from vim-native, the patch claimed that the cross-compiling rules were broken. However they work just fine if you tell it what compiler to use, as the default is "c++" and that isn't in HOSTTOOLS.

---
 ...d-instead-of-cross-compiling-shim-bi.patch | 57 -------------------
 .../renderdoc/renderdoc_1.27.bb               |  2 +-
 2 files changed, 1 insertion(+), 58 deletions(-)
 delete mode 100644 meta-oe/recipes-graphics/renderdoc/renderdoc/0001-renderdoc-use-xxd-instead-of-cross-compiling-shim-bi.patch
meta-oe/recipes-graphics/renderdoc/renderdoc/0001-renderdoc-use-xxd-instead-of-cross-compiling-shim-bi.patch deleted +0 -57
deleted file mode 100644
index e96dedfc39..0000000000
@@ -1,57 +0,0 @@
-From 41a8c9b5ac13066770baee476ebf9828371f4dad Mon Sep 17 00:00:00 2001
-From: Adrian Ratiu <[email protected]>
-Date: Tue, 24 Sep 2019 16:07:18 +0300
-Subject: [PATCH] renderdoc: use xxd instead of cross-compiling shim binary
-
-Renderdoc's attempt to cross compile an xxd replacement by directly
-calling a host cross-compiler breaks under OE's recipe specific
-sysroots protection because this is not a native recipe, so we just
-use xxd-native instead.
-
-Upstream-Status: Inappropriate [embedded-specific]
-
----
- renderdoc/CMakeLists.txt | 23 +----------------------
- 1 file changed, 1 insertion(+), 22 deletions(-)
-
-diff --git a/renderdoc/CMakeLists.txt b/renderdoc/CMakeLists.txt
-index 5cb7440a4..453a034ba 100644
---- a/renderdoc/CMakeLists.txt
-+++ b/renderdoc/CMakeLists.txt
-@@ -370,26 +370,6 @@ set(data
- set(data_objects)
- 
- if(UNIX)
--    # If we're cross-compiling, include-bin will get built for the target and we
--    # then can't execute it. Instead, we force calling c++ (which we can safely
--    # assume is present) directly to build the binary
--
--    if(CMAKE_CROSSCOMPILING)
--        set(HOST_NATIVE_CPP_COMPILER c++ CACHE STRING "Command to run to compile a .cpp into an executable. Default is just c++")
--
--        add_custom_command(OUTPUT ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/include-bin
--            WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
--            COMMAND ${CMAKE_COMMAND} -E make_directory ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}
--            COMMAND ${HOST_NATIVE_CPP_COMPILER} 3rdparty/include-bin/main.cpp -o ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/include-bin
--            DEPENDS 3rdparty/include-bin/main.cpp)
--        set(INCLUDE_BIN_EXE "${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/include-bin")
--        set(INCLUDE_BIN_DEP "${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/include-bin")
--    else()
--        add_executable(include-bin 3rdparty/include-bin/main.cpp)
--        set(INCLUDE_BIN_EXE $<TARGET_FILE:include-bin>)
--        set(INCLUDE_BIN_DEP include-bin)
--    endif()
--
-     foreach(res ${data})
-         set(in ${res})
-         set(working_dir ${CMAKE_CURRENT_SOURCE_DIR})
-@@ -399,8 +379,7 @@ if(UNIX)
-         add_custom_command(OUTPUT ${out_src}
-             WORKING_DIRECTORY ${working_dir}
-             COMMAND ${CMAKE_COMMAND} -E make_directory ${out_src_dir}
--            COMMAND ${INCLUDE_BIN_EXE} ${in} ${out_src}
--            DEPENDS ${INCLUDE_BIN_DEP}
-+            COMMAND xxd -i ${in} ${out_src}
-             DEPENDS ${res})
- 
-         list(APPEND data_objects ${out_src})
meta-oe/recipes-graphics/renderdoc/renderdoc_1.27.bb +1 -1
index 112f0ddcbe..58f2275736 100644
@@ -7,7 +7,6 @@ LIC_FILES_CHKSUM = "file://LICENSE.md;md5=36d34a46cb71546195d2b0c626a52e5d"
 SRCREV = "35b13a8e8fd2a331854dba6da81a20452e142d6f"
 SRC_URI = " \
     git://github.com/baldurk/${BPN}.git;protocol=https;branch=v1.x \
-    file://0001-renderdoc-use-xxd-instead-of-cross-compiling-shim-bi.patch \
 "
 S = "${WORKDIR}/git"
 
@@ -32,6 +31,7 @@ EXTRA_OECMAKE += "\
     -DENABLE_PYRENDERDOC=OFF \
     -DENABLE_RENDERDOCCMD=ON \
     -DCMAKE_BUILD_TYPE=Release \
+    -DHOST_NATIVE_CPP_COMPILER="${BUILD_CXX}" \
 "
 
 FILES:${PN} += "${libdir}"
Signature · 1 line
2.34.1
#1 lore raw
Quoted 22 lines · Ross Burton

From: Ross Burton <[email protected]>

Remove the patch to bring back the user of xxd from vim-native, the patch claimed that the cross-compiling rules were broken. However they work just fine if you tell it what compiler to use, as the default is "c++" and that isn't in HOSTTOOLS.

---
 ...d-instead-of-cross-compiling-shim-bi.patch | 57 -------------------
 .../renderdoc/renderdoc_1.27.bb               |  2 +-
 2 files changed, 1 insertion(+), 58 deletions(-)
 delete mode 100644 meta-oe/recipes-graphics/renderdoc/renderdoc/0001-renderdoc-use-xxd-instead-of-cross-compiling-shim-bi.patch
meta-oe/recipes-graphics/renderdoc/renderdoc/0001-renderdoc-use-xxd-instead-of-cross-compiling-shim-bi.patch deleted +0 -1
deleted file mode 100644
index e96dedfc39..0000000000
@@ -1,57 +0,0 @@
-From 41a8c9b5ac13066770baee476ebf9828371f4dad Mon Sep 17 00:00:00 2001

meta-oe/recipes-graphics/renderdoc/renderdoc/0001-renderdoc-use-xxd-instead-of-cross-compiling-shim-bi.patch line 11

Quoted 10 lines
meta-oe/recipes-graphics/renderdoc/renderdoc/0001-renderdoc-use-xxd-instead-of-cross-compiling-shim-bi.patch deleted +0 -10
-From: Adrian Ratiu <[email protected]>
-Date: Tue, 24 Sep 2019 16:07:18 +0300
-Subject: [PATCH] renderdoc: use xxd instead of cross-compiling shim binary
-
-Renderdoc's attempt to cross compile an xxd replacement by directly
-calling a host cross-compiler breaks under OE's recipe specific
-sysroots protection because this is not a native recipe, so we just
-use xxd-native instead.
-
-Upstream-Status: Inappropriate [embedded-specific]

This is nice to remove such patches which are pure technical debt with no upstream path. Thanks.

Quoted 59 lines
meta-oe/recipes-graphics/renderdoc/renderdoc/0001-renderdoc-use-xxd-instead-of-cross-compiling-shim-bi.patch deleted +0 -46
-
----
- renderdoc/CMakeLists.txt | 23 +----------------------
- 1 file changed, 1 insertion(+), 22 deletions(-)
-
-diff --git a/renderdoc/CMakeLists.txt b/renderdoc/CMakeLists.txt
-index 5cb7440a4..453a034ba 100644
---- a/renderdoc/CMakeLists.txt
-+++ b/renderdoc/CMakeLists.txt
-@@ -370,26 +370,6 @@ set(data
- set(data_objects)
-
- if(UNIX)
--    # If we're cross-compiling, include-bin will get built for the target and we
--    # then can't execute it. Instead, we force calling c++ (which we can safely
--    # assume is present) directly to build the binary
--
--    if(CMAKE_CROSSCOMPILING)
--        set(HOST_NATIVE_CPP_COMPILER c++ CACHE STRING "Command to run to compile a .cpp into an executable. Default is just c++")
--
--        add_custom_command(OUTPUT ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/include-bin
--            WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
--            COMMAND ${CMAKE_COMMAND} -E make_directory ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}
--            COMMAND ${HOST_NATIVE_CPP_COMPILER} 3rdparty/include-bin/main.cpp -o ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/include-bin
--            DEPENDS 3rdparty/include-bin/main.cpp)
--        set(INCLUDE_BIN_EXE "${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/include-bin")
--        set(INCLUDE_BIN_DEP "${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/include-bin")
--    else()
--        add_executable(include-bin 3rdparty/include-bin/main.cpp)
--        set(INCLUDE_BIN_EXE $<TARGET_FILE:include-bin>)
--        set(INCLUDE_BIN_DEP include-bin)
--    endif()
--
-     foreach(res ${data})
-         set(in ${res})
-         set(working_dir ${CMAKE_CURRENT_SOURCE_DIR})
-@@ -399,8 +379,7 @@ if(UNIX)
-         add_custom_command(OUTPUT ${out_src}
-             WORKING_DIRECTORY ${working_dir}
-             COMMAND ${CMAKE_COMMAND} -E make_directory ${out_src_dir}
--            COMMAND ${INCLUDE_BIN_EXE} ${in} ${out_src}
--            DEPENDS ${INCLUDE_BIN_DEP}
-+            COMMAND xxd -i ${in} ${out_src}
-             DEPENDS ${res})
-
-         list(APPEND data_objects ${out_src})
meta-oe/recipes-graphics/renderdoc/renderdoc_1.27.bb +0 -1
index 112f0ddcbe..58f2275736 100644
@@ -7,7 +7,6 @@ LIC_FILES_CHKSUM = "file://LICENSE.md;md5=36d34a46cb71546195d2b0c626a52e5d"
 SRCREV = "35b13a8e8fd2a331854dba6da81a20452e142d6f"
 SRC_URI = " \
     git://github.com/baldurk/${BPN}.git;protocol=https;branch=v1.x \
-    file://0001-renderdoc-use-xxd-instead-of-cross-compiling-shim-bi.patch \
 "
 S = "${WORKDIR}/git"
 

meta-oe/recipes-graphics/renderdoc/renderdoc_1.27.bb EXTRA_OECMAKE += "\ · line 34

Quoted 4 lines
meta-oe/recipes-graphics/renderdoc/renderdoc_1.27.bb +1 -0
@@ -32,6 +31,7 @@ EXTRA_OECMAKE += "\
     -DENABLE_PYRENDERDOC=OFF \
     -DENABLE_RENDERDOCCMD=ON \
     -DCMAKE_BUILD_TYPE=Release \
+    -DHOST_NATIVE_CPP_COMPILER="${BUILD_CXX}" \

Just double checking here
Does it need to be host toolchain provided cpp or cross cpp ?

Quoted 15 lines
meta-oe/recipes-graphics/renderdoc/renderdoc_1.27.bb +0 -1
 "
 
 FILES:${PN} += "${libdir}"
--

2.34.1

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#107705): https://lists.openembedded.org/g/openembedded-devel/message/107705
Mute This Topic: https://lists.openembedded.org/mt/103298090/1997914
Group Owner: [email protected]
Unsubscribe: https://lists.openembedded.org/g/openembedded-devel/unsub [[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-

Applied
#2 lore raw
In reply to [email protected]
Quoted 6 lines · On Thu, 21 Dec 2023 10:20:15 +0000, [email protected] wrote:

Remove the patch to bring back the user of xxd from vim-native, the patch claimed that the cross-compiling rules were broken. However they work just fine if you tell it what compiler to use, as the default is "c++" and that isn't in HOSTTOOLS.

Applied, thanks!

[1/1] renderdoc: no need to depend on vim-native

      commit: fc035a8c4dc84e7414a5a06a0949c514fdc69531

Best regards,

Signature · 1 line
Khem Raj <[email protected]>