Patchwork [15/17] Enable _FORTIFY_SOURCE=2

login
register
mail settings
Submitter Juan Quintela
Date Jan. 20, 2010, 8:14 p.m.
Message ID <a8429cc5a11188ed78506b38e960732baea768e7.1264017981.git.quintela@redhat.com>
Download mbox | patch
Permalink /patch/43357/
State New
Headers show

Comments

Juan Quintela - Jan. 20, 2010, 8:14 p.m.
From: Kirill A. Shutemov <kirill@shutemov.name>

_FORTIFY_SOURCE is a Glibc feature which adds memory and string function
protection.

Signed-off-by: Kirill A. Shutemov <kirill@shutemov.name>
Signed-off-by: Juan Quintela <quintela@redhat.com>
---
 configure |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

Patch

diff --git a/configure b/configure
index 5631bbb..5556b9d 100755
--- a/configure
+++ b/configure
@@ -97,7 +97,7 @@  CFLAGS="-g $CFLAGS"
 QEMU_CFLAGS="-Wall -Wundef -Wendif-labels -Wwrite-strings -Wmissing-prototypes $QEMU_CFLAGS"
 QEMU_CFLAGS="-Wstrict-prototypes -Wredundant-decls $QEMU_CFLAGS"
 QEMU_CFLAGS="-D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE $QEMU_CFLAGS"
-QEMU_CFLAGS="-U_FORTIFY_SOURCE $QEMU_CFLAGS"
+QEMU_CFLAGS="-D_FORTIFY_SOURCE=2 $QEMU_CFLAGS"
 QEMU_CFLAGS="-I. -I\$(SRC_PATH) $QEMU_CFLAGS"
 LDFLAGS="-g $LDFLAGS"