fix dynamic_loading_problem
pass dynamic loader straight to ./yap when booting the first time simplify prefix for chr make cross-compiler use this.
This commit is contained in:
parent
aef5725901
commit
a116b546f3
@ -83,6 +83,7 @@ SHELL=@SHELL@
|
||||
RANLIB=@RANLIB@
|
||||
AR=@AR@
|
||||
srcdir=@srcdir@
|
||||
abs_top_builddir=@abs_top_builddir@
|
||||
SHLIB_SUFFIX=@SHLIB_SUFFIX@
|
||||
MAKEINFO=makeinfo
|
||||
TEXI2DVI=texi2dvi
|
||||
@ -580,7 +581,7 @@ all: startup
|
||||
|
||||
startup: yap@EXEC_SUFFIX@ $(PL_SOURCES)
|
||||
-rm -f startup
|
||||
echo "bootstrap('$(srcdir)/pl/init.yap'). module(user). save_program(startup)." | @CROSS_SIMULATOR@ ./yap -b $(srcdir)/pl/boot.yap
|
||||
echo "bootstrap('$(srcdir)/pl/init.yap'). module(user). save_program(startup)." | @PRE_DYNLOADER_PATH@ ./yap -b $(srcdir)/pl/boot.yap
|
||||
|
||||
yap@EXEC_SUFFIX@: $(HEADERS) yap.o @YAPLIB@
|
||||
$(MPI_CC) $(STANDARD_CFLAGS) $(LDFLAGS) -o yap yap.o @YAPLIB@ $(LIBS) @MPI_LIBS@
|
||||
|
25
configure
vendored
25
configure
vendored
@ -689,6 +689,7 @@ CPLINT_CFLAGS
|
||||
CPLINT_LDFLAGS
|
||||
CPLINT_SHLIB_LD
|
||||
ENABLE_CPLINT
|
||||
PRE_DYNLOADER_PATH
|
||||
EXTEND_DYNLOADER_PATH
|
||||
M4
|
||||
M4GENHDRS
|
||||
@ -714,7 +715,6 @@ LAM_MPI_CC
|
||||
MPI_OBJS
|
||||
MPI_LIBS
|
||||
INSTALL_COMMAND
|
||||
CROSS_SIMULATOR
|
||||
INSTALLCLP
|
||||
JAVALIBPATH
|
||||
JAVAINCPATH
|
||||
@ -1332,6 +1332,7 @@ Optional Features:
|
||||
--enable-dynamic-loading compile Yap as a DLL
|
||||
--enable-use-malloc use malloc to allocate memory
|
||||
--enable-condor allow Yap to be used from condor
|
||||
--enable-chr install chr library
|
||||
--enable-april compile Yap to support April ILP system
|
||||
--enable-dlcompat use dlcompat library for dynamic loading on Mac OS X
|
||||
--enable-cplint=DIR enable the cplint library using the glu library in DIR/lib
|
||||
@ -2841,6 +2842,13 @@ else
|
||||
use_condor=no
|
||||
fi
|
||||
|
||||
# Check whether --enable-chr was given.
|
||||
if test "${enable_chr+set}" = set; then
|
||||
enableval=$enable_chr; use_chr="$enableval"
|
||||
else
|
||||
use_chr=yes
|
||||
fi
|
||||
|
||||
|
||||
# Check whether --enable-april was given.
|
||||
if test "${enable_april+set}" = set; then
|
||||
@ -3424,7 +3432,7 @@ then
|
||||
then
|
||||
RANLIB="sslittle-na-sstrix-ranlib"
|
||||
AR="sslittle-na-sstrix-ar"
|
||||
CROSS_SIMULATOR="sim-fast"
|
||||
PRE_DYNLOADER_PATH="sim-fast"
|
||||
fi
|
||||
else
|
||||
if test -z "${mycflags}"
|
||||
@ -7126,16 +7134,17 @@ esac
|
||||
if test "$dynamic_loading" = "yes"
|
||||
then
|
||||
YAP_EXTRAS="$SHLIB_CFLAGS $YAP_EXTRAS"
|
||||
CROSS_SIMULATOR="LD_LIBRARY_PATH=."
|
||||
case "$target_os" in
|
||||
*cygwin*!*mingw32*)
|
||||
EXTEND_DYNLOADER_PATH=""
|
||||
PRE_DYNLOADER_PATH=""
|
||||
;;
|
||||
*darwin*)
|
||||
DYNYAPLIB=libYap"$SHLIB_SUFFIX"
|
||||
YAPLIB="$DYNYAPLIB"
|
||||
DYNLIB_LD="gcc -dynamiclib"
|
||||
EXTEND_DYNLOADER_PATH="DYLD_LIBRARY_PATH=\$DYLD_LIBRARY_PATH:\$(DESTDIR)\$(LIBDIR): YAPSHAREDIR=\$(DESTDIR)\$(SHAREDIR)/Yap YAPLIBDIR=\$(DESTDIR)\$(YAPLIBDIR)"
|
||||
PRE_DYNLOADER_PATH="DYLD_LIBRARY_PATH=\$(abs_top_builddir)"
|
||||
EXTEND_DYNLOADER_PATH="DYLD_LIBRARY_PATH=\$(DESTDIR)\$(LIBDIR): YAPSHAREDIR=\$(DESTDIR)\$(SHAREDIR)/Yap YAPLIBDIR=\$(DESTDIR)\$(YAPLIBDIR)"
|
||||
;;
|
||||
*)
|
||||
case "$target_cpu" in
|
||||
@ -7150,6 +7159,7 @@ then
|
||||
;;
|
||||
esac
|
||||
EXTEND_DYNLOADER_PATH="LD_LIBRARY_PATH=\$LD_LIBRARY_PATH:\$(DESTDIR)\$(LIBDIR): YAPSHAREDIR=\$(DESTDIR)\$(SHAREDIR)/Yap YAPLIBDIR=\$(DESTDIR)\$(YAPLIBDIR)"
|
||||
PRE_DYNLOADER_PATH="LD_LIBRARY_PATH=\$(abs_top_builddir)"
|
||||
LDFLAGS="$LDFLAGS -Wl,-R,$prefix/lib -Wl,-R,$JAVA_HOME/jre/lib/$JAVA_TARGET"
|
||||
DYNYAPLIB=libYap"$SHLIB_SUFFIX"
|
||||
YAPLIB="$DYNYAPLIB"
|
||||
@ -7157,6 +7167,7 @@ then
|
||||
;;
|
||||
esac
|
||||
else
|
||||
PRE_DYNLOADER_PATH=""
|
||||
EXTEND_DYNLOADER_PATH="YAPSHAREDIR=\$(DESTDIR)\$(SHAREDIR) YAPLIBDIR=\$(DESTDIR)\$(YAPLIBDIR)"
|
||||
DYNYAPLIB=libYap.notused
|
||||
fi
|
||||
@ -7532,6 +7543,7 @@ fi
|
||||
|
||||
|
||||
|
||||
|
||||
# LAM
|
||||
OLD_CC=${CC}
|
||||
CC=${LAM_MPI_CC}
|
||||
@ -13546,7 +13558,6 @@ EXEC_SUFFIX=""
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
{ echo "$as_me:$LINENO: checking for gcc threaded code" >&5
|
||||
@ -16922,6 +16933,7 @@ CPLINT_CFLAGS!$CPLINT_CFLAGS$ac_delim
|
||||
CPLINT_LDFLAGS!$CPLINT_LDFLAGS$ac_delim
|
||||
CPLINT_SHLIB_LD!$CPLINT_SHLIB_LD$ac_delim
|
||||
ENABLE_CPLINT!$ENABLE_CPLINT$ac_delim
|
||||
PRE_DYNLOADER_PATH!$PRE_DYNLOADER_PATH$ac_delim
|
||||
EXTEND_DYNLOADER_PATH!$EXTEND_DYNLOADER_PATH$ac_delim
|
||||
M4!$M4$ac_delim
|
||||
M4GENHDRS!$M4GENHDRS$ac_delim
|
||||
@ -16942,7 +16954,6 @@ JAVA_HOME!$JAVA_HOME$ac_delim
|
||||
JAVAC!$JAVAC$ac_delim
|
||||
JAR!$JAR$ac_delim
|
||||
IN_UNIX!$IN_UNIX$ac_delim
|
||||
YAPMPILIB!$YAPMPILIB$ac_delim
|
||||
_ACEOF
|
||||
|
||||
if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 97; then
|
||||
@ -16984,11 +16995,11 @@ _ACEOF
|
||||
ac_delim='%!_!# '
|
||||
for ac_last_try in false false false false false :; do
|
||||
cat >conf$$subs.sed <<_ACEOF
|
||||
YAPMPILIB!$YAPMPILIB$ac_delim
|
||||
LAM_MPI_CC!$LAM_MPI_CC$ac_delim
|
||||
MPI_OBJS!$MPI_OBJS$ac_delim
|
||||
MPI_LIBS!$MPI_LIBS$ac_delim
|
||||
INSTALL_COMMAND!$INSTALL_COMMAND$ac_delim
|
||||
CROSS_SIMULATOR!$CROSS_SIMULATOR$ac_delim
|
||||
INSTALLCLP!$INSTALLCLP$ac_delim
|
||||
JAVALIBPATH!$JAVALIBPATH$ac_delim
|
||||
JAVAINCPATH!$JAVAINCPATH$ac_delim
|
||||
|
11
configure.in
11
configure.in
@ -390,7 +390,7 @@ then
|
||||
then
|
||||
RANLIB="sslittle-na-sstrix-ranlib"
|
||||
AR="sslittle-na-sstrix-ar"
|
||||
CROSS_SIMULATOR="sim-fast"
|
||||
PRE_DYNLOADER_PATH="sim-fast"
|
||||
fi
|
||||
else
|
||||
if test -z "${mycflags}"
|
||||
@ -854,16 +854,17 @@ esac
|
||||
if test "$dynamic_loading" = "yes"
|
||||
then
|
||||
YAP_EXTRAS="$SHLIB_CFLAGS $YAP_EXTRAS"
|
||||
CROSS_SIMULATOR="LD_LIBRARY_PATH=."
|
||||
case "$target_os" in
|
||||
*cygwin*!*mingw32*)
|
||||
EXTEND_DYNLOADER_PATH=""
|
||||
PRE_DYNLOADER_PATH=""
|
||||
;;
|
||||
*darwin*)
|
||||
DYNYAPLIB=libYap"$SHLIB_SUFFIX"
|
||||
YAPLIB="$DYNYAPLIB"
|
||||
DYNLIB_LD="gcc -dynamiclib"
|
||||
EXTEND_DYNLOADER_PATH="DYLD_LIBRARY_PATH=\$DYLD_LIBRARY_PATH:\$(DESTDIR)\$(LIBDIR): YAPSHAREDIR=\$(DESTDIR)\$(SHAREDIR)/Yap YAPLIBDIR=\$(DESTDIR)\$(YAPLIBDIR)"
|
||||
PRE_DYNLOADER_PATH="DYLD_LIBRARY_PATH=\$(abs_top_builddir)"
|
||||
EXTEND_DYNLOADER_PATH="DYLD_LIBRARY_PATH=\$(DESTDIR)\$(LIBDIR): YAPSHAREDIR=\$(DESTDIR)\$(SHAREDIR)/Yap YAPLIBDIR=\$(DESTDIR)\$(YAPLIBDIR)"
|
||||
;;
|
||||
*)
|
||||
case "$target_cpu" in
|
||||
@ -878,6 +879,7 @@ then
|
||||
;;
|
||||
esac
|
||||
EXTEND_DYNLOADER_PATH="LD_LIBRARY_PATH=\$LD_LIBRARY_PATH:\$(DESTDIR)\$(LIBDIR): YAPSHAREDIR=\$(DESTDIR)\$(SHAREDIR)/Yap YAPLIBDIR=\$(DESTDIR)\$(YAPLIBDIR)"
|
||||
PRE_DYNLOADER_PATH="LD_LIBRARY_PATH=\$(abs_top_builddir)"
|
||||
LDFLAGS="$LDFLAGS -Wl,-R,$prefix/lib -Wl,-R,$JAVA_HOME/jre/lib/$JAVA_TARGET"
|
||||
DYNYAPLIB=libYap"$SHLIB_SUFFIX"
|
||||
YAPLIB="$DYNYAPLIB"
|
||||
@ -885,6 +887,7 @@ then
|
||||
;;
|
||||
esac
|
||||
else
|
||||
PRE_DYNLOADER_PATH=""
|
||||
EXTEND_DYNLOADER_PATH="YAPSHAREDIR=\$(DESTDIR)\$(SHAREDIR) YAPLIBDIR=\$(DESTDIR)\$(YAPLIBDIR)"
|
||||
DYNYAPLIB=libYap.notused
|
||||
fi
|
||||
@ -1000,6 +1003,7 @@ else
|
||||
ENABLE_CPLINT="#"
|
||||
fi
|
||||
AC_SUBST(ENABLE_CPLINT)
|
||||
AC_SUBST(PRE_DYNLOADER_PATH)
|
||||
AC_SUBST(EXTEND_DYNLOADER_PATH)
|
||||
|
||||
# LAM
|
||||
@ -1130,7 +1134,6 @@ AC_SUBST(LAM_MPI_CC)
|
||||
AC_SUBST(MPI_OBJS)
|
||||
AC_SUBST(MPI_LIBS)
|
||||
AC_SUBST(INSTALL_COMMAND)
|
||||
AC_SUBST(CROSS_SIMULATOR)
|
||||
AC_SUBST(INSTALLCLP)
|
||||
AC_SUBST(JAVALIBPATH)
|
||||
AC_SUBST(JAVAINCPATH)
|
||||
|
Reference in New Issue
Block a user