|
|
963210 |
From eda215b5fdf43de6d5e0ee3641bb4bb42728ab11 Mon Sep 17 00:00:00 2001
|
|
|
963210 |
From: Robbie Harwood <rharwood@redhat.com>
|
|
|
963210 |
Date: Wed, 4 Jan 2017 13:18:18 -0500
|
|
|
963210 |
Subject: [PATCH] krb5-1.15-beta1-buildconf.patch
|
|
|
963210 |
|
|
|
963210 |
---
|
|
|
963210 |
src/build-tools/krb5-config.in | 7 +++++++
|
|
|
963210 |
src/config/pre.in | 2 +-
|
|
|
963210 |
src/config/shlib.conf | 5 +++--
|
|
|
963210 |
3 files changed, 11 insertions(+), 3 deletions(-)
|
|
|
963210 |
|
|
|
963210 |
diff --git a/src/build-tools/krb5-config.in b/src/build-tools/krb5-config.in
|
|
|
963210 |
index c17cb5eb5..1891dea99 100755
|
|
|
963210 |
--- a/src/build-tools/krb5-config.in
|
|
|
963210 |
+++ b/src/build-tools/krb5-config.in
|
|
|
963210 |
@@ -226,6 +226,13 @@ if test -n "$do_libs"; then
|
|
|
963210 |
-e 's#\$(PTHREAD_CFLAGS)#'"$PTHREAD_CFLAGS"'#' \
|
|
|
963210 |
-e 's#\$(CFLAGS)##'`
|
|
|
963210 |
|
|
|
963210 |
+ if test `dirname $libdir` = /usr ; then
|
|
|
963210 |
+ lib_flags=`echo $lib_flags | sed -e "s#-L$libdir##" -e "s#$RPATH_FLAG$libdir##"`
|
|
|
963210 |
+ fi
|
|
|
963210 |
+ lib_flags=`echo $lib_flags | sed -e "s#-fPIE##g" -e "s#-pie##g"`
|
|
|
963210 |
+ lib_flags=`echo $lib_flags | sed -e "s#-Wl,-z,relro##g"`
|
|
|
963210 |
+ lib_flags=`echo $lib_flags | sed -e "s#-Wl,-z,now##g"`
|
|
|
963210 |
+
|
|
|
963210 |
if test $library = 'kdb'; then
|
|
|
963210 |
lib_flags="$lib_flags -lkdb5 $KDB5_DB_LIB"
|
|
|
963210 |
library=krb5
|
|
|
963210 |
diff --git a/src/config/pre.in b/src/config/pre.in
|
|
|
963210 |
index fcea229bd..d961b5621 100644
|
|
|
963210 |
--- a/src/config/pre.in
|
|
|
963210 |
+++ b/src/config/pre.in
|
|
|
963210 |
@@ -185,7 +185,7 @@ INSTALL_PROGRAM=@INSTALL_PROGRAM@ $(INSTALL_STRIP)
|
|
|
963210 |
INSTALL_SCRIPT=@INSTALL_PROGRAM@
|
|
|
963210 |
INSTALL_DATA=@INSTALL_DATA@
|
|
|
963210 |
INSTALL_SHLIB=@INSTALL_SHLIB@
|
|
|
963210 |
-INSTALL_SETUID=$(INSTALL) $(INSTALL_STRIP) -m 4755 -o root
|
|
|
963210 |
+INSTALL_SETUID=$(INSTALL) $(INSTALL_STRIP) -m 4755
|
|
|
963210 |
## This is needed because autoconf will sometimes define @exec_prefix@ to be
|
|
|
963210 |
## ${prefix}.
|
|
|
963210 |
prefix=@prefix@
|
|
|
963210 |
diff --git a/src/config/shlib.conf b/src/config/shlib.conf
|
|
|
963210 |
index 3e4af6c02..2b20c3fda 100644
|
|
|
963210 |
--- a/src/config/shlib.conf
|
|
|
963210 |
+++ b/src/config/shlib.conf
|
|
|
963210 |
@@ -423,7 +423,7 @@ mips-*-netbsd*)
|
|
|
963210 |
# Linux ld doesn't default to stuffing the SONAME field...
|
|
|
963210 |
# Use objdump -x to examine the fields of the library
|
|
|
963210 |
# UNDEF_CHECK is suppressed by --enable-asan
|
|
|
963210 |
- LDCOMBINE='$(CC) -shared -fPIC -Wl,-h,$(LIBPREFIX)$(LIBBASE)$(SHLIBSEXT) $(UNDEF_CHECK)'
|
|
|
963210 |
+ LDCOMBINE='$(CC) -shared -fPIC -Wl,-h,$(LIBPREFIX)$(LIBBASE)$(SHLIBSEXT) $(UNDEF_CHECK) -Wl,-z,relro -Wl,--warn-shared-textrel'
|
|
|
963210 |
UNDEF_CHECK='-Wl,--no-undefined'
|
|
|
963210 |
# $(EXPORT_CHECK) runs export-check.pl when in maintainer mode.
|
|
|
963210 |
LDCOMBINE_TAIL='-Wl,--version-script binutils.versions $(EXPORT_CHECK)'
|
|
|
963210 |
@@ -435,7 +435,8 @@ mips-*-netbsd*)
|
|
|
963210 |
SHLIB_EXPFLAGS='$(SHLIB_RPATH_FLAGS) $(SHLIB_DIRS) $(SHLIB_EXPLIBS)'
|
|
|
963210 |
PROFFLAGS=-pg
|
|
|
963210 |
PROG_RPATH_FLAGS='$(RPATH_FLAG)$(PROG_RPATH)'
|
|
|
963210 |
- CC_LINK_SHARED='$(CC) $(PROG_LIBPATH) $(PROG_RPATH_FLAGS) $(CFLAGS) $(LDFLAGS)'
|
|
|
963210 |
+ CC_LINK_SHARED='$(CC) $(PROG_LIBPATH) $(PROG_RPATH_FLAGS) $(CFLAGS) -pie -Wl,-z,relro -Wl,-z,now $(LDFLAGS)'
|
|
|
963210 |
+ INSTALL_SHLIB='${INSTALL} -m755'
|
|
|
963210 |
CC_LINK_STATIC='$(CC) $(PROG_LIBPATH) $(CFLAGS) $(LDFLAGS)'
|
|
|
963210 |
CXX_LINK_SHARED='$(CXX) $(PROG_LIBPATH) $(PROG_RPATH_FLAGS) $(CXXFLAGS) $(LDFLAGS)'
|
|
|
963210 |
CXX_LINK_STATIC='$(CXX) $(PROG_LIBPATH) $(CXXFLAGS) $(LDFLAGS)'
|