Alexandre Julliard : winegcc: Allow the output file to end in .so.

Alexandre Julliard julliard at winehq.org
Thu May 14 16:17:45 CDT 2020


Module: wine
Branch: master
Commit: 469058acc17ace339bf30a693d8d635ff1e0dbd6
URL:    https://source.winehq.org/git/wine.git/?a=commit;h=469058acc17ace339bf30a693d8d635ff1e0dbd6

Author: Alexandre Julliard <julliard at winehq.org>
Date:   Thu May 14 14:01:24 2020 +0200

winegcc: Allow the output file to end in .so.

Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 tools/winegcc/winegcc.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/tools/winegcc/winegcc.c b/tools/winegcc/winegcc.c
index 920ede6c3d..c966c08665 100644
--- a/tools/winegcc/winegcc.c
+++ b/tools/winegcc/winegcc.c
@@ -1107,12 +1107,12 @@ static void build(struct options* opts)
     if (strendswith(output_file, ".fake")) fake_module = 1;
 
     /* normalize the filename a bit: strip .so, ensure it has proper ext */
-    if (strendswith(output_file, ".so")) 
-	output_file[strlen(output_file) - 3] = 0;
     if ((output_name = strrchr(output_file, '/'))) output_name++;
     else output_name = output_file;
     if (!strchr(output_name, '.'))
         output_file = strmake("%s.%s", output_file, opts->shared ? "dll" : "exe");
+    else if (strendswith(output_file, ".so"))
+	output_file[strlen(output_file) - 3] = 0;
     output_path = is_pe ? output_file : strmake( "%s.so", output_file );
 
     /* get the filename from the path */




More information about the wine-cvs mailing list