Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753906Ab3CRQ3x (ORCPT ); Mon, 18 Mar 2013 12:29:53 -0400 Received: from 173-166-109-252-newengland.hfc.comcastbusiness.net ([173.166.109.252]:49421 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752510Ab3CRQ0A (ORCPT ); Mon, 18 Mar 2013 12:26:00 -0400 From: Arnaldo Carvalho de Melo To: Ingo Molnar Cc: linux-kernel@vger.kernel.org, Borislav Petkov , Arnaldo Carvalho de Melo Subject: [PATCH 13/54] tools lib lk: Fix _FORTIFY_SOURCE builds Date: Mon, 18 Mar 2013 13:24:58 -0300 Message-Id: <1363623939-10748-14-git-send-email-acme@infradead.org> X-Mailer: git-send-email 1.8.1.1.361.gec3ae6e In-Reply-To: <1363623939-10748-1-git-send-email-acme@infradead.org> References: <1363623939-10748-1-git-send-email-acme@infradead.org> Content-Type: text/plain; charset="utf-8" X-SRS-Rewrite: SMTP reverse-path rewritten from by bombadil.infradead.org See http://www.infradead.org/rpr.html Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1770 Lines: 44 From: Borislav Petkov 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 Reported-by: Jiri Olsa Link: http://lkml.kernel.org/r/1362338733-8718-1-git-send-email-bp@alien8.de Signed-off-by: Arnaldo Carvalho de Melo --- tools/lib/lk/Makefile | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/tools/lib/lk/Makefile b/tools/lib/lk/Makefile index 8cf576f..926cbf3 100644 --- a/tools/lib/lk/Makefile +++ b/tools/lib/lk/Makefile @@ -10,7 +10,7 @@ LIB_OBJS += $(OUTPUT)debugfs.o LIBFILE = liblk.a -CFLAGS = -ggdb3 -Wall -Wextra -std=gnu99 -Werror $(CFLAGS_OPTIMIZE) -D_FORTIFY_SOURCE=2 $(EXTRA_WARNINGS) $(EXTRA_CFLAGS) -fPIC +CFLAGS = -ggdb3 -Wall -Wextra -std=gnu99 -Werror -O6 -D_FORTIFY_SOURCE=2 $(EXTRA_WARNINGS) $(EXTRA_CFLAGS) -fPIC EXTLIBS = -lpthread -lrt -lelf -lm ALL_CFLAGS = $(CFLAGS) $(BASIC_CFLAGS) -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 ALL_LDFLAGS = $(LDFLAGS) -- 1.7.1 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/