Preloading import libraries with MSVC

2012-11-02 Thread Peter Rosin
Hi! As discussed earlier[1], there are problems with preloading import libraries when using Microsoft Visual C/C++. This series is a polished version of the previously posted rough cut. However, the first two patches are largely unrelated to the topic, but they help visualize what the meat in the

[PATCH 2/3] libtool: unify the global symbol transformations

2012-11-02 Thread Peter Rosin
Since it is safe for $lt_cv_sys_global_symbol_to_cdecl to match with a simple /^T .* .*$/ type expression, it is ok for the other transformations as well. At least if you require at least one $symcode at the start of the line, so that the just generated output doesn't match the next sed expression

[PATCH 1/3] libtool: break up long lines

2012-11-02 Thread Peter Rosin
* m4/libtool.m4 (_LT_CMD_GLOBAL_SYMBOLS): Break up long lines when assigning the sed scripts that transform the extracted symbol lines. Signed-off-by: Peter Rosin --- m4/libtool.m4 | 16 +--- 1 files changed, 13 insertions(+), 3 deletions(-) diff --git a/m4/libtool.m4 b/m4/libtool

[PATCH 3/3] libtool: add @INIT@ to the preloader, for data imports on Windows

2012-11-02 Thread Peter Rosin
* m4/libtool.m4 (_LT_CMD_GLOBAL_SYMBOLS) [dumpbin]: Adjust lt_cv_sys_global_symbol_to_cdecl so that it declares imported data symbols as __declspec(dllimport). Adjust lt_cv_sys_global_symbol_to_c_name_address and lt_cv_sys_global_symbol_to_c_name_address_lib_prefix so that they fill in "(void*) 0"