From owner-freebsd-ports-bugs@freebsd.org Mon Oct 10 04:13:32 2016 Return-Path: Delivered-To: freebsd-ports-bugs@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 05F11AF7AF8 for ; Mon, 10 Oct 2016 04:13:32 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2001:1900:2254:206a::16:76]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C6FD9BEF for ; Mon, 10 Oct 2016 04:13:31 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from bugs.freebsd.org ([127.0.1.118]) by kenobi.freebsd.org (8.15.2/8.15.2) with ESMTP id u9A4DVwQ031657 for ; Mon, 10 Oct 2016 04:13:31 GMT (envelope-from bugzilla-noreply@freebsd.org) 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 Date: Mon, 10 Oct 2016 04:13:32 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Ports & Packages X-Bugzilla-Component: Individual Port(s) X-Bugzilla-Version: Latest X-Bugzilla-Keywords: patch X-Bugzilla-Severity: Affects Only Me X-Bugzilla-Who: jbeich@FreeBSD.org X-Bugzilla-Status: New X-Bugzilla-Resolution: X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: freebsd-ports-bugs@FreeBSD.org X-Bugzilla-Flags: maintainer-feedback+ X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: freebsd-ports-bugs@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Ports bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 10 Oct 2016 04:13:32 -0000 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D213271 --- Comment #3 from Jan Beich (mail not working) --- 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 -&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.=