[1833] in BarnOwl Developers

home help back first fref pref prev next nref lref last post

[PATCH] locker-build: Use -R instead of -Wl,-R on Solaris.

daemon@ATHENA.MIT.EDU (Nelson Elhage)
Thu Oct 29 18:22:56 2009

Resent-From: nelhage@mit.edu
Resent-To: barnowl-dev-mtg@charon.mit.edu
X-Original-To: nelhage@lunatique.mit.edu
From: Nelson Elhage <nelhage@MIT.EDU>
To: barnowl-dev@mit.edu
Cc: Nelson Elhage <nelhage@mit.edu>
Date: Fri, 23 Oct 2009 19:59:27 -0400

On Athena 9 Solaris, `krb5-config --libs` includes
`-R/usr/athena/lib`. Paths passed with -R end up taking precedence
over those passed with -Wl,-R, and so barnowl ends up using the glib
out of /usr/athena/lib unless we specify the barnowl library dir using
-R as well. Unfortunately, gcc elsewhere does not understand -R, so
conditionalize on the uname.

Signed-off-by: Nelson Elhage <nelhage@mit.edu>
---
 scripts/locker-build |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)

diff --git a/scripts/locker-build b/scripts/locker-build
index 2b8a036..ddba740 100755
--- a/scripts/locker-build
+++ b/scripts/locker-build
@@ -79,11 +79,14 @@ $TAR -C "$TMPDIR" -xzf "$SRC_TGZ" || die "Unable to untar"
 
     echo "Building BarnOwl version $VERS"
 
+    opt_rpath="-Wl,-R"
+    [ $(uname) = "SunOS" ] && opt_rpath="-R"
+
     BARNOWL="/afs/sipb.mit.edu/project/barnowl/arch/$ATHENA_SYS"
     export PKG_CONFIG_PATH="$BARNOWL/lib/pkgconfig"
 
     CFLAGS="-I$BARNOWL/include" \
-        LDFLAGS="-L$BARNOWL/lib -Wl,-R$BARNOWL/lib" \
+        LDFLAGS="-L$BARNOWL/lib $opt_rpath$BARNOWL/lib" \
         ./configure --exec-prefix="/mit/barnowl/arch/$ATHENA_SYS" \
         --prefix="/mit/barnowl/builds/barnowl-$VERS" --mandir=/mit/barnowl/man \
         --program-suffix="-$VERS" \
-- 
1.6.5.40.g402af7


home help back first fref pref prev next nref lref last post