Date: Mon, 10 Oct 2016 04:13:32 +0000 From: bugzilla-noreply@freebsd.org To: freebsd-ports-bugs@FreeBSD.org Subject: [Bug 213271] devel/marisa-trie: enable SSE2 by default for amd64 or depending on CPUTYPE Message-ID: <bug-213271-13-JDmoDBeat0@https.bugs.freebsd.org/bugzilla/> In-Reply-To: <bug-213271-13@https.bugs.freebsd.org/bugzilla/> References: <bug-213271-13@https.bugs.freebsd.org/bugzilla/>
next in thread | previous in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D213271 --- Comment #3 from Jan Beich (mail not working) <jbeich@FreeBSD.org> --- dmesg(8) or rather /var/run/dmesg.boot is a basic CPUID check in kernel. Wh= at you probably want is extract supported features out of compiler, similar to= bug 112997. Output depends on compiler type and version, so any make(1) magic w= ould have to accomodate. Here's an example: ############################# .ifnmake describe _CC1!=3D ${CC} -E -v -march=3Dnative -</dev/null 2>&1 | fgrep cc1 . if ${_CC1:M*-triple*} # clang _SIMD=3D ${_CC1:M+*:S/^+//:S/.//g} . else _SIMD=3D ${_CC1:N-mno-*:N-march*:N-mtune*:M-m*:S/-m//:S/.//g} . endif MACHINE_CPU+=3D ${_SIMD} .endif print-simd: @${ECHO} ${_SIMD} ############################# $ cc -v |& fgrep ' version' FreeBSD clang version 3.9.0 (tags/RELEASE_390/final 280324) (based on LLVM 3.9.0) $ gcc6 -v |& fgrep ' version' gcc version 6.2.0 (FreeBSD Ports Collection) $ make print-simd sse2 cx16 prfchw bmi2 xsavec fsgsbase popcnt aes xsaves smap mmx rdseed hle clflushopt xsave invpcidavx rtm fma bmi rdrnd sse41 sse42 avx2 sse lzcnt pc= lmul f16c ssse3 sgx cmov movbe xsaveopt adx sse3 $ make print-simd CC=3Dgcc6 mmx sse sse2 sse3 ssse3 cx16 sahf movbe aes pclmul popcnt abm fma bmi bmi2 = avx avx2 sse42 sse41 lzcnt rtm hle rdrnd f16c fsgsbase rdseed prfchw adx fxsr x= save xsaveopt clflushopt xsavec xsaves $ make -V OPTIONS_DEFAULT ADX AES AMD64 AVX AVX2 BMI BMI2 CLFLUSHOPT CMOV CX16 F16C FMA FMA3 FSGSBASE HLE INVPCID LZCNT MMX MOVBE PCLMUL POPCNT PRFCHW RDRND RDSEED RTM SGX SMAP = SSE SSE2 SSE3 SSE41 SSE42 SSSE3 XSAVE XSAVEC XSAVEOPT XSAVES ############################# It maybe worth to write new USES for to supplant bsd.cpu.mk but let's keep individual port's Makefiles in a declarative style. This means complex stuff like conditionals, shell invocations should be avoided or kept to minimum. --=20 You are receiving this mail because: You are the assignee for the bug.=
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-213271-13-JDmoDBeat0>