[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#947828: freedv FTBFS on most architectures, unconditionally uses x86 asm for avx detection.



After consulting with upstream (who approved my patch and said they intend to apply it upstream) I have gone ahead with the NMU. Final debdiff is attached.



diff -Nru freedv-1.4/debian/changelog freedv-1.4/debian/changelog
--- freedv-1.4/debian/changelog	2019-11-18 03:32:07.000000000 +0000
+++ freedv-1.4/debian/changelog	2020-01-07 10:09:41.000000000 +0000
@@ -1,3 +1,10 @@
+freedv (1.4-1.1) unstable; urgency=medium
+
+  * Non-maintainer upload.
+  * Put x86 specific code behind ifdefs (Closes: 947828).
+
+ -- Peter Michael Green <plugwash@debian.org>  Tue, 07 Jan 2020 10:09:41 +0000
+
 freedv (1.4-1) unstable; urgency=medium
 
   * New upstream release
diff -Nru freedv-1.4/debian/patches/put-x86-specific-code-behind-ifdefs freedv-1.4/debian/patches/put-x86-specific-code-behind-ifdefs
--- freedv-1.4/debian/patches/put-x86-specific-code-behind-ifdefs	1970-01-01 00:00:00.000000000 +0000
+++ freedv-1.4/debian/patches/put-x86-specific-code-behind-ifdefs	2020-01-07 10:09:35.000000000 +0000
@@ -0,0 +1,27 @@
+Description: Put x86 specific code behind ifdefs.
+Author: Peter Michael Green <plugwash@debian.org>
+
+--- freedv-1.4.orig/src/fdmdv2_main.cpp
++++ freedv-1.4/src/fdmdv2_main.cpp
+@@ -4496,6 +4496,8 @@ void MainFrame::CloseSerialPort(void)
+ // Tests the underlying platform for AVX support.  2020 needs AVX support to run
+ // in real-time, and old processors do not offer AVX support
+ //
++#if defined(__x86_64__) || defined(_M_X64) || defined(__i386) || defined(_M_IX86)
++
+ void __cpuid(int* cpuinfo, int info)
+ {
+     __asm__ __volatile__(
+@@ -4538,6 +4540,12 @@ void MainFrame::checkAvxSupport(void)
+ 
+     isAvxPresent = avxSupported;
+ }
++#else
++void MainFrame::checkAvxSupport(void)
++{
++    isAvxPresent = false;
++}
++#endif
+ 
+ #ifdef __UDP_SUPPORT__
+ 
diff -Nru freedv-1.4/debian/patches/series freedv-1.4/debian/patches/series
--- freedv-1.4/debian/patches/series	2019-11-18 03:32:07.000000000 +0000
+++ freedv-1.4/debian/patches/series	2020-01-07 10:09:35.000000000 +0000
@@ -2,3 +2,4 @@
 HID-PTT
 debian-version
 optional-lpcnetfreedv
+put-x86-specific-code-behind-ifdefs

Reply to: