From: "Andreas Färber" <andreas.faerber@web.de>
To: Peter Maydell <peter.maydell@linaro.org>
Cc: Paolo Bonzini <pbonzini@redhat.com>,
Anthony Liguori <aliguori@us.ibm.com>,
qemu-devel@nongnu.org, patches@linaro.org
Subject: Re: [Qemu-devel] [PATCH] configure: Default to 'cc', not 'gcc', on MacOS X
Date: Sat, 17 Nov 2012 14:02:07 +0100 [thread overview]
Message-ID: <50A78ACF.8070206@web.de> (raw)
In-Reply-To: <1353083843-17175-1-git-send-email-peter.maydell@linaro.org>
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 <peter.maydell@linaro.org>
> ---
> 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.
Andreas
> + host_cc="cc"
> +else
> + host_cc="gcc"
> +fi
> libs_softmmu=""
> libs_tools=""
> audio_pt_int=""
> @@ -250,7 +256,16 @@ done
> # Using uname is really, really broken. Once we have the right set of checks
> # we can eliminate its usage altogether.
>
> -cc="${CC-${cross_prefix}gcc}"
> +# Preferred compiler:
> +# ${CC} (if set)
> +# ${cross_prefix}gcc (if cross-prefix specified)
> +# system compiler
> +if test -z "${CC}${cross_prefix}"; then
> + cc="$host_cc"
> +else
> + cc="${CC-${cross_prefix}gcc}"
> +fi
> +
> ar="${AR-${cross_prefix}ar}"
> objcopy="${OBJCOPY-${cross_prefix}objcopy}"
> ld="${LD-${cross_prefix}ld}"
>
next prev parent reply other threads:[~2012-11-17 13:02 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-11-16 16:37 [Qemu-devel] [PATCH] configure: Default to 'cc', not 'gcc', on MacOS X Peter Maydell
2012-11-17 13:02 ` Andreas Färber [this message]
2012-11-17 13:10 ` Peter Maydell
2012-11-21 23:19 ` Peter Maydell
2012-11-22 0:04 ` Andreas Färber
2012-11-22 8:33 ` Peter Maydell
2012-11-22 8:38 ` Brad Smith
2012-11-22 8:41 ` Peter Maydell
2012-11-22 8:45 ` Brad Smith
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=50A78ACF.8070206@web.de \
--to=andreas.faerber@web.de \
--cc=aliguori@us.ibm.com \
--cc=patches@linaro.org \
--cc=pbonzini@redhat.com \
--cc=peter.maydell@linaro.org \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.