config.gcc (msp430*-*-*): Enable initfini_array by default unless explicitly disabled...
authorJozef Lawrynowicz <jozef.l@mittosystems.com>
Wed, 24 Jul 2019 21:13:54 +0000 (21:13 +0000)
committerJozef Lawrynowicz <jozefl@gcc.gnu.org>
Wed, 24 Jul 2019 21:13:54 +0000 (21:13 +0000)
2019-07-24  Jozef Lawrynowicz  <jozef.l@mittosystems.com>

* config.gcc (msp430*-*-*): Enable initfini_array by default unless
explicitly disabled with --disable-initfini-array.

From-SVN: r273774

gcc/ChangeLog
gcc/config.gcc

index 8ed57edef03b58a83fe16fe5b8a23db9c19c2ecc..8afc61ded72ea97f824ebd20e64f005354cbde68 100644 (file)
@@ -1,3 +1,8 @@
+2019-07-24  Jozef Lawrynowicz  <jozef.l@mittosystems.com>
+
+       * config.gcc (msp430*-*-*): Enable initfini_array by default unless
+       explicitly disabled with --disable-initfini-array.
+
 2019-07-24  Jozef Lawrynowicz  <jozef.l@mittosystems.com>
 
        * config/msp430/msp430.h (ENDFILE_SPEC): Wrap uses of crtn*.o in
index e55c67a4248f596a2756b87f8466e594be216b11..76c0cb3674c43c909a97c92917dbaf1a447cbfb0 100644 (file)
@@ -2512,6 +2512,12 @@ msp430*-*-*)
        cxx_target_objs="msp430-c.o"
        tmake_file="${tmake_file} msp430/t-msp430"
        extra_gcc_objs="driver-msp430.o"
+       # Enable .init_array unless it has been explicitly disabled.
+       # The MSP430 EABI mandates the use of .init_array, and the Newlib CRT code
+       # since mid-2019 expects it.
+       if test x${disable_initfini_array} != xyes; then
+               gcc_cv_initfini_array=yes
+       fi
        ;;
 nds32*-*-*)
        target_cpu_default="0"