summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTimothy Pearson <tpearson@raptorengineering.com>2024-08-24 13:18:50 -0500
committerTimothy Pearson <tpearson@raptorengineering.com>2024-08-24 13:51:12 -0500
commitc1b1bef77ead0f3440833f01c03b0af61ef8ec20 (patch)
treed278c723f80c904f01346fa4fe3bdfd2d363b671
parent2ef6dba8728db2437def9a4fc1d3e20e0aa44c31 (diff)
downloadulab-c1b1bef77ead0f3440833f01c03b0af61ef8ec20.tar.gz
ulab-c1b1bef77ead0f3440833f01c03b0af61ef8ec20.zip
Fix FTBFS on ppc64el hostsHEADmaster
-rwxr-xr-xlib/ffts/debian/rules20
-rw-r--r--lib/ffts/src/Makefile.am2
-rw-r--r--lib/ffts/src/ffts_internal.h4
-rw-r--r--lib/ffts/src/ffts_real.c4
4 files changed, 19 insertions, 11 deletions
diff --git a/lib/ffts/debian/rules b/lib/ffts/debian/rules
index 968c6ef..ff19c8d 100755
--- a/lib/ffts/debian/rules
+++ b/lib/ffts/debian/rules
@@ -18,16 +18,24 @@ DEB_BUILD_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)
DEB_DH_BUILDDEB_ARGS += -- -Z$(shell dpkg-deb --help | grep -q ":.* xz[,.]" \
&& echo xz || echo bzip2)
+# Generic architecture default
+cdbs_configure_flags := --enable-single --disable-dynamic-code --enable-shared --disable-rpath
+
ifneq (,$(findstring x86_64-,$(DEB_BUILD_GNU_TYPE)))
cdbs_configure_flags := --enable-single --enable-sse --enable-shared --disable-rpath
-else ifneq (,$(findstring arm-,$(DEB_BUILD_GNU_TYPE)))
-ifneq(,$(findstring armhf,$(DEB_HOST_ARCH)))
+endif
+
+ifneq (,$(findstring powerpc-,$(DEB_BUILD_GNU_TYPE)))
+ cdbs_configure_flags := --enable-single --disable-dynamic-code --enable-shared --disable-rpath
+endif
+
+ifneq (,$(findstring arm-,$(DEB_BUILD_GNU_TYPE)))
+ ifneq(,$(findstring armhf,$(DEB_HOST_ARCH)))
cdbs_configure_flags := --enable-single --enable-neon --float_abi=hard --enable-shared --disable-rpath
-else ifneq (,$(findstring aarch64-,$(DEB_BUILD_GNU_TYPE)))
+ endif
+ ifneq (,$(findstring aarch64-,$(DEB_BUILD_GNU_TYPE)))
cdbs_configure_flags := --enable-single --enable-neon --float_abi=hard --enable-shared --disable-rpath
-else
- cdbs_configure_flags := --enable-single --enable-shared --disable-rpath
-endif
+ endif
post-patches:: debian/stamp-bootstrap
diff --git a/lib/ffts/src/Makefile.am b/lib/ffts/src/Makefile.am
index ff6b0cc..527d240 100644
--- a/lib/ffts/src/Makefile.am
+++ b/lib/ffts/src/Makefile.am
@@ -6,7 +6,7 @@ libffts_la_SOURCES = ffts.c ffts_nd.c ffts_real.c ffts_real_nd.c ffts_transpose.
libffts_la_SOURCES += codegen.h codegen_arm.h codegen_sse.h ffts.h ffts_nd.h ffts_real.h ffts_real_nd.h ffts_small.h ffts_static.h macros-alpha.h macros-altivec.h macros-neon.h macros-sse.h macros.h neon.h neon_float.h patterns.h types.h vfp.h
if DYNAMIC_DISABLED
-libffts_la_SOURCES += ffts_static.c
+#libffts_la_SOURCES += ffts_static.c
else
libffts_la_SOURCES += codegen.c
endif
diff --git a/lib/ffts/src/ffts_internal.h b/lib/ffts/src/ffts_internal.h
index 04ebb9c..8932c49 100644
--- a/lib/ffts/src/ffts_internal.h
+++ b/lib/ffts/src/ffts_internal.h
@@ -228,7 +228,7 @@ ffts_aligned_malloc(size_t size)
#elif defined(HAVE_MEMALIGN)
p = memalign(32, size);
#elif defined(__ALTIVEC__)
- p = vec_malloc(size);
+ p = malloc(size);
#elif defined(_MSC_VER) || defined(WIN32)
p = _aligned_malloc(size, 32);
#elif defined(HAVE_VALLOC)
@@ -249,7 +249,7 @@ void ffts_aligned_free(void *p)
#elif defined(HAVE_POSIX_MEMALIGN) || defined(HAVE_MEMALIGN)
free(p);
#elif defined(__ALTIVEC__)
- vec_free(p);
+ free(p);
#elif defined(_MSC_VER) || defined(WIN32)
_aligned_free(p);
#else
diff --git a/lib/ffts/src/ffts_real.c b/lib/ffts/src/ffts_real.c
index e0f0e1f..a1a0482 100644
--- a/lib/ffts/src/ffts_real.c
+++ b/lib/ffts/src/ffts_real.c
@@ -738,7 +738,7 @@ ffts_execute_1d_real_inv(ffts_plan_t *p, const void *input, void *output)
FFTS_API ffts_plan_t*
ffts_init_1d_real(size_t N, int sign)
{
-#ifndef __ARM_NEON__
+#if !defined( __ARM_NEON__ ) && !defined( __ALTIVEC__ )
int cpu_flags = ffts_cpu_detect(NULL);
#endif
ffts_plan_t *p;
@@ -799,4 +799,4 @@ ffts_init_1d_real(size_t N, int sign)
cleanup:
ffts_free_1d_real(p);
return NULL;
-} \ No newline at end of file
+}