Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 15 Jul 2016 11:10:03 -0400
From:      "Mikhail T." <mi+thun@aldan.algebra.com>
To:        "freebsd-ports@FreeBSD.ORG" <freebsd-ports@FreeBSD.ORG>
Subject:   binary packages and CPU-features
Message-ID:  <72dd14cc-7128-6d62-8c02-18afc647664d@aldan.algebra.com>

next in thread | raw e-mail | index | archive | help
Hello!

What is the general approach to porting software, which uses advanced
CPU-features (like SSE), but has no run-time detection of them?

I just added graphics/lepton, for example, which has some functions
implemented with AVX2 intrinsics -- but whether or not to use them is
determined at compile-time... The original code also required SSE4, but
I managed to patch it to lower the requirements to SSSE3.

Typically, pre-built packages target the lowest, but this particular
program will not build without at least SSSE3 available at all.

Should there be three separate packages: lepton-avx2, lepton-ssse3, and
lepton-sse4? Maybe, our package-building infrastructure should
automatically produce different packages from ports expressing such a
desire by declaring, for example:

    CPUSPECIFIC=        avx2 ssse3 sse4
    CPUSPECIFIC_AVX2=   -mavx2
    CPUSPECIFIC_SSSE3=  -mssse3
    CPUSPECIFIC_SSE4=   -msse4.1

Should I simply set NO_PACKAGE -- to avoid a situation when a prebuilt
binary will not even start for some users (such as on older Opterons)?

    -mi

    -mi




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?72dd14cc-7128-6d62-8c02-18afc647664d>