Am 07.04.2012 18:23, schrieb Peter Maydell:
On 7 April 2012 16:53, Stefan Weil <s...@weilnetz.de> wrote:
Not all i386 / x86_64 hosts use ELF.
Ask the compiler whether ELF is used.
 tcg/i386/tcg-target.c |    6 +++++-

+#if !defined(__ELF__)
+    /* Host machine without ELF. */

Hmm, should this check maybe go in the generic tcg code
rather than the i386 specific bits?

-- PMM

Extract from tcg/tcg.c:

   #ifdef ELF_HOST_MACHINE
   /* In order to use this feature, the backend needs to do three things:

       (1) Define ELF_HOST_MACHINE to indicate both what value to
           put into the ELF image and to indicate support for the feature.

       (2) Define tcg_register_jit.  This should create a buffer containing
           the contents of a .debug_frame section that describes the post-
           prologue unwind info for the tcg machine.

       (3) Call tcg_register_jit_int, with the constructed .debug_frame.
   */


So the generic tcg code checks ELF_HOST_MACHINE.

I see no reasonable way to simplify the checks, because each tcg target
must decide whether it supports that feature or not.

Happy Easter

Stefan W.


Reply via email to