Am 15.08.2012 16:55, schrieb Peter Maydell: > On 15 August 2012 15:47, Andreas Färber <afaer...@suse.de> wrote: >> Am 11.08.2012 23:34, schrieb Peter Maydell: >>> +# Default objcc to clang if available, otherwise use CC >>> +if has clang; then >>> + objcc=clang >> >> On IRC I had commented that I find defaulting to clang whenever clang is >> available too aggressive (it may be some /usr/local/bin version that >> doesn't even have the right host architecture support compiled in). >> I won't object to this patch but would appreciate a follow-up limiting >> this to v10.8+ where it's actually needed and keep using gcc elsewhere. > > Mmm. It might be better to explicitly test for a compiler > with Blocks support (although even then you might end up > with clang on pre-10.8; I don't really want to check for "does > header Foo need blocks support" because that seems a bit fragile.)
A simple does-clang-compile-a-hello-word-for-host check, falling back to gcc, should catch the worst regressions as well. Andreas -- SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer; HRB 16746 AG Nürnberg