winegcc: Fix compiling of 32-bit Winelib Apps on shared 32/64-bit setups
André Hentschel
nerv at dawncrow.de
Fri Apr 16 15:51:29 CDT 2010
---
tools/winegcc/winegcc.c | 8 ++++++++
1 files changed, 8 insertions(+), 0 deletions(-)
diff --git a/tools/winegcc/winegcc.c b/tools/winegcc/winegcc.c
index 7023ff4..f780a69 100644
--- a/tools/winegcc/winegcc.c
+++ b/tools/winegcc/winegcc.c
@@ -1252,6 +1252,14 @@ int main(int argc, char **argv)
opts.unicode_app = 1;
else if (strcmp("-m32", argv[i]) == 0)
{
+ if (opts.target_cpu == CPU_x86_64)
+ {
+ const char *stdlib32path[] = { "/usr/lib32/wine", "/usr/local/lib32/wine", "/lib32/wine" };
+ unsigned int j;
+ opts.target_cpu = CPU_x86;
+ for ( j = 0; j < sizeof(stdlib32path)/sizeof(stdlib32path[0]); j++ )
+ strarray_add(opts.lib_dirs, stdlib32path[j]);
+ }
opts.force_pointer_size = 4;
raw_linker_arg = 1;
}
--
Best Regards, André Hentschel
More information about the wine-patches
mailing list