Message ID | 7b28c03a-c032-6cec-c127-1c12cbe98eeb@foss.arm.com |
---|---|
State | New |
Headers | show |
Series | [AArch64] Turn on -fasynchronous-unwind-tables and -funwind-tables by default. | expand |
On Tue, Mar 13, 2018 at 01:35:56PM +0000, Ramana Radhakrishnan wrote: > Jakub commented here that > https://gcc.gnu.org/ml/gcc-patches/2018-02/msg01325.html we don't turn > on fasynchronous-unwind-tables for AArch64. I note that x86_64 turns on > funwind-tables as well. Thus this patch turns on both. > > Note that this doesn't increase code size but will likely increase > binary size because we now have a lot more eh_frame / debug_frame > information being spat out. We probably need to do get the clang /llvm > guys to do the same but I'll prod them separately. > > Bootstrapped and regression tested on aarch64-none-linux-gnu. > > Ok ? OK. Thanks, James
On Mon, Mar 19, 2018 at 12:12 PM, James Greenhalgh <james.greenhalgh@arm.com> wrote: > On Tue, Mar 13, 2018 at 01:35:56PM +0000, Ramana Radhakrishnan wrote: >> Jakub commented here that >> https://gcc.gnu.org/ml/gcc-patches/2018-02/msg01325.html we don't turn >> on fasynchronous-unwind-tables for AArch64. I note that x86_64 turns on >> funwind-tables as well. Thus this patch turns on both. >> >> Note that this doesn't increase code size but will likely increase >> binary size because we now have a lot more eh_frame / debug_frame >> information being spat out. We probably need to do get the clang /llvm >> guys to do the same but I'll prod them separately. >> >> Bootstrapped and regression tested on aarch64-none-linux-gnu. >> >> Ok ? > > OK. > Now applied. Maybe the FreeBSD guys want to do the same but that's their choice ? CC'ing Andreas just in case he has an opinion. Ramana > Thanks, > James >
diff --git a/gcc/common/config/aarch64/aarch64-common.c b/gcc/common/config/aarch64/aarch64-common.c index 7fd9305..a9fc5f1 100644 --- a/gcc/common/config/aarch64/aarch64-common.c +++ b/gcc/common/config/aarch64/aarch64-common.c @@ -53,6 +53,10 @@ static const struct default_options aarch_option_optimization_table[] = { OPT_LEVELS_1_PLUS, OPT_fsched_pressure, NULL, 1 }, /* Enable redundant extension instructions removal at -O2 and higher. */ { OPT_LEVELS_2_PLUS, OPT_free, NULL, 1 }, +#if (TARGET_DEFAULT_ASYNC_UNWIND_TABLES == 1) + { OPT_LEVELS_ALL, OPT_fasynchronous_unwind_tables, NULL, 1 }, + { OPT_LEVELS_ALL, OPT_funwind_tables, NULL, 1}, +#endif { OPT_LEVELS_NONE, 0, NULL, 0 } }; diff --git a/gcc/config.gcc b/gcc/config.gcc index 2156c6b..3fe7c8f 100644 --- a/gcc/config.gcc +++ b/gcc/config.gcc @@ -981,6 +981,7 @@ aarch64*-*-linux*) tm_file="${tm_file} dbxelf.h elfos.h gnu-user.h linux.h glibc-stdint.h" tm_file="${tm_file} aarch64/aarch64-elf.h aarch64/aarch64-linux.h" tmake_file="${tmake_file} aarch64/t-aarch64 aarch64/t-aarch64-linux" + tm_defines="${tm_defines} TARGET_DEFAULT_ASYNC_UNWIND_TABLES=1" case $target in aarch64_be-*) tm_defines="${tm_defines} TARGET_BIG_ENDIAN_DEFAULT=1"