forked from pool/coreutils
184 lines
12 KiB
Diff
184 lines
12 KiB
Diff
--- lib/Makefile.am
|
|
+++ lib/Makefile.am
|
|
@@ -18,6 +18,7 @@
|
|
include gnulib.mk
|
|
|
|
AM_CFLAGS = $(WARN_CFLAGS) # $(WERROR_CFLAGS)
|
|
+AM_CFLAGS += -fpie
|
|
|
|
libcoreutils_a_SOURCES += \
|
|
buffer-lcm.c buffer-lcm.h \
|
|
--- lib/Makefile.in
|
|
+++ lib/Makefile.in
|
|
@@ -1169,7 +1169,7 @@ GPERF = gperf
|
|
LINK_WARNING_H = $(top_srcdir)/build-aux/link-warning.h
|
|
charset_alias = $(DESTDIR)$(libdir)/charset.alias
|
|
charset_tmp = $(DESTDIR)$(libdir)/charset.tmp
|
|
-AM_CFLAGS = $(WARN_CFLAGS) # $(WERROR_CFLAGS)
|
|
+AM_CFLAGS = $(WARN_CFLAGS) -fpie
|
|
all: $(BUILT_SOURCES) config.h
|
|
$(MAKE) $(AM_MAKEFLAGS) all-recursive
|
|
|
|
--- src/Makefile.am
|
|
+++ src/Makefile.am
|
|
@@ -149,6 +149,10 @@ uptime_LDADD = $(LDADD) $(POW_LIB) $(GET
|
|
|
|
su_SOURCES = su.c getdef.c
|
|
su_LDADD = $(LDADD) $(LIB_CRYPT) $(PAM_LIBS)
|
|
+su_CFLAGS = -fpie
|
|
+su_LDFLAGS = -pie
|
|
+timeout_CFLAGS = -fpie
|
|
+timeout_LDFLAGS = -pie
|
|
|
|
dir_LDADD += $(LIB_ACL)
|
|
ls_LDADD += $(LIB_ACL)
|
|
--- src/Makefile.in
|
|
+++ src/Makefile.in
|
|
@@ -605,10 +605,12 @@ stty_OBJECTS = stty.$(OBJEXT)
|
|
stty_LDADD = $(LDADD)
|
|
stty_DEPENDENCIES = libver.a ../lib/libcoreutils.a \
|
|
$(am__DEPENDENCIES_1) ../lib/libcoreutils.a
|
|
-am_su_OBJECTS = su.$(OBJEXT) getdef.$(OBJEXT)
|
|
+am_su_OBJECTS = su-su.$(OBJEXT) su-getdef.$(OBJEXT)
|
|
su_OBJECTS = $(am_su_OBJECTS)
|
|
su_DEPENDENCIES = $(am__DEPENDENCIES_2) $(am__DEPENDENCIES_1) \
|
|
$(am__DEPENDENCIES_1)
|
|
+su_LINK = $(CCLD) $(su_CFLAGS) $(CFLAGS) $(su_LDFLAGS) $(LDFLAGS) -o \
|
|
+ $@
|
|
sum_SOURCES = sum.c
|
|
sum_OBJECTS = sum.$(OBJEXT)
|
|
sum_LDADD = $(LDADD)
|
|
@@ -633,9 +635,12 @@ tee_DEPENDENCIES = libver.a ../lib/libco
|
|
test_SOURCES = test.c
|
|
test_OBJECTS = test.$(OBJEXT)
|
|
test_DEPENDENCIES = $(am__DEPENDENCIES_2) $(am__DEPENDENCIES_1)
|
|
-am_timeout_OBJECTS = timeout.$(OBJEXT) operand2sig.$(OBJEXT)
|
|
+am_timeout_OBJECTS = timeout-timeout.$(OBJEXT) \
|
|
+ timeout-operand2sig.$(OBJEXT)
|
|
timeout_OBJECTS = $(am_timeout_OBJECTS)
|
|
timeout_DEPENDENCIES = $(am__DEPENDENCIES_2) $(am__DEPENDENCIES_1)
|
|
+timeout_LINK = $(CCLD) $(timeout_CFLAGS) $(CFLAGS) $(timeout_LDFLAGS) \
|
|
+ $(LDFLAGS) -o $@
|
|
touch_SOURCES = touch.c
|
|
touch_OBJECTS = touch.$(OBJEXT)
|
|
touch_DEPENDENCIES = $(am__DEPENDENCIES_2) $(am__DEPENDENCIES_1)
|
|
@@ -1515,6 +1520,10 @@ tail_LDADD = $(nanosec_libs)
|
|
uptime_LDADD = $(LDADD) $(POW_LIB) $(GETLOADAVG_LIBS)
|
|
su_SOURCES = su.c getdef.c
|
|
su_LDADD = $(LDADD) $(LIB_CRYPT) $(PAM_LIBS)
|
|
+su_CFLAGS = -fpie
|
|
+su_LDFLAGS = -pie
|
|
+timeout_CFLAGS = -fpie
|
|
+timeout_LDFLAGS = -pie
|
|
stat_LDADD = $(LDADD) $(LIB_SELINUX)
|
|
|
|
# programs that use getaddrinfo (e.g., via canon_host)
|
|
@@ -1933,7 +1942,7 @@ stty$(EXEEXT): $(stty_OBJECTS) $(stty_DE
|
|
$(LINK) $(stty_OBJECTS) $(stty_LDADD) $(LIBS)
|
|
su$(EXEEXT): $(su_OBJECTS) $(su_DEPENDENCIES)
|
|
@rm -f su$(EXEEXT)
|
|
- $(LINK) $(su_OBJECTS) $(su_LDADD) $(LIBS)
|
|
+ $(su_LINK) $(su_OBJECTS) $(su_LDADD) $(LIBS)
|
|
sum$(EXEEXT): $(sum_OBJECTS) $(sum_DEPENDENCIES)
|
|
@rm -f sum$(EXEEXT)
|
|
$(LINK) $(sum_OBJECTS) $(sum_LDADD) $(LIBS)
|
|
@@ -1954,7 +1963,7 @@ test$(EXEEXT): $(test_OBJECTS) $(test_DE
|
|
$(LINK) $(test_OBJECTS) $(test_LDADD) $(LIBS)
|
|
timeout$(EXEEXT): $(timeout_OBJECTS) $(timeout_DEPENDENCIES)
|
|
@rm -f timeout$(EXEEXT)
|
|
- $(LINK) $(timeout_OBJECTS) $(timeout_LDADD) $(LIBS)
|
|
+ $(timeout_LINK) $(timeout_OBJECTS) $(timeout_LDADD) $(LIBS)
|
|
touch$(EXEEXT): $(touch_OBJECTS) $(touch_DEPENDENCIES)
|
|
@rm -f touch$(EXEEXT)
|
|
$(LINK) $(touch_OBJECTS) $(touch_LDADD) $(LIBS)
|
|
@@ -2043,7 +2052,6 @@ distclean-compile:
|
|
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/false.Po@am__quote@
|
|
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fmt.Po@am__quote@
|
|
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fold.Po@am__quote@
|
|
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/getdef.Po@am__quote@
|
|
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/getlimits.Po@am__quote@
|
|
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ginstall-copy.Po@am__quote@
|
|
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ginstall-cp-hash.Po@am__quote@
|
|
@@ -2104,14 +2112,16 @@ distclean-compile:
|
|
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/split.Po@am__quote@
|
|
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/stat.Po@am__quote@
|
|
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/stty.Po@am__quote@
|
|
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/su.Po@am__quote@
|
|
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/su-getdef.Po@am__quote@
|
|
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/su-su.Po@am__quote@
|
|
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sum.Po@am__quote@
|
|
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sync.Po@am__quote@
|
|
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tac.Po@am__quote@
|
|
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tail.Po@am__quote@
|
|
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tee.Po@am__quote@
|
|
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test.Po@am__quote@
|
|
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/timeout.Po@am__quote@
|
|
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/timeout-operand2sig.Po@am__quote@
|
|
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/timeout-timeout.Po@am__quote@
|
|
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/touch.Po@am__quote@
|
|
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tr.Po@am__quote@
|
|
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/true.Po@am__quote@
|
|
@@ -2286,6 +2296,62 @@ sha512sum-md5sum.obj: md5sum.c
|
|
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
|
@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(sha512sum_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o sha512sum-md5sum.obj `if test -f 'md5sum.c'; then $(CYGPATH_W) 'md5sum.c'; else $(CYGPATH_W) '$(srcdir)/md5sum.c'; fi`
|
|
|
|
+su-su.o: su.c
|
|
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(su_CFLAGS) $(CFLAGS) -MT su-su.o -MD -MP -MF $(DEPDIR)/su-su.Tpo -c -o su-su.o `test -f 'su.c' || echo '$(srcdir)/'`su.c
|
|
+@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/su-su.Tpo $(DEPDIR)/su-su.Po
|
|
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='su.c' object='su-su.o' libtool=no @AMDEPBACKSLASH@
|
|
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
|
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(su_CFLAGS) $(CFLAGS) -c -o su-su.o `test -f 'su.c' || echo '$(srcdir)/'`su.c
|
|
+
|
|
+su-su.obj: su.c
|
|
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(su_CFLAGS) $(CFLAGS) -MT su-su.obj -MD -MP -MF $(DEPDIR)/su-su.Tpo -c -o su-su.obj `if test -f 'su.c'; then $(CYGPATH_W) 'su.c'; else $(CYGPATH_W) '$(srcdir)/su.c'; fi`
|
|
+@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/su-su.Tpo $(DEPDIR)/su-su.Po
|
|
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='su.c' object='su-su.obj' libtool=no @AMDEPBACKSLASH@
|
|
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
|
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(su_CFLAGS) $(CFLAGS) -c -o su-su.obj `if test -f 'su.c'; then $(CYGPATH_W) 'su.c'; else $(CYGPATH_W) '$(srcdir)/su.c'; fi`
|
|
+
|
|
+su-getdef.o: getdef.c
|
|
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(su_CFLAGS) $(CFLAGS) -MT su-getdef.o -MD -MP -MF $(DEPDIR)/su-getdef.Tpo -c -o su-getdef.o `test -f 'getdef.c' || echo '$(srcdir)/'`getdef.c
|
|
+@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/su-getdef.Tpo $(DEPDIR)/su-getdef.Po
|
|
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='getdef.c' object='su-getdef.o' libtool=no @AMDEPBACKSLASH@
|
|
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
|
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(su_CFLAGS) $(CFLAGS) -c -o su-getdef.o `test -f 'getdef.c' || echo '$(srcdir)/'`getdef.c
|
|
+
|
|
+su-getdef.obj: getdef.c
|
|
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(su_CFLAGS) $(CFLAGS) -MT su-getdef.obj -MD -MP -MF $(DEPDIR)/su-getdef.Tpo -c -o su-getdef.obj `if test -f 'getdef.c'; then $(CYGPATH_W) 'getdef.c'; else $(CYGPATH_W) '$(srcdir)/getdef.c'; fi`
|
|
+@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/su-getdef.Tpo $(DEPDIR)/su-getdef.Po
|
|
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='getdef.c' object='su-getdef.obj' libtool=no @AMDEPBACKSLASH@
|
|
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
|
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(su_CFLAGS) $(CFLAGS) -c -o su-getdef.obj `if test -f 'getdef.c'; then $(CYGPATH_W) 'getdef.c'; else $(CYGPATH_W) '$(srcdir)/getdef.c'; fi`
|
|
+
|
|
+timeout-timeout.o: timeout.c
|
|
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(timeout_CFLAGS) $(CFLAGS) -MT timeout-timeout.o -MD -MP -MF $(DEPDIR)/timeout-timeout.Tpo -c -o timeout-timeout.o `test -f 'timeout.c' || echo '$(srcdir)/'`timeout.c
|
|
+@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/timeout-timeout.Tpo $(DEPDIR)/timeout-timeout.Po
|
|
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='timeout.c' object='timeout-timeout.o' libtool=no @AMDEPBACKSLASH@
|
|
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
|
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(timeout_CFLAGS) $(CFLAGS) -c -o timeout-timeout.o `test -f 'timeout.c' || echo '$(srcdir)/'`timeout.c
|
|
+
|
|
+timeout-timeout.obj: timeout.c
|
|
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(timeout_CFLAGS) $(CFLAGS) -MT timeout-timeout.obj -MD -MP -MF $(DEPDIR)/timeout-timeout.Tpo -c -o timeout-timeout.obj `if test -f 'timeout.c'; then $(CYGPATH_W) 'timeout.c'; else $(CYGPATH_W) '$(srcdir)/timeout.c'; fi`
|
|
+@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/timeout-timeout.Tpo $(DEPDIR)/timeout-timeout.Po
|
|
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='timeout.c' object='timeout-timeout.obj' libtool=no @AMDEPBACKSLASH@
|
|
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
|
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(timeout_CFLAGS) $(CFLAGS) -c -o timeout-timeout.obj `if test -f 'timeout.c'; then $(CYGPATH_W) 'timeout.c'; else $(CYGPATH_W) '$(srcdir)/timeout.c'; fi`
|
|
+
|
|
+timeout-operand2sig.o: operand2sig.c
|
|
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(timeout_CFLAGS) $(CFLAGS) -MT timeout-operand2sig.o -MD -MP -MF $(DEPDIR)/timeout-operand2sig.Tpo -c -o timeout-operand2sig.o `test -f 'operand2sig.c' || echo '$(srcdir)/'`operand2sig.c
|
|
+@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/timeout-operand2sig.Tpo $(DEPDIR)/timeout-operand2sig.Po
|
|
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='operand2sig.c' object='timeout-operand2sig.o' libtool=no @AMDEPBACKSLASH@
|
|
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
|
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(timeout_CFLAGS) $(CFLAGS) -c -o timeout-operand2sig.o `test -f 'operand2sig.c' || echo '$(srcdir)/'`operand2sig.c
|
|
+
|
|
+timeout-operand2sig.obj: operand2sig.c
|
|
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(timeout_CFLAGS) $(CFLAGS) -MT timeout-operand2sig.obj -MD -MP -MF $(DEPDIR)/timeout-operand2sig.Tpo -c -o timeout-operand2sig.obj `if test -f 'operand2sig.c'; then $(CYGPATH_W) 'operand2sig.c'; else $(CYGPATH_W) '$(srcdir)/operand2sig.c'; fi`
|
|
+@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/timeout-operand2sig.Tpo $(DEPDIR)/timeout-operand2sig.Po
|
|
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='operand2sig.c' object='timeout-operand2sig.obj' libtool=no @AMDEPBACKSLASH@
|
|
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
|
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(timeout_CFLAGS) $(CFLAGS) -c -o timeout-operand2sig.obj `if test -f 'operand2sig.c'; then $(CYGPATH_W) 'operand2sig.c'; else $(CYGPATH_W) '$(srcdir)/operand2sig.c'; fi`
|
|
+
|
|
ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
|
|
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
|
|
unique=`for i in $$list; do \
|