[winegcc08] Handle -L in a separate array

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



...rather than adding -L<libpath> to both the DLLs and static libraries
No functional changes.

Changelog:
    Handle -L<dir> in a separate array
diff -u -r -N tools.7/winewrap.c tools/winewrap.c
--- tools.7/winewrap.c	2003-09-09 16:52:49.000000000 +0100
+++ tools/winewrap.c	2003-09-09 16:36:26.000000000 +0100
@@ -217,7 +217,7 @@
 /* Default output name is the same as mingw-ld */
 static char *output_name = "a.exe";
 
-static strarray *arh_files, *dll_files, *lib_files, *lib_paths, *obj_files;
+static strarray *arh_files, *dll_files, *lib_files, *llib_paths, *lib_paths, *obj_files;
 
 int verbose = 0;
 static int keep_generated = 0;
@@ -324,8 +324,7 @@
 static void add_lib_path(const char* path)
 {
     strarray_add(lib_paths, strdup(path));
-    strarray_add(dll_files, strmake("-L%s", path));
-    strarray_add(lib_files, strmake("-L%s", path));
+    strarray_add(llib_paths, strmake("-L%s", path));
 }
 
 static void add_lib_file(const char* library)
@@ -386,6 +385,8 @@
     strarray_add(wspec_args, strmake("%s.exe", base_name));
     strarray_add(wspec_args, gui_mode ? "-mgui" : "-mcui");
     strarray_add(wspec_args, wrap_o_name);
+    for (i = 0; i < llib_paths->size; i++)
+	strarray_add(wspec_args, llib_paths->base[i]);
     for (i = 0; i < lib_files->size; i++)
 	strarray_add(wspec_args, lib_files->base[i]);
     for (i = 0; i < dll_files->size; i++)
@@ -440,6 +441,7 @@
     strarray_init(dll_files);
     strarray_init(lib_files);
     strarray_init(lib_paths);
+    strarray_init(llib_paths);
     strarray_init(obj_files);
     
     /* include the standard DLL path first */
@@ -547,6 +549,8 @@
 	strarray_add(spec_args, strmake("%s.exe", base_name));
         strarray_add(spec_args, gui_mode ? "-mgui" : "-mcui");
     }
+    for (i = 0; i < llib_paths->size; i++)
+	strarray_add(spec_args, llib_paths->base[i]);
     for (i = 0; i < dll_files->size; i++)
 	strarray_add(spec_args, dll_files->base[i]);
     for (i = 0; i < obj_files->size; i++)
@@ -583,8 +587,8 @@
     strarray_add(link_args, "-Wl,-Bsymbolic,-z,defs");
     strarray_add(link_args, "-lwine");
     strarray_add(link_args, "-lm");
-    for (i = 0; i < lib_files->size; i++)
-	strarray_add(link_args, lib_files->base[i]);
+    for (i = 0; i < llib_paths->size; i++)
+	strarray_add(link_args, llib_paths->base[i]);
     strarray_add(link_args, "-o");
     if (create_wrapper)
 	strarray_add(link_args, strmake("%s-wrap.dll.so", base_file));

[Index of Archives]     [Gimp for Windows]     [Red Hat]     [Samba]     [Yosemite Camping]     [Graphics Cards]     [Wine Home]

  Powered by Linux