Avoid deprecation warning with MSVC

Olly Betts <[email protected]>
Newsgroups gmane.comp.gnu.libtool.patches
Message-ID <[email protected]>
Using -Fe instead of -o avoids the warning and should be OK with older
versions too (the MSVS 2008 docs list -Fe).

Cheers,
    Olly
0001-Use-Fe-with-MSVC-to-specify-DLL-output-filename.patch (text/x-diff, 2 KB)
From 0d1a97460cf14d2574db4749f7bf4c2145035c07 Mon Sep 17 00:00:00 2001
From: Olly Betts <[email protected]>
Date: Wed, 24 Jan 2018 14:09:23 +1300
Subject: [PATCH] Use -Fe with MSVC to specify DLL output filename

This avoids a deprecation warning with current versions of MSVC, and
is documented as supported at least as far back as MSVS 2008.

* m4/libtool.m4: Use -Fe instead of -o to specify DLL output filename
for MSVC.

Signed-off-by: Olly Betts <[email protected]>
---
 m4/libtool.m4 | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/m4/libtool.m4 b/m4/libtool.m4
index 597c6042..6861bc38 100644
--- a/m4/libtool.m4
+++ b/m4/libtool.m4
@@ -5594,14 +5594,14 @@ _LT_EOF
 	# Tell ltmain to make .dll files, not .so files.
 	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,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~linknames='
+	_LT_TAGVAR(archive_cmds, $1)='$CC -Fe $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~linknames='
 	_LT_TAGVAR(archive_expsym_cmds, $1)='if _LT_DLL_DEF_P([$export_symbols]); then
             cp "$export_symbols" "$output_objdir/$soname.def";
             echo "$tool_output_objdir$soname.def" > "$output_objdir/$soname.exp";
           else
             $SED -e '\''s/^/-link -EXPORT:/'\'' < $export_symbols > $output_objdir/$soname.exp;
           fi~
-          $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~
+          $CC -Fe $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~
           linknames='
 	# The linker will not automatically build a static lib if we build a DLL.
 	# _LT_TAGVAR(old_archive_from_new_cmds, $1)='true'
-- 
2.15.1
signature.asc (application/pgp-signature, 833 B)
-----BEGIN PGP SIGNATURE-----

iQIzBAABCgAdFiEECOJAD/f+j+3jrLUoGBR7BzutKwcFAlpn48cACgkQGBR7Bzut
KwdX/Q//TL99og/fMlZWQa2nStslmKA2BqdxziX8fzq0hyT1dvAWhowXValabp8L
9RWtnKrz3EKd1+uzhmfYVwC9OBXysfHbs9fEKUnP39tPymKcLMZg4aCeMQVxa2xQ
wHUBcllolMdSoKOtnVci6AyBDuWLFtu5I9OWb4HQydXmgxXX2gznEYkxOaBw0H3+
EuXHYU69pRzMRmb+8XADkvQnGEDoLZzbDc6dW49ohEh6Mxdp/p4FEKyCOfFhB4qx
lX5DQet1fAnmqFzZLVKL0lNs99I0nEbsIMnVu5CfaDkxpJZVZJAqR79QYDH4XThv
adgfMYEhQhLTGk/NNrf/DMDmkPo8xMyVP4cLImAzgLPSmCnGMo8h/MONBVPC48Wb
sGQgEyvhGtpdZIv4B5kOlZ+QrqYs09Vbd2cdk1zzSX0p+HteocnXcDjzQpJdTIJm
YhR9o6k6OoZ+rFlS/BaXxsu/vhw/A0gzLFvao9e52X/gWBPry2SXu3Svtleqh2Bs
4/f1dubfaaN2oFr4VgjJS2Bs0zmbMHgzw2sURiT4/xasW7rCeSb4VYQ89lnbtFvt
IMM1CYG2ewd7Jzf6zVCYYB4bsSGQSfaD+fxulKKumFJmXY9H5i9HvxGP6hbtvRCj
BQYQYQRaEKpYLWh3mr17sARx7QbLnQS/eBkDIGI/yExtTpb1a3U=
=tmg5
-----END PGP SIGNATURE-----
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.