From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932740AbcA0Nzd (ORCPT ); Wed, 27 Jan 2016 08:55:33 -0500 Received: from mx1.redhat.com ([209.132.183.28]:55049 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932145AbcA0Nz3 (ORCPT ); Wed, 27 Jan 2016 08:55:29 -0500 Date: Wed, 27 Jan 2016 11:55:25 -0200 From: Arnaldo Carvalho de Melo To: Jiri Olsa Cc: Wang Nan , linux-kernel@vger.kernel.org, Jiri Olsa , Li Zefan Subject: Re: [PATCH] tools build: Check basic headers for test-compile feature checker Message-ID: <20160127135524.GB9648@redhat.com> References: <20160126165945.GC3493@redhat.com> <1453893742-20603-1-git-send-email-wangnan0@huawei.com> <20160127132359.GA13158@krava.brq.redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20160127132359.GA13158@krava.brq.redhat.com> X-Url: http://acmel.wordpress.com User-Agent: Mutt/1.5.20 (2009-12-10) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Em Wed, Jan 27, 2016 at 02:23:59PM +0100, Jiri Olsa escreveu: > On Wed, Jan 27, 2016 at 11:22:22AM +0000, Wang Nan wrote: > > An i386 binary can be linked correctly even without correct headers. > > Which causes problem. For exmaple: > > > > $ mv /tmp/oxygen_root/usr/include/gnu/stubs-32.h{,.bak} > > $ make tools/perf > > Auto-detecting system features: > > ... dwarf: [ on ] > > [SNIP] > > GEN common-cmds.h > > CC perf-read-vdso32 > > In file included from /tmp/oxygen_root/usr/include/features.h:388:0, > > from /tmp/oxygen_root/usr/include/stdio.h:27, > > from perf-read-vdso.c:1: > > /tmp/oxygen_root/usr/include/gnu/stubs.h:7:27: fatal error: gnu/stubs-32.h: No such file or directory > > # include > > ^ > > compilation terminated. > > ... > > > > In this patch we checks not only compiler and linker, but also basic > > headers in test-compile test case, make it fail on a platform > > lacking correct headers. > > > > Signed-off-by: Wang Nan > > Cc: Arnaldo Carvalho de Melo > > Cc: Jiri Olsa > > Cc: Li Zefan > > nice ;-) Ok, so this one may explain that problem when reusing the features dump file, trying applying this and then the other... > Acked-by: Jiri Olsa > > thanks, > jirka > > > --- > > tools/build/feature/test-compile.c | 2 ++ > > 1 file changed, 2 insertions(+) > > > > diff --git a/tools/build/feature/test-compile.c b/tools/build/feature/test-compile.c > > index 31dbf45..c54e655 100644 > > --- a/tools/build/feature/test-compile.c > > +++ b/tools/build/feature/test-compile.c > > @@ -1,4 +1,6 @@ > > +#include > > int main(void) > > { > > + printf("Hello World!\n"); > > return 0; > > } > > -- > > 1.8.3.4 > >