Date: Tue, 21 Nov 2017 23:44:23 +1100 (EST) From: Bruce Evans <brde@optusnet.com.au> To: Warner Losh <imp@freebsd.org> Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r326037 - head/share/mk Message-ID: <20171121233000.M2067@besplex.bde.org> In-Reply-To: <201711202241.vAKMfMpO008434@repo.freebsd.org> References: <201711202241.vAKMfMpO008434@repo.freebsd.org>
next in thread | previous in thread | raw e-mail | index | archive | help
On Mon, 20 Nov 2017, Warner Losh wrote: > Author: imp > Date: Mon Nov 20 22:41:22 2017 > New Revision: 326037 > URL: https://svnweb.freebsd.org/changeset/base/326037 > > Log: > Add -mno-avx2 for clang as well as -mno-avx. We don't want either of > them when asking for no SIMD. Is this needed. For SSE, -mno-sse implies -mno-sse[2,3,4,...] so an multiple set of no-sse* flags are not needed (I have only checked this for sse2). Multiple no-sse* flags are also not used. > Modified: head/share/mk/bsd.cpu.mk > ============================================================================== > --- head/share/mk/bsd.cpu.mk Mon Nov 20 22:27:33 2017 (r326036) > +++ head/share/mk/bsd.cpu.mk Mon Nov 20 22:41:22 2017 (r326037) > @@ -393,7 +393,7 @@ CFLAGS += ${_CPUCFLAGS} > # (-mfpmath= is not supported) > # > .if ${MACHINE_CPUARCH} == "i386" || ${MACHINE_CPUARCH} == "amd64" > -CFLAGS_NO_SIMD.clang= -mno-avx > +CFLAGS_NO_SIMD.clang= -mno-avx -mno-avx2 > CFLAGS_NO_SIMD= -mno-mmx -mno-sse Nearby example of non-use for SSE. > .endif > CFLAGS_NO_SIMD += ${CFLAGS_NO_SIMD.${COMPILER_TYPE}} Testing shows that -mavx2 -mno-avx kills all AVX for clang in an example that only generates AVX instructions (-mavx2 enabls these as a subset). Bruce
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20171121233000.M2067>