On 11 November 2013 20:10, Andreas Tobler <andre...@freebsd.org> wrote:
> Paolo asked me to test and submit the below patch to fix compilation and
> link with clang.
>
> Paolo reduced the issue to a clang bug where dead code is not properly
> eliminated before linktime. (the clang bug ID: 17882)

Thanks for the patch. However, it looks a bit odd to me. Can
you quote the error message clang produces, please?

I think I would agree with the commenter in the bug report you
reference (http://llvm.org/bugs/show_bug.cgi?id=17882)
that this is not a clang bug. We shouldn't be relying on the
compiler's dead code elimination to get rid of references to
functions that don't exist in certain configurations. This will
always be unreliable (especially if compiling without optimization).
Instead we should either be using ifdefs or stub functions (probably
the latter in this case).

If you put a stub implementation of kvm_arch_get_supported_cpuid()
into target-i386/kvm-stub.c does this fix the compilation issue?

thanks
-- PMM

Reply via email to