aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPeter Seebach <peter.seebach@windriver.com>2010-09-15 10:47:42 -0500
committerPeter Seebach <peter.seebach@windriver.com>2010-09-15 11:07:36 -0500
commite5c82673805290747db3607bc0e2645dcff105f6 (patch)
tree7347a4914e78078f570124c9fd9515f717fa139f
parente3765ee9c9c2bccaa32fbe6426d4eb1bbcd214e7 (diff)
downloadpseudo-e5c82673805290747db3607bc0e2645dcff105f6.tar.gz
pseudo-e5c82673805290747db3607bc0e2645dcff105f6.tar.bz2
pseudo-e5c82673805290747db3607bc0e2645dcff105f6.zip
In the WR Linux build system, we build host tools (including pseudo)
in one place, but then often reuse them in other project directories. As a result, the --with-sqlite path is no longer the right path to use for RPATH later in the program's life. In the past, we were using chrpath to change the path to something more suitable, but this doesn't work if the new path is longer. Instead, allow an explicit --with-rpath setting which our build system can use. The logic is: * If you don't specify --with-sqlite or --with-rpath, you get no -Wl,-R * If you specify an empty path in --with-rpath, or --without-rpath, you get no -Wl,-R * If you specify --with-rpath with a non-empty path, you get -Wl,-R<path> * If you specify --with-sqlite, but not --with-rpath, you get -Wl,-R$(SQLITE)/lib
-rw-r--r--ChangeLog.txt4
-rw-r--r--Makefile.in3
-rwxr-xr-xconfigure16
3 files changed, 21 insertions, 2 deletions
diff --git a/ChangeLog.txt b/ChangeLog.txt
index 777bcf9..f70429f 100644
--- a/ChangeLog.txt
+++ b/ChangeLog.txt
@@ -1,3 +1,7 @@
+2010-09-15:
+ * (seebs) allow setting default RPATH entry distinct from sqlite3
+ directory.
+
2010-09-08:
* (seebs) handle mkfifo without guaranteeing an EINVAL response.
diff --git a/Makefile.in b/Makefile.in
index f916788..2bf8197 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -23,6 +23,7 @@ SUFFIX=@SUFFIX@
SQLITE=@SQLITE@
BITS=@BITS@
MARK64=@MARK64@
+RPATH=@RPATH@
VERSION=0.3
LIB=lib$(MARK64)
@@ -36,7 +37,7 @@ CFLAGS_BASE=-pipe -std=gnu99 -Wall -W -Wextra
CFLAGS_CODE=-fPIC -D_LARGEFILE64_SOURCE -D_ATFILE_SOURCE -m$(BITS)
CFLAGS_DEFS=-DPSEUDO_PREFIX='"$(PREFIX)"' -DPSEUDO_SUFFIX='"$(SUFFIX)"' -DPSEUDO_BINDIR='"$(BIN)"' -DPSEUDO_LIBDIR='"$(LIB)"' -DPSEUDO_LOCALSTATEDIR='"$(LOCALSTATE)"' -DPSEUDO_VERSION='"$(VERSION)"'
CFLAGS_DEBUG=-O2 -g
-CFLAGS_SQL=-L$(SQLITE)/lib -I$(SQLITE)/include -Wl,-R$(SQLITE)/lib
+CFLAGS_SQL=-L$(SQLITE)/lib -I$(SQLITE)/include $(RPATH)
CFLAGS_PSEUDO=$(CFLAGS_BASE) $(CFLAGS_CODE) $(CFLAGS_DEFS) \
$(CFLAGS_DEBUG) $(CFLAGS_SQL)
diff --git a/configure b/configure
index 08e2283..ea89d0b 100755
--- a/configure
+++ b/configure
@@ -26,7 +26,11 @@ opt_sqlite=/usr
usage()
{
echo >&2 "usage:"
- echo >&2 " configure --prefix=... [--suffix=...] [--with-sqlite=...] [--bits=32|64]"
+ echo >&2 " configure --prefix=..."
+ echo >&2 " [--suffix=...]"
+ echo >&2 " [--with-sqlite=...]"
+ echo >&2 " [--with-rpath=...|--without-rpath]"
+ echo >&2 " [--bits=32|64]"
exit 1
}
@@ -39,6 +43,15 @@ do
;;
--with-sqlite=*)
opt_sqlite=${arg#--with-sqlite=}
+ # assign new value if unset
+ : ${opt_rpath=-Wl,-R\$(SQLITE)/lib}
+ ;;
+ --without-rpath)
+ opt_rpath=''
+ ;;
+ --with-rpath=*)
+ rpath=${arg#--with-rpath=}
+ opt_rpath=${rpath:+-Wl,-R$rpath}
;;
--suffix=*)
opt_suffix=${arg#--suffix=}
@@ -82,6 +95,7 @@ sed -e '
s,@PREFIX@,'"$opt_prefix"',g
s,@SUFFIX@,'"$opt_suffix"',g
s,@SQLITE@,'"$opt_sqlite"',g
+ s!@RPATH@!'"$opt_rpath"'!g
s,@MARK64@,'"$opt_mark64"',g
s,@BITS@,'"$opt_bits"',g
' < Makefile.in > Makefile