Package: bowtie / 1.2.2+dfsg-4

gcc-64bit.patch Patch series | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
Description: Use gcc to determine if an arch is 64-bit
 uname -m is misleading when determining if an arch is 64-bit or not
 - It indicates the _build_ machine's processor which may not be the same as the
   processor the code is being built for (cross compiling).
 - It fails if a 32-bit compiler is used on a 64-bit cpu (eg build i386 packages
   on x86_64). This is common on the mips buildds.
 Therefore ask GCC if this architecture is 64-bit. Using __LP64__ is the easiest
 method, but is not portable and probably only works with GCC and Clang
 unfortunately.
Author: James Cowgill <jcowgill@debian.org>
---
This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
--- bowtie.orig/Makefile
+++ bowtie/Makefile
@@ -162,7 +162,7 @@
 VERSION = $(shell cat VERSION)
 
 BITS=32
-ifneq (,$(filter $(shell uname -m), aarch64 ppc64le x86_64))
+ifeq (1,$(shell echo __LP64__ | $(CC) -P -E -))
 	BITS=64
 endif
 # msys will always be 32 bit so look at the cpu arch instead.