SHA256
1
0
forked from pool/coreutils
coreutils/coreutils-8.6-compile-su-with-fpie.diff

43 lines
1.0 KiB
Diff
Raw Normal View History

From d1a49cccf99373293a88f5bce74857d5bb813e46 Mon Sep 17 00:00:00 2001
From: Thorsten Kukuk <kukuk@suse.de>
Date: Tue, 17 Aug 2010 09:21:22 +0200
Subject: [PATCH 7/7] compile su with -fpie
---
lib/Makefile.am | 2 +-
src/Makefile.am | 5 +++++
2 files changed, 6 insertions(+), 1 deletions(-)
diff --git a/lib/Makefile.am b/lib/Makefile.am
index b4a591b..059928e 100644
--- a/lib/Makefile.am
+++ b/lib/Makefile.am
@@ -17,7 +17,7 @@
include gnulib.mk
-AM_CFLAGS += $(GNULIB_WARN_CFLAGS) $(WERROR_CFLAGS)
+AM_CFLAGS += $(GNULIB_WARN_CFLAGS) $(WERROR_CFLAGS) -fpie
libcoreutils_a_SOURCES += \
buffer-lcm.c buffer-lcm.h
diff --git a/src/Makefile.am b/src/Makefile.am
index 484f6c2..17600af 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -355,6 +355,11 @@ uptime_LDADD += $(GETLOADAVG_LIBS)
su_SOURCES = su.c getdef.c
su_LDADD += $(LIB_CRYPT) $(PAM_LIBS)
+su_CFLAGS = -fpie
+su_LDFLAGS = -pie
+timeout_CFLAGS = -fpie
+timeout_LDFLAGS = -pie
+
# for various ACL functions
copy_LDADD += $(LIB_ACL)
ls_LDADD += $(LIB_ACL)
--
1.7.1