tools build: Check basic headers for test-compile feature checker
authorWang Nan <wangnan0@huawei.com>
Wed, 27 Jan 2016 11:22:22 +0000 (11:22 +0000)
committerArnaldo Carvalho de Melo <acme@redhat.com>
Wed, 27 Jan 2016 14:59:32 +0000 (11:59 -0300)
commitcf9162c290447cdf6fca7b64dd6e2200dc52f03b
tree1e9e9c5f9dce2ea57a836117de6b37c53fc6aa7b
parent5ac76283b32b116c58e362e99542182ddcfc8262
tools build: Check basic headers for test-compile feature checker

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@huawei.com>
Acked-by: Jiri Olsa <jolsa@kernel.org>
Cc: Li Zefan <lizefan@huawei.com>
Link: http://lkml.kernel.org/r/1453893742-20603-1-git-send-email-wangnan0@huawei.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
tools/build/feature/test-compile.c
This page took 0.029997 seconds and 5 git commands to generate.