+2017-01-17 Joe Seymour <joe.s@somniumtech.com>
+
+ * gcc.target/msp430/mul_f5_muldef.c: New test.
+
2017-01-17 Michael Meissner <meissner@linux.vnet.ibm.com>
PR target/79004
--- /dev/null
+/* { dg-do link } */
+/* { dg-options "-mhwmult=f5series" } */
+
+/* This program used to result in a multiple definition error:
+
+libmul_f5.a(lib2hw_mul_f5.o): In function `__mulhi2_f5':
+(.text.__mulhi2_f5+0x0): multiple definition of `__mspabi_mpyi'
+libgcc.a(mpy.o):mpy.c:(.text.__mulhi3+0x0): first defined here */
+
+#include <stdio.h>
+
+int main (void)
+{
+ printf ("%d", 430);
+}
$(srcdir)/config/msp430/lib2mul.c \
$(srcdir)/config/msp430/lib2shift.c \
$(srcdir)/config/msp430/epilogue.S \
- $(srcdir)/config/msp430/mpy.c \
$(srcdir)/config/msp430/slli.S \
$(srcdir)/config/msp430/srai.S \
$(srcdir)/config/msp430/srli.S \
HOST_LIBGCC2_CFLAGS += -Os -ffunction-sections -fdata-sections -mhwmult=none
+mpy.o: $(srcdir)/config/msp430/mpy.c
+ $(gcc_compile) $< -c
+
lib2_mul_none.o: $(srcdir)/config/msp430/lib2mul.c
$(gcc_compile) $< -c -DMUL_NONE
lib2hw_mul_f5.o: $(srcdir)/config/msp430/lib2hw_mul.S
$(gcc_compile) $< -c -DMUL_F5
-libmul_none.a: lib2_mul_none.o
+libmul_none.a: lib2_mul_none.o mpy.o
$(AR_CREATE_FOR_TARGET) $@ $(filter %.o,$^)
libmul_16.a: lib2hw_mul_16.o lib2_mul_16bit.o