2
0
mirror of git://git.savannah.gnu.org/libtool.git synced 2025-03-19 15:50:25 +08:00

*** empty log message ***

This commit is contained in:
Gordon Matzigkeit 1997-07-24 19:00:16 +00:00 committed by Gordon Matzigkeit
parent 9fa1a6f890
commit decd84eb46
8 changed files with 77 additions and 43 deletions

@ -1,3 +1,21 @@
Thu Jul 24 10:42:30 1997 Gordon Matzigkeit <gord@gnu.ai.mit.edu>
* ltmain.sh.in, ltconfig.in (export_dynamic_flag_spec): Renamed
from export_dynamic_flag because we eval it in ltmain.sh.
* ltmain.sh.in (link_static): Don't eval link_static_flag.
* demo/dlmain.c (main): Change function prototype to be KNR
compatible. From Kaveh R. Ghazi.
* ltmain.sh.in (link): Use no_builtin_flag. This works around
conflicting definitions of builtin functions with at least GCC.
Reported by Kazuhiro Sasayama.
* ltconfig.in (no_builtin_flag): New flag to turn off builtin
functions when compiling an object file.
(pipe_works): Use it.
Wed Jul 23 08:18:19 1997 Gordon Matzigkeit <gord@gnu.ai.mit.edu>
* ltconfig.in (pic_flag): According to the libg++ 2.7.2 configure

@ -1,6 +1,6 @@
dnl Process this file with autoconf to create configure.
AC_INIT(ltmain.sh.in)
AM_INIT_AUTOMAKE(libtool,1.0a)
AM_INIT_AUTOMAKE(libtool,1.0b)
pkgdatadir='${datadir}/libtool'
AC_SUBST(pkgdatadir)

@ -30,7 +30,9 @@ struct dld_symlist
extern struct dld_symlist dld_preloaded_symbols[];
int
main (int argc, char **argv)
main (argc, argv)
int argc;
char **argv;
{
struct dld_symlist *s;
int (*pfoo)() = 0;

@ -2478,7 +2478,7 @@ Whether libtool should build static libraries on this system. Set to
@samp{yes} or @samp{no}.
@end defvar
@defvar export_dynamic_flag
@defvar export_dynamic_flag_spec
Compiler link flag that allows a dlopened shared library to reference
symbols that are defined in the program.
@end defvar
@ -2562,6 +2562,11 @@ Linker flag (passed through the C compiler) used to prevent dynamic
linking.
@end defvar
@defvar no_builtin_flag
Compiler flag to disable builtin functions that conflict with declaring
external global symbols as @code{char}.
@end defvar
@defvar pic_flag
Any additional compiler flags for building library object files.
@end defvar

@ -377,7 +377,7 @@ if test "$with_gcc" != yes || test -z "$CC"; then
#endif
EOF
# LINENO
if { ac_try='${CC-cc} -E conftest.c'; { (eval echo $progname:378: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
if { ac_try='${CC-cc} -E conftest.c'; { (eval echo $progname:380: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
with_gcc=yes
fi
$rm conftest.c
@ -394,12 +394,14 @@ profile_flag_pattern=
special_shlib_compile_flags=
wl=
link_static_flag=
no_builtin_flag=
if test "$with_gcc" = yes; then
pic_flag='-fPIC'
profile_flag_pattern='-pg?'
wl='-Wl,'
link_static_flag='-static'
no_builtin_flag=' -fno-builtin'
else
# PORTME Check for PIC flags for the system compiler.
case "$host_os" in
@ -477,36 +479,27 @@ if test -n "$special_shlib_compile_flags"; then
fi
fi
# See if we are using a broken GCC collect2 program.
if test "$with_gcc" = yes; then
echo $ac_n "checking for broken GCC collect2... $ac_c" 1>&6
# FIXME: Run a test here, instead of relying on the canonical system name.
case "$host_os" in
aix3*)
can_build_shared=no
echo $ac_t yes 1>&6
echo "$progname: to build shared libraries, set the CC env variable to \`xlc' and reconfigure" 1>&2
;;
*)
echo $ac_t no 1>&6
;;
esac
fi
echo $ac_n "checking for $compiler option to statically link programs... $ac_c" 1>&6
if test -n "$link_static_flag"; then
$rm conftest*
echo 'main(){return(0);}' > conftest.c
save_LDFLAGS="$LDFLAGS"
LDFLAGS="$LDFLAGS $link_static_flag"
# LINENO
if { (eval echo $progname:488: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
echo $ac_t "$link_static_flag" 1>&6
else
echo $ac_t none 1>&6
link_static_flag=
fi
LDFLAGS="$save_LDFLAGS"
$rm conftest*
if test -z "$LN_S"; then
# Check to see if we can use ln -s, or we need hard links.
echo $ac_n "checking whether ln -s works... $ac_c" 1>&6
rm -f conftestdata
$rm conftestdata
if ln -s X conftestdata 2>/dev/null; then
rm -f conftestdata
$rm conftestdata
LN_S="ln -s"
else
LN_S=ln
@ -568,7 +561,7 @@ echo $ac_n "checking whether the linker ($LD) supports shared libraries... $ac_c
allow_undefined_flag=
archive_cmds=
export_dynamic_flag=
export_dynamic_flag_spec=
hardcode_libdir_flag_spec=
hardcode_libdir_separator=
hardcode_direct=no
@ -602,7 +595,7 @@ if test "$with_gnu_ld" = yes; then
if test "$ld_shlibs" = yes; then
archive_cmds='$CC -shared ${wl}-soname $wl$soname -o $lib$libobjs$deplibs'
hardcode_libdir_flag_spec='${wl}-rpath $wl$libdir'
export_dynamic_flag='${wl}-export-dynamic'
export_dynamic_flag_spec='${wl}-export-dynamic'
fi
else
# PORTME fill in a description of your system's linker (not GNU ld)
@ -613,6 +606,10 @@ else
# Note: this linker hardcodes the directories in LIBPATH if there
# are no directories specified by -L.
hardcode_minus_L=yes
# Direct hardcoding is not supported with a broken collect2.
if test "$with_gcc" = yes && test -n "$link_static_flag"; then
hardcode_direct=unsupported
fi
;;
aix4*)
@ -763,7 +760,7 @@ fi
# Check to see that the pipe works correctly.
pipe_works=no
rm -f conftest*
$rm conftest*
cat > conftest.c <<EOF
char nm_test_var;
void nm_test_func(){}
@ -771,9 +768,9 @@ main(){nm_test_var='a';nm_test_func();return(0);}
EOF
# LINENO
if { (eval echo $progname:751: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; } && test -s conftest.o; then
# Now try to grab the symbols.
if { echo "$progname:752: eval \"$NM conftest.o | $global_symbol_pipe > conftest.nm\"" >&5; eval "$NM conftest.o | $global_symbol_pipe > conftest.nm 2>&5"; } && test -s conftest.nm; then
if { (eval echo $progname:771: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; } && test -s conftest.o; then
# Now try to grab the symbols. LINENO
if { echo "$progname:773: eval \"$NM conftest.o | $global_symbol_pipe > conftest.nm\"" >&5; eval "$NM conftest.o | $global_symbol_pipe > conftest.nm 2>&5"; } && test -s conftest.nm; then
# Try sorting and uniquifying the output.
sort conftest.nm | uniq > conftest.nmT && mv -f conftest.nmT conftest.nm
@ -806,8 +803,11 @@ EOF
# Now try linking the two files.
mv conftest.o conftestm.o
save_LIBS="$LIBS"
save_CFLAGS="$CFLAGS"
LIBS='conftestm.o'
if { (eval echo configure:807: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
CFLAGS="$CFLAGS$no_builtin_flag"
# LINENO
if { (eval echo $progname:810: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
pipe_works=yes
else
echo "$progname: failed program was:" >&5
@ -825,7 +825,7 @@ else
echo "$progname: failed program was:" >&5
cat conftest.c >&5
fi
rm -f conftest*
$rm conftest*
# Don't use the global_symbol_pipe unless it works.
echo "$ac_t$pipe_works" 1>&6
@ -1037,7 +1037,7 @@ echo "checking whether to build static libraries... $enable_static" 1>&6
ofile=libtool
trap "$rm $ofile; exit 1" 1 2 15
echo creating $ofile
rm -fr $ofile
$rm $ofile
cat <<EOF > $ofile
#! /bin/sh
@ -1095,8 +1095,11 @@ pic_flag='$pic_flag'
# Compiler flag to prevent dynamic linking.
link_static_flag='$link_static_flag'
# Compiler flag to turn off builtin functions.
no_builtin_flag='$no_builtin_flag'
# Compiler flag to allow reflexive dlopens.
export_dynamic_flag='$export_dynamic_flag'
export_dynamic_flag_spec='$export_dynamic_flag_spec'
# Pattern to match compiler flags for creating libNAME_p libraries:
profile_flag_pattern='$profile_flag_pattern'

@ -370,8 +370,8 @@ if test -z "$show_help"; then
-export-dynamic)
if test "$export_dynamic" != yes; then
export_dynamic=yes
compile_command="$compile_command "`eval echo "$export_dynamic_flag"`
finalize_command="$finalize_command "`eval echo "$export_dynamic_flag"`
compile_command="$compile_command "`eval echo "$export_dynamic_flag_spec"`
finalize_command="$finalize_command "`eval echo "$export_dynamic_flag_spec"`
# Add the symbol object into the linking commands.
compile_command="$compile_command @SYMFILE@"
finalize_command="$finalize_command @SYMFILE@"
@ -833,7 +833,7 @@ if test -z "$show_help"; then
# Create links to the real library.
for link in $linknames; do
$show "(cd $objdir && $LN_S $realname $link)"
$run eval "(cd $objdir && $LN_S $realname $link)" || exit $?
$run eval '(cd $objdir && $LN_S $realname $link)' || exit $?
done
# If -export-dynamic was specified, set the dlname.
@ -1009,8 +1009,8 @@ EOF
$run rm -f "$nlist" "$nlist"T
# Now compile the dynamic symbol file.
$show "(cd $objdir && $CC -c '${output}S.c')"
$run eval "(cd $objdir && $CC -c '${output}S.c')" || exit $?
$show "(cd $objdir && $CC -c$no_builtin_flag \"${output}S.c\")"
$run eval '(cd $objdir && $CC -c$no_builtin_flag "${output}S.c")' || exit $?
# Transform the symbol file into the correct name.
compile_command=`echo "$compile_command" | sed "s%@SYMFILE@%$objdir/${output}S.o%"`

@ -1,3 +1,8 @@
Thu Jul 24 11:04:22 1997 Gordon Matzigkeit <gord@gnu.ai.mit.edu>
* demo-exec.test (status): Use status variables so that we try to
execute all the programs.
Sat Jul 12 15:38:25 1997 Gordon Matzigkeit <gord@gnu.ai.mit.edu>
* demo-exec.test, demo-inst.test: Check the new helldl program,

@ -19,22 +19,23 @@ fi
# Check to see if the programs really run.
echo "Executing uninstalled programs in ../demo"
status=0
if ../demo/hell.static | grep 'Welcome to GNU Hell'; then :
else
echo "$0: cannot execute ../demo/hell.static" 1>&2
exit 1
status=1
fi
if ../demo/hell | grep 'Welcome to GNU Hell'; then :
else
echo "$0: cannot execute ../demo/hell" 1>&2
exit 1
status=1
fi
if ../demo/helldl | egrep -e '(Welcome to .*GNU Hell|unsupported)'; then :
else
echo "$0: cannot execute ../demo/helldl" 1>&2
exit 1
status=1
fi
exit 0
exit $status