git: 857a4e0967b2 - main - comms/liquid-dsp: add dotprod_crcf_copy on powerpc64*
Piotr Kubaj <[email protected]>
| Newsgroups | gmane.os.freebsd.devel.cvs.ports |
|---|---|
| Message-ID | <[email protected]> |
The branch main has been updated by pkubaj: URL: https://cgit.FreeBSD.org/ports/commit/?id=857a4e0967b223a17558fe1e30a6d772fbd75618 commit 857a4e0967b223a17558fe1e30a6d772fbd75618 Author: Piotr Kubaj <[email protected]> AuthorDate: 2026-08-11 18:21:31 +0000 Commit: Piotr Kubaj <[email protected]> CommitDate: 2026-08-12 12:54:27 +0000 comms/liquid-dsp: add dotprod_crcf_copy on powerpc64* Fixes linking of reverse dependencies on powerpc64*: : && /usr/bin/c++ -O2 -pipe -mcpu=power9 -fstack-protector-strong -fno-strict-aliasing -mcpu=power9 -O2 -pipe -mcpu=power9 -fstack-protector-strong -fno-strict-aliasing -mcpu=power9 -DNDEBUG -Wl,--undefined-version -Xlinker --dependency-file=src/CMakeFiles/inspectrum.dir/link.d src/CMakeFiles/inspectrum.dir/inspectrum_autogen/mocs_compilation.cpp.o src/CMakeFiles/inspectrum.dir/abstractsamplesource.cpp.o src/CMakeFiles/inspectrum.dir/amplitudedemod.cpp.o src/CMakeFiles/inspectrum.dir/cursor.cpp.o src/CMakeFiles/inspectrum.dir/cursors.cpp.o src/CMakeFiles/inspectrum.dir/main.cpp.o src/CMakeFiles/inspectrum.dir/fft.cpp.o src/CMakeFiles/inspectrum.dir/frequencydemod.cpp.o src/CMakeFiles/inspectrum.dir/mainwindow.cpp.o src/CMakeFiles/inspectrum.dir/inputsource.cpp.o src/CMakeFiles/ins pectrum.dir/phasedemod.cpp.o src/CMakeFiles/inspectrum.dir/plot.cpp.o src/CMakeFiles/inspectrum.dir/plots.cpp.o src/CMakeFiles/inspectrum.dir/plotview.cpp.o src/CMakeFiles/inspectrum.dir/sa mplebuffer.cpp.o src/CMakeFiles/inspectrum.dir/samplesource.cpp.o src/CMakeFiles/inspectrum.dir/spectrogramcontrols.cpp.o src/CMakeFiles/inspectrum.dir/spectrogramplot.cpp.o src/CMakeFiles/inspectrum.dir/threshold.cpp.o src/CMakeFiles/inspectrum.dir/traceplot.cpp.o src/CMakeFiles/inspectrum.dir/tuner.cpp.o src/CMakeFiles/inspectrum.dir/tunertransform.cpp.o src/CMakeFiles/inspectrum.dir/util.cpp.o -o src/inspectrum -Wl,-rpath,/usr/local/lib/qt6:/usr/local/lib: /usr/local/lib/qt6/libQt6Widgets.so.6.11.1 /usr/local/lib/qt6/libQt6Concurrent.so.6.11.1 /usr/local/lib/libfftw3f.so /usr/local/lib/libliquid.so /usr/local/lib/qt6/libQt6Gui.so.6.11.1 /usr/local/lib/libGLX.so /usr/local/lib/libOpenGL.so /usr/local/lib/qt6/libQt6Core.so.6.11.1 -pthread -Wl,-rpath-link,/usr/local/lib/qt6 && : ld: error: undefined reference: dotprod_rrrf_copy >>> referenced by /usr/local/lib/libliquid.so (disallowed by --no-allow-shlib-undefined) ld: error: undefined reference: dotprod_crcf_copy >>> referenced by /usr/local/lib/libliquid.so (disallowed by --no-allow-shlib-undefined) c++: error: linker command failed with exit code 1 (use -v to see invocation) --- comms/liquid-dsp/Makefile | 1 + .../files/patch-src_dotprod_src_dotprod__crcf.av.c | 40 ++++++++++++++++++--- .../files/patch-src_dotprod_src_dotprod__rrrf.av.c | 42 ++++++++++++++++++---- 3 files changed, 72 insertions(+), 11 deletions(-) diff --git a/comms/liquid-dsp/Makefile b/comms/liquid-dsp/Makefile index 400cac7e20a4..b06110961416 100644 --- a/comms/liquid-dsp/Makefile +++ b/comms/liquid-dsp/Makefile @@ -1,6 +1,7 @@ PORTNAME= liquid-dsp DISTVERSIONPREFIX= v DISTVERSION= 1.6.0 +PORTREVISION= 1 CATEGORIES= comms MAINTAINER= [email protected] diff --git a/comms/liquid-dsp/files/patch-src_dotprod_src_dotprod__crcf.av.c b/comms/liquid-dsp/files/patch-src_dotprod_src_dotprod__crcf.av.c index ee33f55d4bdb..449812cdbb58 100644 --- a/comms/liquid-dsp/files/patch-src_dotprod_src_dotprod__crcf.av.c +++ b/comms/liquid-dsp/files/patch-src_dotprod_src_dotprod__crcf.av.c @@ -1,14 +1,44 @@ ---- src/dotprod/src/dotprod_crcf.av.c.orig 2024-06-19 07:24:39 UTC +--- src/dotprod/src/dotprod_crcf.av.c.orig 2023-06-19 22:04:12 UTC +++ src/dotprod/src/dotprod_crcf.av.c -@@ -26,6 +26,7 @@ +@@ -26,6 +26,8 @@ #include <stdio.h> #include <stdlib.h> ++#include <string.h> +#include <altivec.h> #include "liquid.internal.h" -@@ -195,8 +196,8 @@ int dotprod_crcf_execute(dotprod_crcf _q, +@@ -160,6 +162,28 @@ dotprod_crcf dotprod_crcf_recreate_rev(dotprod_crcf _q + return dotprod_crcf_create_rev(_h,_n); + } + ++// copy the structured dotprod object ++dotprod_crcf dotprod_crcf_copy(dotprod_crcf q_orig) ++{ ++ // validate input ++ if (q_orig == NULL) ++ return liquid_error_config("dotprod_crcf_copy().av, object cannot be NULL"); ++ ++ dotprod_crcf q_copy = (dotprod_crcf)malloc(sizeof(struct dotprod_crcf_s)); ++ q_copy->n = q_orig->n; ++ ++ // copy each of the four alignment-shifted coefficient arrays, ++ // matching the allocation performed by dotprod_crcf_create_opt() ++ unsigned int i; ++ for (i=0; i<4; i++) { ++ unsigned int len = 1 + (2*q_copy->n + i - 1)/4; ++ q_copy->h[i] = calloc(len, 2*sizeof(vector float)); ++ memmove(q_copy->h[i], q_orig->h[i], len*(2*sizeof(vector float))); ++ } ++ ++ return q_copy; ++} ++ + // destroy the structured dotprod object + int dotprod_crcf_destroy(dotprod_crcf _q) + { +@@ -195,8 +219,8 @@ int dotprod_crcf_execute(dotprod_crcf _q, union { vector float v; float w[4];} s; unsigned int nblocks; @@ -19,7 +49,7 @@ d = (vector float*)_q->h[al]; -@@ -206,7 +207,7 @@ int dotprod_crcf_execute(dotprod_crcf _q, +@@ -206,7 +230,7 @@ int dotprod_crcf_execute(dotprod_crcf _q, // split into four vectors each with four 32-bit // partial sums. Effectively each loop iteration // operates on 16 input samples at a time. @@ -28,7 +58,7 @@ while (nblocks >= 4) { s0 = vec_madd(ar[nblocks-1],d[nblocks-1],s0); s1 = vec_madd(ar[nblocks-2],d[nblocks-2],s1); -@@ -227,7 +228,7 @@ int dotprod_crcf_execute(dotprod_crcf _q, +@@ -227,7 +251,7 @@ int dotprod_crcf_execute(dotprod_crcf _q, // move the result into the union s (effetively, // this loads the four 32-bit values in s0 into // the array w). diff --git a/comms/liquid-dsp/files/patch-src_dotprod_src_dotprod__rrrf.av.c b/comms/liquid-dsp/files/patch-src_dotprod_src_dotprod__rrrf.av.c index 380885fd00a1..41dae00ffc95 100644 --- a/comms/liquid-dsp/files/patch-src_dotprod_src_dotprod__rrrf.av.c +++ b/comms/liquid-dsp/files/patch-src_dotprod_src_dotprod__rrrf.av.c @@ -1,14 +1,15 @@ ---- src/dotprod/src/dotprod_rrrf.av.c.orig 2024-06-19 07:25:01 UTC +--- src/dotprod/src/dotprod_rrrf.av.c.orig 2023-06-19 22:04:12 UTC +++ src/dotprod/src/dotprod_rrrf.av.c -@@ -26,6 +26,7 @@ +@@ -26,6 +26,8 @@ #include <stdio.h> #include <stdlib.h> ++#include <string.h> +#include <altivec.h> #include "liquid.internal.h" -@@ -117,7 +118,7 @@ dotprod_rrrf dotprod_rrrf_create_opt(float * _h, +@@ -117,7 +119,7 @@ dotprod_rrrf dotprod_rrrf_create_opt(float * _h, for (i=0; i<4; i++) { q->h[i] = calloc(1+(q->n+i-1)/4,sizeof(vector float)); for (j=0; j<q->n; j++) @@ -17,7 +18,36 @@ } return q; -@@ -190,8 +191,8 @@ int dotprod_rrrf_execute(dotprod_rrrf _q, +@@ -155,6 +157,28 @@ dotprod_rrrf dotprod_rrrf_recreate_rev(dotprod_rrrf _q + return dotprod_rrrf_create_rev(_h,_n); + } + ++// copy the structured dotprod object ++dotprod_rrrf dotprod_rrrf_copy(dotprod_rrrf q_orig) ++{ ++ // validate input ++ if (q_orig == NULL) ++ return liquid_error_config("dotprod_rrrf_copy().av, object cannot be NULL"); ++ ++ dotprod_rrrf q_copy = (dotprod_rrrf)malloc(sizeof(struct dotprod_rrrf_s)); ++ q_copy->n = q_orig->n; ++ ++ // copy each of the four alignment-shifted coefficient arrays, ++ // matching the allocation performed by dotprod_rrrf_create_opt() ++ unsigned int i; ++ for (i=0; i<4; i++) { ++ unsigned int len = 1 + (q_copy->n + i - 1)/4; ++ q_copy->h[i] = calloc(len, sizeof(vector float)); ++ memmove(q_copy->h[i], q_orig->h[i], len*(sizeof(vector float))); ++ } ++ ++ return q_copy; ++} ++ + // destroy the structured dotprod object + int dotprod_rrrf_destroy(dotprod_rrrf _q) + { +@@ -190,8 +214,8 @@ int dotprod_rrrf_execute(dotprod_rrrf _q, union { vector float v; float w[4];} s; unsigned int nblocks; @@ -28,7 +58,7 @@ d = (vector float*)_q->h[al]; -@@ -200,7 +201,7 @@ int dotprod_rrrf_execute(dotprod_rrrf _q, +@@ -200,7 +224,7 @@ int dotprod_rrrf_execute(dotprod_rrrf _q, // split into four vectors each with four 32-bit // partial sums. Effectively each loop iteration // operates on 16 input samples at a time. @@ -37,7 +67,7 @@ while (nblocks >= 4) { s0 = vec_madd(ar[nblocks-1],d[nblocks-1],s0); s1 = vec_madd(ar[nblocks-2],d[nblocks-2],s1); -@@ -221,7 +222,7 @@ int dotprod_rrrf_execute(dotprod_rrrf _q, +@@ -221,7 +245,7 @@ int dotprod_rrrf_execute(dotprod_rrrf _q, // move the result into the union s (effetively, // this loads the four 32-bit values in s0 into // the array w).