diff --git a/tools/winebuild/build.h b/tools/winebuild/build.h index 91b75714536..86513dd004d 100644 --- a/tools/winebuild/build.h +++ b/tools/winebuild/build.h @@ -315,6 +315,7 @@ extern int verbose; extern int save_temps; extern int link_ext_symbols; extern int force_pointer_size; +extern int unwind_tables; extern char *input_file_name; extern char *spec_file_name; diff --git a/tools/winebuild/main.c b/tools/winebuild/main.c index 4a11519a508..d2ec9430dae 100644 --- a/tools/winebuild/main.c +++ b/tools/winebuild/main.c @@ -47,6 +47,7 @@ int verbose = 0; int save_temps = 0; int link_ext_symbols = 0; int force_pointer_size = 0; +int unwind_tables = 0; #ifdef __i386__ enum target_cpu target_cpu = CPU_x86; @@ -237,7 +238,7 @@ static const char usage_str[] = " -e, --entry=FUNC Set the DLL entry point function (default: DllMain)\n" " -E, --export=FILE Export the symbols defined in the .spec or .def file\n" " --external-symbols Allow linking to external symbols\n" -" -f FLAGS Compiler flags (only -fPIC is supported)\n" +" -f FLAGS Compiler flags (-fPIC and -fasynchronous-unwind-tables are supported)\n" " -F, --filename=DLLFILE Set the DLL filename (default: from input file name)\n" " --fake-module Create a fake binary module\n" " -h, --help Display this help message\n" @@ -404,6 +405,8 @@ static char **parse_options( int argc, char **argv, DLLSPEC *spec ) break; case 'f': if (!strcmp( optarg, "PIC") || !strcmp( optarg, "pic")) UsePIC = 1; + else if (!strcmp( optarg, "asynchronous-unwind-tables")) unwind_tables = 1; + else if (!strcmp( optarg, "no-asynchronous-unwind-tables")) unwind_tables = 0; /* ignore all other flags */ break; case 'h': diff --git a/tools/winebuild/utils.c b/tools/winebuild/utils.c index 0e5f061b98e..d9cc5ee8227 100644 --- a/tools/winebuild/utils.c +++ b/tools/winebuild/utils.c @@ -879,6 +879,7 @@ void output_cfi( const char *format, ... ) { va_list valist; + if (!unwind_tables) return; va_start( valist, format ); fputc( '\t', output_file ); vfprintf( output_file, format, valist ); diff --git a/tools/winebuild/winebuild.man.in b/tools/winebuild/winebuild.man.in index 88452d3bd06..2b0f0b72917 100644 --- a/tools/winebuild/winebuild.man.in +++ b/tools/winebuild/winebuild.man.in @@ -101,8 +101,10 @@ another Unix library (for symbols defined in another dll, a .I forward specification must be used instead). .TP -.BI \-f\ flags -Ignored for compatibility with the C compiler. +.BI \-f\ option +Specify a code generation option. Currently \fB\-fPIC\fR and +\fB\-fasynchronous-unwind-tables\fR are supported. Other options are +ignored for compatibility with the C compiler. .TP .B \--fake-module Create a fake PE module for a dll or exe, instead of the normal