Source: dxvk Version: 2.4-2 Severity: normal X-Debbugs-CC: Guillem Jover <guil...@debian.org>
Dear Maintainer, Guillem pointed out on irc a few potential improvements to the fixes introduced in version 2.4-2: * Use amd64 CFLAGS on all 64 bit architectures, i386 on 32 bits. * Use x86_64-w64-mingw32-objcopy on all 64 bit architectures, i686-w64-mingw32-objcopy on 32 bits. * Do not override DEB_HOST_GNU_CPU in d/strip_debug.sh, use a new variable instead. I have implemented the changes he suggested, please find a patch attached. Emanuele
diff -Nru dxvk-2.4/debian/changelog dxvk-2.4/debian/changelog --- dxvk-2.4/debian/changelog 2024-07-17 04:12:52.000000000 +0200 +++ dxvk-2.4/debian/changelog 2024-07-19 09:58:24.000000000 +0200 @@ -1,3 +1,13 @@ +dxvk (2.4-3) unstable; urgency=medium + + * Use amd64 CFLAGS on all 64 bit architectures, i386 on 32 bits. + * Use x86_64-w64-mingw32-objcopy on all 64 bit architectures, + i686-w64-mingw32-objcopy on 32 bits. + * Do not override DEB_HOST_GNU_CPU in d/strip_debug.sh, use a new variable + instead. + + -- Emanuele Rocca <e...@debian.org> Fri, 19 Jul 2024 09:58:24 +0200 + dxvk (2.4-2) unstable; urgency=medium [Emanuele Rocca] diff -Nru dxvk-2.4/debian/rules dxvk-2.4/debian/rules --- dxvk-2.4/debian/rules 2024-07-17 04:12:52.000000000 +0200 +++ dxvk-2.4/debian/rules 2024-07-19 09:52:02.000000000 +0200 @@ -14,9 +14,14 @@ # fails with: unrecognized option '-z' export DEB_BUILD_MAINT_OPTIONS := hardening=-relro -ifeq ($(DEB_TARGET_ARCH),arm64) +# Use amd64 build flags when building the package on 64 bit architectures, i386 +# otherwise +ifeq ($(DEB_HOST_ARCH_BITS),64) CFLAGS = $(shell dpkg-architecture -aamd64 -f -c dpkg-buildflags --get CFLAGS) CXXFLAGS = $(shell dpkg-architecture -aamd64 -f -c dpkg-buildflags --get CXXFLAGS) +else + CFLAGS = $(shell dpkg-architecture -ai386 -f -c dpkg-buildflags --get CFLAGS) + CXXFLAGS = $(shell dpkg-architecture -ai386 -f -c dpkg-buildflags --get CXXFLAGS) endif LDFLAGS += -flto -Wl,--build-id diff -Nru dxvk-2.4/debian/strip_debug.sh dxvk-2.4/debian/strip_debug.sh --- dxvk-2.4/debian/strip_debug.sh 2024-07-17 04:12:52.000000000 +0200 +++ dxvk-2.4/debian/strip_debug.sh 2024-07-19 09:58:22.000000000 +0200 @@ -33,20 +33,22 @@ # 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 + if [ "${DEB_HOST_ARCH_BITS}" = "64" ]; then + gnu_cpu=x86_64 + else + gnu_cpu=i686 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" + ${gnu_cpu}-w64-mingw32-objcopy --only-keep-debug "$BINARY_FILE" "$DEBUG_FILE" chmod 0644 "$DEBUG_FILE" - ${DEB_HOST_GNU_CPU}-w64-mingw32-strip --remove-section=.comment --remove-section=.note --strip-unneeded "$BINARY_FILE" + ${gnu_cpu}-w64-mingw32-strip --remove-section=.comment --remove-section=.note --strip-unneeded "$BINARY_FILE" # It is not possible to specify a path that does not exist to set the debug link with objcopy. # Instead, using a filename without component directory will trigger a lookup in various locations # including /usr/lib/debug/ cp "$DEBUG_FILE" "${BINARY_FILE_DIR}/${DEBUG_FILE_NAME}" pushd "${BINARY_FILE_DIR}" - ${DEB_HOST_GNU_CPU}-w64-mingw32-objcopy --add-gnu-debuglink "$(basename $DEBUG_FILE_NAME)" "$BINARY_FILE_NAME" + ${gnu_cpu}-w64-mingw32-objcopy --add-gnu-debuglink "$(basename $DEBUG_FILE_NAME)" "$BINARY_FILE_NAME" popd rm "${BINARY_FILE_DIR}/${DEBUG_FILE_NAME}" } @@ -74,5 +76,5 @@ # [...] # (gdb) target remote localhost:2345 -# gdb must be used instead of ${DEB_HOST_GNU_CPU}-w64-mingw32-gdb (else winedbg will have this error: +# gdb must be used instead of ${gnu_cpu}-w64-mingw32-gdb (else winedbg will have this error: # 0108:err:winedbg:packet_query Unhandled query "GetTIBAddr:110"