use libtool --tag for linker, and try to fix up -fPIC use

svn: r6946
This commit is contained in:
Matthew Flatt 2007-07-22 17:10:19 +00:00
parent 7bd42686b5
commit 1c257a92a8
3 changed files with 7 additions and 5 deletions

View File

@ -139,7 +139,7 @@
[(ppc-macosx ppc-darwin i386-macosx i386-darwin)
(list "-bundle" "-flat_namespace" "-undefined" "suppress")]
[(i386-cygwin) win-gcc-linker-flags]
[else (list "-shared")]))
[else (list "-fPIC" "-shared")]))
(define (get-env-link-flags)
(let ([v (or (getenv "MZSCHEME_DYNEXT_LINKER_FLAGS")

5
src/configure vendored
View File

@ -5389,6 +5389,7 @@ case $OS in
;;
Linux)
LIBS="$LIBS -rdynamic"
DYN_CFLAGS="-fPIC"
# PPC: X11 librares are not found
case `$UNAME -m` in
ppc)
@ -11179,8 +11180,8 @@ if test "${enable_shared}" = "yes" ; then
STATIC_AR="${LIBTOOLPROG} --mode=link $CC -o"
ARFLAGS=""
RANLIB=":"
MZLINKER="${LIBTOOLPROG} --mode=link $CC${need_gcc_static_libgcc} -rpath ${absprefix}/lib"
MREDLINKER="${LIBTOOLPROG} --mode=link $CXX${need_gcc_static_libgcc} -rpath ${absprefix}/lib"
MZLINKER="${LIBTOOLPROG} --mode=link --tag=CC $CC${need_gcc_static_libgcc} -rpath ${absprefix}/lib"
MREDLINKER="${LIBTOOLPROG} --mode=link --tag=CXX $CXX${need_gcc_static_libgcc} -rpath ${absprefix}/lib"
PLAIN_CC="$CC"
CC="${LIBTOOLPROG} --mode=compile --tag=CC $CC"
CXX="${LIBTOOLPROG} --mode=compile --tag=CXX $CXX"

View File

@ -518,6 +518,7 @@ case $OS in
;;
Linux)
LIBS="$LIBS -rdynamic"
DYN_CFLAGS="-fPIC"
# PPC: X11 librares are not found
case `$UNAME -m` in
ppc)
@ -1192,8 +1193,8 @@ if test "${enable_shared}" = "yes" ; then
STATIC_AR="${LIBTOOLPROG} --mode=link $CC -o"
ARFLAGS=""
RANLIB=":"
MZLINKER="${LIBTOOLPROG} --mode=link $CC${need_gcc_static_libgcc} -rpath ${absprefix}/lib"
MREDLINKER="${LIBTOOLPROG} --mode=link $CXX${need_gcc_static_libgcc} -rpath ${absprefix}/lib"
MZLINKER="${LIBTOOLPROG} --mode=link --tag=CC $CC${need_gcc_static_libgcc} -rpath ${absprefix}/lib"
MREDLINKER="${LIBTOOLPROG} --mode=link --tag=CXX $CXX${need_gcc_static_libgcc} -rpath ${absprefix}/lib"
PLAIN_CC="$CC"
CC="${LIBTOOLPROG} --mode=compile --tag=CC $CC"
CXX="${LIBTOOLPROG} --mode=compile --tag=CXX $CXX"