qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH] configure: Default to 'cc', not 'gcc', on MacOS


From: Peter Maydell
Subject: Re: [Qemu-devel] [PATCH] configure: Default to 'cc', not 'gcc', on MacOS X
Date: Sat, 17 Nov 2012 13:10:10 +0000

On 17 November 2012 13:02, Andreas Färber <address@hidden> wrote:
> Am 16.11.2012 17:37, schrieb Peter Maydell:
>> When building for MacOS X, default the C compiler to 'cc' (usually
>> clang) rather than 'gcc'. This avoids the Apple 'gcc', which is
>> generally an elderly llvm-gcc provided mostly for legacy purposes,
>> in favour of the best supported compiler available on the platform.
>>
>> Signed-off-by: Peter Maydell <address@hidden>
>> ---
>> I now seem to be getting failures to compile due to weak refs on
>> clang as well, but defaulting to cc seems like a good long term
>> plan anyway. I've mostly been building and testing with --cc=clang
>> so this isn't a sudden compiler switch from my point of view.
>> I'm ambivalent about whether this should go in 1.3 or not, given
>> it doesn't actually fix the weakref issues.
>>
>>  configure |   19 +++++++++++++++++--
>>  1 file changed, 17 insertions(+), 2 deletions(-)
>>
>> diff --git a/configure b/configure
>> index f847ee2..ec9932b 100755
>> --- a/configure
>> +++ b/configure
>> @@ -116,7 +116,13 @@ audio_drv_list=""
>>  audio_card_list="ac97 es1370 sb16 hda"
>>  audio_possible_cards="ac97 es1370 sb16 cs4231a adlib gus hda"
>>  block_drv_whitelist=""
>> -host_cc="gcc"
>> +if test "$(uname -s)" = "Darwin"; then
>> +  # On MacOS X the standard supported system compiler is 'cc' (usually 
>> clang),
>> +  # and 'gcc' is a legacy llvm-gcc which is rather elderly and best avoided.
>
> This comment strikes me as wrong in this generality. It should at least
> be qualified with OSX version numbers.

How about "and if 'gcc' is not the same as 'cc' then it is a legacy llvm-gcc
which is rather elderly and best avoided" ? I'd rather not get into having
to research which versions of OSX shipped with which compiler as 'cc',
when really the point is that 'cc' will always give you whichever compiler
Apple thought was the best default for that version.

-- PMM



reply via email to

[Prev in Thread] Current Thread [Next in Thread]