51 lines
2.3 KiB
Diff
51 lines
2.3 KiB
Diff
|
Don't let an RPATH into any of the binaries we build here. While we're
|
||
|
tinkering with linker flags, prune out the -L/usr/lib* and PIE flags where
|
||
|
they might leak out and affect apps which use the libraries.
|
||
|
|
||
|
--- krb5-1.5/src/aclocal.m4 2006-05-24 06:29:25.000000000 -0400
|
||
|
+++ krb5-1.5/src/aclocal.m4 2006-07-05 14:31:04.000000000 -0400
|
||
|
@@ -1184,6 +1184,7 @@
|
||
|
[AC_REQUIRE([KRB5_LIB_AUX])dnl
|
||
|
AC_REQUIRE([KRB5_AC_NEED_LIBGEN])dnl
|
||
|
AC_SUBST(CC_LINK)
|
||
|
+RPATH_FLAG=
|
||
|
AC_SUBST(RPATH_FLAG)
|
||
|
AC_SUBST(DEPLIBEXT)])
|
||
|
|
||
|
--- krb5-1.5/src/krb5-config.in 2006-06-15 20:26:49.000000000 -0400
|
||
|
+++ krb5-1.5/src/krb5-config.in 2006-07-05 14:31:04.000000000 -0400
|
||
|
@@ -186,6 +186,11 @@
|
||
|
-e 's#\$(PTHREAD_CFLAGS)#'"$PTHREAD_CFLAGS"'#' \
|
||
|
-e 's#\$(CFLAGS)#'"$CFLAGS"'#'`
|
||
|
|
||
|
+ if test `dirname $libdir` = /usr ; then
|
||
|
+ lib_flags=`echo $lib_flags | sed -e "s#-L$libdir##" -e "s#$RPATH_FLAG$libdir##"`
|
||
|
+ fi
|
||
|
+ lib_flags=`echo $lib_flags | sed -e "s#-fPIE##" -e "s#-pie##"`
|
||
|
+
|
||
|
if test $library = 'kdb'; then
|
||
|
lib_flags="$lib_flags -lkdb5 $KDB5_DB_LIB"
|
||
|
library=krb5
|
||
|
--- krb5-1.5/src/config/shlib.conf 2006-06-16 01:53:34.000000000 -0400
|
||
|
+++ krb5-1.5/src/config/shlib.conf 2006-07-05 14:31:04.000000000 -0400
|
||
|
@@ -371,14 +371,15 @@
|
||
|
# Use objdump -x to examine the fields of the library
|
||
|
LDCOMBINE='$(CC) -shared -fPIC -Wl,-h,$(LIBPREFIX)$(LIBBASE)$(SHLIBSEXT) $(LDFLAGS)'
|
||
|
#
|
||
|
- LDCOMBINE_TAIL='-Wl,--version-script binutils.versions && $(PERL) -w $(SRCTOP)/util/export-check.pl $(SHLIB_EXPORT_FILE) $@'
|
||
|
+ LDCOMBINE_TAIL='-Wl,--version-script binutils.versions -Wl,-E && $(PERL) -w $(SRCTOP)/util/export-check.pl $(SHLIB_EXPORT_FILE) $@'
|
||
|
SHLIB_EXPORT_FILE_DEP=binutils.versions
|
||
|
# For cases where we do have dependencies on other libraries
|
||
|
# built in this tree...
|
||
|
- SHLIB_EXPFLAGS='-Wl,-R$(SHLIB_RDIRS) $(SHLIB_DIRS) $(SHLIB_EXPLIBS)'
|
||
|
+ SHLIB_EXPFLAGS='$(SHLIB_DIRS) $(SHLIB_EXPLIBS)'
|
||
|
PROFFLAGS=-pg
|
||
|
- RPATH_FLAG='-Wl,-rpath -Wl,'
|
||
|
- CC_LINK_SHARED='$(CC) $(PROG_LIBPATH) $(RPATH_FLAG)$(PROG_RPATH) $(CFLAGS) $(LDFLAGS)'
|
||
|
+ RPATH_FLAG='-L'
|
||
|
+ CC_LINK_SHARED='$(CC) $(PROG_LIBPATH) $(CFLAGS) -pie $(LDFLAGS)'
|
||
|
+ INSTALL_SHLIB='${INSTALL} -m755'
|
||
|
CC_LINK_STATIC='$(CC) $(PROG_LIBPATH) $(CFLAGS) $(LDFLAGS)'
|
||
|
RUN_ENV='LD_LIBRARY_PATH=`echo $(PROG_LIBPATH) | sed -e "s/-L//g" -e "s/ /:/g"`; export LD_LIBRARY_PATH; '
|
||
|
|