[NDS32] Disable -fdelete-null-pointer-checks by default for nds32*-*-elf.
authorChung-Ju Wu <jasonwucj@gmail.com>
Sun, 3 Jun 2018 03:17:40 +0000 (03:17 +0000)
committerChung-Ju Wu <jasonwucj@gcc.gnu.org>
Sun, 3 Jun 2018 03:17:40 +0000 (03:17 +0000)
gcc/
* common/config/nds32/nds32-common.c (nds32_option_optimization_table):
Disable -fdelete-null-pointer-checks for ELF toolchain.

From-SVN: r261122

gcc/ChangeLog
gcc/common/config/nds32/nds32-common.c

index 0e6eef7..18f539d 100644 (file)
@@ -1,3 +1,8 @@
+2018-06-03  Chung-Ju Wu  <jasonwucj@gmail.com>
+
+       * common/config/nds32/nds32-common.c (nds32_option_optimization_table):
+       Disable -fdelete-null-pointer-checks for ELF toolchain.
+
 2018-06-02  Chung-Ju Wu  <jasonwucj@gmail.com>
            Kito Cheng  <kito.cheng@gmail.com>
 
index e4478f1..197f06c 100644 (file)
@@ -74,6 +74,11 @@ nds32_handle_option (struct gcc_options *opts ATTRIBUTE_UNUSED,
 /* Implement TARGET_OPTION_OPTIMIZATION_TABLE.  */
 static const struct default_options nds32_option_optimization_table[] =
 {
+#if TARGET_LINUX_ABI == 0
+  /* Disable -fdelete-null-pointer-checks by default in ELF toolchain.  */
+  { OPT_LEVELS_ALL,               OPT_fdelete_null_pointer_checks,
+                                                          NULL, 0 },
+#endif
   /* Enable -fsched-pressure by default at -O1 and above.  */
   { OPT_LEVELS_1_PLUS,            OPT_fsched_pressure,     NULL, 1 },
   /* Enable -fomit-frame-pointer by default at all optimization levels.  */