summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTom Yu <tlyu@mit.edu>2004-02-12 18:28:01 +0000
committerTom Yu <tlyu@mit.edu>2004-02-12 18:28:01 +0000
commit3772bd7c1af805fd40d5996681a1eea1c0ac8f0a (patch)
treed4b3ea4a901b78757eb72b8853258a32a089f6e8
parentebc2280102d9bcfabe73818bf3b55aaa5265b9e8 (diff)
downloadkrb5-3772bd7c1af805fd40d5996681a1eea1c0ac8f0a.tar.gz
krb5-3772bd7c1af805fd40d5996681a1eea1c0ac8f0a.tar.xz
krb5-3772bd7c1af805fd40d5996681a1eea1c0ac8f0a.zip
Tru64 and Irix have RPATH issues for test suite
Implement hack for faking up _RLD_ROOT with a shadow of the directory tree up to the installed "lib" directory. This helps with running tests on Tru64 and Irix. ticket: 1793 git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@16066 dc483132-0cff-0310-8789-dd5450dbe970
-rw-r--r--src/config/ChangeLog12
-rw-r--r--src/config/pre.in4
-rw-r--r--src/config/shlib.conf45
-rw-r--r--src/kadmin/testing/scripts/ChangeLog4
-rw-r--r--src/kadmin/testing/scripts/env-setup.shin4
-rw-r--r--src/util/ChangeLog5
-rw-r--r--src/util/Makefile.in7
7 files changed, 67 insertions, 14 deletions
diff --git a/src/config/ChangeLog b/src/config/ChangeLog
index 37d34aa45c..16c1fa9cbc 100644
--- a/src/config/ChangeLog
+++ b/src/config/ChangeLog
@@ -1,3 +1,15 @@
+2004-02-12 Tom Yu <tlyu@mit.edu>
+
+ * pre.in (FAKEDEST, FAKEPREFIX, FAKELIBDIR): Support variables for
+ the _RLD_ROOT hack.
+
+ * shlib.conf: For alpha/Tru64 and Irix, construct _RLD_ROOT values
+ pointing to a fake destdir, as well as to the real root directory.
+ Previously, pointing _RLD_ROOT at a non-existent directory and
+ putting everything in LD_LIBRARY_PATH caused other installed
+ utilities with RPATHs which were run by the test suite to fail to
+ run.
+
2004-02-09 Tom Yu <tlyu@mit.edu>
* config.guess: Update from autoconf-2.59.
diff --git a/src/config/pre.in b/src/config/pre.in
index f89a9da406..34f91b7e09 100644
--- a/src/config/pre.in
+++ b/src/config/pre.in
@@ -123,6 +123,10 @@ SRCTOP = @srcdir@/$(BUILDTOP)
VPATH = @srcdir@
CONFIG_RELTOPDIR = @CONFIG_RELTOPDIR@
+FAKEDEST=$(BUILDTOP)/util/fakedest
+FAKEPREFIX=$(FAKEDEST)/$(prefix)
+FAKELIBDIR=$(FAKEPREFIX)/lib
+
# DEFS set by configure
# DEFINES set by local Makefile.in
# LOCALINCLUDES set by local Makefile.in
diff --git a/src/config/shlib.conf b/src/config/shlib.conf
index f37a747338..8442ab8346 100644
--- a/src/config/shlib.conf
+++ b/src/config/shlib.conf
@@ -30,13 +30,20 @@ alpha*-dec-osf*)
PROFFLAGS=-pg
RPATH_FLAG='-Wl,-rpath -Wl,'
CC_LINK_SHARED='$(CC) $(PROG_LIBPATH) $(RPATH_FLAG)$(PROG_RPATH) $(CFLAGS) $(LDFLAGS)'
- # Need -oldstyle_liblookup to avoid picking up shared libs from
- # other builds. OSF/1 / Tru64 ld programs look through the entire
- # library path for shared libs prior to looking through the
- # entire library path for static libs.
- CC_LINK_STATIC='$(CC) $(PROG_LIBPATH) -Wl,-oldstyle_liblookup $(CFLAGS) $(LDFLAGS)'
- # $(PROG_RPATH) is here to handle things like a shared tcl library
- RUN_ENV='LD_LIBRARY_PATH=`echo $(PROG_LIBPATH) | sed -e "s/-L//g" -e "s/ /:/g"`:$(PROG_RPATH):/usr/shlib:/usr/ccs/lib:/usr/lib/cmplrs/cc:/usr/lib:/usr/local/lib; export LD_LIBRARY_PATH; _RLD_ROOT=/dev/dummy/d; export _RLD_ROOT;'
+ if test "$krb5_cv_prog_gcc" = yes; then
+ # Really should check for gnu ld vs system ld, too.
+ CC_LINK_STATIC='$(CC) $(PROG_LIBPATH) $(CFLAGS) $(LDFLAGS)'
+ else
+ # Need -oldstyle_liblookup to avoid picking up shared libs from
+ # other builds. OSF/1 / Tru64 ld programs look through the entire
+ # library path for shared libs prior to looking through the
+ # entire library path for static libs.
+ CC_LINK_STATIC='$(CC) $(PROG_LIBPATH) -Wl,-oldstyle_liblookup $(CFLAGS) $(LDFLAGS)'
+ fi
+ # _RLD_ROOT hack needed to repoint "root" directory for purposes
+ # of searching for shared libs, since RPATHs take precedence over
+ # LD_LIBRARY_PATH.
+ RUN_ENV='LD_LIBRARY_PATH=`echo $(PROG_LIBPATH) | sed -e "s/-L//g" -e "s/ /:/g"`$${LD_LIBRARY_PATH+:$$LD_LIBRARY_PATH}; export LD_LIBRARY_PATH; _RLD_ROOT=$(FAKEDEST):$${_RLD_ROOT+$$_RLD_ROOT}$${_RLD_ROOT-/}; export _RLD_ROOT;'
;;
# HPUX *seems* to work under 10.20.
@@ -93,11 +100,17 @@ mips-sgi-irix6.3) # This is a Kludge; see below
# supported ABIs on Irix, and the precedence of the rpath over
# LD_LIBRARY*_PATH. Like OSF/1, _RLD*_ROOT needs to be set to
# work around this lossage.
- add='`echo $(PROG_LIBPATH) | sed -e "s/-L//g" -e "s/ /:/g"`'
- dummy=/dev/dummmy/d
+ #
# Set the N32 and 64 variables first because the unqualified
# variables affect all three and can cause the sed command to fail.
- RUN_ENV="LD_LIBRARYN32_PATH=$add:/usr/lib32:/usr/lib32/internal:/lib32:/opt/lib32; export LD_LIBRARYN32_PATH; _RLDN32_ROOT=$dummy; export _RLDN32_ROOT; LD_LIBRARY64_PATH=$add:/usr/lib64:/usr/lib64/internal:/lib64:/opt/lib64; export LD_LIBRARY64_PATH; _RLD64_ROOT=$dummy; export _RLD64_ROOT; LD_LIBRARY_PATH=$add:/usr/lib:/usr/lib/internal:/lib:/lib/cmplrs/cc:/usr/lib/cmplrs/cc:/opt/lib; export LD_LIBRARY_PATH; _RLD_ROOT=$dummy; export _RLD_ROOT;"
+ #
+ # This loop is to reduce the clutter a slight bit.
+ add='`echo $(PROG_LIBPATH) | sed -e "s/-L//g" -e "s/ /:/g"`'
+ RUN_ENV=
+ for i in N32 64 ''; do
+ RUN_ENV="${RUN_ENV+ $RUN_ENV}LD_LIBRARY${i}_PATH=$add\$\${LD_LIBRARY${i}_PATH+:\$\$LD_LIBRARY${i}_PATH}; export LD_LIBRARY${i}_PATH;"
+ RUN_ENV="${RUN_ENV} _RLD${i}_ROOT=\$(FAKEDEST):\$\${_RLD${i}_ROOT+\$\${_RLD${i}_ROOT}}\$\${_RLD${i}_ROOT-/}; export _RLD${i}_ROOT;"
+ done
;;
mips-sgi-irix*)
@@ -116,11 +129,17 @@ mips-sgi-irix*)
# supported ABIs on Irix, and the precedence of the rpath over
# LD_LIBRARY*_PATH. Like OSF/1, _RLD*_ROOT needs to be set to
# work around this lossage.
- add='`echo $(PROG_LIBPATH) | sed -e "s/-L//g" -e "s/ /:/g"`'
- dummy=/dev/dummmy/d
+ #
# Set the N32 and 64 variables first because the unqualified
# variables affect all three and can cause the sed command to fail.
- RUN_ENV="LD_LIBRARYN32_PATH=$add:/usr/lib32:/usr/lib32/internal:/lib32:/opt/lib32; export LD_LIBRARYN32_PATH; _RLDN32_ROOT=$dummy; export _RLDN32_ROOT; LD_LIBRARY64_PATH=$add:/usr/lib64:/usr/lib64/internal:/lib64:/opt/lib64; export LD_LIBRARY64_PATH; _RLD64_ROOT=$dummy; export _RLD64_ROOT; LD_LIBRARY_PATH=$add:/usr/lib:/usr/lib/internal:/lib:/lib/cmplrs/cc:/usr/lib/cmplrs/cc:/opt/lib; export LD_LIBRARY_PATH; _RLD_ROOT=$dummy; export _RLD_ROOT;"
+ #
+ # This loop is to reduce the clutter a slight bit.
+ add='`echo $(PROG_LIBPATH) | sed -e "s/-L//g" -e "s/ /:/g"`'
+ RUN_ENV=
+ for i in N32 64 ''; do
+ RUN_ENV="${RUN_ENV+ $RUN_ENV}LD_LIBRARY${i}_PATH=$add\$\${LD_LIBRARY${i}_PATH+:\$\$LD_LIBRARY${i}_PATH}; export LD_LIBRARY${i}_PATH;"
+ RUN_ENV="${RUN_ENV} _RLD${i}_ROOT=\$(FAKEDEST):\$\${_RLD${i}_ROOT+\$\${_RLD${i}_ROOT}}\$\${_RLD${i}_ROOT-/}; export _RLD${i}_ROOT;"
+ done
;;
# untested...
diff --git a/src/kadmin/testing/scripts/ChangeLog b/src/kadmin/testing/scripts/ChangeLog
index 4b49a023cd..1ec2b42a36 100644
--- a/src/kadmin/testing/scripts/ChangeLog
+++ b/src/kadmin/testing/scripts/ChangeLog
@@ -1,3 +1,7 @@
+2004-02-12 Tom Yu <tlyu@mit.edu>
+
+ * env-setup.shin: Substitute FAKEDEST. Substitue "$" for "$$".
+
2003-12-05 Tom Yu <tlyu@mit.edu>
* env-setup.shin: Allow BUILDTOP substitution.
diff --git a/src/kadmin/testing/scripts/env-setup.shin b/src/kadmin/testing/scripts/env-setup.shin
index e4a8c7e1b5..0f790ac1c2 100644
--- a/src/kadmin/testing/scripts/env-setup.shin
+++ b/src/kadmin/testing/scripts/env-setup.shin
@@ -22,12 +22,14 @@ PROG_LIBPATH=-L@RBUILD@/lib
BUILDTOP=@RBUILD@
# XXX kludge!
PROG_RPATH=@RBUILD@/lib
+# XXX more kludge!
+FAKEDEST=@RBUILD@/util/fakedest
# This converts $(TOPLIBD) to $TOPLIBD
cat > /tmp/env_setup$$ <<\EOF
@KRB5_RUN_ENV@
EOF
-foo=`sed -e 's/(//g' -e 's/)//g' /tmp/env_setup$$`
+foo=`sed -e 's/(//g' -e 's/)//g' -e 's/\\\$\\\$/\$/g' /tmp/env_setup$$`
eval $foo
# This will get put in setup.csh for convenience
diff --git a/src/util/ChangeLog b/src/util/ChangeLog
index 7b833a1e1d..54b9cdbbd3 100644
--- a/src/util/ChangeLog
+++ b/src/util/ChangeLog
@@ -1,3 +1,8 @@
+2004-02-12 Tom Yu <tlyu@mit.edu>
+
+ * Makefile.in (all-unix, clean-unix): Add new rule to build fake
+ root directory for _RLD_ROOT hacks.
+
2003-12-05 Tom Yu <tlyu@mit.edu>
* Makefile.in (DL_COMPILE, DL_COMPILE_TAIL): New variables to
diff --git a/src/util/Makefile.in b/src/util/Makefile.in
index bb04ff73d6..dd106bbc28 100644
--- a/src/util/Makefile.in
+++ b/src/util/Makefile.in
@@ -29,8 +29,15 @@ DL_COMPILE=@DL_COMPILE@
DL_COMPILE_TAIL=@DL_COMPILE_TAIL@
all-recurse: libupdate makeshlib @EXITSLEEP_TARG@
+all-unix:: $(FAKEPREFIX)/lib
all-mac::
+$(FAKEPREFIX)/lib:
+ $(SRCTOP)/config/mkinstalldirs $(FAKEPREFIX) && ln -s `pwd`/../lib $(FAKEPREFIX)
+
+clean-unix::
+ $(RM) -r $(FAKEPREFIX)
+
NO_OUTDIR=1
all-windows::
@echo Making in util\windows