diff options
author | Ulrich Drepper <drepper@redhat.com> | 2009-06-16 20:46:42 -0700 |
---|---|---|
committer | Ulrich Drepper <drepper@redhat.com> | 2009-06-16 20:46:42 -0700 |
commit | f051ddfe22d3db4e77d6a545d5363be8b986cb96 (patch) | |
tree | 0eb2454ecb7b16a095f107a6316f4d54dd7076a6 /login | |
parent | f60ddf9bf737e015f7da866ca7f46006b4ce9700 (diff) | |
download | glibc-f051ddfe22d3db4e77d6a545d5363be8b986cb96.zip glibc-f051ddfe22d3db4e77d6a545d5363be8b986cb96.tar.gz glibc-f051ddfe22d3db4e77d6a545d5363be8b986cb96.tar.bz2 |
Build pt_chown as PIE.
Diffstat (limited to 'login')
-rw-r--r-- | login/Makefile | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/login/Makefile b/login/Makefile index 427c050..beb2a5c 100644 --- a/login/Makefile +++ b/login/Makefile @@ -54,10 +54,23 @@ otherlibs += $(nssobjdir)/libnss_files.a $(resolvobjdir)/libnss_dns.a \ $(resolvobjdir)/libresolv.a $(common-objpfx)libc.a endif +ifeq (yesyes,$(have-fpie)$(build-shared)) +pt_chown-cflags += $(pie-ccflag) +endif +ifeq (yes,$(have-ssp)) +pt_chown-cflags += -fstack-protector +endif ifeq (yes,$(have-libcap)) libcap = -lcap endif +CFLAGS-pt_chown.c = $(pt_chown-cflags) LDLIBS-pt_chown = $(libcap) +ifeq (yesyes,$(have-fpie)$(build-shared)) +LDFLAGS-pt_chown = -Wl,-z,now + +$(objpfx)pt_chown: $(objpfx)pt_chown.o + $(+link-pie) +endif # pt_chown needs to be setuid root. $(inst_libexecdir)/pt_chown: $(objpfx)pt_chown $(+force) |