If -fopenmp if passed to gcc during linking, it will take care to add all
necessary libs to link correctly for openmp support. Currently libtool filters
those flags, similar as it was the case with the threading flags. This change
handles the situation for the openmp support similar as before the thread
support was fixed.
http://lists.gnu.org/archive/html/bug-libtool/2010-12/msg00009.htmlhttp://lists.gnu.org/archive/html/bug-libtool/2011-03/msg00014.html
* libltdl/config/ltmain.m4sh (func_mode_link): Treat OpenMP
flags like pthreads flags.
Signed-off-by: Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
* libltdl/m4/ltdl.m4: Define extra extension if module extension
differs from shared lib extension.
* libltdl/ltdl.c: Use it.
* tests/darwin.at: Test it.
* NEWS: Announce it.
Reported by Hans Aberg, Michael Ellis, and others.
* libltdl/m4/ltmain.m4sh: Check that argv contains " --lt-"
before looping to remove wrapper script targetted arguments.
Performance regression reported by Dan McGee.
* libltdl/m4/libtool.m4 (_LT_REQUIRED_DARWIN_CHECKS): Ignore
stderr during tests for -flag unless it contains "flag".
* tests/darwin.at: Add test.
Reported by Jeremy Huddleston and also by David Fang.
* libltdl/m4/libtool.m4 (_LT_COMPILER_PIC) [linux]
<lt_prog_compiler_wl>: Set to '-Qoption ld ' if we
detect Sun Fortran version 8.4 or newer.
Report by Terry Dontje.
Signed-off-by: Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
* libltdl/config/ltmain.m4sh (func_mode_install): When executing
old_postinstall_cmds and old_archive_cmds, convert $oldlib to a
format appropriate for the tool and provide that in $tool_oldlib.
Also use $tool_oldlib when stripping old libraries.
* libltdl/m4/libtool.m4 (_LT_CMD_OLD_ARCHIVE): Use $tool_oldlib
as argument to $RANLIB.
* THANKS: Update.
Report by Dan McMahill.
Signed-off-by: Peter Rosin <peda@lysator.liu.se>
* libltdl/m4/libtool.m4 (LT_CMD_MAX_LEN) [os2]
<lt_cv_sys_max_cmd_len>: Set to 8192 to avoid long test.
Signed-off-by: Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
* libltdl/m4/libtool.m4 (_LT_COMPILER_PIC) [linux]:
Match Intel compiler also using $CC -V output, to avoid false
negatives with compiler drivers like mpif77.
Report by Christian Rössel.
Signed-off-by: Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
* libltdl/m4/libtool.m4 (_LT_COMPILER_PIC) [linux]:
Match Portland compilers also using $CC -V output, to avoid
false negatives with MPI compiler drivers.
Report by Christian Rössel.
Signed-off-by: Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
* libltdl/m4/libtool.m4 (_LT_COMPILER_PIC)
<lt_prog_compiler_pic>: Prepend -Xcompiler to nonempty variable
setting rather than hard-coding -Xcompiler -fPIC, for darwin.
* NEWS, THANKS: Update.
Report by Paweł Daniluk.
Signed-off-by: Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
* libltdl/config/getopt.m4sh (func_help): Use $AUTOCONF and
$AUTOMAKE if set, for --version outout.
Signed-off-by: Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
* libltdl/config/ltmain.m4sh (func_mode_link): Set $wl to empty
if $LD is used for creating shared libraries. Do not use
hardcode_libdir_flag_spec_ld any more.
* libltdl/m4/libtool.m4 (_LT_LINKER_SHLIBS, _LT_LANG_CXX_CONFIG)
(_LT_LANG_F77_CONFIG, _LT_LANG_FC_CONFIG, _LT_SYS_DYNAMIC_LINKER)
<hardcode_libdir_flag_spec_ld>: Remove all instances of the tag
variable.
(_LT_LINKER_SHLIBS) [linux, xlf] <hardcode_libdir_flag_spec>:
Set variable, including ${wl}. Fixes hardcoding in programs
created by XL Fortran on GNU/Linux.
* NEWS, THANKS: Update.
Report by Paul H. Hargrove.
Signed-off-by: Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
* doc/automake.texi: Rebuild menus (using ^C ^U ^A in emacs).
Thanks to Ian Lance Taylor for the suggestion.
Signed-off-by: Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
* libltdl/m4/libtool.m4: Modify --with-pic to accept a list of
package names. Modelled off --enable-shared.
* tests/with-pic.at: New test.
* Makefile.am (TESTSUITE_AT): Add tests/with-pic.at.
* doc/libtool.texi (LT_INIT): Enhance documentation of
--with-pic configure flag.
* NEWS (New features): Mention that --with-pic now accepts a
comma-separated list of package names.
Signed-off-by: Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
* tests/cwrapper.at (cwrapper and installed shared libraries):
Compile program source without libtool, so we can be sure a
non-PIC object will be created.
Signed-off-by: Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
* doc/libtool.texi (Invoking libtool): Document that the shell
used to invoke libtool needs to be the same used to configure
it.
* THANKS: Update.
Report by Markus Duft.
Signed-off-by: Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
* 'libtool-next' (early part):
libtool: remove redundant unsubstituted shell var defaults.
maint: don't leak developer GREP, SED etc into distribution file.
maint: rearrange Makefile.am in preparation for a follow-up patch.
Signed-off-by: Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
* libltdl/m4/libtool.m4 (_LT_DARWIN_LINKER_FEATURES): Update
macro comment header.
[darwin, F77, FC] <compiler_needs_object>: Set to yes if
whole_archive_flag_spec is nonempty. Fixes convenience.at test
suite failures with gfortran 4.2 on Darwin.
* THANKS: Update.
Report by Paul Laight.
Signed-off-by: Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
* tests/bindir.at (bindir install tests): Rewrite checks for
place of the installed shared library in two separate tests,
depending on whether -bindir is supposed to have an effect or
not. In the positive case, make the test stricter so that we
reject libraries in $libdir. In the negative case, do not
require a major version number in the $libdir file name, for AIX
without runtimelinking. If tmpdir creation fails, skip the
test. Use fewer bindir directory names for testing, to speed
up the test. Also mention MSVC style DLL name in comment.
Report by Peter Rosin.
Signed-off-by: Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
* doc/libtool.texi (Link mode): Fix -no-undefined description.
(Inter-library dependencies): Use Windows not AIX as example
system. Clarify need for symbol resolution at library creation
time.
Signed-off-by: Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
* libltdl/config/ltmain.m4sh (func_emit_cwrapperexe_src): If
the wrapper script contains long lines, split them for
readability and to conform with C standards.
* tests/cwrapper.at (cwrapper string length): New test, making
sure we don't regress.
Signed-off-by: Peter Rosin <peda@lysator.liu.se>
* libltdl/m4/libtool.m4 (_LT_CMD_GLOBAL_SYMBOLS)
<dumpbin, lt_cv_sys_global_symbol_pipe>: Make all sections
viable for symbol extraction again when the symbols from a new
file starts. Fixes tests/tagdemo-make.test for MSVC 10.
* tests/dumpbin-symbols.at: New test, making sure we don't
regress.
* Makefile.am (TESTSUITE_AT): Update.
Signed-off-by: Peter Rosin <peda@lysator.liu.se>
* tests/need_lib_prefix.at [MSVC, OS/2]: Skip this test on
systems that do not have libraries prefixed with lib.
Signed-off-by: Peter Rosin <peda@lysator.liu.se>
Makes the touched tests pass for MSVC when DLLs are built.
* tests/demo/Makefile.am, tests/pdemo/Makefile.am: Define
BUILDING_LIBHELLO when building libhello.la.
* tests/demo/foo.h, tests/pdemo/foo.h (nothing) <MSVC>: Export
variable when building the libhello dll and import when using
libhello. For GCC and non-w32, and when building a static
libhello, leave as an ordinary extern.
* tests/pdemo/foo.h [Cygwin]: Remove unneeded and "dead" export
and import logic (LIBFOO_DLL is always undefined).
* tests/pdemo/longer_file_name_foo.c,
tests/pdemo/longer_file_name_foo2.c (_LIBFOO_COMPILATION_): Not
useful before, even less so now. Removed.
* tests/depdemo/l1/Makefile.am: Define BUILDING_LIBL1 when
building libl1.la.
* tests/depdemo/l2/Makefile.am: Define BUILDING_LIBL2 when
building libl2.la.
* tests/depdemo/l3/Makefile.am: Define BUILDING_LIBL3 when
building libl3.la.
* tests/depdemo/l4/Makefile.am: Define BUILDING_LIBL4 when
building libl4.la.
* tests/depdemo/l1/l1.h, tests/depdemo/l2/l2.h,
tests/depdemo/l3/l3.h, tests/depdemo/l4/l4.h <MSVC>: Export
variables when building the associated library dll and import
when using the library. For GCC and non-w32, and when building
static libraries, leave as an ordinary extern.
Signed-off-by: Peter Rosin <peda@lysator.liu.se>
* doc/libtool.texi (Dlopened modules): Remove broken reference
to what should have been Libtool 0.9g.
Report by Roumen Petrov.
Signed-off-by: Ralf Wildenhues <Ralf.Wildenhues@gmx.de>