Commit ecb889f1 authored by Nicholas Breen's avatar Nicholas Breen

patches/20_altivec_kernel.dpatch and others: Shift PPC FTBFS fix to separate...

patches/20_altivec_kernel.dpatch and others: Shift PPC FTBFS fix to separate patch instead.  Give URL of bug reported upstream.
parent af9e1b8a
gromacs (4.0.5-2) UNRELEASED; urgency=low
* debian/rules: Enable -D__restrict__ on powerpc for use in Altivec-
optimized kernels (FTBFS otherwise).
* patches/20_altivec_kernel.dpatch: Resolve FTBFS on AltiVec-enabled
PPC builds caused by use of "restrict" keyword, which GCC does not
normally accept unless in C99 mode. Reported upstream at
http://bugzilla.gromacs.org/show_bug.cgi?id=324
-- Nicholas Breen <nbreen@ofb.net> Mon, 11 May 2009 18:18:50 -0700
......
04_autoconf_mpisuffix.dpatch
05_lt_init.dpatch
11_readme.dpatch
20_altivec_kernel.dpatch
#! /bin/sh /usr/share/dpatch/dpatch-run
## 20_altivec_kernel.dpatch by Nicholas Breen <nbreen@ofb.net>
##
## All lines beginning with `## DP:' are a description of the patch.
## DP: Fix FTBFS on PPC due to "restrict" keyword, which GCC does not
## DP: enable by default. Reported upstream at:
## DP: http://bugzilla.gromacs.org/show_bug.cgi?id=324
@DPATCH@
diff -Nru gromacs-4.0.5.orig/src/gmxlib/nonbonded/nb_kernel_ppc_altivec/ppc_altivec_util.h gromacs-4.0.5/src/gmxlib/nonbonded/nb_kernel_ppc_altivec/ppc_altivec_util.h
--- gromacs-4.0.5.orig/src/gmxlib/nonbonded/nb_kernel_ppc_altivec/ppc_altivec_util.h 2009-05-09 01:26:32.000000000 -0700
+++ gromacs-4.0.5/src/gmxlib/nonbonded/nb_kernel_ppc_altivec/ppc_altivec_util.h 2009-05-17 15:42:03.148542714 -0700
@@ -41,6 +41,13 @@
#include <altivec.h>
#endif
+/* gcc disallows the "restrict" keyword without -std=c99, but __restrict
+ * always works.
+ */
+#ifdef __GNUC__
+#define restrict __restrict
+#endif
+
/** Write contents of a SIMD FP variable on standard out.
*
* @internal
......@@ -27,11 +27,6 @@ ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
CFLAGS += -O0
endif
# Enable "restrict" keyword on PPC/Altivec-specific kernels
ifneq (,$(findstring powerpc,$(DEB_HOST_ARCH)))
CFLAGS += "-Drestrict=__restrict"
endif
COMMON_CONFIG_PARAMS = \
--host=$(DEB_HOST_GNU_TYPE) \
--build=$(DEB_BUILD_GNU_TYPE) \
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment