+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
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.
libfoo_la_SOURCES = foo.c
libfoo_la_LIBADD = $(LIBM)
+libfoo_la_LDFLAGS = -no-undefined
noinst_HEADERS = foo.h
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)
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)
lib_LTLIBRARIES = libl1.la
libl1_la_SOURCES = l1.c l1.h
+libl1_la_LDFLAGS = -no-undefined
lib_LTLIBRARIES = libl2.la
libl2_la_SOURCES = l2.c l2.h
+libl2_la_LDFLAGS = -no-undefined
libl2_la_LIBADD = $(top_builddir)/l1/libl1.la
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
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)
/* --- 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 */
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
# _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'
done
# Clean up.
- rm -f a.out
+ rm -f a.out a.exe
else
echo "libtool.m4: error: problem compiling C++ test program"
fi
# _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'
# 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.
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
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
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
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
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
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