[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1454102273-16431-2-git-send-email-acme@kernel.org>
Date: Fri, 29 Jan 2016 18:17:38 -0300
From: Arnaldo Carvalho de Melo <acme@...nel.org>
To: Ingo Molnar <mingo@...nel.org>
Cc: linux-kernel@...r.kernel.org, Wang Nan <wangnan0@...wei.com>,
Li Zefan <lizefan@...wei.com>,
Arnaldo Carvalho de Melo <acme@...hat.com>
Subject: [PATCH 01/16] tools build: Check basic headers for test-compile feature checker
See http://www.infradead.org/rpr.html
From: Wang Nan <wangnan0@...wei.com>
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 <gnu/stubs-32.h>
^
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 <wangnan0@...wei.com>
Acked-by: Jiri Olsa <jolsa@...nel.org>
Cc: Li Zefan <lizefan@...wei.com>
Link: http://lkml.kernel.org/r/1453893742-20603-1-git-send-email-wangnan0@huawei.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@...hat.com>
---
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 31dbf45bf99c..c54e6551ae4c 100644
--- a/tools/build/feature/test-compile.c
+++ b/tools/build/feature/test-compile.c
@@ -1,4 +1,6 @@
+#include <stdio.h>
int main(void)
{
+ printf("Hello World!\n");
return 0;
}
--
2.5.0
Powered by blists - more mailing lists