]> git.baikalelectronics.ru Git - kernel.git/commit
tools lib lk: Fix _FORTIFY_SOURCE builds
authorBorislav Petkov <bp@suse.de>
Sun, 3 Mar 2013 19:25:33 +0000 (20:25 +0100)
committerArnaldo Carvalho de Melo <acme@redhat.com>
Fri, 15 Mar 2013 16:06:01 +0000 (13:06 -0300)
commit18f20c53b0c0a4eb1bd5fabb3ea96f93b9ef9b83
tree8ed12f2c55b75a7e1db5c0c2dbc7de67441a8805
parentdb2cd87045126b52a338a78d078b0de4b70fbaf2
tools lib lk: Fix _FORTIFY_SOURCE builds

Jiri Olsa triggers the following build error:

    SUBDIR ../lib/lk/
    CC debugfs.o
In file included from /usr/include/errno.h:29:0,
                 from debugfs.c:1:
/usr/include/features.h:314:4: error: #warning _FORTIFY_SOURCE requires compiling with optimization (-O) [-Werror=cpp]

This is because enabling buffer overflow checks through _FORTIFY_SOURCE
require compiler optimizations to be enabled too. However, those are
not. Enable them by simply copying the perf optimization level. It can
be expanded later if we want to support debug builds, etc.

Signed-off-by: Borislav Petkov <bp@suse.de>
Reported-by: Jiri Olsa <jolsa@redhat.com>
Link: http://lkml.kernel.org/r/1362338733-8718-1-git-send-email-bp@alien8.de
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
tools/lib/lk/Makefile