Finding the machine CPU arch

Rainer Müller raimue at macports.org
Wed Mar 6 12:54:46 PST 2013


Hello,

On 2013-03-06 20:43, Vincent Habchi wrote:
>> Couldn't we just select variants like +sse, +sse2, etc. based on the
>> current architecture?
> 
> I know you are fundamentally against auto-configuration. I see, however, a few reasons why it is a good choice in case of Atlas:
> 
> 1. From me egoistic and self-centered point of view, I would have to write/maintain a lot of variants with mutual exclusions, etc. which would not simplify the Portfile readability; I am also unsure on how to handle flags variants and universal build (e.g. +avx during a i386 universal build);

Sorry, it's not that I want to put a lot of work on your stack, so
please don't take this as offense. I am just making proposals on how
this could be solved such that we do not loose the ability to distribute
binary archives. Furthermore, sometimes I just don't know all the
details of the port in question and do not spend enough time to rule out
all edge cases - such as +avx for universal builds.

I appreciate the contributions by all port maintainers. If you say that
this would cost more time than you are able to offer and want to invest
into MacPorts, that's totally fine and it's okay if this is dropped.
Please just do it your way as MacPorts would not be the same without the
various contributions from users from all fields!

> 2. Most of the users won’t build Atlas as a standalone package but rather as a dependency automatically pulled in by the building process. In that case, there is absolutely no point in using variants (both systems would achieve the same goal, assuming the default variants build for maximum speed);

> 3. I don’t expect most users of MacPorts, although maybe slightly more technically aware that the standard Mac owner, to know all the arcane about sse/avx. If we except cross-compilation, what would be the point of not compiling for the native arch?

The version using variant is reproducible as everyone would still use
the same flags and gets the same result. These binaries could be shared
between machines with the canonical identifier of
name/version/revision/variants attached. This is the key concept of our
pre-compiled archives.

Rainer


More information about the macports-dev mailing list