mirror of
https://github.com/openembedded/meta-openembedded.git
synced 2026-06-04 14:39:54 +00:00
fftw: Add support for ptest.
* The bench program is installed then moved into the ptest ares so it links. Since we are building for all precisions, we need to build three versions of the bench program. Signed-off-by: Philip Balister <philip@opensdr.com> Signed-off-by: Khem Raj <raj.khem@gmail.com>
This commit is contained in:
committed by
Khem Raj
parent
6a68b4c724
commit
f274fb5880
@@ -0,0 +1,9 @@
|
||||
--- ./tests/Makefile.am.orig 2021-03-23 11:45:12.756371739 -0400
|
||||
+++ ./tests/Makefile.am 2021-03-23 11:46:43.224132851 -0400
|
||||
@@ -1,5 +1,5 @@
|
||||
AM_CPPFLAGS = -I $(top_srcdir)
|
||||
-noinst_PROGRAMS = bench
|
||||
+bin_PROGRAMS = bench@PREC_SUFFIX@
|
||||
EXTRA_DIST = check.pl README
|
||||
|
||||
if THREADS
|
||||
@@ -0,0 +1,41 @@
|
||||
--- ./tests/Makefile.am.orig 2021-03-23 11:45:12.756371739 -0400
|
||||
+++ ./tests/Makefile.am 2021-03-23 19:29:19.692180793 -0400
|
||||
@@ -1,21 +1,21 @@
|
||||
AM_CPPFLAGS = -I $(top_srcdir)
|
||||
-noinst_PROGRAMS = bench
|
||||
+bin_PROGRAMS = bench@PREC_SUFFIX@
|
||||
EXTRA_DIST = check.pl README
|
||||
|
||||
if THREADS
|
||||
-bench_CFLAGS = $(PTHREAD_CFLAGS)
|
||||
+bench@PREC_SUFFIX@_CFLAGS = $(PTHREAD_CFLAGS)
|
||||
if !COMBINED_THREADS
|
||||
LIBFFTWTHREADS = $(top_builddir)/threads/libfftw3@PREC_SUFFIX@_threads.la
|
||||
endif
|
||||
else
|
||||
if OPENMP
|
||||
-bench_CFLAGS = $(OPENMP_CFLAGS)
|
||||
+bench@PREC_SUFFIX@_CFLAGS = $(OPENMP_CFLAGS)
|
||||
LIBFFTWTHREADS = $(top_builddir)/threads/libfftw3@PREC_SUFFIX@_omp.la
|
||||
endif
|
||||
endif
|
||||
|
||||
-bench_SOURCES = bench.c hook.c fftw-bench.c fftw-bench.h
|
||||
-bench_LDADD = $(LIBFFTWTHREADS) \
|
||||
+bench@PREC_SUFFIX@_SOURCES = bench.c hook.c fftw-bench.c fftw-bench.h
|
||||
+bench@PREC_SUFFIX@_LDADD = $(LIBFFTWTHREADS) \
|
||||
$(top_builddir)/libfftw3@PREC_SUFFIX@.la \
|
||||
$(top_builddir)/libbench2/libbench2.a $(THREADLIBS)
|
||||
|
||||
--- ./tools/Makefile.am.orig 2021-03-24 08:22:31.845581620 -0400
|
||||
+++ ./tools/Makefile.am 2021-03-24 08:24:26.454053573 -0400
|
||||
@@ -24,7 +24,7 @@
|
||||
endif
|
||||
|
||||
fftw@PREC_SUFFIX@_wisdom_SOURCES = fftw-wisdom.c
|
||||
-fftw@PREC_SUFFIX@_wisdom_LDADD = $(top_builddir)/tests/bench-bench.o \
|
||||
-$(top_builddir)/tests/bench-fftw-bench.o $(LIBFFTWTHREADS) \
|
||||
+fftw@PREC_SUFFIX@_wisdom_LDADD = $(top_builddir)/tests/bench@PREC_SUFFIX@-bench.o \
|
||||
+$(top_builddir)/tests/bench@PREC_SUFFIX@-fftw-bench.o $(LIBFFTWTHREADS) \
|
||||
$(top_builddir)/libfftw3@PREC_SUFFIX@.la \
|
||||
$(top_builddir)/libbench2/libbench2.a $(THREADLIBS)
|
||||
@@ -0,0 +1,30 @@
|
||||
#!/bin/sh
|
||||
|
||||
cd fftw
|
||||
/usr/bin/perl -w ./check.pl -r -c=30 -v `pwd`/bench
|
||||
fftw_result=$?
|
||||
cd ../fftwf
|
||||
/usr/bin/perl -w ./check.pl -r -c=30 -v `pwd`/benchf
|
||||
fftwf_result=$?
|
||||
cd ../fftwl
|
||||
/usr/bin/perl -w ./check.pl -r -c=30 -v `pwd`/benchl
|
||||
fftwl_result=$?
|
||||
|
||||
echo -n "fftw test result:"
|
||||
if [ $fftw_result = "0" ]; then
|
||||
echo PASSED
|
||||
else
|
||||
echo FAILED
|
||||
fi
|
||||
echo -n "fftwf test result:"
|
||||
if [ $fftwf_result = "0" ]; then
|
||||
echo PASSED
|
||||
else
|
||||
echo FAILED
|
||||
fi
|
||||
echo -n "fftwl test result:"
|
||||
if [ $fftwl_result = "0" ]; then
|
||||
echo PASSED
|
||||
else
|
||||
echo FAILED
|
||||
fi
|
||||
@@ -6,11 +6,13 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=59530bdf33659b29e73d4adb9f9f6552"
|
||||
SRC_URI = " \
|
||||
http://www.fftw.org/fftw-${PV}.tar.gz \
|
||||
file://0001-NEON-autodetection-segfaults-assume-neon-present.patch \
|
||||
file://install-bench.patch \
|
||||
file://run-ptest \
|
||||
"
|
||||
SRC_URI[md5sum] = "8aac833c943d8e90d51b697b27d4384d"
|
||||
SRC_URI[sha256sum] = "6113262f6e92c5bd474f2875fa1b01054c4ad5040f6b0da7c03c98821d9ae303"
|
||||
|
||||
inherit autotools pkgconfig
|
||||
inherit autotools pkgconfig ptest
|
||||
|
||||
# we had multiple recipes in the past
|
||||
PROVIDES = "fftwl fftwf"
|
||||
@@ -65,6 +67,22 @@ do_install() {
|
||||
done
|
||||
}
|
||||
|
||||
do_install_ptest() {
|
||||
for lib in fftw fftwl fftwf; do
|
||||
install -d ${D}${PTEST_PATH}/$lib
|
||||
install -m 0755 ${S}/tests/check.pl ${D}${PTEST_PATH}/$lib
|
||||
cd ${WORKDIR}/build-$lib
|
||||
if [ $lib = "fftw" ]; then
|
||||
mv ${D}${bindir}/bench ${D}${PTEST_PATH}/$lib
|
||||
fi
|
||||
if [ $lib = "fftwl" ]; then
|
||||
mv ${D}${bindir}/benchl ${D}${PTEST_PATH}/$lib
|
||||
fi
|
||||
if [ $lib = "fftwf" ]; then
|
||||
mv ${D}${bindir}/benchf ${D}${PTEST_PATH}/$lib
|
||||
fi
|
||||
done
|
||||
}
|
||||
|
||||
PACKAGES =+ "libfftw libfftwl libfftwf"
|
||||
FILES_libfftw = "${libdir}/libfftw3.so.* ${libdir}/libfftw3_*.so.*"
|
||||
@@ -79,5 +97,7 @@ FILES_fftw-wisdom-to-conf = "${bindir}/fftw-wisdom-to-conf"
|
||||
|
||||
FILES_${PN}-dev += "${libdir}/cmake"
|
||||
RDEPENDS_${PN}-dev = "libfftw libfftwl libfftwf"
|
||||
RDEPENDS_${PN}-ptest += "perl"
|
||||
RDEPENDS_${PN}-ptest_remove = "fftw"
|
||||
|
||||
BBCLASSEXTEND = "native"
|
||||
|
||||
Reference in New Issue
Block a user