Control: tags -1 + patch

On 2024-06-14 10:42, Emanuele Rocca wrote:
>  stderr: x86_64-w64-mingw32-gcc: error: unrecognized command-line option 
> ‘-mbranch-protection=standard’

Please consider applying the attached patch to fix this FTBFS bug by
using CFLAGS as defined for amd64 instead of arm64.

The patch additionally uses x86_64-w64-mingw32-objcopy on arm64 instead
of aarch64-w64-mingw32-objcopy given that the latter does not exist.

Thanks,
  ema
diff -Nru dxvk-2.3.1/debian/changelog dxvk-2.3.1/debian/changelog
--- dxvk-2.3.1/debian/changelog	2024-05-08 09:37:24.000000000 +0000
+++ dxvk-2.3.1/debian/changelog	2024-06-14 11:54:49.000000000 +0000
@@ -1,3 +1,11 @@
+dxvk (2.3.1-1.1) UNRELEASED; urgency=medium
+
+  * Non-maintainer upload.
+  * Use amd64 CFLAGS when building on arm64 (Closes: #1073188).
+  * Use x86_64-w64-mingw32-objcopy on arm64.
+
+ -- Emanuele Rocca <e...@debian.org>  Fri, 14 Jun 2024 13:54:49 +0200
+
 dxvk (2.3.1-1) unstable; urgency=medium
 
   * NUR:
diff -Nru dxvk-2.3.1/debian/rules dxvk-2.3.1/debian/rules
--- dxvk-2.3.1/debian/rules	2024-05-08 09:37:24.000000000 +0000
+++ dxvk-2.3.1/debian/rules	2024-06-14 11:54:49.000000000 +0000
@@ -14,6 +14,11 @@
 # fails with: unrecognized option '-z'
 export DEB_BUILD_MAINT_OPTIONS := hardening=-relro
 
+ifeq ($(DEB_TARGET_ARCH),arm64)
+	CFLAGS = $(shell dpkg-architecture -aamd64 -f -c dpkg-buildflags --get CFLAGS)
+	CXXFLAGS = $(shell dpkg-architecture -aamd64 -f -c dpkg-buildflags --get CXXFLAGS)
+endif
+
 LDFLAGS += -flto -Wl,--build-id
 
 # Meson flags
diff -Nru dxvk-2.3.1/debian/strip_debug.sh dxvk-2.3.1/debian/strip_debug.sh
--- dxvk-2.3.1/debian/strip_debug.sh	2024-05-08 09:37:24.000000000 +0000
+++ dxvk-2.3.1/debian/strip_debug.sh	2024-06-14 11:54:49.000000000 +0000
@@ -33,6 +33,10 @@
     # Sequence made according to dh_strip but using binutils-mingw-w64-x86-64 tools
     # https://salsa.debian.org/debian/debhelper/-/blob/main/dh_strip
 
+    if [ "${DEB_HOST_GNU_CPU}" = "aarch64" ]; then
+	    DEB_HOST_GNU_CPU=x86_64
+    fi
+
     # Note: --compress-debug-sections is not supported by winedbg and will cause a crash
     ${DEB_HOST_GNU_CPU}-w64-mingw32-objcopy --only-keep-debug "$BINARY_FILE" "$DEBUG_FILE"
     chmod 0644 "$DEBUG_FILE"

Reply via email to