aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorSebastian Huber <sebastian.huber@embedded-brains.de>2021-01-16 09:00:23 +0100
committerSebastian Huber <sebastian.huber@embedded-brains.de>2021-01-16 17:54:27 +0100
commit7e02426ba0cc4f97ed347f963a6409b32c3c0c88 (patch)
tree0d2e17019501b45258d24242a8eb7422b24793dd /gcc
parente2559c3945a09521ffe4f59669bc4d902ae77adb (diff)
downloadgcc-7e02426ba0cc4f97ed347f963a6409b32c3c0c88.zip
gcc-7e02426ba0cc4f97ed347f963a6409b32c3c0c88.tar.gz
gcc-7e02426ba0cc4f97ed347f963a6409b32c3c0c88.tar.bz2
nios2: Remove custom instruction warnings
Do not warn if custom instructions are not used due to missing optimization flags. This prevents build errors with -Werror which cannot be disabled via a dedicated warning option. One reason to remove these warnings is to enable a multilib for the "Nios II Floating Point Hardware 2 Component". For example, the libatomic target library in GCC is built with -Werror and the warnings removed by this patch resulted in errors like: cc1: error: switch '-mcustom-fmins' has no effect unless '-ffinite-math-only' is specified [-Werror] cc1: error: switch '-mcustom-fmaxs' has no effect unless '-ffinite-math-only' is specified [-Werror] cc1: error: switch '-mcustom-round' has no effect unless '-fno-math-errno' is specified [-Werror] gcc/ * config/nios2/nios2.c (nios2_custom_check_insns): Remove custom instruction warnings.
Diffstat (limited to 'gcc')
-rw-r--r--gcc/config/nios2/nios2.c28
1 files changed, 0 insertions, 28 deletions
diff --git a/gcc/config/nios2/nios2.c b/gcc/config/nios2/nios2.c
index 3bffabe..e4349e7 100644
--- a/gcc/config/nios2/nios2.c
+++ b/gcc/config/nios2/nios2.c
@@ -1186,34 +1186,6 @@ nios2_custom_check_insns (void)
break;
}
- /* Warn if the user has certain exotic operations that won't get used
- without -funsafe-math-optimizations. See expand_builtin () in
- builtins.c. */
- if (!flag_unsafe_math_optimizations)
- for (i = 0; i < ARRAY_SIZE (nios2_fpu_insn); i++)
- if (N2FPU_ENABLED_P (i) && N2FPU_UNSAFE_P (i))
- warning (0, "switch %<-mcustom-%s%> has no effect unless "
- "%<-funsafe-math-optimizations%> is specified",
- N2FPU_NAME (i));
-
- /* Warn if the user is trying to use -mcustom-fmins et. al, that won't
- get used without -ffinite-math-only. See fold_builtin_fmin_fmax ()
- in builtins.c. */
- if (!flag_finite_math_only)
- for (i = 0; i < ARRAY_SIZE (nios2_fpu_insn); i++)
- if (N2FPU_ENABLED_P (i) && N2FPU_FINITE_P (i))
- warning (0, "switch %<-mcustom-%s%> has no effect unless "
- "%<-ffinite-math-only%> is specified", N2FPU_NAME (i));
-
- /* Warn if the user is trying to use a custom rounding instruction
- that won't get used without -fno-math-errno. See
- expand_builtin_int_roundingfn_2 () in builtins.c. */
- if (flag_errno_math)
- for (i = 0; i < ARRAY_SIZE (nios2_fpu_insn); i++)
- if (N2FPU_ENABLED_P (i) && N2FPU_NO_ERRNO_P (i))
- warning (0, "switch %<-mcustom-%s%> has no effect unless "
- "%<-fno-math-errno%> is specified", N2FPU_NAME (i));
-
if (errors || custom_code_conflict)
fatal_error (input_location,
"conflicting use of %<-mcustom%> switches, target attributes, "