[med-svn] [Git][med-team/gmap][master] Apply patch from Helmut Grohne for slightly better cross building support. Closes: #980484

Michael R. Crusoe gitlab at salsa.debian.org
Tue Jan 19 19:09:39 GMT 2021



Michael R. Crusoe pushed to branch master at Debian Med / gmap


Commits:
10b06cba by Michael R. Crusoe at 2021-01-19T20:09:28+01:00
Apply patch from Helmut Grohne for slightly better cross building support. Closes: #980484

- - - - -


3 changed files:

- debian/changelog
- + debian/patches/cross
- debian/patches/series


Changes:

=====================================
debian/changelog
=====================================
@@ -1,3 +1,10 @@
+gmap (2020-12-17+ds-3) UNRELEASED; urgency=medium
+
+  * Apply patch from Helmut Grohne for slightly better cross building
+    support. Closes: #980484
+
+ -- Michael R. Crusoe <crusoe at debian.org>  Tue, 19 Jan 2021 20:09:11 +0100
+
 gmap (2020-12-17+ds-2) unstable; urgency=medium
 
   * Team upload.


=====================================
debian/patches/cross
=====================================
@@ -0,0 +1,83 @@
+From: Helmut Grohne <helmut at subdivi.de>
+Subject: Work towards more cross-building support
+Origin: vendor, https://bugs.debian.org/cgi-bin/bugreport.cgi?att=1;bug=980484;filename=cross.patch;msg=5
+--- gmap-2020-12-17+ds.orig/config/builtin-popcount.m4
++++ gmap-2020-12-17+ds/config/builtin-popcount.m4
+@@ -33,29 +33,41 @@
+ # Test for __builtin functions with or without the -mpopcnt compiler flag
+ CFLAGS="$CFLAGS_ORIG $POPCNT_CFLAGS"
+ 
+-AC_MSG_CHECKING(for __builtin_popcount)
++AC_CHECK_DECL([__builtin_popcount],[
++AC_MSG_CHECKING(whether __builtin_popcount works)
+ AC_RUN_IFELSE(
+   [AC_LANG_PROGRAM([[]],
+                    [[return (__builtin_popcount(0xffffffffu) == 32) ? 0 : 9;]])],
+   [AC_MSG_RESULT(yes)
+    AC_DEFINE([HAVE_BUILTIN_POPCOUNT],[1],[Define to 1 if __builtin_popcount works.])],
+-  [AC_MSG_RESULT(no)])
++  [AC_MSG_RESULT(no)],
++  [AC_MSG_RESULT([cross, guessing yes])
++   AC_DEFINE([HAVE_BUILTIN_POPCOUNT],[1],[Define to 1 if __builtin_popcount works.])])
++],[])
+ 
+-AC_MSG_CHECKING(for __builtin_clz)
++AC_CHECK_DECL([__builtin_clz],[
++AC_MSG_CHECKING(whether __builtin_clz works)
+ AC_RUN_IFELSE(
+   [AC_LANG_PROGRAM([[]],
+                    [[return (__builtin_clz(0x1u) == 31) ? 0 : 9;]])],
+   [AC_MSG_RESULT(yes)
+    AC_DEFINE([HAVE_BUILTIN_CLZ],[1],[Define to 1 if __builtin_clz works.])],
+-  [AC_MSG_RESULT(no)])
++  [AC_MSG_RESULT(no)],
++  [AC_MSG_RESULT([cross, guessing yes])
++   AC_DEFINE([HAVE_BUILTIN_CLZ],[1],[Define to 1 if __builtin_clz works.])])
++],[])
+ 
+-AC_MSG_CHECKING(for __builtin_ctz)
++AC_CHECK_DECL([__builtin_ctz],[
++AC_MSG_CHECKING(whether __builtin_ctz works)
+ AC_RUN_IFELSE(
+   [AC_LANG_PROGRAM([[]],
+                    [[return (__builtin_ctz(0x80000000u) == 31) ? 0 : 9;]])],
+   [AC_MSG_RESULT(yes)
+    AC_DEFINE([HAVE_BUILTIN_CTZ],[1],[Define to 1 if __builtin_ctz works.])],
+-  [AC_MSG_RESULT(no)])
++  [AC_MSG_RESULT(no)],
++  [AC_MSG_RESULT([cross, guessing yes])
++   AC_DEFINE([HAVE_BUILTIN_CTZ],[1],[Define to 1 if __builtin_ctz works.])])
++])
+ 
+ CFLAGS=$CFLAGS_ORIG
+ 
+--- gmap-2020-12-17+ds.orig/config/asm-bsr.m4
++++ gmap-2020-12-17+ds/config/asm-bsr.m4
+@@ -4,7 +4,7 @@
+ AC_LANG(C)
+ 
+ AC_MSG_CHECKING(for bsr instruction in assembly)
+-AC_RUN_IFELSE(
++AC_LINK_IFELSE(
+   [AC_LANG_PROGRAM([[ ]],
+                    [[int msb; unsigned int x = rand(); asm("bsr %1,%0" : "=r"(msb) : "r"(x));]])],
+   [AC_MSG_RESULT(yes)
+--- gmap-2020-12-17+ds.orig/config/ax_cpuid_intel.m4
++++ gmap-2020-12-17+ds/config/ax_cpuid_intel.m4
+@@ -1,6 +1,7 @@
+ AC_DEFUN([AX_CPUID_INTEL],
+ [AC_REQUIRE([AC_PROG_CC])
+ AC_LANG_PUSH([C])
++AC_CHECK_HEADER([immintrin.h],[
+ # Test for SSE2 support
+   AC_MSG_CHECKING(for sse2 support)
+   AC_RUN_IFELSE(
+@@ -63,7 +64,7 @@
+         [AC_MSG_RESULT(yes)
+          ax_cv_cpu_has_avx512bw_ext=yes],
+ 	[AC_MSG_RESULT(no)])
+-
++],[])
+ AC_LANG_POP([C])
+ ])
+ 


=====================================
debian/patches/series
=====================================
@@ -2,3 +2,4 @@ only-do-cpuid-on-amd64-i386.patch
 install-data-local
 remove_getopt_code_copy.patch
 #fix-gcc10-build.patch
+cross



View it on GitLab: https://salsa.debian.org/med-team/gmap/-/commit/10b06cba91d10f5c5f5beccaa75e359cd4728de3

-- 
View it on GitLab: https://salsa.debian.org/med-team/gmap/-/commit/10b06cba91d10f5c5f5beccaa75e359cd4728de3
You're receiving this email because of your account on salsa.debian.org.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://alioth-lists.debian.net/pipermail/debian-med-commit/attachments/20210119/b0116d44/attachment-0001.html>


More information about the debian-med-commit mailing list