From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933761AbZHEIwX (ORCPT ); Wed, 5 Aug 2009 04:52:23 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S933608AbZHEIwV (ORCPT ); Wed, 5 Aug 2009 04:52:21 -0400 Received: from one.firstfloor.org ([213.235.205.2]:34491 "EHLO one.firstfloor.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933365AbZHEIwU (ORCPT ); Wed, 5 Aug 2009 04:52:20 -0400 To: Dave Airlie Cc: Ingo Molnar , Linus Torvalds , Sam Ravnborg , LKML Subject: Re: ftrace scripts and make V=1 From: Andi Kleen References: <21d7e9970908050023j2807ef3bi1321ac2a1fd9a743@mail.gmail.com> Date: Wed, 05 Aug 2009 10:52:17 +0200 In-Reply-To: <21d7e9970908050023j2807ef3bi1321ac2a1fd9a743@mail.gmail.com> (Dave Airlie's message of "Wed, 5 Aug 2009 17:23:26 +1000") Message-ID: <874osmk5ha.fsf@basil.nowhere.org> User-Agent: Gnus/5.1008 (Gnus v5.10.8) Emacs/22.3 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Dave Airlie writes: > Hey, > > So I spent 3-4 hrs today (I'm stupid yes) tracking down a .o breakage by > blaming rawhide gcc/binutils as I was using make V=1and seeing only the > compiler chain running, > > However some ftrace script was sneaking in afterwards > and screwing up the .o without mentioning itself. > > Surely V=1 should print all these shitty scripts its running? I ran into the same problem some time ago and fixed it with these two patches patch. -Andi --- kbuild: Fail build if recordmcount.pl fails When this script fails the build should fail too. Otherwise there are mysterious build failures later. Signed-off-by: Andi Kleen --- scripts/Makefile.build | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) Index: linux-2.6.31-rc1-ak/scripts/Makefile.build =================================================================== --- linux-2.6.31-rc1-ak.orig/scripts/Makefile.build +++ linux-2.6.31-rc1-ak/scripts/Makefile.build @@ -206,7 +206,7 @@ cmd_modversions = \ endif ifdef CONFIG_FTRACE_MCOUNT_RECORD -cmd_record_mcount = perl $(srctree)/scripts/recordmcount.pl "$(ARCH)" \ +cmd_record_mcount = set -e ; perl $(srctree)/scripts/recordmcount.pl "$(ARCH)" \ "$(if $(CONFIG_64BIT),64,32)" \ "$(OBJDUMP)" "$(OBJCOPY)" "$(CC)" "$(LD)" "$(NM)" "$(RM)" "$(MV)" \ "$(if $(part-of-module),1,0)" "$(@)"; --- kbuild: Echo the record_mcount command I had some problems with record_mcount in the Makefile and it was hard to track down. Echo it by default to make it easier to diagnose. Signed-off-by: Andi Kleen --- scripts/Makefile.build | 1 + 1 file changed, 1 insertion(+) Index: linux-2.6.31-rc1-ak/scripts/Makefile.build =================================================================== --- linux-2.6.31-rc1-ak.orig/scripts/Makefile.build +++ linux-2.6.31-rc1-ak/scripts/Makefile.build @@ -216,6 +216,7 @@ define rule_cc_o_c $(call echo-cmd,checksrc) $(cmd_checksrc) \ $(call echo-cmd,cc_o_c) $(cmd_cc_o_c); \ $(cmd_modversions) \ + $(call echo-cmd,record_mcount) \ $(cmd_record_mcount) \ scripts/basic/fixdep $(depfile) $@ '$(call make-cmd,cc_o_c)' > \ $(dot-target).tmp; \ -- ak@linux.intel.com -- Speaking for myself only.