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