public inbox for kvm@vger.kernel.org
 help / color / mirror / Atom feed
From: Andrew Jones <drjones@redhat.com>
To: kvmarm@lists.cs.columbia.edu, kvm@vger.kernel.org
Cc: christoffer.dall@linaro.org, pbonzini@redhat.com
Subject: [PATCH v5 02/19] makefile and run_tests tweaks
Date: Wed, 11 Jun 2014 16:01:17 +0200	[thread overview]
Message-ID: <1402495294-30737-3-git-send-email-drjones@redhat.com> (raw)
In-Reply-To: <1402495294-30737-1-git-send-email-drjones@redhat.com>

- remove a redundant '-display none'
- remove a redundant -g from CFLAGS
- remove a useless -I../include/x86 from CFLAGS
- remove lib autodep files on make clean

Signed-off-by: Andrew Jones <drjones@redhat.com>
Acked-by: Christoffer Dall <christoffer.dall@linaro.org>
---
v4: no change other than rebase
v3: reword run_tests.sh help text [Christoffer Dall]
---
 Makefile              | 11 ++++++-----
 config-x86-common.mak | 16 +++++++---------
 run_tests.sh          |  6 +++---
 3 files changed, 16 insertions(+), 17 deletions(-)

diff --git a/Makefile b/Makefile
index 444b6531b8836..17307d1dfd760 100644
--- a/Makefile
+++ b/Makefile
@@ -6,16 +6,16 @@ DESTDIR := $(PREFIX)/share/qemu/tests
 .PHONY: arch_clean clean
 
 #make sure env CFLAGS variable is not used
-CFLAGS = -g
+CFLAGS =
 
 libgcc := $(shell $(CC) --print-libgcc-file-name)
 
 libcflat := lib/libcflat.a
 cflatobjs := \
+	lib/argv.o \
 	lib/printf.o \
 	lib/string.o \
 	lib/report.o
-cflatobjs += lib/argv.o
 
 #include architecure specific make rules
 include config-$(ARCH).mak
@@ -26,8 +26,9 @@ include config-$(ARCH).mak
 cc-option = $(shell if $(CC) $(1) -S -o /dev/null -xc /dev/null \
               > /dev/null 2>&1; then echo "$(1)"; else echo "$(2)"; fi ;)
 
-CFLAGS += -O1
-CFLAGS += $(autodepend-flags) -g -fomit-frame-pointer -Wall
+CFLAGS += -g
+CFLAGS += $(autodepend-flags) -Wall
+CFLAGS += $(call cc-option, -fomit-frame-pointer, "")
 CFLAGS += $(call cc-option, -fno-stack-protector, "")
 CFLAGS += $(call cc-option, -fno-stack-protector-all, "")
 CFLAGS += -I.
@@ -52,4 +53,4 @@ install:
 	install $(tests_and_config) $(DESTDIR)
 
 clean: arch_clean
-	$(RM) *.o *.a .*.d $(libcflat) $(cflatobjs)
+	$(RM) *.o *.a .*.d lib/.*.d $(libcflat) $(cflatobjs)
diff --git a/config-x86-common.mak b/config-x86-common.mak
index 93c9fee875085..84cce7065d400 100644
--- a/config-x86-common.mak
+++ b/config-x86-common.mak
@@ -1,13 +1,9 @@
 #This is a make file with common rules for both x86 & x86-64
 
-CFLAGS += -I../include/x86
-
 all: test_cases
 
-cflatobjs += \
-	lib/x86/io.o \
-	lib/x86/smp.o
-
+cflatobjs += lib/x86/io.o
+cflatobjs += lib/x86/smp.o
 cflatobjs += lib/x86/vm.o
 cflatobjs += lib/x86/fwcfg.o
 cflatobjs += lib/x86/apic.o
@@ -20,15 +16,17 @@ $(libcflat): LDFLAGS += -nostdlib
 $(libcflat): CFLAGS += -ffreestanding -I lib
 
 CFLAGS += -m$(bits)
+CFLAGS += -O1
 
 libgcc := $(shell $(CC) -m$(bits) --print-libgcc-file-name)
 
 FLATLIBS = lib/libcflat.a $(libgcc)
 %.elf: %.o $(FLATLIBS) flat.lds
-	$(CC) $(CFLAGS) -nostdlib -o $@ -Wl,-T,flat.lds $(filter %.o, $^) $(FLATLIBS)
+	$(CC) $(CFLAGS) -nostdlib -o $@ -Wl,-T,flat.lds \
+		$(filter %.o, $^) $(FLATLIBS)
 
 %.flat: %.elf
-	objcopy -O elf32-i386 $^ $@
+	$(OBJCOPY) -O elf32-i386 $^ $@
 
 tests-common = $(TEST_DIR)/vmexit.flat $(TEST_DIR)/tsc.flat \
                $(TEST_DIR)/smptest.flat  $(TEST_DIR)/port80.flat \
@@ -109,7 +107,7 @@ $(TEST_DIR)/debug.elf: $(cstart.o) $(TEST_DIR)/debug.o
 
 arch_clean:
 	$(RM) $(TEST_DIR)/*.o $(TEST_DIR)/*.flat $(TEST_DIR)/*.elf \
-	$(TEST_DIR)/.*.d $(TEST_DIR)/lib/.*.d $(TEST_DIR)/lib/*.o
+	$(TEST_DIR)/.*.d lib/x86/.*.d
 
 api/%.o: CFLAGS += -m32
 
diff --git a/run_tests.sh b/run_tests.sh
index 55ecac5bed3a4..b077091da18b3 100755
--- a/run_tests.sh
+++ b/run_tests.sh
@@ -27,7 +27,7 @@ function run()
         return
     fi
 
-	cmdline="./x86-run $kernel -smp $smp -display none $opts"
+    cmdline="./x86-run $kernel -smp $smp $opts"
     if [ $verbose != 0 ]; then
         echo $cmdline
     fi
@@ -92,8 +92,8 @@ Usage: $0 [-g group] [-h] [-v]
     -h: Output this help text
     -v: Enables verbose mode
 
-Set the environment variable QEMU=/path/to/qemu-system-x86_64 to allow the
-internally used x86-run to pick up the right qemu binary.
+Set the environment variable QEMU=/path/to/qemu-system-x86_64 to
+specify the appropriate qemu binary for x86-run.
 
 EOF
 }
-- 
1.9.3


  parent reply	other threads:[~2014-06-11 14:01 UTC|newest]

Thread overview: 45+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-06-11 14:01 [PATCH v5 00/19] kvm-unit-tests/arm: initial drop Andrew Jones
2014-06-11 14:01 ` [PATCH v5 01/19] remove unused files Andrew Jones
2014-06-11 14:01 ` Andrew Jones [this message]
2014-06-11 14:01 ` [PATCH v5 03/19] clean root dir of all x86-ness Andrew Jones
2014-06-12 10:31   ` Paolo Bonzini
2014-06-12 10:40     ` Andrew Jones
2014-06-12 10:42       ` Paolo Bonzini
2014-06-12 10:54         ` Andrew Jones
2014-06-11 14:01 ` [PATCH v5 04/19] add distclean target and gitignore more Andrew Jones
2014-06-12 10:36   ` Paolo Bonzini
2014-06-14 13:17     ` Christoffer Dall
2014-06-11 14:01 ` [PATCH v5 05/19] add 'make cscope' support Andrew Jones
2014-06-11 14:01 ` [PATCH v5 07/19] libfdt: get libfdt to build Andrew Jones
2014-06-11 14:01 ` [PATCH v5 08/19] add support for Linux device trees Andrew Jones
2014-06-12  9:19   ` Christoffer Dall
2014-06-11 14:01 ` [PATCH v5 09/19] libcflat: add abort() and assert() Andrew Jones
2014-06-12 10:48   ` Paolo Bonzini
2014-06-12 11:07     ` Andrew Jones
2014-06-12 11:09       ` Paolo Bonzini
2014-06-11 14:01 ` [PATCH v5 10/19] Introduce asm-generic/*.h files Andrew Jones
2014-06-11 14:01 ` [PATCH v5 11/19] add minimal virtio support for devtree virtio-mmio Andrew Jones
2014-06-14 13:30   ` Christoffer Dall
2014-06-11 14:01 ` [PATCH v5 12/19] Introduce virtio-testdev Andrew Jones
2014-06-12 10:16   ` Paolo Bonzini
2014-06-12 11:30     ` Andrew Jones
2014-06-12 11:56       ` Paolo Bonzini
2014-06-11 14:01 ` [PATCH v5 13/19] libcflat: clean up libcflat.h and add string.h Andrew Jones
2014-06-12 10:52   ` Paolo Bonzini
2014-06-12 11:12     ` Andrew Jones
2014-06-11 14:01 ` [PATCH v5 14/19] printf: support field padding Andrew Jones
2014-06-11 14:01 ` [PATCH v5 15/19] arm: initial drop Andrew Jones
2014-06-14 14:16   ` Christoffer Dall
2014-06-16  7:36     ` Andrew Jones
2014-06-11 14:01 ` [PATCH v5 16/19] arm: Add spinlock implementation Andrew Jones
2014-06-11 14:01 ` [PATCH v5 17/19] arm: Add IO accessors to avoid register-writeback Andrew Jones
2014-06-11 14:01 ` [PATCH v5 18/19] arm: add useful headers from the Linux kernel Andrew Jones
2014-06-11 14:01 ` [PATCH v5 19/19] arm: vectors support Andrew Jones
     [not found] ` <1402495294-30737-7-git-send-email-drjones@redhat.com>
2014-06-12 10:44   ` [PATCH v5 06/19] libfdt: Import libfdt source Paolo Bonzini
2014-06-12 10:59     ` Andrew Jones
2014-06-12 14:39       ` Paolo Bonzini
2014-06-12 11:09   ` Paolo Bonzini
2014-06-12 10:54 ` [PATCH v5 00/19] kvm-unit-tests/arm: initial drop Paolo Bonzini
2014-06-14 14:44 ` Christoffer Dall
2014-06-16  7:46   ` Andrew Jones
2014-06-16  7:56     ` Christoffer Dall

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1402495294-30737-3-git-send-email-drjones@redhat.com \
    --to=drjones@redhat.com \
    --cc=christoffer.dall@linaro.org \
    --cc=kvm@vger.kernel.org \
    --cc=kvmarm@lists.cs.columbia.edu \
    --cc=pbonzini@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox