[Bug target/82641] Unable to enable crc32 for a certain function with target attribute on ARM (aarch32)
arnd at linaro dot org
gcc-bugzilla@gcc.gnu.org
Tue Jan 30 21:56:00 GMT 2018
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82641
--- Comment #23 from Arnd Bergmann <arnd at linaro dot org> ---
I've done some more testing with '#pragma GCC target("arch=armv5te")' in place,
but ran into another problem:
<built-in>: note: this is the location of the previous definition
In file included from /git/arm-soc/include/linux/thread_info.h:38,
from /git/arm-soc/include/asm-generic/current.h:5,
from ./arch/arm/include/generated/asm/current.h:1,
from /git/arm-soc/include/linux/sched.h:12,
from /git/arm-soc/arch/arm/kernel/xscale-cp0.c:14:
/git/arm-soc/arch/arm/kernel/xscale-cp0.c: In function 'dsp_do':
/git/arm-soc/arch/arm/include/asm/thread_info.h:88:35: error: inlining failed
in call to always_inline 'current_thread_info': target specific option mismatch
static inline struct thread_info *current_thread_info(void)
^~~~~~~~~~~~~~~~~~~
/git/arm-soc/arch/arm/kernel/xscale-cp0.c:48:18: note: called from here
dsp_save_state(current_thread_info()->cpu_context.extra);
^~~~~~~~~~~~~~~~~~~~~
I've worked around that now by separating the parts that use inline assembly
into standalone functions with GCC push_options/pop_options around them, so
they are not mixed with normal code that might call an inline function, but
this is getting increasingly ugly.
More information about the Gcc-bugs
mailing list