aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjhale <jhale@FreeBSD.org>2017-07-31 20:16:28 +0800
committerjhale <jhale@FreeBSD.org>2017-07-31 20:16:28 +0800
commit90a2f29ea57abde9385f7029834d80b2e8e05aa5 (patch)
treed053506e90b25500f30813a91a4a60d9acbee57f
parent199d670f32a2dbdb5b6ac8fcbff8a926ee090d34 (diff)
downloadfreebsd-ports-90a2f29ea57abde9385f7029834d80b2e8e05aa5.tar.gz
freebsd-ports-90a2f29ea57abde9385f7029834d80b2e8e05aa5.tar.zst
freebsd-ports-90a2f29ea57abde9385f7029834d80b2e8e05aa5.zip
MFH: r446955
Fix build on armv6. The -funsafe-math-optimizations flag in Clang (pulled in by -ffast-math) is emitting references to the sincos() function which is not implemented on versions of FreeBSD < 1200032. Workaround by adding -fno-unsafe-math-optimizations to armv6 CFLAGS. /bin/sh ../libtool --tag=CC --mode=link /nxb-bin/usr/bin/cc -D_THREAD_SAFE -pthread -O2 -pipe -O3 -ffast-math -fstrict-aliasing -fomit-frame-pointer -o bench bench-bench.o bench-hook.o bench-fftw-bench.o ../threads/libfftw3_threads.la ../libfftw3.la ../libbench2/libbench2.a -lm libtool: link: /nxb-bin/usr/bin/cc -D_THREAD_SAFE -pthread -O2 -pipe -O3 -ffast-math -fstrict-aliasing -fomit-frame-pointer -o .libs/bench bench-bench.o bench-hook.o bench-fftw-bench.o ../threads/.libs/libfftw3_threads.so ../.libs/libfftw3.so ../libbench2/libbench2.a -lm -pthread -Wl,-rpath -Wl,/usr/local/lib ./libbench2/libbench2.a(verify-lib.o): In function `aphase_shift': verify-lib.c:(.text+0x578): undefined reference to `sincos' ./libbench2/libbench2.a(verify-lib.o): In function `tf_shift': verify-lib.c:(.text+0x13a0): undefined reference to `sincos' verify-lib.c:(.text+0x16e4): undefined reference to `sincos' cc: error: linker command failed with exit code 1 (use -v to see invocation) gmake[3]: *** [Makefile:400: bench] Error 1 gmake[3]: Leaving directory '/wrkdirs/usr/ports/math/fftw3/work/fftw-3.3.6-pl2/tests' gmake[2]: *** [Makefile:684: all-recursive] Error 1 gmake[2]: Leaving directory '/wrkdirs/usr/ports/math/fftw3/work/fftw-3.3.6-pl2' gmake[1]: *** [Makefile:549: all] Error 2 gmake[1]: Leaving directory '/wrkdirs/usr/ports/math/fftw3/work/fftw-3.3.6-pl2' *** Error code 1 PR: 220590 Submitted by: jbeich Approved by: ports-secteam (blanket)
-rw-r--r--math/fftw3/Makefile3
1 files changed, 3 insertions, 0 deletions
diff --git a/math/fftw3/Makefile b/math/fftw3/Makefile
index 824f3ff2b0a7..82829c8f410d 100644
--- a/math/fftw3/Makefile
+++ b/math/fftw3/Makefile
@@ -124,6 +124,9 @@ CFLAGS+= -fomit-frame-pointer
. if ${ARCH} == "i386" && (${COMPILER_TYPE} == "gcc" || !empty(USE_GCC)) && !${PORT_OPTIONS:MOPENMPI}
CFLAGS+= -malign-double
. endif
+. if ${ARCH} == "armv6" && ${OPSYS} == FreeBSD && ${OSVERSION} < 1200032
+CFLAGS+= -fno-unsafe-math-optimizations
+. endif
WITHOUT_NO_STRICT_ALIASING= yes
.endif # end OPTIMIZED_CFLAGS