From owner-svn-ports-head@freebsd.org Sun Aug 25 21:23:51 2019 Return-Path: Delivered-To: svn-ports-head@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 72FCCC55D6 for ; Sun, 25 Aug 2019 21:23:51 +0000 (UTC) (envelope-from adamw@adamw.org) Received: from mail-wm1-x343.google.com (mail-wm1-x343.google.com [IPv6:2a00:1450:4864:20::343]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 46Gp6G24Zkz4Vw9 for ; Sun, 25 Aug 2019 21:23:50 +0000 (UTC) (envelope-from adamw@adamw.org) Received: by mail-wm1-x343.google.com with SMTP id m125so13919427wmm.3 for ; Sun, 25 Aug 2019 14:23:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=adamw-org.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=6CdDN+zH8TLhtbtrSgIWE43NM/a0SuAGPIAj1an6joo=; b=FntC+nK6biGA4JWgMhB/nQU7SBEQFDF+HkggUgidPpQ1UoZzUxqs4C4WMBr0IjH9uV vGTRWTkShyvAo59+5/1NGZOocBk8IvvCZ6BIUW/VpJCiikjpXT3zHqzhVS1jGBYZu8Ib STf2sG33mZJqbqH0uailcgI8D3w0w6vsshtYSKNGL9UAHV44pWDIPbzXkpPMnYc1Pxbi OuzHfwEwJGKTjEBY3qAnB3qH7gJGTBc9vWfosWuqCT9TvGROXkMgvD3dp8KpHj68uK/O 9Fzr/DRED/Vp8znIhUeHZvA+r8soAAjQqAVOCheAfqe0m8N1URDjg4n2GNfcpZI/GwNI j10g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=6CdDN+zH8TLhtbtrSgIWE43NM/a0SuAGPIAj1an6joo=; b=ae2EWp3lt5VxmDQYQbPKWC6UZxNsZFfG3xsrlaaRKdKsBQ+hOCUgPDWcPNqi/2BAoT G5oL6rMU0KiN90XSm/eHR2zbsXpCAhUke6HJOFnQ1kjm/Y9zDxWN7QJ+213RqiIL06nP e1RaquX9pbFV2sp939Gb6AQ26OSg77ovNQOxIyVNLrCaTXve3vMzLgqTUlo13P4OPBLt oRDWGgTFxXwgKpyPW6UalJQJQ+76BBnVagKkoCSGls409PUz2syo71I+Qoi9X9hcPB4B 0a0BFTxdy4gbn/I6J5q8q+92oewnH7jCPt7eXvgRb2AaXSX2fAmsi3DiijqRrAXlV7YW hIHg== X-Gm-Message-State: APjAAAWFvmnsRmIaOFJWE/3oX3plfgHTv1SLkZ8R+YvdHsH7urieMBw4 9o964hE280Zys5LgzT7TYn0Hz4f4IYOSw1t5MKPYxg== X-Google-Smtp-Source: APXvYqxgOhBmz0mEv+cae3+jd/emphCXxvj7A8D0HR0B+SgYYzeGtN+FboyoYnwPAxpWwqJJ+Abh32FKYJhtU7UvtC0= X-Received: by 2002:a1c:1f41:: with SMTP id f62mr18300459wmf.176.1566768228533; Sun, 25 Aug 2019 14:23:48 -0700 (PDT) MIME-Version: 1.0 References: <201908251703.x7PH3bbw038772@repo.freebsd.org> In-Reply-To: <201908251703.x7PH3bbw038772@repo.freebsd.org> From: Adam Weinberger Date: Sun, 25 Aug 2019 15:23:32 -0600 Message-ID: Subject: Re: svn commit: r509806 - head/math/blasfeo To: Yuri Victorovich Cc: ports-committers , svn-ports-all , svn-ports-head Content-Type: text/plain; charset="UTF-8" X-Rspamd-Queue-Id: 46Gp6G24Zkz4Vw9 X-Spamd-Bar: --- Authentication-Results: mx1.freebsd.org; dkim=pass header.d=adamw-org.20150623.gappssmtp.com header.s=20150623 header.b=FntC+nK6; dmarc=none; spf=pass (mx1.freebsd.org: domain of adamw@adamw.org designates 2a00:1450:4864:20::343 as permitted sender) smtp.mailfrom=adamw@adamw.org X-Spamd-Result: default: False [-3.91 / 15.00]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; R_DKIM_ALLOW(-0.20)[adamw-org.20150623.gappssmtp.com:s=20150623]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_THREE(0.00)[4]; R_SPF_ALLOW(-0.20)[+ip6:2a00:1450:4000::/36]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; MIME_GOOD(-0.10)[text/plain]; PREVIOUSLY_DELIVERED(0.00)[svn-ports-head@freebsd.org]; DMARC_NA(0.00)[adamw.org]; TO_MATCH_ENVRCPT_SOME(0.00)[]; TO_DN_ALL(0.00)[]; DKIM_TRACE(0.00)[adamw-org.20150623.gappssmtp.com:+]; NEURAL_HAM_SHORT(-0.98)[-0.983,0]; RCVD_IN_DNSWL_NONE(0.00)[3.4.3.0.0.0.0.0.0.0.0.0.0.0.0.0.0.2.0.0.4.6.8.4.0.5.4.1.0.0.a.2.list.dnswl.org : 127.0.5.0]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+]; IP_SCORE(-0.43)[ip: (3.24), ipnet: 2a00:1450::/32(-3.01), asn: 15169(-2.33), country: US(-0.05)]; ASN(0.00)[asn:15169, ipnet:2a00:1450::/32, country:US]; RCVD_COUNT_TWO(0.00)[2]; RCVD_TLS_ALL(0.00)[] X-BeenThere: svn-ports-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the ports tree for head List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 25 Aug 2019 21:23:51 -0000 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 -- Adam Weinberger adamw@adamw.org https://www.adamw.org