winebuild: Support for -fasynchronous-unwind-tables flag to enable/disable CFI generation.

This commit is contained in:
Alexandre Julliard 2010-04-11 12:07:44 +02:00
parent e550e8a100
commit 3dfbbb597c
4 changed files with 10 additions and 3 deletions

View file

@ -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;

View file

@ -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':

View file

@ -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 );

View file

@ -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