* NEWS: Updated.

* libtool.m4: use $NM to create the symbol list on cygwin, not
$ltdll_cmds as on mingw.  For all tags, (and host=cygwin) set
allow_undefined_flag="" so that the --auto-import magic
works properly.  For all tags (and host=cygiwn) set
always_export_symbols=no -- it is unnecessary thanks to
binutils' auto-export magic.
* libltdl/ltdl.c: Don't force cygwin to use the LoadLibrary
wrapper; use cygwin's builtin implementatino of dl*.
* cdemo/Makefile.am: the downside of unsetting
'allow_undefined_flag' -- we must include -no-undefined
in the _la_LDFLAGS variable.
* depdemo/l1/Makefile.am: ditto.
* depdemo/l2/Makefile.am: ditto.
* depdemo/l3/Makefile.am: ditto.
* depdemo/l4/Makefile.am: ditto.
* mdemo/Makefile.am: ditto.
* tagdemo/Makefile.am: ditto.
* demo/Makefile.am: ditto.  But also, we must make special
provision to clean up the hell0 wrapper script.
* pdemo/Makefile.am: ditto -no-undefined.  ditto hell0.
And use 'hell_static' instead of 'hell.static'.
* tests/pdemo-inst.test: use 'hell_static' instead
of 'hell.static'.
* tests/pdemo-exec.test: ditto.
This commit is contained in:
Charles Wilson 2002-06-01 14:09:50 +00:00 committed by Gary V. Vaughan
parent c8ffe65a48
commit 7cb0a065a5
15 changed files with 66 additions and 28 deletions

View File

@ -1,3 +1,31 @@
2002-05-31 Charles Wilson <cwilson@ece.gatech.edu>
* NEWS: Updated.
* libtool.m4: use $NM to create the symbol list on cygwin, not
$ltdll_cmds as on mingw. For all tags, (and host=cygwin) set
allow_undefined_flag="" so that the --auto-import magic
works properly. For all tags (and host=cygiwn) set
always_export_symbols=no -- it is unnecessary thanks to
binutils' auto-export magic.
* libltdl/ltdl.c: Don't force cygwin to use the LoadLibrary
wrapper; use cygwin's builtin implementatino of dl*.
* cdemo/Makefile.am: the downside of unsetting
'allow_undefined_flag' -- we must include -no-undefined
in the _la_LDFLAGS variable.
* depdemo/l1/Makefile.am: ditto.
* depdemo/l2/Makefile.am: ditto.
* depdemo/l3/Makefile.am: ditto.
* depdemo/l4/Makefile.am: ditto.
* mdemo/Makefile.am: ditto.
* tagdemo/Makefile.am: ditto.
* demo/Makefile.am: ditto. But also, we must make special
provision to clean up the hell0 wrapper script.
* pdemo/Makefile.am: ditto -no-undefined. ditto hell0.
And use 'hell_static' instead of 'hell.static'.
* tests/pdemo-inst.test: use 'hell_static' instead
of 'hell.static'.
* tests/pdemo-exec.test: ditto.
2002-05-30 Charles Wilson <cwilson@ece.gatech.edu>
* tests/build-relink2.test: look for installed libl3.la

2
NEWS
View File

@ -1,6 +1,8 @@
NEWS - list of user-visible changes between releases of GNU Libtool
New in 1.4f: 2002-??-??; CVS version 1.4e, Libtool team:
* libltdl will now use cygwins dlopen API instead of always forcing
LoadLibrary.
* Support auto-import patch to binutils on cygwin for much improved dll
support.
* Bug fixes.

View File

@ -8,6 +8,7 @@ noinst_LTLIBRARIES = libfoo.la
libfoo_la_SOURCES = foo.c
libfoo_la_LIBADD = $(LIBM)
libfoo_la_LDFLAGS = -no-undefined
noinst_HEADERS = foo.h

View File

@ -8,14 +8,14 @@ EXTRA_DIST = acinclude.m4
lib_LTLIBRARIES = libhello.la
libhello_la_SOURCES = hello.c foo.c
libhello_la_LIBADD = $(LIBM)
libhello_la_LDFLAGS = -version-info 3:12:1
libhello_la_LDFLAGS = -no-undefined -version-info 3:12:1
include_HEADERS = foo.h
if BINARY_HELLDL
BUILD_helldl = helldl
else
BUILD_helldl =
BUILD_helldl =
endif
bin_PROGRAMS = hell hell_static $(BUILD_helldl)
@ -125,16 +125,20 @@ libhell0_a_SOURCES = hello.c foo.c
EXTRA_LTLIBRARIES = libhell1.la libhell2.la
libhell1_la_SOURCES = hell1.c
libhell1_la_LIBADD = -L. -lhell0
libhell1_la_LDFLAGS = -rpath $(libdir)
libhell1_la_LDFLAGS = -no-undefined -rpath $(libdir)
libhell1_la_DEPENDENCIES = libhell0.a
libhell2_la_SOURCES = hell2.c
libhell2_la_LIBADD = -L. -lhell0
libhell2_la_LDFLAGS = -rpath $(libdir)
libhell2_la_LDFLAGS = -no-undefined -rpath $(libdir)
libhell2_la_DEPENDENCIES = libhell0.a
EXTRA_PROGRAMS = hell0
hell0_SOURCES = main.c
hell0_LDADD = libhell1.la libhell2.la $(LIBM)
CLEANFILES += $(EXTRA_LIBRARIES) $(EXTRA_LTLIBRARIES) $(EXTRA_PROGRAMS)
# 'hell0' in EXTRA_PROGRAMS gets translated to 'hell0.exe'; but we
# must explicitly list the wrapper script 'hell0'. (bin_PROGRAMS
# are handled seamlessly by automake rules; the extra step is only
# necessary for EXTRA_PROGRAMS)
CLEANFILES += $(EXTRA_LIBRARIES) $(EXTRA_LTLIBRARIES) $(EXTRA_PROGRAMS) hell0
deplibs-check: hell0$(EXEEXT)

View File

@ -6,3 +6,4 @@ INCLUDES = -I$(top_srcdir)
lib_LTLIBRARIES = libl1.la
libl1_la_SOURCES = l1.c l1.h
libl1_la_LDFLAGS = -no-undefined

View File

@ -6,4 +6,5 @@ INCLUDES = -I$(top_srcdir)
lib_LTLIBRARIES = libl2.la
libl2_la_SOURCES = l2.c l2.h
libl2_la_LDFLAGS = -no-undefined
libl2_la_LIBADD = $(top_builddir)/l1/libl1.la

View File

@ -8,4 +8,5 @@ extradir = $(libdir)/extra
lib_LTLIBRARIES = libl3.la
libl3_la_SOURCES = l3.c l3.h
libl3_la_LDFLAGS = -no-undefined
libl3_la_LIBADD = $(top_builddir)/l1/libl1.la $(top_builddir)/l2/libl2.la

View File

@ -6,4 +6,5 @@ INCLUDES = -I$(top_srcdir)
lib_LTLIBRARIES = libl4.la
libl4_la_SOURCES = l4.c l4.h
libl4_la_LDFLAGS = -no-undefined
libl4_la_LIBADD = $(top_builddir)/l3/libl3.la $(LIBM)

View File

@ -911,11 +911,7 @@ lt_estrdup (str)
/* --- DLOPEN() INTERFACE LOADER --- */
/* Older Cygwin dlopen implementations print a spurious error message to
stderr if the call to LoadLibrary() fails for any reason. We can
mitigate this by not using the Cygwin implementation, and falling
back to our own LoadLibrary() wrapper. */
#if HAVE_LIBDL && !defined(__CYGWIN__)
#if HAVE_LIBDL
/* dynamic linking with dlopen/dlsym */
@ -1734,7 +1730,7 @@ lt_dlinit ()
handles = 0;
user_search_path = 0; /* empty search path */
#if HAVE_LIBDL && !defined(__CYGWIN__)
#if HAVE_LIBDL
errors += lt_dlloader_add (lt_dlloader_next (0), &sys_dl, "dlopen");
#endif
#if HAVE_SHL_LOAD

9
libtool.m4 vendored
View File

@ -2584,8 +2584,7 @@ case $host_os in
# _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
# as there is no search path for DLLs.
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
_LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
_LT_AC_TAGVAR(always_export_symbols, $1)=yes
_LT_AC_TAGVAR(always_export_symbols, $1)=no
if $LD --help 2>&1 | egrep 'auto-import' > /dev/null; then
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--image-base=0x10000000 ${wl}--out-implib,$lib'
@ -3164,7 +3163,7 @@ if AC_TRY_EVAL(ac_compile); then
done
# Clean up.
rm -f a.out
rm -f a.out a.exe
else
echo "libtool.m4: error: problem compiling C++ test program"
fi
@ -4496,8 +4495,7 @@ EOF
# _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
# as there is no search path for DLLs.
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
_LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
_LT_AC_TAGVAR(always_export_symbols, $1)=yes
_LT_AC_TAGVAR(always_export_symbols, $1)=no
if $LD --help 2>&1 | egrep 'auto-import' > /dev/null; then
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--image-base=0x10000000 ${wl}--out-implib,$lib'
@ -4797,7 +4795,6 @@ EOF
# hardcode_libdir_flag_spec is actually meaningless, as there is
# no search path for DLLs.
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
_LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
# Tell ltmain to make .lib files, not .a files.
libext=lib
# FIXME: Setting linknames here is a bad hack.

View File

@ -10,7 +10,7 @@ lib_LTLIBRARIES = libsub.la foo1.la libfoo2.la
foo1_la_SOURCES = foo1.c
foo1_la_LIBADD = $(LIBM) libsub.la
foo1_la_LDFLAGS = -module -avoid-version
foo1_la_LDFLAGS = -no-undefined -module -avoid-version
libfoo2_la_SOURCES = foo2.c
libfoo2_la_LIBADD = $(LIBM) libsub.la

View File

@ -8,17 +8,17 @@ EXTRA_DIST = acinclude.m4
lib_LTLIBRARIES = libhello.la
libhello_la_SOURCES = longer_file_name_hello.c longer_file_name_foo.c longer_file_name_foo2.c
libhello_la_LIBADD = $(LIBM)
libhello_la_LDFLAGS = -version-info 3:12:1
libhello_la_LDFLAGS = -no-undefined -version-info 3:12:1
include_HEADERS = foo.h
if BINARY_HELLDL
BUILD_helldl = helldl
else
BUILD_helldl =
BUILD_helldl =
endif
bin_PROGRAMS = hell hell.static $(BUILD_helldl)
bin_PROGRAMS = hell hell_static $(BUILD_helldl)
# Build hell from longer_file_name_main.c and libhello.la
hell_SOURCES = longer_file_name_main.c
@ -125,16 +125,20 @@ libhell0_a_SOURCES = longer_file_name_hello.c longer_file_name_foo.c
EXTRA_LTLIBRARIES = libhell1.la libhell2.la
libhell1_la_SOURCES = longer_file_name_hell1.c
libhell1_la_LIBADD = -L. -lhell0
libhell1_la_LDFLAGS = -rpath $(libdir)
libhell1_la_LDFLAGS = -no-undefined -rpath $(libdir)
libhell1_la_DEPENDENCIES = libhell0.a
libhell2_la_SOURCES = longer_file_name_hell2.c
libhell2_la_LIBADD = -L. -lhell0
libhell2_la_LDFLAGS = -rpath $(libdir)
libhell2_la_LDFLAGS = -no-undefined -rpath $(libdir)
libhell2_la_DEPENDENCIES = libhell0.a
EXTRA_PROGRAMS = hell0
hell0_SOURCES = longer_file_name_main.c
hell0_LDADD = libhell1.la libhell2.la $(LIBM)
CLEANFILES += $(EXTRA_LIBRARIES) $(EXTRA_LTLIBRARIES) $(EXTRA_PROGRAMS)
# 'hell0' in EXTRA_PROGRAMS gets translated to 'hell0.exe'; but we
# must explicitly list the wrapper script 'hell0'. (bin_PROGRAMS
# are handled seamlessly by automake rules; the extra step is only
# necessary for EXTRA_PROGRAMS)
CLEANFILES += $(EXTRA_LIBRARIES) $(EXTRA_LTLIBRARIES) $(EXTRA_PROGRAMS) hell0
deplibs-check: hell0

View File

@ -10,10 +10,12 @@ noinst_LTLIBRARIES = libfoo.la
lib_LTLIBRARIES = libbaz.la
libfoo_la_SOURCES = foo.cpp
libfoo_la_LDFLAGS = -no-undefined
libfoo_la_LIBADD = $(LIBM)
# Test some of the ILD support when using tagged configurations.
libbaz_la_SOURCES = baz.cpp
libbaz_la_LDFLAGS = -no-undefined
libbaz_la_LIBADD = libfoo.la
noinst_HEADERS = foo.h baz.h

View File

@ -20,9 +20,9 @@ fi
echo "Executing uninstalled programs in ../pdemo"
status=0
if ../pdemo/hell.static| grep 'Welcome to GNU Hell'; then :
if ../pdemo/hell-static| grep 'Welcome to GNU Hell'; then :
else
echo "$0: cannot execute ../pdemo/hell.static" 1>&2
echo "$0: cannot execute ../pdemo/hell_static" 1>&2
status=1
fi

View File

@ -25,9 +25,9 @@ $make install || exit 1
echo "= Executing installed programs"
status=0
if $prefix/bin/hell.static | grep 'Welcome to GNU Hell'; then :
if $prefix/bin/hell_static | grep 'Welcome to GNU Hell'; then :
else
echo "$0: cannot execute $prefix/bin/hell.static" 1>&2
echo "$0: cannot execute $prefix/bin/hell_static" 1>&2
status=1
fi