Commit Graph

2981 Commits

Author SHA1 Message Date
Charles Wilson
76735dcb93 Document wrapper changes.
* NEWS: Indicate new feature and incompatibility.
* doc/libtool.texi [detailmenu]: Add reference to subsection
'Wrapper executables for programs', in Platform Quirks category.
[Linking executables]: Mention wrapper executables, in
addition to wrapper scripts. Add menu referencing subsection
'Wrapper executables for programs'.
[Wrapper executables for programs]: New subsection. Documents
cwrapper rationale and command line options.
2010-02-21 15:07:12 -05:00
Charles Wilson
efa4728055 Add --lt-* options to shell wrapper
* libltdl/config/ltmain.m4sh (func_emit_wrapper): Call
func_parse_lt_options early. Use func_exec_program.
(func_emit_wrapper:func_parse_lt_options): New function.
(func_emit_wrapper:func_lt_dump_args): New function.
(func_emit_wrapper:func_exec_program_core): New function.
(func_emit_wrapper:func_exec_program): New function.
2010-02-21 00:42:13 -05:00
Charles Wilson
2613ea3ab2 Enable runtime cwrapper debugging; add tests
* libltdl/config/ltmain.m4sh (func_emit_cwrapperexe_src):
Update comments. Initialize program_name. Eliminate _LENGTH
variables for string constants. In debug mode, print a
banner with known content before any other output. Remove
LTWRAPPER_DEBUGPRINTF macro. Add constants and variables
to support new --lt-debug option.
(func_emit_cwrapperexe_src:ltwrapper_debugprintf): Renamed to...
(func_emit_cwrapperexe_src:lt_debugprintf): this. Only print
messages if lt_debug != 0. Ensure appearance of messages
conforms to GCS.
(func_emit_cwrapperexe_src:lt_fatal): Ditto.
(func_emit_cwrapperexe_src:lt_error_core): Ditto.
(func_emit_cwrapperexe_src): Update all callers to lt_fatal.
Update all users of LTWRAPPER_DEBUGPRINTF (()) to call
lt_debugprintf () directly.
(func_emit_cwrapperexe_src:main): Consolidate option parsing.
Ensure first use of lt_debugprintf occurs after option parsing.
Add stanza to parse for --lt-debug and set lt_debug variable.
Use strcmp rather than strncmp, where safe.
* tests/cwrapper.at: Add new tests for --lt-debug and
-DLT_DEBUGWRAPPER.
2010-02-21 00:32:17 -05:00
Ralf Wildenhues
7e8be90f48 Use --email with gendocs.sh.
* Makefile.maint (web-manual): Pass bug reporting address to
gendocs.sh.

Signed-off-by: Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
2010-01-31 15:34:51 +01:00
Ralf Wildenhues
2080fe9649 Make testsuite code C++ clean again.
* tests/resident.at (resident modules): Fix for C++.

Signed-off-by: Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
2010-01-31 15:33:27 +01:00
Peter Rosin
e4eefcd401 Testsuite exposure for dlloader API.
* tests/dlloadet-api.at: New file, new test.
* Makefile.am (TESTSUITE_AT): Update.

Signed-off-by: Peter Rosin <peda@lysator.liu.se>
2010-01-29 09:04:13 +01:00
Peter Rosin
f4c63234c9 * tests/loadlibrary.at: Fix C++ issues.
Signed-off-by: Peter Rosin <peda@lysator.liu.se>
2010-01-29 08:50:13 +01:00
Peter Rosin
080e088e42 Report proper errors from the loadlibrary loader.
* libltdl/loaders/loadlibrary.c (loadlibraryerror): New
helper function that returns the latest Windows error as a
string, or the provided default string on failure to do so.
(LOADLIB_SETERROR): New macro that wraps previous to make it
easy to use.
(vm_open, vm_close, vm_sym): Make use of previous.
(LOCALFREE): New macro to help free the Windows error string.
(vl_exit): Make use of previous.
* tests/loadlibarry.at: New file, new test that makes sure
the loadlibrary loader reports non-standard error messages.
* Makefile.am (TESTSUITE_AT): Add above test.

Signed-off-by: Peter Rosin <peda@lysator.liu.se>
2010-01-21 08:42:12 +01:00
Peter Rosin
16362c656a Use GetErrorMode if it is available.
* libltdl/loaders/loadlibrary.c (wrap_geterrormode): New
function that checks if GetErrorMode is supported by the
system and makes use of it if it is.
(fallback_geterrormode): New function that is used otherwise
that implements the old workaround.
(geterrormode): New function pointer that points at either
of the above or directly at GetErrorMode.
(vm_open): Make use of the above.

Signed-off-by: Peter Rosin <peda@lysator.liu.se>
2010-01-18 09:48:23 +01:00
Ralf Wildenhues
a75f8acf28 Ensure functions from resident modules work in atexit handlers.
* tests/resident.at (resident modules): New file, new test.
* Makefile.am (TESTSUITE_AT): Adjust.
Report by Bob Friesenhahn.

Signed-off-by: Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
2010-01-11 21:56:23 +01:00
Ralf Wildenhues
574b79474a Testsuite exposure for relative output file names and deplibs.
* tests/deplib-in-subdir.at (deplib in subdir): New file, new
test.
* Makefile.am (TESTSUITE_AT): Update.
Prompted by report from Bob Friesenhahn.

Signed-off-by: Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
2010-01-11 21:49:38 +01:00
Ralf Wildenhues
85223ba6a4 Testsuite exposure for C++ exception handling.
* tests/exceptions.at (C++ exception handling): New file, new
test.
* Makefile.am (TESTSUITE_AT): Update.
Report by Bob Friesenhahn.
2010-01-11 21:21:13 +01:00
Ralf Wildenhues
4d9381c8e1 Bump copyright years.
* ChangeLog.2009: New, rotated from ...
* ChangeLog: ... here.
* Makefile.am (EXTRA_DIST): Add ChangeLog.2009.
* NEWS, libltdl/config/ltmain.m4sh: Bump copyright years.
* libltdl/m4/libtool.m4 (_LT_COPYING, LT_OUTPUT): Likewise.
* libtoolize.m4sh: Likewise.

Signed-off-by: Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
2010-01-06 08:03:33 +01:00
Peter Rosin
78f270a9ab * libltdl/ltdl.c (lt_dlerror): Remove meaningless conditional.
Signed-off-by: Peter Rosin <peda@lysator.liu.se>
2009-12-30 03:18:19 +01:00
Peter Rosin
a2a8d8a663 * libltdl/ltdl.c (file_not_found): Fix typos in code comment.
Signed-off-by: Peter Rosin <peda@lysator.liu.se>
2009-12-29 19:00:58 +01:00
Ralf Wildenhues
7ce92b0b9b Replace last __oline__ instance.
* libltdl/m4/libtool.m4 (_LT_TRY_DLOPEN_SELF): Replace last
__oline__ instance with $LINENO.

Signed-off-by: Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
2009-12-12 08:51:02 +01:00
Ralf Wildenhues
93f5529731 Improve parsing of .la files in libltdl.
* libltdl/ltdl.c (trim): Do not dump core upon missing quote in
module .la file.
* tests/lalib-syntax.at (syntax of .la files): New file, new
test.
* Makefile.am (TESTSUITE_AT): Add tests/lalib-syntax.at.
Report by Bob Friesenhahn.

Signed-off-by: Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
2009-12-09 07:28:59 +01:00
Ralf Wildenhues
31eb92de4f Sane fallback initialization of $ECHO from $as_echo.
* libltdl/config/general.m4sh: Use 'printf %s\n' if $as_echo is
unset.
* tests/testsuite.at: Likewise.
* THANKS: Update.
Report by Vadim Zeitlin and Peter Rosin.

Signed-off-by: Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
2009-12-05 15:50:56 +01:00
Ralf Wildenhues
c4e8bf31aa lt_dlloader_remove and lt_dlloader_find accept const arguments.
* libltdl/lt_dlloader.c (lt_dlloader_remove, lt_dlloader_find):
Accept `const char *' arguments, as documented.  Cast them to
`void *' for the slist machinery.
* libltdl/libltdl/lt_dlloader.h: Adjust prototypes.

Signed-off-by: Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
2009-12-02 23:13:20 +01:00
Ralf Wildenhues
fea7fdee4e Test and fix slist.c.
* libltdl/libltdl/slist.h: Include stddef.h, for size_t.
(slist_remove): Return pointer to SList, not void.
* libltdl/slist.c: Include stdlib.h, for malloc and free.
(slist_remove): Adjust prototype as above.
(slist_sort): Do not loop forever on one-item list.
* tests/slist.at (SList functionality): New file, new test.
* Makefile.am (TESTSUITE_AT): Add tests/slist.at.

Signed-off-by: Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
2009-12-02 23:13:05 +01:00
Peter Rosin
2c9c38d8a1 Please C++ compilers when calling strrchr.
* libltdl/ltdl.c (has_library_ext): Match the return type of
strrchr with the first argument to please C++ compilers.
Report by Peter O'Gorman.

Signed-off-by: Peter Rosin <peda@lysator.liu.se>
2009-11-30 14:20:36 -05:00
Ralf Wildenhues
b15f6f9ded Fix bindir and dlopen tests for C++ compilers (CC=g++).
* tests/bindir.at (bindir basic lib test, bindir install tests):
Include stdlib.h rather than declaring abort.
* tests/lt_dlopenext.at (lt_dlopenext error messages): Use
`extern "C"' annotation for dlsym'ed function in C++ mode.

Signed-off-by: Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
2009-11-29 23:03:14 +01:00
Ralf Wildenhues
ef32f487d7 Enable symbol versioning with the GNU gold linker.
* libltdl/m4/libtool.m4 (_LT_LINKER_SHLIBS): Accept 'GNU gold'
in the version string.
* NEWS, THANKS: Update.
Report by Peter Fritzsche.

Signed-off-by: Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
2009-11-29 23:02:34 +01:00
Peter Rosin
4137bb8a15 Fix cross build issue in execute mode test.
* tests/execute-mode.at: Skip test for cross builds.

Signed-off-by: Peter Rosin <peda@lysator.liu.se>
2009-11-25 17:29:34 -05:00
Ralf Wildenhues
79dc9e9c8a Tighten regex for Portland C++ compiler for version 10.
* libltdl/m4/libtool.m4 (_LT_LANG_CXX_CONFIG) [linux]:
Match a dot after version 1 through 5, so 10 and up don't match,
and use weak symbols.
* THANKS: Update.
Report by Jeff Squyres and Brent Leback.

Signed-off-by: Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
2009-11-24 15:27:37 +01:00
Peter O'Gorman
614eb28c76 Update libltdl version to match 2.2.6b release.
libltdl/Makefile.inc: Make version 9:1:2
2009-11-16 09:26:29 -06:00
Bob Friesenhahn
e91f7b9600 Don't load module.la from current directory by default.
* libltdl/ltdl.c (try_dlopen): Do not attempt to load an
unqualified module.la file from the current directory (by
default) since doing so is insecure and is not compliant with
the documentation.
* tests/testsuite.at: Qualify access to module.la file in
current directory so that test passes.
2009-11-15 20:50:02 -06:00
Peter O'Gorman
3580cddcea Only use preopen loader to load preopened archives
* libltdl/ltdl.c: Limit checking of .a to preopen loader.
* tests/lt_dlopen_a.at: Add test.
* Makefile.am: Add test.
2009-11-15 20:49:55 -06:00
Ralf Wildenhues
c242ea638d Recognize `pgfortran' as Portland compiler.
* libltdl/m4/libtool.m4 (_LT_COMPILER_PIC, _LT_LINKER_SHLIBS):
Accept `pgfortran*' too.
Report by Jeff Squyres.

Signed-off-by: Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
2009-11-14 11:32:18 +01:00
Alexandre Oliva
1d3560143c Fix verbose link extraction for multiply reconfigured GCC.
* libltdl/m4/libtool.m4 (_LT_LANG_CXX_CONFIG)
<output_verbose_link_cmd>: Drop GCC lines "Configured with" that
may contain unrelated flags.

Signed-off-by: Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
2009-11-04 20:02:47 +01:00
Eric Blake
eae9d5832f Allow gcc builds with -Wall -Werror.
* libltdl/ltdl.c (try_dlopen): Use strlen rather than LT_STRLEN on
an array that will never be NULL.

Signed-off-by: Eric Blake <ebb9@byu.net>
Signed-off-by: Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
2009-11-02 20:08:17 -07:00
Ralf Wildenhues
5a46d6e5c1 Fix func_normal_abspath sed script for Solaris.
* libltdl/config/general.m4sh (pathcar, pathcdr, removedotparts)
(collapseslashes, finalslash): Use single quotes, for clarity.
(removedotparts): Avoid \{N,M\} after subexpression \(...\), for
Solaris /bin/sed.

Signed-off-by: Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
2009-11-01 11:41:34 +01:00
Ralf Wildenhues
7890173078 Improve versioning algorithm documentation.
* doc/libtool.texi (Updating version info): Repeat the
algorithms in different, hopefully simpler terms.
* THANKS: Update.
Prompted by Richard B. Kreckel.

Signed-off-by: Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
2009-11-01 11:38:23 +01:00
Ingo Weinhold
a4cc3d2c9f Support for the Haiku operating system.
* libltdl/config/ltmain.m4sh (func_mode_link): Add cases for
`*-*-haiku*' alongside `*-*-beos*'.
* libltdl/m4/libtool.m4 (_LT_SYS_DYNAMIC_LINKER)
(_LT_CHECK_MAGIC_METHOD, LT_LIB_M, _LT_COMPILER_PIC)
(_LT_LINKER_SHLIBS, _LT_LANG_CXX_CONFIG): Add cases for
`haiku*'.
* NEWS, THANKS: Update.

Signed-off-by: Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
2009-11-01 10:53:23 +01:00
Ralf Wildenhues
16988b3532 Fix quoting of AS, DLLTOOL, and OBJDUMP for the libtool script.
* libltdl/m4/ltoptions.m4 (AC_LIBTOOL_DLOPEN): Quote values of
$AS, $DLLTOOL, and $OBJDUMP, so they can contain arguments.
* THANKS: Update.
Report by Matthijs Kooijman.

Signed-off-by: Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
2009-11-01 09:26:51 +01:00
Ralf Wildenhues
741a9867eb Initial support for the Cuda Compiler Driver on Linux.
* libltdl/config/ltmain.m4sh (func_mode_compile): Accept source
file extensions `.cu' and `.cup'.
* libltdl/m4/libtool.m4 (_LT_COMPILER_NO_RTTI, _LT_COMPILER_PIC)
(_LT_LINKER_SHLIBS): Support for `nvcc' compiler driver.
* NEWS, THANKS: Update.
Report by Mahesh Narayanamurthi.

Signed-off-by: Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
2009-09-18 20:36:34 +02:00
Dave Korn
6858ed03d8 Control where win32 DLLs get installed.
* libltdl/config/general.m4sh (func_normal_abspath): New function.
(func_relative_path): Likewise.
* libltdl/config/ltmain.m4sh (func_mode_help): Document "-bindir".
(func_mode_link): Accept new "-bindir" option and use it, if
supplied, to place Windows DLLs.
* tests/bindir.at: New file for install tests using "-bindir".
* Makefile.am (TESTSUITE_AT): Add bindir.at.
* doc/libtool.texi (Link Mode): Update documentation.
* NEWS, THANKS: Update.

Signed-off-by: Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
2009-09-12 08:23:03 +02:00
Akim Demaille
55e9cc469d libtool: clean libconftest.a.
* libltdl/m4/libtool.m4 (_LT_REQUIRED_DARWIN_CHECKS): Here.

Signed-off-by: Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
2009-09-12 07:33:54 +02:00
Peter Rosin
3a4f0d3958 func_win32_libid doesn't work with MS dumpbin
* libltdl/m4/libtool.m4 (_LT_CHECK_MAGIC_METHOD): The $NM
interface is assumed to be BSD nm in func_win32_libid, so
check for that before using it.

Signed-off-by: Peter Rosin <peda@lysator.liu.se>
2009-09-10 09:52:37 +02:00
Ralf Wildenhues
b03736353b Allow dlopen self test to work with gcc's -fvisibility=hidden.
* libltdl/m4/libtool.m4 (_LT_TRY_DLOPEN_SELF): Declare default
visibility for the symbol we are going to test dlopen (NULL)
when a GCC version is used that understands the visibility
attribute, under the assumption that if -fvisibility=hidden
will be used, the user code will be sufficiently annotated
for visibility of needed symbols from the main executable.
* THANKS: Update.
Report by Josh Hursey against OpenMPI.

Signed-off-by: Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
2009-09-08 20:03:54 +02:00
Ralf Wildenhues
1e4e1984b0 Fix and split recent testsuite addition for compile/link flags.
* tests/flags.at (passing flags through libtool): Split into ...
(passing CC flags through libtool)
(passing CXX flags through libtool)
(passing F77 flags through libtool)
(passing FC flags through libtool)
(passing GCJ flags through libtool): ... these five tests,
factorized with m4_foreach.  Fix F77 and FC compile and link
commands; add GCJ tag.  Use LT_AT_TAG to correctly skip tags
for which no compiler exists.  Use $EXEEXT where appropriate.
Drop unneeded use of reload_cmds.
Reports by Peter Rosin and Peter O'Gorman.

Signed-off-by: Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
2009-09-08 20:02:57 +02:00
Peter O'Gorman
91697c2092 Fix redirect in test case.
tests/darwin.at: Fix stderr redirect.
2009-09-07 15:17:03 -05:00
Peter O'Gorman
4ad8b63bd1 Use darwin's -force_load flag if available for whole_archive_flag_spec
* libltdl/m4/libtool.m4 (_LT_REQUIRED_DARWIN_CHECKS): Check for
-force_load and use it if there.
* tests/darwin.at: Add a simple test.
2009-09-07 00:41:58 -05:00
Ralf Wildenhues
2eb8c3e51f Testsuite keyword 'interactive' and check-* rules.
* Makefile.am (testsuite_deps, testsuite_deps_uninstalled):
New variables.
(check-local, installcheck-local): Use them.
(check-interactive, check-noninteractive): New rules.
* tests/link-order2.at (Link order of deplibs),
tests/static.at (static linking flags for programs): Add keyword
`interactive'.
* doc/libtool.texi (Test descriptions): Document all keywords
used in the Libtool test suite.
* NEWS: Update.

Signed-off-by: Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
2009-09-06 19:38:06 +02:00
Ralf Wildenhues
0805518173 Fix failure test in the presence of --with-pic or -prefer-pic.
* tests/fail.at (Failure tests): Run non-PIC failure test only
if pic_mode is 'default' or 'no', rather than 'default' or 'yes'
and also -prefer-pic has not been passed in $CFLAGS.
* THANKS: Update.
Report by Donn Washburn.

Signed-off-by: Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
2009-09-06 12:42:34 +02:00
Ralf Wildenhues
8c35d79757 Add testsuite exposure for passing of compiler and linker flags.
* tests/flags.at (passing flags through libtool): New file, new
test, for bug fixed in previous commit.
* Makefile.am (TESTSUITE_AT): Add tests/flags.at.

Signed-off-by: Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
2009-09-06 09:57:55 +02:00
Peter Rosin
c9bbeef468 Make -Wc,FLAG behave like -Xcompiler FLAG in link mode.
* libltdl/config/ltmain.m4sh (func_mode_link): Remove "-Wc,"
instead of replacing it with "$wl" when linking programs
through the compiler driver, just as is the case when linking
libraries.
* NEWS: Update.

Signed-off-by: Peter Rosin <peda@lysator.liu.se>
2009-09-04 22:19:36 +02:00
Lennart Poettering
d1de1d4ada Shut up prototype warnings with recent GCC and -Wstrict-prototypes.
* libltdl/config/ltmain.m4sh (func_generate_dlsyms): Use recent
GCC's diagnostic pragma to override a -Wstrict-prototypes
setting for the symbol list code.
* THANKS: Update.

Signed-off-by: Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
2009-08-23 07:19:26 +02:00
Ralf Wildenhues
db160ae47c Remove __oline__ from macros, for less spurious configure diffs.
* libltdl/m4/libtool.m4 (_LT_ENABLE_LOCK, _LT_COMPILER_OPTION)
(_LT_COMPILER_C_O, LT_PATH_NM): Replace __oline__ instances with
$LINENO.
* NEWS: Update.

Signed-off-by: Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
2009-08-23 07:12:30 +02:00
Roumen Petrov
04329d8355 Fixup 'execute mode' test for w32.
* tests/execute-mode.at (execute mode): Add missing $EXEEXT.
(LDFLAGS): Add -no-undefined.

Signed-off-by: Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
2009-07-25 11:32:26 +02:00