From owner-svn-ports-all@freebsd.org Sun Aug 25 21:47:46 2019 Return-Path: Delivered-To: svn-ports-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id B866CC6111; Sun, 25 Aug 2019 21:47:46 +0000 (UTC) (envelope-from yuri@freebsd.org) Received: from shell1.rawbw.com (shell1.rawbw.com [198.144.192.42]) by mx1.freebsd.org (Postfix) with ESMTP id 46Gpdt2jxJz4WrD; Sun, 25 Aug 2019 21:47:46 +0000 (UTC) (envelope-from yuri@freebsd.org) Received: from yv.noip.me (c-67-180-169-236.hsd1.ca.comcast.net [67.180.169.236]) (authenticated bits=0) by shell1.rawbw.com (8.15.1/8.15.1) with ESMTPSA id x7PLlhXk024354 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128 verify=NO); Sun, 25 Aug 2019 14:47:44 -0700 (PDT) (envelope-from yuri@freebsd.org) X-Authentication-Warning: shell1.rawbw.com: Host c-67-180-169-236.hsd1.ca.comcast.net [67.180.169.236] claimed to be yv.noip.me Reply-To: yuri@freebsd.org Subject: Re: svn commit: r509806 - head/math/blasfeo To: Adam Weinberger Cc: ports-committers , svn-ports-all , svn-ports-head References: <201908251703.x7PH3bbw038772@repo.freebsd.org> From: Yuri Message-ID: <989bea15-de1b-a2af-1221-72da9dbe4f06@freebsd.org> Date: Sun, 25 Aug 2019 14:47:41 -0700 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:60.0) Gecko/20100101 Thunderbird/60.8.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Content-Language: en-US X-Rspamd-Queue-Id: 46Gpdt2jxJz4WrD X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-2.92 / 15.00]; local_wl_from(0.00)[freebsd.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.996,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; NEURAL_HAM_SHORT(-0.92)[-0.921,0]; ASN(0.00)[asn:7961, ipnet:198.144.192.0/20, country:US] X-BeenThere: svn-ports-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the ports tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 25 Aug 2019 21:47:46 -0000 On 2019-08-25 14:23, Adam Weinberger wrote: > On Sun, Aug 25, 2019 at 11:03 AM Yuri Victorovich wrote: >> Author: yuri >> Date: Sun Aug 25 17:03:37 2019 >> New Revision: 509806 >> URL: https://svnweb.freebsd.org/changeset/ports/509806 >> >> Log: >> math/blasfeo: Specify TARGET in architecture-specific way, this fixes build on non-Intel architectures >> >> Reported by: fallout >> >> Modified: >> head/math/blasfeo/Makefile >> >> Modified: head/math/blasfeo/Makefile >> ============================================================================== >> --- head/math/blasfeo/Makefile Sun Aug 25 16:55:07 2019 (r509805) >> +++ head/math/blasfeo/Makefile Sun Aug 25 17:03:37 2019 (r509806) >> @@ -2,6 +2,7 @@ >> >> PORTNAME= blasfeo >> DISTVERSION= 0.1.1 >> +PORTREVISION= 1 >> CATEGORIES= math >> >> MAINTAINER= yuri@FreeBSD.org >> @@ -13,5 +14,23 @@ LICENSE_FILE= ${WRKSRC}/LICENSE.txt >> USES= cmake >> USE_GITHUB= yes >> GH_ACCOUNT= giaf >> + >> +CMAKE_ARGS= -DTARGET:STRING=GENERIC >> + >> +OPTIONS_SINGLE= ${ARCH:C/amd64/TARGET/:C/[a-z].*//} # architecture-wise options are based on the list in Makefile.rule >> +OPTIONS_SINGLE_TARGET= ${ARCH:C/amd64/GENERIC X64_INTEL_HASWELL X64_INTEL_SANDY_BRIDGE X64_INTEL_CORE X64_AMD_BULLDOZER/:C/[a-z].*//} >> +OPTIONS_DEFAULT= ${ARCH:C/amd64/GENERIC/:C/[a-z].*//} >> +# TODO ARM also has SIMD acceleration >> + >> +GENERIC_DESC= Generic C code without SIMD acceleration >> +X64_INTEL_HASWELL_DESC= x86_64 architecture with AVX2 and FMA ISA (64 bit OS) >> +X64_INTEL_SANDY_BRIDGE_DESC= x86_64 architecture with AVX ISA (64 bit OS) >> +X64_INTEL_CORE_DESC= x86_64 architecture with SSE3 (64 bit OS) >> +X64_AMD_BULLDOZER_DESC= x86_64 architecture with AVX and FMA ISA (64 bit OS) >> + >> +X64_INTEL_HASWELL_CMAKE_ON= -DTARGET:STRING=X64_INTEL_HASWELL >> +X64_INTEL_SANDY_BRIDGE_CMAKE_ON= -DTARGET:STRING=X64_INTEL_SANDY_BRIDGE >> +X64_INTEL_CORE_CMAKE_ON= -DTARGET:STRING=X64_INTEL_CORE >> +X64_AMD_BULLDOZER_CMAKE_ON= -DTARGET:STRING=X64_AMD_BULLDOZER >> >> .include > Hi Yuri, > > This is clever, but it doesn't feel like a good use of OPTIONS. If a > builder CPU rev changes, the package changes, which prevents some > reproducibility. Dynamic, per-host OPTIONS changes are not what the > OPTIONS paradigm generally does. > > The way this kind of thing is normally handled is by adding an > OPTIMIZED_CFLAGS option, which could then contain the logic you have > there. > > If people really will want to pick a target they don't run, then keep > them as options but still make GENERIC the default. If people will > only want to build for the target they're running, then this should > probably be implemented as a CMakeLists.txt patch. > > # Adam > > Hi Adam, The default if GENERIC in all cases, which means generic C code. Port options only allow to upgrade this manually. Yuri