From 0d492f414437a42cebf5d6efc2b7e73120e259af Mon Sep 17 00:00:00 2001 From: Ralf Wildenhues Date: Tue, 6 Mar 2007 22:31:09 +0000 Subject: [PATCH] * libltdl/config/ltmain.m4sh (func_mode_link): Also apply the symbol filtering for w32 and the include_expsyms feature in the case of exceeded command line length. Fixes test failure on MinGW. --- ChangeLog | 5 +++++ libltdl/config/ltmain.m4sh | 22 ++++++++++++++++++++++ 2 files changed, 27 insertions(+) diff --git a/ChangeLog b/ChangeLog index 26db93b6..52a1e654 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,10 @@ 2007-03-06 Ralf Wildenhues + * libltdl/config/ltmain.m4sh (func_mode_link): Also apply the + symbol filtering for w32 and the include_expsyms feature in the + case of exceeded command line length. Fixes test failure on + MinGW. + * tests/stresstest.at: For const data object imported from shared library, define appropriate macros to expand __declspec(dllimport) on w32. Use two different main objects diff --git a/libltdl/config/ltmain.m4sh b/libltdl/config/ltmain.m4sh index 1084942d..06bb2785 100644 --- a/libltdl/config/ltmain.m4sh +++ b/libltdl/config/ltmain.m4sh @@ -5381,6 +5381,28 @@ EOF fi fi + if ${skipped_export-false}; then + if test -n "$export_symbols" && test -n "$include_expsyms"; then + tmp_export_symbols="$export_symbols" + test -n "$orig_export_symbols" && tmp_export_symbols="$orig_export_symbols" + $opt_dry_run || eval '$ECHO "X$include_expsyms" | $Xsed | $SP2NL >> "$tmp_export_symbols"' + fi + + if test -n "$orig_export_symbols"; then + # The given exports_symbols file has to be filtered, so filter it. + func_echo "filter symbol list for \`$libname.la' to tag DATA exports" + # FIXME: $output_objdir/$libname.filter potentially contains lots of + # 's' commands which not all seds can handle. GNU sed should be fine + # though. Also, the filter scales superlinearly with the number of + # global variables. join(1) would be nice here, but unfortunately + # isn't a blessed tool. + $opt_dry_run || $SED -e '/[ ,]DATA/!d;s,\(.*\)\([ \,].*\),s|^\1$|\1\2|,' < $export_symbols > $output_objdir/$libname.filter + delfiles="$delfiles $export_symbols $output_objdir/$libname.filter" + export_symbols=$output_objdir/$libname.def + $opt_dry_run || $SED -f $output_objdir/$libname.filter < $orig_export_symbols > $export_symbols + fi + fi + libobjs=$output # Restore the value of output. output=$save_output