Module: wine Branch: master Commit: 486783626f133c549a3f9455c683b059aacc7897 URL: http://source.winehq.org/git/wine.git/?a=commit;h=486783626f133c549a3f9455c6...
Author: Charles Davis cdavis@mymail.mines.edu Date: Wed Oct 5 17:07:38 2011 -0600
winegcc: On Mac OS, turn -s into -Wl,-x.
---
tools/winegcc/winegcc.c | 12 ++++++++++++ 1 files changed, 12 insertions(+), 0 deletions(-)
diff --git a/tools/winegcc/winegcc.c b/tools/winegcc/winegcc.c index 3a7e93a..adb1873 100644 --- a/tools/winegcc/winegcc.c +++ b/tools/winegcc/winegcc.c @@ -199,6 +199,7 @@ struct options int force_pointer_size; int large_address_aware; int unwind_tables; + int strip; const char* wine_objdir; const char* output_name; const char* image_base; @@ -1009,6 +1010,8 @@ static void build(struct options* opts) strarray_add(link_args, "-image_base"); strarray_add(link_args, opts->image_base); } + if (opts->strip) + strarray_add(link_args, "-Wl,-x"); break; case PLATFORM_SOLARIS: { @@ -1417,6 +1420,15 @@ int main(int argc, char **argv) opts.shared = 1; raw_compiler_arg = raw_linker_arg = 0; } + else if (strcmp("-s", argv[i]) == 0 && opts.target_platform == PLATFORM_APPLE) + { + /* On Mac, change -s into -Wl,-x. ld's -s switch + * is deprecated, and it doesn't work on Tiger with + * MH_BUNDLEs anyway + */ + opts.strip = 1; + raw_linker_arg = 0; + } break; case 'v': if (argv[i][2] == 0) verbose++;