{"thread":{"id":"22313","subject":"[PATCH 2/4] msvc: Fix an \"unrecognized option\" linker warning","startedAt":"2010-01-20T19:25:51Z","lastAt":"2010-01-23T00:06:36Z","messageCount":2,"participants":["Ramsay Jones","Sebastian Schuberth"],"isPatch":true,"patchVersion":1,"patchTotal":4},"messages":[{"id":"132216","messageId":"4B5758BF.9090806@ramsay1.demon.co.uk","threadId":"22313","inReplyTo":null,"subject":"[PATCH 2/4] msvc: Fix an \"unrecognized option\" linker warning","fromName":"Ramsay Jones","fromEmail":"ramsay@ramsay1.demon.co.uk","sentAt":"2010-01-20T19:25:51Z","receivedAt":"2010-01-20T19:25:51Z","isPatch":true,"sender":{"key":"ramsay@ramsayjones.plus.com","avatar":"https://avatars.githubusercontent.com/u/33702710?v=4"},"body":"\nHaving recently added support for building git-imap-send on\nWindows, we now link against OpenSSL libraries, and the linker\nissues the following warning:\n\n    warning LNK4044: unrecognized option '/lssl'; ignored\n\nIn order to suppress the warning, we change the msvc linker\nscript to translate an '-lssl' parameter to the ssleay32.lib\nlibrary.\n\nNote that the linker script was already including ssleay32.lib\n(along with libeay32.lib) as part of the translation of the\n'-lcrypto' library parameter.  However, libeay32.dll does not\ndepend on ssleay32.dll and can be used stand-alone, so we remove\nssleay32.lib from the '-lcrypto' translation.\n\nThe dependence of ssleay32.dll on libeay32.dll is represented in\nthe Makefile by the NEEDS_CRYPTO_WITH_SSL build variable.\n\nAlso, add the corresponding change to the buildsystem generator.\n\nSigned-off-by: Ramsay Jones <ramsay@ramsay1.demon.co.uk>\n---\n compat/vcbuild/scripts/clink.pl |    1 +\n contrib/buildsystems/engine.pl  |    1 +\n 2 files changed, 2 insertions(+), 0 deletions(-)\n\ndiff --git a/compat/vcbuild/scripts/clink.pl b/compat/vcbuild/scripts/clink.pl\nindex 8a2112f..4374771 100644\n--- a/compat/vcbuild/scripts/clink.pl\n+++ b/compat/vcbuild/scripts/clink.pl\n@@ -31,6 +31,7 @@ while (@ARGV) {\n \t\tpush(@args, \"iconv.lib\");\n \t} elsif (\"$arg\" eq \"-lcrypto\") {\n \t\tpush(@args, \"libeay32.lib\");\n+\t} elsif (\"$arg\" eq \"-lssl\") {\n \t\tpush(@args, \"ssleay32.lib\");\n \t} elsif (\"$arg\" =~ /^-L/ && \"$arg\" ne \"-LTCG\") {\n \t\t$arg =~ s/^-L/-LIBPATH:/;\ndiff --git a/contrib/buildsystems/engine.pl b/contrib/buildsystems/engine.pl\nindex 245af73..ce4eb1e 100644\n--- a/contrib/buildsystems/engine.pl\n+++ b/contrib/buildsystems/engine.pl\n@@ -322,6 +322,7 @@ sub handleLinkLine\n             push(@libs, \"zlib.lib\");\n \t} elsif (\"$part\" eq \"-lcrypto\") {\n             push(@libs, \"libeay32.lib\");\n+        } elsif (\"$part\" eq \"-lssl\") {\n             push(@libs, \"ssleay32.lib\");\n         } elsif ($part =~ /^-/) {\n             push(@lflags, $part);\n-- \n1.6.6\n"},{"id":"132431","messageId":"4B5A3D8C.3000701@gmail.com","threadId":"22313","inReplyTo":"4B5758BF.9090806@ramsay1.demon.co.uk","subject":"Re: [PATCH 2/4] msvc: Fix an \"unrecognized option\" linker warning","fromName":"Sebastian Schuberth","fromEmail":"sschuberth@gmail.com","sentAt":"2010-01-23T00:06:36Z","receivedAt":"2010-01-23T00:06:36Z","isPatch":true,"sender":{"key":"sschuberth@gmail.com","avatar":"https://avatars.githubusercontent.com/u/349154?v=4"},"body":"On 20.01.2010 20:25, Ramsay Jones wrote:\n\n> Having recently added support for building git-imap-send on\n> Windows, we now link against OpenSSL libraries, and the linker\n> issues the following warning:\n>\n>      warning LNK4044: unrecognized option '/lssl'; ignored\n>\n> In order to suppress the warning, we change the msvc linker\n> script to translate an '-lssl' parameter to the ssleay32.lib\n> library.\n>\n> Note that the linker script was already including ssleay32.lib\n> (along with libeay32.lib) as part of the translation of the\n> '-lcrypto' library parameter.  However, libeay32.dll does not\n> depend on ssleay32.dll and can be used stand-alone, so we remove\n> ssleay32.lib from the '-lcrypto' translation.\n>\n> The dependence of ssleay32.dll on libeay32.dll is represented in\n> the Makefile by the NEEDS_CRYPTO_WITH_SSL build variable.\n>\n> Also, add the corresponding change to the buildsystem generator.\n>\n> Signed-off-by: Ramsay Jones<ramsay@ramsay1.demon.co.uk>\n\nAcked-by: Sebastian Schuberth <sschuberth@gmail.com>\n\n-- \nSebastian Schuberth\n"}]}