From 2afbaebc1d61621df901c69f0893adb40f8d57f9 Mon Sep 17 00:00:00 2001 From: q66 Date: Sat, 9 Feb 2019 18:49:47 +0100 Subject: [PATCH] dhewm3: fix build on ppc/ppc64 This disables some altivec bits specific to MacOS on Linux. --- srcpkgs/dhewm3/patches/ppc64.patch | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 srcpkgs/dhewm3/patches/ppc64.patch diff --git a/srcpkgs/dhewm3/patches/ppc64.patch b/srcpkgs/dhewm3/patches/ppc64.patch new file mode 100644 index 00000000000..087cb3973d5 --- /dev/null +++ b/srcpkgs/dhewm3/patches/ppc64.patch @@ -0,0 +1,26 @@ +Fixes build as the altivec bits include a MacOS-specific header. + +Original author: + +--- neo/idlib/math/Simd_AltiVec.cpp 2017-07-12 12:34:33.000000000 +0000 ++++ neo/idlib/math/Simd_AltiVec.cpp 2017-07-12 12:43:51.863029647 +0000 +@@ -45,7 +45,7 @@ + // + //=============================================================== + +-#if defined(__GNUC__) && defined(__ALTIVEC__) ++#if defined(MACOS_X) && defined(__GNUC__) && defined(__ALTIVEC__) + + #ifdef PPC_INTRINSICS + // for square root estimate instruction +--- neo/idlib/math/Simd_AltiVec.h 2017-07-12 12:34:33.000000000 +0000 ++++ neo/idlib/math/Simd_AltiVec.h 2017-07-12 12:38:38.083750262 +0000 +@@ -110,7 +110,7 @@ + //#define DRAWVERT_PADDED + + class idSIMD_AltiVec : public idSIMD_Generic { +-#if defined(__GNUC__) && defined(__ALTIVEC__) ++#if defined(MACOS_X) && defined(__GNUC__) && defined(__ALTIVEC__) + public: + + virtual const char * VPCALL GetName( void ) const;