From patchwork Fri Apr 7 06:58:10 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thomas Huth X-Patchwork-Id: 9668833 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 31D8D602B3 for ; Fri, 7 Apr 2017 06:58:18 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 1DB97285D2 for ; Fri, 7 Apr 2017 06:58:18 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 0E540285EC; Fri, 7 Apr 2017 06:58:18 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=2.0 tests=BAYES_00,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 9A6F7285D2 for ; Fri, 7 Apr 2017 06:58:17 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753105AbdDGG6Q (ORCPT ); Fri, 7 Apr 2017 02:58:16 -0400 Received: from mx1.redhat.com ([209.132.183.28]:38660 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752775AbdDGG6P (ORCPT ); Fri, 7 Apr 2017 02:58:15 -0400 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id AF59719CF24; Fri, 7 Apr 2017 06:58:14 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com AF59719CF24 Authentication-Results: ext-mx05.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx05.extmail.prod.ext.phx2.redhat.com; spf=pass smtp.mailfrom=thuth@redhat.com DKIM-Filter: OpenDKIM Filter v2.11.0 mx1.redhat.com AF59719CF24 Received: from thh440s.redhat.com (ovpn-116-101.ams2.redhat.com [10.36.116.101]) by smtp.corp.redhat.com (Postfix) with ESMTP id ED35718966; Fri, 7 Apr 2017 06:58:11 +0000 (UTC) From: Thomas Huth To: alex.bennee@linaro.org, pbonzini@redhat.com, rkrcmar@redhat.com Cc: drjones@redhat.com, kvm@vger.kernel.org, linux-arm-kernel@lists.infradead.org, kvmarm@lists.cs.columbia.edu, christoffer.dall@linaro.org, marc.zyngier@arm.com Subject: [RFC kvm-unit-tests PATCH 9/8] Makefiles: Fix up the powerpc build include and link paths Date: Fri, 7 Apr 2017 08:58:10 +0200 Message-Id: <1491548290-11401-1-git-send-email-thuth@redhat.com> In-Reply-To: <20170406190727.5624-9-alex.bennee@linaro.org> References: <20170406190727.5624-9-alex.bennee@linaro.org> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.29]); Fri, 07 Apr 2017 06:58:14 +0000 (UTC) Sender: kvm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: kvm@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP The changes for out-of-tree builds are here pretty much the same as for the ARM Makefile.common. Signed-off-by: Thomas Huth --- powerpc/Makefile.common | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/powerpc/Makefile.common b/powerpc/Makefile.common index e536ffe..1fbcafb 100644 --- a/powerpc/Makefile.common +++ b/powerpc/Makefile.common @@ -12,7 +12,10 @@ tests-common = \ $(TEST_DIR)/tm.elf \ $(TEST_DIR)/sprs.elf -tests-all = $(tests-common) $(tests) +scripts-common += $(TEST_DIR)/run +scripts-common += $(TEST_DIR)/unittests.cfg + +tests-all = $(tests-common) $(tests) $(scripts_common) all: $(TEST_DIR)/boot_rom.bin $(tests-all) ################################################################## @@ -21,14 +24,14 @@ CFLAGS += -std=gnu99 CFLAGS += -ffreestanding CFLAGS += -Wextra CFLAGS += -O2 -CFLAGS += -I lib -I lib/libfdt +CFLAGS += -I $(SRCDIR)/lib -I $(SRCDIR)/lib/libfdt -I lib CFLAGS += -Wa,-mregnames # We want to keep intermediate files .PRECIOUS: %.o asm-offsets = lib/$(ARCH)/asm-offsets.h -include scripts/asm-offsets.mak +include $(SRCDIR)/scripts/asm-offsets.mak cflatobjs += lib/util.o cflatobjs += lib/alloc.o @@ -44,10 +47,11 @@ cflatobjs += lib/powerpc/smp.o FLATLIBS = $(libcflat) $(LIBFDT_archive) %.elf: CFLAGS += $(arch_CFLAGS) %.elf: LDFLAGS = $(arch_LDFLAGS) -nostdlib -pie -n -%.elf: %.o $(FLATLIBS) powerpc/flat.lds $(cstart.o) $(reloc.o) - $(CC) $(CFLAGS) -c -o $(@:.elf=.aux.o) lib/auxinfo.c -DPROGNAME=\"$@\" +%.elf: %.o $(FLATLIBS) $(SRCDIR)/powerpc/flat.lds $(cstart.o) $(reloc.o) + $(CC) $(CFLAGS) -c -o $(@:.elf=.aux.o) $(SRCDIR)/lib/auxinfo.c \ + -DPROGNAME=\"$@\" $(LD) $(LDFLAGS) -o $@ \ - -T powerpc/flat.lds --build-id=none \ + -T $(SRCDIR)/powerpc/flat.lds --build-id=none \ $(filter %.o, $^) $(FLATLIBS) $(@:.elf=.aux.o) $(RM) $(@:.elf=.aux.o) @echo -n Checking $@ for unsupported reloc types...