Re: [RFC PATCH] perf: add SLANG_INC for slang.h
From: Arnaldo Carvalho de Melo
Date: Wed Sep 05 2012 - 16:54:48 EST
Em Fri, Aug 24, 2012 at 11:10:39AM +0800, Liang Li escreveu:
> CFLAGS was previously hard coded to contain "-I/usr/include/slang" to
> work with hosts that have "/usr/include/slang/slang.h" as well as hosts
> that have "/usr/include/slang.h". This path can cause compile warnings
> like:
>
> cc1: warning: '/usr/include/slang' doesn't exists.
>
> or
>
> cc1: warning: include location "/usr/include/slang" is unsafe for
> cross-compilation [-Wpoison-system-directories]
>
> Then in some cases warnings become errors if WERROR is enabled hence
> build errors.
>
> To fix this issue, we can use -idirafter to downgrade the priority of the
> default hard coded path. We can also make the slang include directory
> a variable, to allow the user to specify SLANG_INC and set their own
> include location. And add a '=' prefix to indicate better
> compatibility with sysroot/cross compile cases.
CC /home/acme/git/build/perf/builtin-diff.o
In file included from util/../ui/keysyms.h:4,
from util/hist.h:142,
from builtin-diff.c:11:
util/../ui/libslang.h:12:19: error: slang.h: No such file or directory
util/../ui/libslang.h:14:5: error: "SLANG_VERSION" is not defined
In file included from util/../ui/keysyms.h:4,
from util/hist.h:142,
from util/evsel.h:10,
from util/evlist.h:8,
from builtin-annotate.c:20:
util/../ui/libslang.h:12:19: error: slang.h: No such file or directory
util/../ui/libslang.h:14:5: error: "SLANG_VERSION" is not defined
builtin-annotate.c: In function âhists__find_annotationsâ:
builtin-annotate.c:122: error: âSL_KEY_RIGHTâ undeclared (first use in
this function)
builtin-annotate.c:122: error: (Each undeclared identifier is reported
only once
builtin-annotate.c:122: error: for each function it appears in.)
builtin-annotate.c:134: error: âSL_KEY_LEFTâ undeclared (first use in
this function)
make: *** [/home/acme/git/build/perf/builtin-annotate.o] Error 1
make: *** Waiting for unfinished jobs....
make: *** [/home/acme/git/build/perf/builtin-diff.o] Error 1
make: Leaving directory `/home/git/linux/tools/perf'
[acme@sandy linux]$ cat /etc/redhat-release
Red Hat Enterprise Linux Server release 6.3 (Santiago)
[acme@sandy linux]$
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/