From patchwork Wed Apr 14 14:03:31 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jan Kiszka X-Patchwork-Id: 92410 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter.kernel.org (8.14.3/8.14.3) with ESMTP id o3EE3nVc017067 for ; Wed, 14 Apr 2010 14:03:49 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755495Ab0DNODr (ORCPT ); Wed, 14 Apr 2010 10:03:47 -0400 Received: from thoth.sbs.de ([192.35.17.2]:16299 "EHLO thoth.sbs.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751127Ab0DNODq (ORCPT ); Wed, 14 Apr 2010 10:03:46 -0400 Received: from mail2.siemens.de (localhost [127.0.0.1]) by thoth.sbs.de (8.12.11.20060308/8.12.11) with ESMTP id o3EE3VSV007936; Wed, 14 Apr 2010 16:03:32 +0200 Received: from [139.25.109.167] (mchn012c.ww002.siemens.net [139.25.109.167] (may be forged)) by mail2.siemens.de (8.12.11.20060308/8.12.11) with ESMTP id o3EE3VSl018738; Wed, 14 Apr 2010 16:03:31 +0200 Message-ID: <4BC5CB33.2070604@siemens.com> Date: Wed, 14 Apr 2010 16:03:31 +0200 From: Jan Kiszka User-Agent: Mozilla/5.0 (X11; U; Linux i686 (x86_64); de; rv:1.8.1.12) Gecko/20080226 SUSE/2.0.0.12-1.1 Thunderbird/2.0.0.12 Mnenhy/0.7.5.666 MIME-Version: 1.0 To: Avi Kivity , Marcelo Tosatti CC: kvm Subject: [PATCH] kvm test: Fix i386 crossbuild Sender: kvm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: kvm@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.3 (demeter.kernel.org [140.211.167.41]); Wed, 14 Apr 2010 14:03:50 +0000 (UTC) diff --git a/kvm/user/config-x86-common.mak b/kvm/user/config-x86-common.mak index 63cca42..f3172fb 100644 --- a/kvm/user/config-x86-common.mak +++ b/kvm/user/config-x86-common.mak @@ -18,6 +18,8 @@ $(libcflat): CFLAGS += -ffreestanding -I test/lib CFLAGS += -m$(bits) +libgcc := $(shell $(CC) -m$(bits) --print-libgcc-file-name) + FLATLIBS = test/lib/libcflat.a $(libgcc) %.flat: %.o $(FLATLIBS) $(CC) $(CFLAGS) -nostdlib -o $@ -Wl,-T,flat.lds $^ $(FLATLIBS) @@ -32,7 +34,7 @@ test_cases: $(tests-common) $(tests) $(TEST_DIR)/%.o: CFLAGS += -std=gnu99 -ffreestanding -I test/lib -I test/lib/x86 $(TEST_DIR)/bootstrap: $(TEST_DIR)/bootstrap.o - $(CC) -nostdlib -o $@ -Wl,-T,bootstrap.lds $^ + $(CC) $(CFLAGS) -nostdlib -o $@ -Wl,-T,bootstrap.lds $^ $(TEST_DIR)/access.flat: $(cstart.o) $(TEST_DIR)/access.o $(TEST_DIR)/print.o