Fixes on the build sequence, to avoid duplicate mentions of libgmp and not required uses of -rpath

This commit is contained in:
jjgarcia 2003-10-06 12:46:09 +00:00
parent e3473825d2
commit cc7bcb81fc
4 changed files with 21 additions and 13 deletions

4
src/aclocal.m4 vendored
View file

@ -132,15 +132,15 @@ case "${host_os}" in
;;
freebsd*)
thehost="freebsd"
CLIBS="-lcompat"
SHARED_LDFLAGS="-shared"
LDRPATH="-Wl,--rpath,~A"
CLIBS=""
;;
netbsd*)
thehost="netbsd"
SHARED_LDFLAGS="-shared"
LDRPATH="-Wl,--rpath,~A"
CLIBS="-lcompat"
CLIBS=""
;;
solaris*)
thehost="sun4sol2"

View file

@ -52,15 +52,19 @@
(si::system (format nil "
mkdir tmp; ~
cd tmp; ~
ar -x ../liblsp.a; for i in *.o; do mv $i lsp_$i; done; ar -r ../libecl.a *o; rm *.o; ~
ar -x ../libclos.a; for i in *.o; do mv $i lsp_$i; done; ar -r ../libecl.a *o; rm *.o; ~
ranlib ../libecl.a; ~
cd ..; rm -rf tmp/* liblsp* libclos* "))
ar -x ../@LIBPREFIX@lsp.@LIBEXT@; for i in *.@OBJEXT@; do mv $i lsp_$i; done; ar -r ../@LIBPREFIX@ecl.@LIBEXT@ *.@OBJEXT@; rm *.@OBJEXT@; ~
ar -x ../@LIBPREFIX@clos.@LIBEXT@; for i in *.@OBJEXT@; do mv $i lsp_$i; done; ar -r ../@LIBPREFIX@ecl.@LIBEXT@ *.@OBJEXT@; rm *.@OBJEXT@; ~
@RANLIB@ ../@LIBPREFIX@ecl.@LIBEXT@; ~
cd ..; rm -rf tmp/* @LIBPREFIX@{lsp,clos} "))
#+dlopen
(progn
(c::shared-cc "./tmp/libecl.so" "c/main.o" "./libecl.a" #+boehm-gc "-lgc")
(si::system "mv ./tmp/libecl.so ."))
;; We do not need the -rpath flag for the library, nor -lecl.
(let ((c::*ld-flags* "@CLIBS@"))
(c::shared-cc (compile-file-pathname "ecl" :type :dll)
"c/main.@OBJEXT@"
(compile-file-pathname "ecl" :type :lib)
#+boehm-gc "-lgc"
"-lgmp"))
;;;
;;; * Compile, load and link Common-Lisp to C compiler

8
src/configure vendored
View file

@ -3847,15 +3847,15 @@ case "${host_os}" in
;;
freebsd*)
thehost="freebsd"
CLIBS="-lcompat"
SHARED_LDFLAGS="-shared"
LDRPATH="-Wl,--rpath,~A"
CLIBS=""
;;
netbsd*)
thehost="netbsd"
SHARED_LDFLAGS="-shared"
LDRPATH="-Wl,--rpath,~A"
CLIBS="-lcompat"
CLIBS=""
;;
solaris*)
thehost="sun4sol2"
@ -4083,7 +4083,7 @@ TARGETS="ecl${EXEEXT}"
LIBRARIES=""
LSP_LIBRARIES="${LIBPREFIX}ecl.${LIBEXT}"
SUBDIR=c
CLIBS="${CLIBS} -lgmp -lm"
CLIBS="${CLIBS} -lm"
if test ${boehm} = "no" ; then
EXTRA_OBJS="${EXTRA_OBJS} alloc.${OBJEXT} gbc.${OBJEXT}"
else
@ -4112,6 +4112,8 @@ fi
if test ${local_gmp} = "no" ; then
LIBRARIES="${LIBRARIES} ${LIBPREFIX}gmp.${LIBEXT}"
SUBDIR="${SUBDIR} gmp"
else
CLIBS="-lgmp ${CLIBS}"
fi
if test ${runtime} ; then
cat >>confdefs.h <<\_ACEOF

View file

@ -163,7 +163,7 @@ TARGETS="ecl${EXEEXT}"
LIBRARIES=""
LSP_LIBRARIES="${LIBPREFIX}ecl.${LIBEXT}"
SUBDIR=c
CLIBS="${CLIBS} -lgmp -lm"
CLIBS="${CLIBS} -lm"
if test ${boehm} = "no" ; then
EXTRA_OBJS="${EXTRA_OBJS} alloc.${OBJEXT} gbc.${OBJEXT}"
else
@ -186,6 +186,8 @@ fi
if test ${local_gmp} = "no" ; then
LIBRARIES="${LIBRARIES} ${LIBPREFIX}gmp.${LIBEXT}"
SUBDIR="${SUBDIR} gmp"
else
CLIBS="-lgmp ${CLIBS}"
fi
if test ${runtime} ; then
AC_DEFINE(RUNTIME)