toolchain: introduce BR2_TOOLCHAIN_HAS_GCC_BUG_99410
authorGiulio Benetti <giulio.benetti@benettiengineering.com>
Fri, 5 Mar 2021 15:15:28 +0000 (16:15 +0100)
committerPeter Korsgaard <peter@korsgaard.com>
Sat, 6 Mar 2021 15:46:28 +0000 (16:46 +0100)
belle-sip package fails to build for the Nios2 architecture with
optimization enabled with gcc < 8.x:
http://autobuild.buildroot.net/results/71f26fd81db8e9b19b3f18f3f3cefd9c768f094f/

It's been reported upstream:
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99410

Signed-off-by: Giulio Benetti <giulio.benetti@benettiengineering.com>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
toolchain/Config.in

index 553612c4aa292d852eebd3cfdc662e3d6f1154c9..fdc0f9ba5975bb6750766532d66a8421cf9e0029 100644 (file)
@@ -166,6 +166,13 @@ config BR2_TOOLCHAIN_HAS_GCC_BUG_93847
        bool
        default y if BR2_nios2 && !BR2_TOOLCHAIN_GCC_AT_LEAST_9
 
+# https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99410
+# Error: branch offset out of range on Nios II. This bug
+# no longer exists in gcc >= 8.x.
+config BR2_TOOLCHAIN_HAS_GCC_BUG_99140
+       bool
+       default y if BR2_nios2 && !BR2_TOOLCHAIN_GCC_AT_LEAST_8
+
 config BR2_TOOLCHAIN_HAS_NATIVE_RPC
        bool