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

Alexandre Julliard julliard at winehq.org
Mon Apr 12 09:54:06 CDT 2010


Module: wine
Branch: master
Commit: 3dfbbb597c3087aee5cdecd190089e27d1b82587
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=3dfbbb597c3087aee5cdecd190089e27d1b82587

Author: Alexandre Julliard <julliard at winehq.org>
Date:   Sun Apr 11 12:07:44 2010 +0200

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

---

 tools/winebuild/build.h          |    1 +
 tools/winebuild/main.c           |    5 ++++-
 tools/winebuild/utils.c          |    1 +
 tools/winebuild/winebuild.man.in |    6 ++++--
 4 files changed, 10 insertions(+), 3 deletions(-)

diff --git a/tools/winebuild/build.h b/tools/winebuild/build.h
index 91b7571..86513dd 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 4a11519..d2ec943 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 0e5f061..d9cc5ee 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 88452d3..2b0f0b7 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




More information about the wine-cvs mailing list