Blob Blame History Raw
From ce99e244faff3cae27b2e3511febd8bdc5bd0e03 Mon Sep 17 00:00:00 2001
From: Wim Taymans <wtaymans@redhat.com>
Date: Mon, 7 Sep 2015 13:43:55 +0200
Subject: [PATCH] compiler: also prefer the backup function when no target

If we don't have a compiler target (like for ppc64), prefer to use the
backup function instead of doing full emulation.
---
 orc/orccompiler.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/orc/orccompiler.c b/orc/orccompiler.c
index 0086f77..0c2ff23 100644
--- a/orc/orccompiler.c
+++ b/orc/orccompiler.c
@@ -318,7 +318,7 @@ orc_program_compile_full (OrcProgram *program, OrcTarget *target,
     program->orccode->vars[i].value = compiler->vars[i].value;
   }
 
-  if (program->backup_func && _orc_compiler_flag_backup) {
+  if (program->backup_func && (_orc_compiler_flag_backup || target == NULL)) {
     orc_compiler_error (compiler, "Compilation disabled, using backup");
     compiler->result = ORC_COMPILE_RESULT_UNKNOWN_COMPILE;
     goto error;
-- 
2.4.3