Commit Graph

2022 Commits

Author SHA1 Message Date
Gary V. Vaughan
e9b2b3f264 Since defs can change (path to grep for example) when it is made
for a different host, it can't be shipped.  That also means that
defs will always be generated in the build tree, so each test case
can have the srcdir discovery factored away into tests/defs.in:

* Makefile.am (EXTRA_DIST): s/defs/defs.in/g
* tests/Makefile.am (defs): New rule to remake defs from the
parent directory's Makefile.
* tests/cdemo-conf.test, tests/cdemo-exec.test,
tests/cdemo-make.test, tests/cdemo-shared.test,
tests/cdemo-static.test, tests/demo-conf.test,
tests/demo-deplibs.test, tests/demo-exec.test,
tests/demo-hardcode.test, tests/demo-inst.test,
tests/demo-make.test, tests/demo-nofast.test,
tests/demo-noinst-link.test, tests/demo-nopic.test,
tests/demo-pic.test, tests/demo-relink.test,
tests/demo-shared.test, tests/demo-static.test,
tests/demo-unst.test, tests/depdemo-conf.test,
tests/depdemo-exec.test, tests/depdemo-inst.test,
tests/depdemo-make.test, tests/depdemo-nofast.test,
tests/depdemo-relink.test, tests/depdemo-shared.test,
tests/depdemo-static.test, tests/depdemo-unst.test,
tests/f77demo-conf.test, tests/f77demo-exec.test,
tests/f77demo-make.test, tests/f77demo-shared.test,
tests/f77demo-static.test, tests/link-2.test, tests/link.test,
tests/mdemo-conf.test, tests/mdemo-dryrun.test,
tests/mdemo-exec.test, tests/mdemo-inst.test,
tests/mdemo-make.test, tests/mdemo-shared.test,
tests/mdemo-static.test, tests/mdemo-unst.test,
tests/mdemo2-conf.test, tests/mdemo2-exec.test,
tests/mdemo2-make.test, tests/nomode.test, tests/pdemo-conf.test,
tests/pdemo-exec.test, tests/pdemo-inst.test,
tests/pdemo-make.test, tests/quote.test, tests/sh.test,
tests/suffix.test, tests/tagdemo-conf.test,
tests/tagdemo-exec.test, tests/tagdemo-make.test,
tests/tagdemo-shared.test, tests/tagdemo-static.test,
tests/tagtrace.test: Removed srcdir discovery boilerplate...
* tests/defs.in: ...and put it here.
2004-09-23 13:07:15 +00:00
Ralf Wildenhues
6cc733bc35 * m4/libtool.m4 (_LT_CMD_GLOBAL_SYMBOLS): move symcode calculation
to correct place.
* doc/libtool.texi (libtool script contents): update description
of global_symbol_to_cdecl.
2004-09-23 12:26:40 +00:00
Gary V. Vaughan
bfce27f524 * configure.ac (M4SH): AC_SUBST m4sh expander.
* config/general.m4sh, config/getopt.m4sh: New files with factored
out functionality from...
* config/ltmain.in, libtoolize.in: ...here.  m4_include the shared
code, and call AS_SHELL_SANITIZE.  Also quote all `[' and `]' to
survive m4 run.
(func_serial): No need to double up m4sh quotes after a `#'.
(func_check_macros): Escape `dnl' to stop m4sh interpreting it as
a macro.
* tests/defs.in: New file expanded into tests/defs by autom4te.
* m4/libtool.m4 (_LT_DECL_EGREP): Also require fgrep for the tests
that use it.
* Makefile.am ($(top_srcdir)/config/ltmain.sh): Now built with
M4SH.
(libtoolize): Ditto.
* bootstrap: Set M4SH for call to make.
* HACKING: No need to sync to AS_SHELL_SANITIZE by hand any more.
2004-09-23 01:16:41 +00:00
Gary V. Vaughan
a453acdc32 * m4/libtool.m4: _LT_DECL uppercase ECHO.
* config/ltmain.in: Use it throughout.
(func_mkdir_p): Now matches the other implementations in
tests/defs and libtoolize.in.
* tests/sh.test: Updated to detect ECHO misuse.
2004-09-23 00:13:02 +00:00
Gary V. Vaughan
f28311788e * config/ltmain.in (func_mode_link): Propagate a convenience
library's dependency libs correctly when it is being linked into a
libtool library.  Deplibs are now propagated whether libdir is set
or not.
2004-09-22 23:31:27 +00:00
Andreas Schwab
a2ad2dce32 The dlpreopen pass over libraries reverses the elements in the
$deplibs list.  This causes problems when the link pass tries to
find libraries when they are located in non-standard places
denoted by -L options.  Due to the reversed order these -L options
occur after the libraries that need them, and they are not found:

* config/ltmain.in: (Un)Reverse $deplibs list at the start of the
link pass in lib mode.
2004-09-22 22:46:12 +00:00
Charles Wilson
8c7eb9e5c9 * ltmain.in (func_generate_dlsyms) [cygwin, mingw]: when creating
a .exp file for an executable, also create a .def file, and add
that file to the link command via SYMFILES.  This causes binutils
to generate an .edata section, and allows self dlopening to work.
* NEWS: Updated.
2004-09-22 08:50:34 +00:00
Charles Wilson
8bf60ee1c8 * m4/libtool.m4 (_LT_SYS_DYNAMIC_LINKER): better quoting for
postinstall_cmds and postuninstall_cmds to allow spaces in install
paths.
2004-09-22 08:11:49 +00:00
Charles Wilson
1ab797d98d * config/ltmain.in (func_generate_dlsyms): Addresses in
_preloaded_symbols[] cannot go into .rdata section if symbols are
DATA imported from DLL, on windows, because runtime relocations
must happen.
* m4/libtool.m4 (_LT_LINKER_SHLIBS([TAGNAME])):	Build exports for
symbols in .rdata sections.
2004-09-22 07:40:25 +00:00
Gary V. Vaughan
97e1a8755a The checks in assign.test are trying to catch case of this ilk:
`foo=bar break', but unfortunately they also choke on `foo=bar;
break' and `foo=bar && break'.  Writing a sophisticated test to
catch just the intended case seems like more trouble than it's
worth, but leaving the test in causes the testsuite to fail on
valid m4sh output:

* tests/assign.test: Removed; chokes on perfectly valid shell
syntax.
* tests/Makefile.am (COMMON_TESTS): Remove assign.test.
* tests/defs.in (scripts): Don't check the m4sh inputs, go back
to checking the generated ltmain.sh script.
2004-09-19 23:21:45 +00:00
Gary V. Vaughan
bc21a1c25d Reported by Roberto Bagnara <bagnara@cs.unipr.it> 2004-09-19 22:11:38 +00:00
Gary V. Vaughan
1f2c4d9702 * config/ltmain.in (func_echo): Except for multi-line warnings and
errors, always use func_echo.  $show is for command output, and
$echo is for internal use in backtick expressions and similar.
2004-09-17 17:12:17 +00:00
Gary V. Vaughan
4bf4433f70 Missed a couple of MKDIR_P references in ltmain.in in my last
patch; fix them carefully.  Introduce an opt_dry_run to ltmain.in
so that the implementations of func_mkdir_p can converge, and a
func_mktempdir to do a better job of temporary directory creation:

* libtoolize.in (func_mkdir_p): Don't fail if the directory wasn't
created in dry run mode.
* tests/defs (func_mkdir_p): Ditto.  We don't actually have a dry
run mode for the tests, but the function is written carefully to
be kept in synch and work correctly here too.
* config/ltmain.in (func_mkdir_p): Ditto.  This copy of the
function now only differs in its use of $echo over $ECHO.
(func_extract_archive): Removed first redundant mkdir call.
(func_mktempdir): New function that tries to avoid races when
making temporary directories.
(opt_dry_run): Set this if --dry-run is given at the CLI, or if
tests/mdemo-dryrun.test has forced the value of $run.
(func_mode_install): Call $MKDIR directly and error out if the
directory cannot be created.
(func_mode_link): Rather than copying func_mkdir_p into the
wrapper script as a replacement for $MKDIR_P, we know that the
script won't be called my `make -j', so write the current value of
$MKDIR.
2004-09-17 14:13:04 +00:00
Peter O'Gorman
c1fdd979bd * m4/libtool.m4: remove an extra "]" 2004-09-17 13:54:05 +00:00
Peter O'Gorman
78fe989539 * m4/libtool.m4 [darwin] (_LT_LANG_CXX_CONFIG): Changes for 10.4.
* config/libtool.in [darwin]: ditto.
2004-09-17 13:41:54 +00:00
Gary V. Vaughan
0e0104aa45 My most recent `2004-09-02 Gary V. Vaughan' patch for mkdir_p
below is horrendously broken since it makes the installed libtool
try to run the mkinstalldirs or install-sh helper scripts.  This
patch fixes the `make -j' mkdir race condition internally:

* libtoolize.in (func_mkdir_p): New slice and dice algorithm
to build the directory tree one dir at a time, ignoring errors
until the end incase they are transient due to a concurrent
identical mkdir.
* tests/defs (func_mkdir_p): Ditto.
* config/ltmain.in (func_mkdir_p): Ditto, except that ltmain.in
uses $echo rather than $ECHO, and uses $show and $run to interact
correctly with the command line.
* configure.ac (AM_INIT_AUTOMAKE): 1.8 is sufficient again.
* Makefile.am (edit): Don't substitute automake's $(mkdir_p).
* NEWS: Updated.
2004-09-16 14:57:02 +00:00
Bob Friesenhahn
7955f590bb * libltdl/loaders/loadlibrary.c: Compilation fixes (originally
from Gary V. Vaughan) to compile under MinGW.
* config/mkstamp: Translate input data so that it is assured to
use the Unix line terminations. This is necessary under Windows if
the files are checked out with CR/NL line terminations. A
side-effect of this change is that input must always be from
stdin. Previously a filename argument was accepted as well.
2004-09-15 18:24:00 +00:00
Ralf Wildenhues
7dd218b183 * tests/Makefile.am: Use the same CPP, F77, CXX and CXXFLAGS
for the test suite.
2004-09-15 13:04:24 +00:00
Ralf Wildenhues
faa4aa46a2 * m4/libtool.m4 (_LT_ENABLE_LOCK):Replace AC_TRY_LINK with
AC_LINK_IFELSE to get rid of `autoconf -Wobsolete' warning.
* m4/ltdl.m4 (LT_LIB_DLLOAD): Ditto.
2004-09-15 01:39:18 +00:00
Gary V. Vaughan
b386564d8e * config/ltmain.in (func_quote_for_eval): Set a return value to
avoid forking at every call.  Changed all callers.
(func_mode_link): Simplified, and removed the final non-portable
nested escaped double quotes in back quotes usage in the process.
2004-09-15 01:25:36 +00:00
Gary V. Vaughan
e5e3b3ada7 * config/ltmain.in (func_quote_for_eval): Factor out the ugly
shell meta-character quoting.  Changed all callers.
2004-09-14 22:47:11 +00:00
Ralf Wildenhues
18aa63dac0 * m4/libtool.m4 (_LT_CMD_GLOBAL_SYMBOLS): Simplification:
distinguish between data and code symbols on every system.
2004-09-14 22:10:37 +00:00
Albert Chin-A-Young
7ea2fa761b Unfortunately, libtool has no way of telling if unrecognized
compiler flags need an argument or not, and can disect options and
pass parts through incorrectly.  This changeset reverts both
2004-09-06 Albert Chin-A-Young (topmost) and 2004-09-05 Albert
Chin-A-Young below, and recognises more options explicitly:

* config/ltmain.in (func_mode_link): Pass through options needed
to compile in 64-bit mode with gcc, and the SGI, Sun, HP and IBM
compilers.
2004-09-14 21:23:43 +00:00
Gary V. Vaughan
546e73c2e3 * m4/libtool.m4 (_LT_CMD_GLOBALS_SYMBOLS): Fix a typo I made when
applying 2004-09-11 Ralf Wildenhues.
2004-09-13 08:23:04 +00:00
Brad
d5a1f2b45c * libtool.m4: Fixes for the OpenBSD support 2004-09-12 13:50:19 +00:00
Peter O'Gorman
f0cb3767cf Our fortran tests were not very good. All the libraries created
were convenience libs, so we did not test the creation of shared
libraries on any platform. Also none of the libs used any actual
fortran library calls, adding a call to write(*,*) in each lib
causes the tests to fail on darwin (and presumably other platforms).
These new tests would likely cause many more fortran test failures,
so if there is an error during make it is reported as SKIP.

* tests/f77demo-make.test: Don't fail hard, skip on failure.
* tests/f77demo/foof2.f: New file.
* tests/f77demo/foof3.f: New file.
* tests/f77demo/fprogram.f: Call routine in new lib.
* tests/f77demo/foof.f: Call routine in another new lib.
* tests/f77demo/Makefile.am: Make a couple of new libraries, add
$(FLIBS) to cprogram LDADD.
2004-09-12 13:36:17 +00:00
Ralf Wildenhues
8240b4ebba * m4/libtool.m4 (_LT_CMD_GLOBAL_SYMBOLS): The linker distinguishes
data and code symbols on linux-gnu/ia64.  Fixes multiple testsuite
failures.
* NEWS: Updated.
2004-09-11 00:50:27 +00:00
Gary V. Vaughan
ab2e10f59d * libltdl/loaders/shl_load.c (get_vtable): Typo. 2004-09-06 00:51:38 +00:00
Albert Chin-A-Young
e8d9b37386 Hopefully, passing unrecognised compiler arguments through
unmolested will prove to be a good plan for the 2.0 release.  If
it goes awry, we can get back to where we were by reverting this
patch and the 2004-09-05 Albert Chin-A-Young patch, aka
gary@gnu.org--2004/libtool--devo--1.0--patch-169,172:

* config/ltmain.in (func_mode_link): Because we now pass through
compiler arguments we doesn't recognize, the code to pass
through GCC's -m* arguments is not needed.
2004-09-06 00:11:00 +00:00
Albert Chin-A-Young
fb9e30ad0e * Makefile.am (clean-ltmain-sh): Using '==' to test for equality
in a shell script is not portable. Use '=' instead.
2004-09-05 23:59:39 +00:00
Andreas Schwab
7d496b567b * m4/ltdl.m4 (LT_WITH_LTDL): Remove excess quoting in argument of
AC_CONFIG_SUBDIRS.
2004-09-05 21:52:45 +00:00
Albert Chin-A-Young
ec1b689c78 * config/ltmain.in (func_mode_link): Pass otherwise unrecognised +
and - style switches to the compiler.
* NEWS: Updated.
2004-09-05 18:10:03 +00:00
Gary V. Vaughan
1c0b2cca5f * Makefile.am (libtool): Force libtool to be regenerated if
stamp-vcl has changed.
2004-09-05 18:00:56 +00:00
Albert Chin-A-Young
0aef25d740 * m4/libtool.m4, config/ltmain.in: When calling $LTCC,
pass default $CFLAGS through with $LTCFLAGS.
2004-09-05 17:35:16 +00:00
David Edelsohn
875f854504 * config/ltmain.in (func_mode_link): Use $pic_object as
$non_pic_object if $non_pic_object=none.
* NEWS: Updated.
2004-09-03 13:02:33 +00:00
Gary V. Vaughan
7ae2b77a89 * bootstrap: Remember that the ltmain.sh generated by bootstrap
is missing most of its substitution values, so force it to be
rebuilt at make time by touching $(top_srcdir)/config/ltmain.in.
2004-09-03 08:10:21 +00:00
Gary V. Vaughan
747ded858d From Martin Quinson <mquinson@ens-lyon.fr>
* m4/libtool.m4 (_LT_SETUP, _LT_ENABLE_LOCK, LT_PATH_LD): Use
AS_HELP_STRING to get rid of autoconf -Wobsolete warning
messages.
* m4/ltdl.m4 (LT_WITH_LTDL, _LT_ENABLE_INSTALL): Ditto.
* m4/ltoptions.m4 (_LT_ENABLE_SHARED, _LT_ENABLE_STATIC)
(_LT_ENABLE_FAST_INSTALL, _LT_WITH_PIC): Ditto.
* TODO: Updated
2004-09-03 01:54:37 +00:00
Ralf Wildenhues
10c92f19eb * libltdl/slist.c (slist_cons): Don't leak the tail of a list. 2004-09-03 01:31:58 +00:00
Albert Chin-A-Young
206543bc66 * m4/libtool.m4 (_LT_ENABLE_LOCK): Reformatted. 2004-09-03 00:44:04 +00:00
Gary V. Vaughan
c9e032e031 * HACKING: Explain how to verify detached signatures with gpg in
the release announcement templates.
2004-09-03 00:34:48 +00:00
Gary V. Vaughan
00ee0bc757 * AUTHORS: Fix typo in my address. 2004-09-03 00:29:52 +00:00
Gary V. Vaughan
ba6daa7408 Builds of packages that use libtool and make -j produce "directory
already exists warnings" for .lib directory.  Build on automake
wisdom to support make -j builds where a suitable mkdir is
available:

* configure.ac (AM_INIT_AUTOMAKE): Require 1.9, which goes to some
trouble to find a $(mkdir_p) that doesn't interfere with make -j.
* Makefile.am (edit): Substitute for @mkdir_p@.
* config/ltmain.in (MKDIR_P): Take @mkdir_p@ value.
(mkdir): Removed.
(func_mkdir_p): New function to use $MKDIR_P.  Factor out all
previous mkdir calls to use this function.
(RM, MV): Declared as in libtoolize.in.  Changed all callers.
* libtoolize.in (MKDIR_P): Take @mkdir_p@ value from automake.
(func_mkdir_p): Use it, similarly to new config/ltmain.in.
* tests/defs: Synchronize boiler plate code with ltmain.in.
Adjust all callers.
Add missing copyright preamble.
* tests/demo-static.test: Add missing copyright preamble.
Reported by Daniel Reed <n@ml.org>
2004-09-03 00:26:37 +00:00
Gary V. Vaughan
fd730c8573 * Makefile.am (clean-ltmain-sh): Quote $(top_builddir) for the
shell, incase it is not set when running maintainer rules with
`make -fMakefile.maint'.
Don't show the shell commands.
2004-09-02 15:33:35 +00:00
Gary V. Vaughan
93e0ecd55c * AUTHORS: Fix my email address. 2004-09-02 15:26:49 +00:00
Ralf Wildenhues
c45d3a0d18 * libltdl/ltdl.c (try_dlopen): Fix memory leak.
* NEWS: Updated.
2004-09-02 13:27:24 +00:00
Gary V. Vaughan
cae83b341b * libltdl/slist.c, libltdl/slist.h: Merge in changes from latest
upstream.  Mostly comments, formal item boxing, a sort function,
and const madness reduction.
(slist_new): Removed.
(slist_box, slist_unbox, slist_sort): New.
(SListCompare, SListCallback): Swapped!
(slist_remove, slist_find): Change order of parameters for
orthogonality with slist_foreach.  Changed all callers.
* libltdl/lt_dlloader.c (loader_cmp): Renamed to...
(loader_callback): ...this.  Return boxed item.
(lt_dlloader_remove): Adjust to new loader_callback semantics;
unbox each removed item before returning.
Remove unused variable.
Remove const from name parameter, since the slist API cannot
guarantee userdata const-ancy for its callback functions.
(lt_dlloader_find): Adjust to new loader_callback semantics; need
to return the contents of the boxed item.
Remove const from name parameter, since the slist API cannot
guarantee userdata const-ancy for its callback functions.
* libltdl/lt_dlloader.h (lt_dlloader_find, lt_dlloader_remove):
Adjust to new constless footprint.
* libltdl/ltdl.c (ltdl_exit): The global `loaders' list is changed
variable `loader' is invalidated.  Since some loaders may be
resident modules that cannot be unloaded (though we have none
yet), we must save each `next' address before calling
`lt_dlloader_remove'.
* NEWS: Updated.
* THANKS: Added Ralf.
2004-09-02 12:55:32 +00:00
Gary V. Vaughan
1748adcc65 * libltdl/lt_dlloader.c (lt_dlloader_add): Handle malloc failure
from slist_new.
* libltdl/ltdl.c (loader_init): Trust lt_dlloader_add(), don't
overwrite its error type, and simplify.
Reported by Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
2004-09-01 17:32:09 +00:00
Ralf Wildenhues
d1f90d0769 * libltdl/slist.c (slist_new): Handle malloc failure gracefully. 2004-09-01 15:31:34 +00:00
Gary V. Vaughan
2d9235e58c * libtoolize.in, config/ltmain.in: Add CDPATH protection to
preamble.
* tests/defs: Put a full m4sh.m4 style 'Be Bourne compatible'
preamble in here too.
* HACKING: Note that tests/defs needs synching with m4sh.m4 too.
* TODO: Add new item.
2004-09-01 09:48:25 +00:00
Gary V. Vaughan
23b9ddd8a3 * libltdl/ltdl.c (try_dlopen, lt_dlforeachfile): Use correct cpp
macro name, LT_DLSEARCH_PATH.
2004-09-01 08:51:35 +00:00