add support-mixed-march.patch
this allows one to rebuild the package with mixed architectures
configurations without hitting a failure to build from source.
Closes: #983930
Étienne Mollier
2 years ago
0 | Description: support mixed machine capabilities without impeding the build | |
1 | This allows one to build the package with almost any combination of machine | |
2 | capabilities. The initial issue was reported against -march=x64-64-v2, but | |
3 | the present patch extends to v3, and probably any combination thrown by a | |
4 | -march=native. The issue seems tied to the way the build process is modified | |
5 | by debian, so may not be very relevant cherry picked upstream. | |
6 | . | |
7 | Diagnostics information is kept around just in case, for convenience. | |
8 | Author: Étienne Mollier <emollier@debian.org> | |
9 | Bug-Debian: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=983930 | |
10 | Forwarded: not-needed | |
11 | Last-Update: 2021-08-21 | |
12 | --- | |
13 | This patch header follows DEP-3: http://dep.debian.net/deps/dep3/ | |
14 | --- kmc.orig/kmer_counter/raduls_avx.cpp | |
15 | +++ kmc/kmer_counter/raduls_avx.cpp | |
16 | @@ -8,7 +8,11 @@ | |
17 | Date : 2019-05-19 | |
18 | */ | |
19 | ||
20 | +#ifdef __AVX2__ | |
21 | +#undef __AVX2__ | |
22 | +#endif | |
23 | + | |
24 | #include "stdafx.h" | |
25 | #include "raduls_impl.h" | |
26 | ||
27 | -// ***** EOF | |
28 | \ No newline at end of file | |
29 | +// ***** EOF | |
30 | --- kmc.orig/kmer_counter/raduls_sse2.cpp | |
31 | +++ kmc/kmer_counter/raduls_sse2.cpp | |
32 | @@ -8,7 +8,17 @@ | |
33 | Date : 2019-05-19 | |
34 | */ | |
35 | ||
36 | +#ifdef __SSE4_1__ | |
37 | +#undef __SSE4_1__ | |
38 | +#endif | |
39 | +#ifdef __AVX__ | |
40 | +#undef __AVX__ | |
41 | +#endif | |
42 | +#ifdef __AVX2__ | |
43 | +#undef __AVX2__ | |
44 | +#endif | |
45 | + | |
46 | #include "stdafx.h" | |
47 | #include "raduls_impl.h" | |
48 | ||
49 | -// ***** EOF | |
50 | \ No newline at end of file | |
51 | +// ***** EOF | |
52 | --- kmc.orig/kmer_counter/raduls_sse41.cpp | |
53 | +++ kmc/kmer_counter/raduls_sse41.cpp | |
54 | @@ -8,7 +8,14 @@ | |
55 | Date : 2019-05-19 | |
56 | */ | |
57 | ||
58 | +#ifdef __AVX__ | |
59 | +#undef __AVX__ | |
60 | +#endif | |
61 | +#ifdef __AVX2__ | |
62 | +#undef __AVX2__ | |
63 | +#endif | |
64 | + | |
65 | #include "stdafx.h" | |
66 | #include "raduls_impl.h" | |
67 | ||
68 | -// ***** EOF | |
69 | \ No newline at end of file | |
70 | +// ***** EOF | |
71 | --- kmc.orig/kmer_counter/raduls_impl.h | |
72 | +++ kmc/kmer_counter/raduls_impl.h | |
73 | @@ -725,12 +725,20 @@ | |
74 | } | |
75 | ||
76 | #if defined(__AVX2__) | |
77 | +#warning "building raduls radix sort for avx2" | |
78 | #define RADULS_RADIX_SORT_FUNNAME RadixSortMSD_AVX2 | |
79 | #elif defined (__AVX__) | |
80 | +#warning "building raduls radix sort for avx" | |
81 | #define RADULS_RADIX_SORT_FUNNAME RadixSortMSD_AVX | |
82 | #elif defined(__SSE4_1__) | |
83 | +#warning "building raduls radix sort for sse4.1" | |
84 | #define RADULS_RADIX_SORT_FUNNAME RadixSortMSD_SSE41 | |
85 | #else | |
86 | +#if defined(__SSE2__) | |
87 | +#warning "building raduls radix sort for sse2" | |
88 | +#else | |
89 | +#warning "building raduls radix sort for debian baseline with simde sse2 compat" | |
90 | +#endif | |
91 | #define RADULS_RADIX_SORT_FUNNAME RadixSortMSD_SSE2 | |
92 | #endif | |
93 |