aboutsummaryrefslogtreecommitdiff
path: root/ports/fftw3/aligned_malloc.patch
diff options
context:
space:
mode:
authorkjpus <35301243+kjpus@users.noreply.github.com>2020-01-27 14:54:00 -0500
committerVictor Romero <romerosanchezv@gmail.com>2020-01-27 11:53:59 -0800
commitbd795cb04011968265a702ad00ab45af30cf5fd4 (patch)
treea47bbe4d0a8c0c5e56141569a4000fd9081b10b5 /ports/fftw3/aligned_malloc.patch
parentca95652aabdf9d9ed2fd67dd6635d099f04d5cf1 (diff)
downloadvcpkg-bd795cb04011968265a702ad00ab45af30cf5fd4.tar.gz
vcpkg-bd795cb04011968265a702ad00ab45af30cf5fd4.zip
[fftw3] Fix SIMD compiler flag and mingw build failure (#9794)
* [fftw3] Fix SIMD compiler flag and mingw build failure * Use vcpkg_check_features and single ENABLE_[SIMD]
Diffstat (limited to 'ports/fftw3/aligned_malloc.patch')
-rw-r--r--ports/fftw3/aligned_malloc.patch38
1 files changed, 38 insertions, 0 deletions
diff --git a/ports/fftw3/aligned_malloc.patch b/ports/fftw3/aligned_malloc.patch
new file mode 100644
index 000000000..447ded62b
--- /dev/null
+++ b/ports/fftw3/aligned_malloc.patch
@@ -0,0 +1,38 @@
+diff --git a/cmake.config.h.in b/cmake.config.h.in
+index 1f4c505..fd763cc 100644
+--- a/cmake.config.h.in
++++ b/cmake.config.h.in
+@@ -112,6 +112,10 @@
+ you don't. */
+ #cmakedefine01 HAVE_DECL_POSIX_MEMALIGN
+
++/* Define to 1 if you have the declaration of `_aligned_malloc', and to 0 if you
++ don't. */
++#cmakedefine01 HAVE_DECL_ALIGNED_MALLOC
++
+ /* Define to 1 if you have the declaration of `sinl', and to 0 if you don't.
+ */
+ #cmakedefine01 HAVE_DECL_SINL
+@@ -184,6 +188,9 @@
+ /* Define to 1 if you have the `memalign' function. */
+ #cmakedefine HAVE_MEMALIGN 1
+
++/* Define to 1 if you have the `_aligned_malloc' function. */
++#cmakedefine HAVE_ALIGNED_MALLOC 1
++
+ /* Define to 1 if you have the `memmove' function. */
+ #cmakedefine HAVE_MEMMOVE 1
+
+diff --git a/kernel/kalloc.c b/kernel/kalloc.c
+index e42f6f3..ffc2257 100644
+--- a/kernel/kalloc.c
++++ b/kernel/kalloc.c
+@@ -103,7 +103,7 @@ void *X(kernel_malloc)(size_t n)
+ # undef real_free
+ # define real_free _mm_free
+
+-# elif defined(_MSC_VER)
++# elif defined(_MSC_VER) || defined (HAVE_ALIGNED_MALLOC)
+ /* MS Visual C++ 6.0 with a "Processor Pack" supports SIMD
+ and _aligned_malloc/free (uses malloc.h) */
+ p = (void *) _aligned_malloc(n, MIN_ALIGNMENT);