[med-svn] [Git][med-team/simde][master] 2 commits: Add patch for better altivec support from upstream.
Michael R. Crusoe
gitlab at salsa.debian.org
Fri Sep 4 09:40:27 BST 2020
Michael R. Crusoe pushed to branch master at Debian Med / simde
Commits:
03490ce9 by Michael R. Crusoe at 2020-09-04T08:21:50+02:00
Add patch for better altivec support from upstream.
- - - - -
4ecc0334 by Michael R. Crusoe at 2020-09-04T10:39:59+02:00
release 0.6.0-3
- - - - -
3 changed files:
- debian/changelog
- + debian/patches/altivec.patch
- debian/patches/series
Changes:
=====================================
debian/changelog
=====================================
@@ -1,3 +1,9 @@
+simde (0.6.0-3) unstable; urgency=medium
+
+ * Add patch for better altivec support from upstream.
+
+ -- Michael R. Crusoe <crusoe at debian.org> Fri, 04 Sep 2020 10:39:45 +0200
+
simde (0.6.0-2) unstable; urgency=medium
* Add two patches for 32bit x86 from upstream.
=====================================
debian/patches/altivec.patch
=====================================
@@ -0,0 +1,76 @@
+From: Evan Nemerson <evan at nemerson.com>
+Date: Thu, 3 Sep 2020 17:17:21 -0700
+Subject: [PATCH] features: improve AltiVec keyword collision work-around
+Source: upstream, https://github.com/simd-everywhere/simde/commit/51861662b0719bc293a472cd52395b13d7b30e9e
+Forwarded: not-needed
+
+I think this is version 3 or 4… hopefully this is more reliable.
+
+---
+ simde/simde-features.h | 42 +++++++++++++++++++++++++++++-------------
+ 1 file changed, 29 insertions(+), 13 deletions(-)
+
+diff --git a/simde/simde-features.h b/simde/simde-features.h
+index 2952704c..d234238c 100644
+--- a/simde/simde-features.h
++++ b/simde/simde-features.h
+@@ -304,15 +304,28 @@
+ #define SIMDE_POWER_ALTIVEC_P5_NATIVE
+ #endif
+ #endif
++
+ #if defined(SIMDE_POWER_ALTIVEC_P6_NATIVE)
+- /* stdbool.h conflicts with the bool in altivec.h */
+- #if defined(bool) && !defined(SIMDE_POWER_ALTIVEC_NO_UNDEF_BOOL_)
++ /* AltiVec conflicts with lots of stuff. The bool keyword conflicts
++ * with the bool keyword in C++ and the bool macro in C99+ (defined
++ * in stdbool.h). The vector keyword conflicts with std::vector in
++ * C++ if you are `using std;`.
++ *
++ * Luckily AltiVec allows you to use `__vector`/`__bool`/`__pixel`
++ * instead, but altivec.h will unconditionally define
++ * `vector`/`bool`/`pixel` so we need to work around that.
++ *
++ * Unfortunately this means that if your code uses AltiVec directly
++ * it may break. If this is the case you'll want to define
++ * `SIMDE_POWER_ALTIVEC_NO_UNDEF` before including SIMDe. Or, even
++ * better, port your code to use the double-underscore versions. */
++ #if defined(bool)
+ #undef bool
+ #endif
++
+ #include <altivec.h>
+- /* GCC allows you to undefine these macros to prevent conflicts with
+- * standard types as they become context-sensitive keywords. */
+- #if defined(__cplusplus)
++
++ #if !defined(SIMDE_POWER_ALTIVEC_NO_UNDEF)
+ #if defined(vector)
+ #undef vector
+ #endif
+@@ -322,14 +335,17 @@
+ #if defined(bool)
+ #undef bool
+ #endif
+- #define SIMDE_POWER_ALTIVEC_VECTOR(T) __vector T
+- #define SIMDE_POWER_ALTIVEC_PIXEL __pixel
+- #define SIMDE_POWER_ALTIVEC_BOOL __bool
+- #else
+- #define SIMDE_POWER_ALTIVEC_VECTOR(T) __vector T
+- #define SIMDE_POWER_ALTIVEC_PIXEL __pixel
+- #define SIMDE_POWER_ALTIVEC_BOOL __bool
+- #endif /* defined(__cplusplus) */
++ #endif /* !defined(SIMDE_POWER_ALTIVEC_NO_UNDEF) */
++
++ /* Use these intsead of vector/pixel/bool in SIMDe. */
++ #define SIMDE_POWER_ALTIVEC_VECTOR(T) __vector T
++ #define SIMDE_POWER_ALTIVEC_PIXEL __pixel
++ #define SIMDE_POWER_ALTIVEC_BOOL __bool
++
++ /* Re-define bool if we're using stdbool.h */
++ #if !defined(__cplusplus) && defined(__bool_true_false_are_defined) && !defined(SIMDE_POWER_ALTIVEC_NO_UNDEF)
++ #define bool _Bool
++ #endif
+ #endif
+
+ /* This is used to determine whether or not to fall back on a vector
=====================================
debian/patches/series
=====================================
@@ -1,3 +1,4 @@
32bit_1.patch
32bit_2.patch
+altivec.patch
munit
View it on GitLab: https://salsa.debian.org/med-team/simde/-/compare/8633237c81d29782d0ee2588c56e17665187b986...4ecc033453f2636c17a79cabe1207bb40ad02c23
--
View it on GitLab: https://salsa.debian.org/med-team/simde/-/compare/8633237c81d29782d0ee2588c56e17665187b986...4ecc033453f2636c17a79cabe1207bb40ad02c23
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/20200904/e95ea0d7/attachment-0001.html>
More information about the debian-med-commit
mailing list