Bugzilla Bug 259945: configure.in: use $ORIGIN with both GCC and Sun

compiler on Solaris. build/unix/run-mozilla.sh: changed '-h "$MOZ_PROGRAM"'
to '-h "libmozjs.so"' because firefox-bin and thunderbird-bin are not
symbol links under dist/bin.  The patch is contributed by Boying Lu
<brian.lu@sun.com>. r=wtc. sr=neil.parkwaycc.co.uk.
This commit is contained in:
wtchang%redhat.com 2005-11-14 21:47:45 +00:00
Родитель 7b3b670f50
Коммит 062ac85da7
2 изменённых файлов: 22 добавлений и 7 удалений

Просмотреть файл

@ -328,10 +328,24 @@ if [ -z "$MRE_HOME" ]; then
fi
##
## Set LD_LIBRARY_PATH
## On Solaris we use $ORIGIN instead of LD_LIBRARY_PATH unless
## $MOZ_PROGRAM is a symbolic link, in this case we need to set
## LD_LIBRARY_PATH because $ORIGIN doesn't work on a symbolic link.
if [ `uname -s` != "SunOS" -o -h "$MOZ_PROGRAM" ]
##
## On Solaris we use $ORIGIN (set in RUNPATH) instead of LD_LIBRARY_PATH
## to locate shared libraries.
##
## When a shared library is a symbolic link, $ORIGIN will be replaced with
## the real path (i.e., what the symbolic link points to) by the runtime
## linker. For example, if dist/bin/libmozjs.so is a symbolic link to
## js/src/libmozjs.so, $ORIGIN will be "js/src" instead of "dist/bin".
## So the runtime linker will use "js/src" NOT "dist/bin" to locate the
## other shared libraries that libmozjs.so depends on. This only happens
## when a user (developer) tries to start firefox, thunderbird, or seamonkey
## under dist/bin. To solve the problem, we should rely on LD_LIBRARY_PATH
## to locate shared libraries.
##
## Note:
## We choose libmozjs.so as a representative shared library. If it is
## a symbolic link, all other shared libraries are symbolic links also.
if [ `uname -s` != "SunOS" -o -h "$MOZ_DIST_BIN/libmozjs.so" ]
then
LD_LIBRARY_PATH=${MOZ_DIST_BIN}:${MOZ_DIST_BIN}/plugins:${MRE_HOME}${LD_LIBRARY_PATH+":$LD_LIBRARY_PATH"}
fi

Просмотреть файл

@ -2019,14 +2019,15 @@ dnl the qsort routine under solaris is faulty
AC_DEFINE(SOLARIS)
TARGET_NSPR_MDCPUCFG='\"md/_solaris32.cfg\"'
SYSTEM_MAKEDEPEND=
# $ORIGIN/.. is for shared libraries under components/ to locate shared
# libraries one level up (e.g. libnspr4.so)
LDFLAGS="$LDFLAGS -R '\$\$ORIGIN:\$\$ORIGIN/..'"
if test -z "$GNU_CC"; then
NS_USE_NATIVE=1
AC_DEFINE(NSCAP_DISABLE_DEBUG_PTR_TYPES)
CFLAGS="$CFLAGS -xstrconst -xbuiltin=%all"
CXXFLAGS="$CXXFLAGS -xbuiltin=%all -features=tmplife -norunpath"
# $ORIGIN/.. is for shared libraries under components/ to locate shared
# libraries one level up (e.g. libnspr4.so)
LDFLAGS="-xildoff -zlazyload -zcombreloc $LDFLAGS -R '\$\$ORIGIN:\$\$ORIGIN/..'"
LDFLAGS="-xildoff -zlazyload -zcombreloc $LDFLAGS"
MOZ_OPTIMIZE_FLAGS="-xO4"
MKSHLIB='$(CXX) $(CXXFLAGS) $(DSO_PIC_FLAGS) $(DSO_LDOPTS) -h $@ -o $@'
MKCSHLIB='$(CC) $(CFLAGS) $(DSO_PIC_FLAGS) -G -Wl,-z -Wl,muldefs -h $@ -o $@'