Module: wine Branch: master Commit: 551d0971c54896f286e41a39217094a477363d49 URL: https://source.winehq.org/git/wine.git/?a=commit;h=551d0971c54896f286e41a392...
Author: Jacek Caban jacek@codeweavers.com Date: Thu Jul 19 16:50:33 2018 +0200
winegcc: Check also for unsuffixed lib/ dir in get_lib_dir.
Wine uses lib/ and lib64/ by default. This fixes -m32 handling in such configuration.
Signed-off-by: Jacek Caban jacek@codeweavers.com Signed-off-by: Alexandre Julliard julliard@winehq.org
---
tools/winegcc/winegcc.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/tools/winegcc/winegcc.c b/tools/winegcc/winegcc.c index 5d604d2..931ac53 100644 --- a/tools/winegcc/winegcc.c +++ b/tools/winegcc/winegcc.c @@ -458,7 +458,12 @@ static char *get_lib_dir( struct options *opts ) while (p > buffer && p[-1] == '/') p--; strcpy( p, libwine ); if (check_platform( opts, buffer )) goto found; - if (p > buffer + 2 && (!memcmp( p - 2, "32", 2 ) || !memcmp( p - 2, "64", 2 ))) p -= 2; + if (p > buffer + 2 && (!memcmp( p - 2, "32", 2 ) || !memcmp( p - 2, "64", 2 ))) + { + p -= 2; + strcpy( p, libwine ); + if (check_platform( opts, buffer )) goto found; + } if (opts->target_cpu != CPU_x86_64 && opts->target_cpu != CPU_ARM64) { strcpy( p, "32" );