diff --git a/gcc/config/i386/i386.c b/gcc/config/i386/i386.c index 375d12b81b2c9..32581b0893155 100644 --- a/gcc/config/i386/i386.c +++ b/gcc/config/i386/i386.c @@ -3772,7 +3772,13 @@ ix86_option_override_internal (bool main_args_p, opts->x_flag_omit_frame_pointer = !(USE_IX86_FRAME_POINTER || opts->x_optimize_size); if (opts->x_flag_asynchronous_unwind_tables == 2) +#ifdef __OS2__ + /* Don't emit DWARF2 unwind tables on OS/2 by default as it makes no use + of it (this would only add unresolved __ehInit in each object). */ + opts->x_flag_asynchronous_unwind_tables = 0; +#else opts->x_flag_asynchronous_unwind_tables = !USE_IX86_FRAME_POINTER; +#endif if (opts->x_flag_pcc_struct_return == 2) opts->x_flag_pcc_struct_return = DEFAULT_PCC_STRUCT_RETURN; }