From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751484AbdBUIOH (ORCPT ); Tue, 21 Feb 2017 03:14:07 -0500 Received: from terminus.zytor.com ([65.50.211.136]:55964 "EHLO terminus.zytor.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751361AbdBUINl (ORCPT ); Tue, 21 Feb 2017 03:13:41 -0500 Date: Tue, 21 Feb 2017 00:13:20 -0800 From: tip-bot for Jiri Olsa Message-ID: Cc: tglx@linutronix.de, acme@redhat.com, dsahern@gmail.com, linux-kernel@vger.kernel.org, hpa@zytor.com, jolsa@kernel.org, mingo@kernel.org, namhyung@kernel.org, a.p.zijlstra@chello.nl, jolsa@redhat.com Reply-To: hpa@zytor.com, jolsa@kernel.org, jolsa@redhat.com, a.p.zijlstra@chello.nl, namhyung@kernel.org, mingo@kernel.org, acme@redhat.com, tglx@linutronix.de, linux-kernel@vger.kernel.org, dsahern@gmail.com In-Reply-To: <1487340058-10496-2-git-send-email-jolsa@kernel.org> References: <1487340058-10496-2-git-send-email-jolsa@kernel.org> To: linux-tip-commits@vger.kernel.org Subject: [tip:perf/urgent] perf build: Add special fixdep cleaning rule Git-Commit-ID: 85e0d509654c2e2e58b29e50a883acd4c4e8807d X-Mailer: tip-git-log-daemon Robot-ID: Robot-Unsubscribe: Contact to get blacklisted from these emails MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset=UTF-8 Content-Disposition: inline Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Commit-ID: 85e0d509654c2e2e58b29e50a883acd4c4e8807d Gitweb: http://git.kernel.org/tip/85e0d509654c2e2e58b29e50a883acd4c4e8807d Author: Jiri Olsa AuthorDate: Fri, 17 Feb 2017 15:00:54 +0100 Committer: Arnaldo Carvalho de Melo CommitDate: Fri, 17 Feb 2017 16:04:38 -0300 perf build: Add special fixdep cleaning rule Ingo reported following build failure: On Sat, Feb 11, 2017 at 12:12:34PM +0100, Ingo Molnar wrote: > > So I had this oldish 32-bit 15.10 Ubuntu installation around (fully updated), and > trying to build perf gave me: > > deimos:~/tip/tools/perf> make > BUILD: Doing 'make -j4' parallel build > make[3]: *** No rule to make target '/usr/include/x86_64-linux-gnu/sys/types.h', needed by 'fixdep.o'. Stop. > Makefile:42: recipe for target 'fixdep-in.o' failed > make[2]: *** [fixdep-in.o] Error 2 > /home/mingo/tip/tools/build/Makefile.include:4: recipe for target 'fixdep' failed > make[1]: *** [fixdep] Error 2 > Makefile:68: recipe for target 'all' failed > make: *** [all] Error 2 > > Now this got a bit better after I did a 'make mrproper' in the kernel tree: > > deimos:~/tip/tools/perf> make > BUILD: Doing 'make -j4' parallel build > HOSTCC fixdep.o > /home/mingo/tip/tools/build/fixdep: 1: /home/mingo/tip/tools/build/fixdep: Syntax error: "(" unexpected > /home/mingo/tip/tools/build/Makefile.build:101: recipe for target 'fixdep.o' failed > make[3]: *** [fixdep.o] Error 2 > Makefile:42: recipe for target 'fixdep-in.o' failed > make[2]: *** [fixdep-in.o] Error 2 > /home/mingo/tip/tools/build/Makefile.include:4: recipe for target 'fixdep' failed > make[1]: *** [fixdep] Error 2 > Makefile:68: recipe for target 'all' failed > make: *** [all] Error 2 > > After some digging it turns out that my 'fixdep' binary was 64-bit: > > deimos:~/tip/tools/perf> file /home/mingo/tip/tools/build/fixdep > /home/mingo/tip/tools/build/fixdep: ELF 64-bit LSB executable, x86-64, version 1 > (SYSV), dynamically linked, interpreter /lib64/ld-linux-x86-64.so.2, for GNU/Linux > 2.6.32, BuildID[sha1]=d527f736b57b5ba47210fbcb562a3b52867d21c1, not stripped > > But it did not get cleaned out by 'make clean'. > > Only after I did a 'make clean' in tools/ itself, did it get built properly. It shows we don't clean up properly the fixdep objects, so adding special rule for that. Signed-off-by: Jiri Olsa Reported-by: Ingo Molnar Cc: David Ahern Cc: Namhyung Kim Cc: Peter Zijlstra Link: http://lkml.kernel.org/r/1487340058-10496-2-git-send-email-jolsa@kernel.org Signed-off-by: Arnaldo Carvalho de Melo --- tools/build/Makefile | 4 ++-- tools/build/Makefile.include | 3 +++ tools/perf/Makefile.perf | 4 ++-- 3 files changed, 7 insertions(+), 4 deletions(-) diff --git a/tools/build/Makefile b/tools/build/Makefile index aaf7ed3..477f00e 100644 --- a/tools/build/Makefile +++ b/tools/build/Makefile @@ -35,8 +35,8 @@ all: $(OUTPUT)fixdep clean: $(call QUIET_CLEAN, fixdep) - $(Q)find . -name '*.o' -delete -o -name '\.*.cmd' -delete -o -name '\.*.d' -delete - $(Q)rm -f fixdep + $(Q)find $(if $(OUTPUT),$(OUTPUT),.) -name '*.o' -delete -o -name '\.*.cmd' -delete -o -name '\.*.d' -delete + $(Q)rm -f $(OUTPUT)fixdep $(OUTPUT)fixdep-in.o: FORCE $(Q)$(MAKE) $(build)=fixdep diff --git a/tools/build/Makefile.include b/tools/build/Makefile.include index ad22e4e..d360f39a4 100644 --- a/tools/build/Makefile.include +++ b/tools/build/Makefile.include @@ -3,4 +3,7 @@ build := -f $(srctree)/tools/build/Makefile.build dir=. obj fixdep: $(Q)$(MAKE) -C $(srctree)/tools/build CFLAGS= LDFLAGS= $(OUTPUT)fixdep +fixdep-clean: + $(Q)$(MAKE) -C $(srctree)/tools/build clean + .PHONY: fixdep diff --git a/tools/perf/Makefile.perf b/tools/perf/Makefile.perf index 4da19b6..79fe31f 100644 --- a/tools/perf/Makefile.perf +++ b/tools/perf/Makefile.perf @@ -726,13 +726,13 @@ config-clean: $(call QUIET_CLEAN, config) $(Q)$(MAKE) -C $(srctree)/tools/build/feature/ $(if $(OUTPUT),OUTPUT=$(OUTPUT)feature/,) clean >/dev/null -clean:: $(LIBTRACEEVENT)-clean $(LIBAPI)-clean $(LIBBPF)-clean $(LIBSUBCMD)-clean config-clean +clean:: $(LIBTRACEEVENT)-clean $(LIBAPI)-clean $(LIBBPF)-clean $(LIBSUBCMD)-clean config-clean fixdep-clean $(call QUIET_CLEAN, core-objs) $(RM) $(LIB_FILE) $(OUTPUT)perf-archive $(OUTPUT)perf-with-kcore $(LANG_BINDINGS) $(Q)find $(if $(OUTPUT),$(OUTPUT),.) -name '*.o' -delete -o -name '\.*.cmd' -delete -o -name '\.*.d' -delete $(Q)$(RM) $(OUTPUT).config-detected $(call QUIET_CLEAN, core-progs) $(RM) $(ALL_PROGRAMS) perf perf-read-vdso32 perf-read-vdsox32 $(OUTPUT)pmu-events/jevents $(OUTPUT)$(LIBJVMTI).so $(call QUIET_CLEAN, core-gen) $(RM) *.spec *.pyc *.pyo */*.pyc */*.pyo $(OUTPUT)common-cmds.h TAGS tags cscope* $(OUTPUT)PERF-VERSION-FILE $(OUTPUT)FEATURE-DUMP $(OUTPUT)util/*-bison* $(OUTPUT)util/*-flex* \ - $(OUTPUT)util/intel-pt-decoder/inat-tables.c $(OUTPUT)fixdep \ + $(OUTPUT)util/intel-pt-decoder/inat-tables.c \ $(OUTPUT)tests/llvm-src-{base,kbuild,prologue,relocation}.c \ $(OUTPUT)pmu-events/pmu-events.c $(QUIET_SUBDIR0)Documentation $(QUIET_SUBDIR1) clean