From mboxrd@z Thu Jan 1 00:00:00 1970 From: Andrew Jones Subject: Re: [kvm-unit-tests PATCH 2/2] arm/arm64 config: Fix arch_clean rule Date: Mon, 7 Sep 2015 16:37:33 +0200 Message-ID: <20150907143733.GF3014@hawk.localdomain> References: <1441185926-61587-1-git-send-email-a.spyridakis@virtualopensystems.com> <1441185926-61587-3-git-send-email-a.spyridakis@virtualopensystems.com> <20150904104835.GC3096@hawk.localdomain> <20150904140528.GH3096@hawk.localdomain> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: mttcg@greensocs.com, KVM General , Mark Burton , Claudio Fontana , QEMU Developers , Alvise Rigo , Jani Kokkonen , Alex =?iso-8859-1?Q?Benn=E9e?= , KONRAD =?iso-8859-1?Q?Fr=E9d=E9ric?= To: Alexander Spyridakis Return-path: Content-Disposition: inline In-Reply-To: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+gceq-qemu-devel=gmane.org@nongnu.org Sender: qemu-devel-bounces+gceq-qemu-devel=gmane.org@nongnu.org List-Id: kvm.vger.kernel.org On Mon, Sep 07, 2015 at 03:35:19PM +0200, Alexander Spyridakis wrote: > On 4 September 2015 at 16:05, Andrew Jones wrote: > > This doesn't reproduce for me. I did the following, and it worked > > fine. > > > > make distclean > > ./configure --arch=arm --cross-prefix=arm-linux-gnu- > > make > > ./configure --arch=arm64 --cross-prefix=aarch64-linux-gnu- > > make clean && make > > Ok I think I found the issue: > > config-arm-common.mak: > >arm_clean: libfdt_clean asm_offsets_clean > > $(RM) $(TEST_DIR)/*.{o,flat,elf} $(libeabi) $(eabiobjs) \ > > $(TEST_DIR)/.*.d lib/arm/.*.d > > config-x86-common.mak: > >arch_clean: > > $(RM) $(TEST_DIR)/*.o $(TEST_DIR)/*.flat $(TEST_DIR)/*.elf \ > > $(TEST_DIR)/.*.d lib/x86/.*.d > > I think the arm case tries to be too clever and on many systems it > fails (tested on debian:jessie,sid and ubuntu:14.04,15.04). Basically > the expression for the arm case fails to resolve, while using the > simpler x86 way works as expected. > > So is the following change acceptable in config-arm-common.mak? > > arm_clean: libfdt_clean asm_offsets_clean > >- $(RM) $(TEST_DIR)/*.{o,flat,elf} $(libeabi) $(eabiobjs) \ > >- $(TEST_DIR)/.*.d lib/arm/.*.d > >+ $(RM) $(TEST_DIR)/*.o $(TEST_DIR)/*.flat $(TEST_DIR)/*.elf \ > >+ $(libeabi) $(eabiobjs) $(TEST_DIR)/.*.d lib/arm/.*.d Ah, it's a dash vs. bash thing. Either we need to change all bashisms in the makefiles, or, since kvm-unit-tests already depends on bash for its scripts, then we might as well just tell make to use it too. This patch will fix it diff --git a/Makefile b/Makefile index 0d5933474cd8c..3e60b4f8e4a57 100644 --- a/Makefile +++ b/Makefile @@ -1,4 +1,6 @@ +SHELL := /bin/bash + ifeq ($(wildcard config.mak),) $(error run ./configure first. See ./configure -h) endif I'll probably submit the patch in a second. Thanks for hunting down the problem! drew From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:49204) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZYxYG-0000u4-0C for qemu-devel@nongnu.org; Mon, 07 Sep 2015 10:37:44 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZYxYB-0005ff-UB for qemu-devel@nongnu.org; Mon, 07 Sep 2015 10:37:43 -0400 Received: from mx1.redhat.com ([209.132.183.28]:35120) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZYxYB-0005fV-PC for qemu-devel@nongnu.org; Mon, 07 Sep 2015 10:37:39 -0400 Date: Mon, 7 Sep 2015 16:37:33 +0200 From: Andrew Jones Message-ID: <20150907143733.GF3014@hawk.localdomain> References: <1441185926-61587-1-git-send-email-a.spyridakis@virtualopensystems.com> <1441185926-61587-3-git-send-email-a.spyridakis@virtualopensystems.com> <20150904104835.GC3096@hawk.localdomain> <20150904140528.GH3096@hawk.localdomain> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Subject: Re: [Qemu-devel] [kvm-unit-tests PATCH 2/2] arm/arm64 config: Fix arch_clean rule List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Alexander Spyridakis Cc: mttcg@greensocs.com, KVM General , Mark Burton , Claudio Fontana , QEMU Developers , Alvise Rigo , Jani Kokkonen , Alex =?iso-8859-1?Q?Benn=E9e?= , KONRAD =?iso-8859-1?Q?Fr=E9d=E9ric?= On Mon, Sep 07, 2015 at 03:35:19PM +0200, Alexander Spyridakis wrote: > On 4 September 2015 at 16:05, Andrew Jones wrote: > > This doesn't reproduce for me. I did the following, and it worked > > fine. > > > > make distclean > > ./configure --arch=arm --cross-prefix=arm-linux-gnu- > > make > > ./configure --arch=arm64 --cross-prefix=aarch64-linux-gnu- > > make clean && make > > Ok I think I found the issue: > > config-arm-common.mak: > >arm_clean: libfdt_clean asm_offsets_clean > > $(RM) $(TEST_DIR)/*.{o,flat,elf} $(libeabi) $(eabiobjs) \ > > $(TEST_DIR)/.*.d lib/arm/.*.d > > config-x86-common.mak: > >arch_clean: > > $(RM) $(TEST_DIR)/*.o $(TEST_DIR)/*.flat $(TEST_DIR)/*.elf \ > > $(TEST_DIR)/.*.d lib/x86/.*.d > > I think the arm case tries to be too clever and on many systems it > fails (tested on debian:jessie,sid and ubuntu:14.04,15.04). Basically > the expression for the arm case fails to resolve, while using the > simpler x86 way works as expected. > > So is the following change acceptable in config-arm-common.mak? > > arm_clean: libfdt_clean asm_offsets_clean > >- $(RM) $(TEST_DIR)/*.{o,flat,elf} $(libeabi) $(eabiobjs) \ > >- $(TEST_DIR)/.*.d lib/arm/.*.d > >+ $(RM) $(TEST_DIR)/*.o $(TEST_DIR)/*.flat $(TEST_DIR)/*.elf \ > >+ $(libeabi) $(eabiobjs) $(TEST_DIR)/.*.d lib/arm/.*.d Ah, it's a dash vs. bash thing. Either we need to change all bashisms in the makefiles, or, since kvm-unit-tests already depends on bash for its scripts, then we might as well just tell make to use it too. This patch will fix it diff --git a/Makefile b/Makefile index 0d5933474cd8c..3e60b4f8e4a57 100644 --- a/Makefile +++ b/Makefile @@ -1,4 +1,6 @@ +SHELL := /bin/bash + ifeq ($(wildcard config.mak),) $(error run ./configure first. See ./configure -h) endif I'll probably submit the patch in a second. Thanks for hunting down the problem! drew