File: cross.patch

package info (click to toggle)
rocminfo 6.4.3-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 320 kB
  • sloc: cpp: 980; python: 205; sh: 40; makefile: 9
file content (30 lines) | stat: -rw-r--r-- 1,244 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
From: Helmut Grohne <helmut@subdivi.de>
Date: Fri, 20 Sep 2024 12:00:33 +0800
Subject: rocminfo FTCBFS: confused architecture terminology
Description: rocminfo fails to cross build from source, because it passes invalid
 compiler flags. The detection is broken due to confusing architecture
 terminologies. The system we are building on is called "build" in Debian
 and GNU, but for cmake it is called "host". The system we are building
 for is called "host" in Debian and GNU, but for cmake it is empty (it
 doesn't have a name).
Bug: https://github.com/ROCm/rocminfo/issues/60
Bug-Debian: https://bugs.debian.org/1024611
Reviewed-by: Étienne Mollier <emollier@debian.org>
Last-Update: 2022-11-22
---
 CMakeLists.txt | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -144,8 +144,8 @@
 #
 # Extend the compiler flags for 64-bit builds
 #
-if((${CMAKE_HOST_SYSTEM_PROCESSOR} STREQUAL "x86_64") OR (${CMAKE_HOST_SYSTEM_PROCESSOR} STREQUAL "AMD64"))
-  set(ROCMINFO_CXX_FLAGS ${ROCMINFO_CXX_FLAGS} -m64 -msse -msse2)
+if((${CMAKE_SYSTEM_PROCESSOR} STREQUAL "x86_64") OR (${CMAKE_SYSTEM_PROCESSOR} STREQUAL "AMD64"))
+  set(ROCMINFO_CXX_FLAGS ${ROCMINFO_CXX_FLAGS} -msse -msse2)
 endif()
 
 #