From patchwork Tue May 11 16:23:32 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alexander Graf X-Patchwork-Id: 52301 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [199.232.76.165]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id F0B9FB7DA1 for ; Wed, 12 May 2010 02:25:47 +1000 (EST) Received: from localhost ([127.0.0.1]:43949 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OBsHA-0004ns-TY for incoming@patchwork.ozlabs.org; Tue, 11 May 2010 12:25:44 -0400 Received: from [140.186.70.92] (port=59667 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OBsF5-00044N-Vn for qemu-devel@nongnu.org; Tue, 11 May 2010 12:23:36 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OBsF4-0008Mr-8e for qemu-devel@nongnu.org; Tue, 11 May 2010 12:23:35 -0400 Received: from cantor.suse.de ([195.135.220.2]:40167 helo=mx1.suse.de) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OBsF4-0008Mh-0u for qemu-devel@nongnu.org; Tue, 11 May 2010 12:23:34 -0400 Received: from relay1.suse.de (charybdis-ext.suse.de [195.135.221.2]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.suse.de (Postfix) with ESMTP id 87F4D8D893; Tue, 11 May 2010 18:23:33 +0200 (CEST) From: Alexander Graf To: qemu-devel@nongnu.org Date: Tue, 11 May 2010 18:23:32 +0200 Message-Id: <1273595012-19587-1-git-send-email-agraf@suse.de> X-Mailer: git-send-email 1.6.0.2 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.4-2.6 Cc: Aurelien Jarno Subject: [Qemu-devel] [PATCH] [S390] Remove warning in tcg stub (tcg_out_reloc) X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org On S390 we don't have a real TCG implementation but use a stub instead. This stub obviously doesn't call any of the TCG helper functions that are usually used by the other TCG targets. If such a helper function is static though, we end up getting a warning that turns into an error thanks to Werror. So to successfully compile qemu, we need to get rid of it. In this case it's tcg_out_reloc. To do that, I figured the easiest way is to call tcg_out_reloc with dumb parameters after an abort call. That way the code in question never gets executed, but we got rid of the warning. Signed-off-by: Alexander Graf --- tcg/s390/tcg-target.c | 6 ++++++ 1 files changed, 6 insertions(+), 0 deletions(-) diff --git a/tcg/s390/tcg-target.c b/tcg/s390/tcg-target.c index 265194a..f1a336d 100644 --- a/tcg/s390/tcg-target.c +++ b/tcg/s390/tcg-target.c @@ -35,6 +35,12 @@ static void patch_reloc(uint8_t *code_ptr, int type, tcg_target_long value, tcg_target_long addend) { tcg_abort(); + + /* + * XXX We need to call this function at least once, since it's static. + * Please remove that code when implementing real s390x tcg support. + */ + tcg_out_reloc(NULL, NULL, 0, 0, 0); } static inline int tcg_target_get_call_iarg_regs_count(int flags)