[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: config.guess invoking cc
From: |
Adam R. Maxwell |
Subject: |
Re: config.guess invoking cc |
Date: |
Wed, 06 Nov 2013 21:22:14 -0800 |
On Nov 6, 2013, at 16:09 , Karl Berry <address@hidden> wrote:
> As I understand it again, it is a fact that all versions of Darwin later
> than X are on 64-bit hardware. Therefore, as far as I can see, it is
> not in principle necessary to run the compiler to determine it. And
> this would be good, because config.guess is used in plenty of situations
> that don't otherwise require a C compiler to be installed.
>
> So ... if you'd accept a patch to avoid $set_cc_for_build on new-enough
> Darwin, I can ask to determine what X is.
Karl has summarized the problem nicely. If it's okay to use /usr/bin/sw_vers
to determine version, pseudocode like this would work:
if sw_vers -productVersion |grep 10\.[0-6] ; then
# use existing code
else
# platform is darwin-x86_64; don't bother invoking cc
fi
$ sw_vers -productVersion
10.9
Alternately, uname -r could be used, but I'm not sure of the darwin version
numbering off the top of my head.
thanks,
Adam