From patchwork Fri Jan 29 21:17:38 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnaldo Carvalho de Melo X-Patchwork-Id: 60840 Delivered-To: patch@linaro.org Received: by 10.112.130.2 with SMTP id oa2csp1364489lbb; Fri, 29 Jan 2016 13:27:00 -0800 (PST) X-Received: by 10.66.164.196 with SMTP id ys4mr16666995pab.119.1454102820567; Fri, 29 Jan 2016 13:27:00 -0800 (PST) Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id n29si26479131pfa.190.2016.01.29.13.27.00; Fri, 29 Jan 2016 13:27:00 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756449AbcA2VSF (ORCPT + 30 others); Fri, 29 Jan 2016 16:18:05 -0500 Received: from casper.infradead.org ([85.118.1.10]:51781 "EHLO casper.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751836AbcA2VSD (ORCPT ); Fri, 29 Jan 2016 16:18:03 -0500 Received: from [179.235.167.117] (helo=zoo.infradead.org) by casper.infradead.org with esmtpsa (Exim 4.85 #2 (Red Hat Linux)) id 1aPGQb-0005Y3-78; Fri, 29 Jan 2016 21:18:01 +0000 Received: by zoo.infradead.org (Postfix, from userid 1000) id E94EC22025F; Fri, 29 Jan 2016 18:17:56 -0300 (BRT) From: Arnaldo Carvalho de Melo To: Ingo Molnar Cc: linux-kernel@vger.kernel.org, Wang Nan , Li Zefan , Arnaldo Carvalho de Melo Subject: [PATCH 01/16] tools build: Check basic headers for test-compile feature checker Date: Fri, 29 Jan 2016 18:17:38 -0300 Message-Id: <1454102273-16431-2-git-send-email-acme@kernel.org> X-Mailer: git-send-email 2.1.0 In-Reply-To: <1454102273-16431-1-git-send-email-acme@kernel.org> References: <1454102273-16431-1-git-send-email-acme@kernel.org> X-SRS-Rewrite: SMTP reverse-path rewritten from by casper.infradead.org Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org See http://www.infradead.org/rpr.html From: Wang Nan 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 Acked-by: Jiri Olsa Cc: Li Zefan Link: http://lkml.kernel.org/r/1453893742-20603-1-git-send-email-wangnan0@huawei.com Signed-off-by: Arnaldo Carvalho de Melo --- tools/build/feature/test-compile.c | 2 ++ 1 file changed, 2 insertions(+) -- 2.5.0 diff --git a/tools/build/feature/test-compile.c b/tools/build/feature/test-compile.c index 31dbf45bf99c..c54e6551ae4c 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; }