vc, bump version, fix install on 32bit (#6368)

This commit is contained in:
Schrijvers Luc
2021-11-06 14:06:47 +01:00
committed by GitHub
parent ba00e24eee
commit 63acf74c8e
2 changed files with 43 additions and 8 deletions

View File

@@ -0,0 +1,31 @@
From a09f6b5d033bb9cc52634833460409d4d815047b Mon Sep 17 00:00:00 2001
From: begasus <begasus@gmail.com>
Date: Sat, 6 Nov 2021 13:37:21 +0000
Subject: Support GCC standard libraries which do not define __GLIBC_PREREQ
https://github.com/VcDevel/Vc/pull/282
diff --git a/Vc/global.h b/Vc/global.h
index 6f85b3c..fd9cdeb 100644
--- a/Vc/global.h
+++ b/Vc/global.h
@@ -132,7 +132,15 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#endif
#ifdef Vc_GCC
-# if Vc_GCC >= 0x70000 && defined __i386__ && (!defined __GLIBC_PREREQ || !__GLIBC_PREREQ(2,26))
+# if Vc_GCC >= 0x70000 && defined __i386__
+ // GCC 7 changed alignof(max_align_t) to 16. glibc 2.26 followed with malloc in 2.26.
+ // 1. If GCC >= 7 and libc is not glibc max_align_t and malloc mismatch
+ // 2. If GCC >= 7 and libc is glibc < 2.26 max_align_t and malloc mismatch
+# ifdef __GLIBC_PREREQ
+# if __GLIBC_PREREQ(2,26)
+# define Vc_HAVE_STD_MAX_ALIGN_T 1
+# endif
+# endif
// GCC 7 changed alignof(max_align_t) to 16. glibc 2.26 followed with malloc in 2.26.
// 1. If GCC >= 7 and libc is not glibc max_align_t and malloc mismatch
// 2. If GCC >= 7 and libc is glibc < 2.26 max_align_t and malloc mismatch
--
2.30.2

View File

@@ -5,16 +5,17 @@ COPYRIGHT="2006-2016 Arseny Kapoulkine"
LICENSE="GNU LGPL v3"
REVISION="1"
SOURCE_URI="https://github.com/VcDevel/Vc/archive/$portVersion.tar.gz"
CHECKSUM_SHA256="7e8b57ed5ff9eb0835636203898c21302733973ff8eaede5134dd7cb87f915f6"
CHECKSUM_SHA256="50d3f151e40b0718666935aa71d299d6370fafa67411f0a9e249fbce3e6e3952"
SOURCE_FILENAME="vc-$portVersion.tar.gz"
SOURCE_DIR="Vc-$portVersion"
PATCHES="vc-$portVersion.patchset"
ARCHITECTURES="all !x86_gcc2"
SECONDARY_ARCHITECTURES="x86"
PROVIDES="
vc$secondaryArchSuffix = $portVersion
devel:libvc$secondaryArchSuffix = $portVersion
devel:libVc$secondaryArchSuffix = $portVersion
"
REQUIRES="
haiku$secondaryArchSuffix
@@ -33,26 +34,29 @@ BUILD_PREREQUIRES="
BUILD()
{
mkdir -p build_haiku && cd build_haiku
cmake .. \
cmake -B build -S . -DCMAKE_BUILD_TYPE=Release \
-DCMAKE_INSTALL_PREFIX:PATH=$prefix \
-DTARGET_ARCHITECTURE=generic
# -DBUILD_TESTING=ON
make ${jobArgs}
make -C build ${jobArgs}
}
INSTALL()
{
cd build_haiku
make install
make -C build install
# move include dir to correct location
mkdir -p $(dirname $includeDir)
mv $prefix/include $includeDir
mv $prefix/lib $prefix/lib2
mkdir -p $libDir
mv $prefix/lib2/* $libDir/
rmdir $prefix/lib2
# prepare develop/lib
prepareInstalledDevelLibs libVc
prepareInstalledDevelLib libVc
}
TEST()