summaryrefslogtreecommitdiff
path: root/m4
diff options
context:
space:
mode:
authorWerner Koch <wk@gnupg.org>2013-04-18 14:40:43 +0200
committerWerner Koch <wk@gnupg.org>2013-05-22 17:59:20 +0200
commit05b3e2dda61d3d532a7f1ffd2487a85ed1c4f3ab (patch)
tree247b0570c056a8a5ad70be58af96b6267b371eb0 /m4
parentb65281a1b76d7898eb7607932246b78277d8570b (diff)
downloadlibgcrypt-05b3e2dda61d3d532a7f1ffd2487a85ed1c4f3ab.tar.gz
Fix libtool 2.4.2 to correctly detect .def files.
* ltmain.sh (sed_uncomment_deffile): New. (orig_export_symbols): Uncomment def file before testing for EXPORTS. * m4/libtool.m4: Do the same for the generated code. -- The old code was not correct in that it only looked at the first line and puts an EXPORTS keyword in front if missing. Binutils 2.22 accepted a duplicated EXPORTS keyword but at least 2.23.2 is more stringent and bails out without this fix. There is no need to send this upstream. Upstream's git master has a lot of changes including a similar fix for this problems. There are no signs that a libtool 2.4.3 will be released to fix this problem and thus we need to stick to our copy of 2.4.2 along with this patch. Signed-off-by: Werner Koch <wk@gnupg.org>
Diffstat (limited to 'm4')
-rw-r--r--m4/libtool.m48
1 files changed, 4 insertions, 4 deletions
diff --git a/m4/libtool.m4 b/m4/libtool.m4
index 4bedbd38..ff871a0a 100644
--- a/m4/libtool.m4
+++ b/m4/libtool.m4
@@ -4773,7 +4773,7 @@ _LT_EOF
_LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
# If the export-symbols file already is a .def file (1st line
# is EXPORTS), use it as is; otherwise, prepend...
- _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
+ _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED \"$sed_uncomment_deffile\" $export_symbols | $SED 1q`" = xEXPORTS; then
cp $export_symbols $output_objdir/$soname.def;
else
echo EXPORTS > $output_objdir/$soname.def;
@@ -5150,7 +5150,7 @@ _LT_EOF
shrext_cmds=".dll"
# FIXME: Setting linknames here is a bad hack.
_LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-dll~linknames='
- _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
+ _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED \"$sed_uncomment_deffile\" $export_symbols | $SED 1q`" = xEXPORTS; then
sed -n -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' -e '1\\\!p' < $export_symbols > $output_objdir/$soname.exp;
else
sed -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' < $export_symbols > $output_objdir/$soname.exp;
@@ -6149,7 +6149,7 @@ if test "$_lt_caught_CXX_error" != yes; then
shrext_cmds=".dll"
# FIXME: Setting linknames here is a bad hack.
_LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-dll~linknames='
- _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
+ _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED \"$sed_uncomment_deffile\" $export_symbols | $SED 1q`" = xEXPORTS; then
$SED -n -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' -e '1\\\!p' < $export_symbols > $output_objdir/$soname.exp;
else
$SED -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' < $export_symbols > $output_objdir/$soname.exp;
@@ -6190,7 +6190,7 @@ if test "$_lt_caught_CXX_error" != yes; then
_LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
# If the export-symbols file already is a .def file (1st line
# is EXPORTS), use it as is; otherwise, prepend...
- _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
+ _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED \"$sed_uncomment_deffile\" $export_symbols | $SED 1q`" = xEXPORTS; then
cp $export_symbols $output_objdir/$soname.def;
else
echo EXPORTS > $output_objdir/$soname.def;