From patchwork Sat Mar 31 18:40:23 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michael Walle X-Patchwork-Id: 149883 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id DB6CAB6FE0 for ; Sun, 1 Apr 2012 04:41:09 +1000 (EST) Received: from localhost ([::1]:37590 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SE3EX-0005nG-0M for incoming@patchwork.ozlabs.org; Sat, 31 Mar 2012 14:41:05 -0400 Received: from eggs.gnu.org ([208.118.235.92]:59713) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SE3EC-0005mt-KM for qemu-devel@nongnu.org; Sat, 31 Mar 2012 14:40:46 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SE3E8-0003ht-QJ for qemu-devel@nongnu.org; Sat, 31 Mar 2012 14:40:44 -0400 Received: from mail.serverraum.org ([78.47.150.89]:59372) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SE3E8-0003h1-KC for qemu-devel@nongnu.org; Sat, 31 Mar 2012 14:40:40 -0400 Received: from localhost (localhost [127.0.0.1]) by mail.serverraum.org (Postfix) with ESMTP id C87CD3F00A; Sat, 31 Mar 2012 20:40:37 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at mail.serverraum.org Received: from mail.serverraum.org ([127.0.0.1]) by localhost (web.serverraum.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id D69Li+Zc1PJs; Sat, 31 Mar 2012 20:40:37 +0200 (CEST) Received: from thanatos.fritz.box (95-89-251-205-dynip.superkabel.de [95.89.251.205]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.serverraum.org (Postfix) with ESMTPSA id 8B5373F00B; Sat, 31 Mar 2012 20:40:37 +0200 (CEST) From: Michael Walle To: qemu-devel@nongnu.org Date: Sat, 31 Mar 2012 20:40:23 +0200 Message-Id: <1333219227-18647-2-git-send-email-michael@walle.cc> X-Mailer: git-send-email 1.7.2.5 In-Reply-To: <1333219227-18647-1-git-send-email-michael@walle.cc> References: <1333219227-18647-1-git-send-email-michael@walle.cc> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) X-Received-From: 78.47.150.89 Cc: Blue Swirl , Michael Walle , Anthony Liguori Subject: [Qemu-devel] [PATCH 1/5] tests: fix out-of-tree building for lm32 target X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Signed-off-by: Michael Walle --- configure | 4 +++- tests/tcg/lm32/Makefile | 13 ++++++++----- 2 files changed, 11 insertions(+), 6 deletions(-) diff --git a/configure b/configure index b51a749..4ef5ec6 100755 --- a/configure +++ b/configure @@ -3876,7 +3876,8 @@ echo "QEMU_INCLUDES+=$includes" >> $config_target_mak done # for target in $targets # build tree in object directory in case the source is not in the current directory -DIRS="tests tests/tcg tests/tcg/cris slirp audio block net pc-bios/optionrom" +DIRS="tests tests/tcg tests/tcg/cris tests/tcg/lm32" +DIRS="$DIRS slirp audio block net pc-bios/optionrom" DIRS="$DIRS pc-bios/spapr-rtas" DIRS="$DIRS roms/seabios roms/vgabios" DIRS="$DIRS fsdev ui usb" @@ -3884,6 +3885,7 @@ DIRS="$DIRS qapi qapi-generated" DIRS="$DIRS qga trace qom" FILES="Makefile tests/tcg/Makefile qdict-test-data.txt" FILES="$FILES tests/tcg/cris/Makefile tests/tcg/cris/.gdbinit" +FILES="$FILES tests/tcg/lm32/Makefile" FILES="$FILES pc-bios/optionrom/Makefile pc-bios/keymaps" FILES="$FILES pc-bios/spapr-rtas/Makefile" FILES="$FILES roms/seabios/Makefile roms/vgabios/Makefile" diff --git a/tests/tcg/lm32/Makefile b/tests/tcg/lm32/Makefile index 03a1abb..9a00ef7 100644 --- a/tests/tcg/lm32/Makefile +++ b/tests/tcg/lm32/Makefile @@ -1,4 +1,4 @@ --include ../../config-host.mak +-include ../../../config-host.mak CROSS=lm32-elf- @@ -12,7 +12,10 @@ SIZE = $(CROSS)size LD = $(CC) OBJCOPY = $(CROSS)objcopy -LDFLAGS = -Tlinker.ld +TSRC_PATH = $(SRC_PATH)/tests/tcg/lm32 + +LDFLAGS = -T$(TSRC_PATH)/linker.ld +ASFLAGS += -Wa,-I,$(TSRC_PATH)/ CRT = crt.o TESTCASES += test_add.tst @@ -82,13 +85,13 @@ TESTCASES += test_xori.tst all: build -%.o: $(SRC_PATH)/tests/lm32/%.c +%.o: $(TSRC_PATH)/%.c $(CC) $(CFLAGS) -c $< -o $@ -%.o: $(SRC_PATH)/tests/lm32/%.S +%.o: $(TSRC_PATH)/%.S $(AS) $(ASFLAGS) -c $< -o $@ -%.tst: %.o macros.inc $(CRT) +%.tst: %.o $(TSRC_PATH)/macros.inc $(CRT) $(LD) $(LDFLAGS) $(NOSTDFLAGS) $(CRT) $< -o $@ build: $(CRT) $(TESTCASES)