$ poudriere jail -cj head-armv7 -x -a arm.armv7 -v head -m svn+https $ poudriere testport -j head-armv7 devel/qt5-core [...] global/qfloat16.cpp:149:31: error: use of undeclared identifier 'vcvt_f16_f32' vst1_f16(out_f16 + i, vcvt_f16_f32(vld1q_f32(in + i))); ^ global/qfloat16.cpp:159:28: error: use of undeclared identifier 'vcvt_f32_f16' vst1q_f32(out + i, vcvt_f32_f16(vld1_f16(in_f16 + i))); ^ 2 errors generated. 5.11.1 build log: https://ptpb.pw/Od03 (failure) 5.10.1 build log: https://ptpb.pw/XBSU (success) My jail is a few months old running on amd64 host updated a few days ago: $ c++ -v FreeBSD clang version 6.0.1 (tags/RELEASE_601/final 335540) (based on LLVM 6.0.1) Target: armv7-unknown-freebsd12.0-gnueabihf Thread model: posix InstalledDir: /nxb-bin/usr/bin
Created attachment 197016 [details] v0 Clang hides vcvt_f16_f32() and vcvt_f32_f16() behind (__ARM_FP & 2) where 2 refers to -mfpu=fp-armv8. However, GCC would only build this code if -march=armv8.2-a+fp16 is passed as well. $ clang60 -dM -E -</dev/null | fgrep __ARM_FP #define __ARM_FP 0xc #define __ARM_FP16_ARGS 1 #define __ARM_FP16_FORMAT_IEEE 1 $ clang60 -mfpu=fp-armv8 -dM -E -</dev/null | fgrep __ARM_FP #define __ARM_FP 0xe #define __ARM_FP16_ARGS 1 #define __ARM_FP16_FORMAT_IEEE 1 #define __ARM_FPV5__ 1 $ gcc7 -dM -E -</dev/null | fgrep __ARM_FP #define __ARM_FP 12 $ gcc7 -mfpu=fp-armv8 -dM -E -</dev/null | fgrep __ARM_FP #define __ARM_FP 14 $ gcc7 -march=armv8.2-a+fp16 -mfpu=fp-armv8 -dM -E -</dev/null | fgrep __ARM_FP #define __ARM_FP 14 #define __ARM_FP16_FORMAT_IEEE 1 #define __ARM_FP16_ARGS 1 build log: https://ptpb.pw/MxS9
(In reply to Jan Beich from comment #1) > -mfpu=fp-armv8 Or -mfpu=neon-vfpv4 or -mfpu=neon-fp16. > -march=armv8.2-a+fp16 Or -mfp16-format=ieee (GCC-only)
(In reply to Jan Beich from comment #1) (__ARM_FP & 2) refers to half precision support [1] gcc6 and gcc7 doesn't define __ARM_FP16_FORMAT_IEEE gcc7 -dM -E - < /dev/null | grep __ARM_FP16_FORMAT_IEEE but clang does: cc -dM -E - < /dev/null | grep __ARM_FP16_FORMAT_IEEE #define __ARM_FP16_FORMAT_IEEE 1 from [2]: The __fp16 type denotes half-precision (16-bit) floating-point. The recommended way to test for this hardware support is to test bit 1 in __ARM_FP and If 16-bit floating-point is available, one of __ARM_FP16_FORMAT_IEEE and __ARM_FP16_FORMAT_ALTERNATIVE will be defined to indicate the format in use could it be a clang bug? [1] http://infocenter.arm.com/help/index.jsp?topic=/com.arm.doc.dui0774g/chr1383660321827.html [2] http://infocenter.arm.com/help/topic/com.arm.doc.ihi0053c/IHI0053C_acle_2_0.pdf
What platforms upstream tests on? Looking at https://codereview.qt-project.org/208522 someone has tested on Linux/armv7/GCC where the conditional expands to #else branch.
A commit references this bug: Author: jbeich Date: Wed Oct 10 21:58:42 UTC 2018 New revision: 481772 URL: https://svnweb.freebsd.org/changeset/ports/481772 Log: devel/qt5-core: unbreak on armv7 after r479286 global/qfloat16.cpp:149:31: error: use of undeclared identifier 'vcvt_f16_f32' vst1_f16(out_f16 + i, vcvt_f16_f32(vld1q_f32(in + i))); ^ global/qfloat16.cpp:159:28: error: use of undeclared identifier 'vcvt_f32_f16' vst1q_f32(out + i, vcvt_f32_f16(vld1_f16(in_f16 + i))); ^ PR: 231293 Approved by: maintainer timeout (1 month) Changes: head/devel/qt5-core/files/patch-src_corelib_global_qfloat16.cpp
A commit references this bug: Author: jbeich Date: Wed Oct 10 22:00:25 UTC 2018 New revision: 481773 URL: https://svnweb.freebsd.org/changeset/ports/481773 Log: MFH: r481772 devel/qt5-core: unbreak on armv7 after r479286 global/qfloat16.cpp:149:31: error: use of undeclared identifier 'vcvt_f16_f32' vst1_f16(out_f16 + i, vcvt_f16_f32(vld1q_f32(in + i))); ^ global/qfloat16.cpp:159:28: error: use of undeclared identifier 'vcvt_f32_f16' vst1q_f32(out + i, vcvt_f32_f16(vld1_f16(in_f16 + i))); ^ PR: 231293 Approved by: maintainer timeout (1 month) Approved by: ports-secteam blanket Changes: _U branches/2018Q4/ branches/2018Q4/devel/qt5-core/files/patch-src_corelib_global_qfloat16.cpp
We can't just wait on maintainer forever. FreeBSD 12.0-RELEASE will have binary packages for armv7 from 2018Q4 snapshot. And this port blocks many others.
Thanks