1 1.1 mrg # Makefile fragment for building LIBGCC for the TI MSP430 processor. 2 1.7 mrg # Copyright (C) 2011-2022 Free Software Foundation, Inc. 3 1.1 mrg # Contributed by Red Hat. 4 1.1 mrg # 5 1.1 mrg # This file is part of GCC. 6 1.1 mrg # 7 1.1 mrg # GCC is free software; you can redistribute it and/or modify it 8 1.1 mrg # under the terms of the GNU General Public License as published 9 1.1 mrg # by the Free Software Foundation; either version 3, or (at your 10 1.1 mrg # option) any later version. 11 1.1 mrg # 12 1.1 mrg # GCC is distributed in the hope that it will be useful, but 13 1.1 mrg # WITHOUT ANY WARRANTY; without even the implied warranty of 14 1.1 mrg # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See 15 1.1 mrg # the GNU General Public License for more details. 16 1.1 mrg # 17 1.1 mrg # You should have received a copy of the GNU General Public 18 1.1 mrg # License along with GCC; see the file COPYING3. If not see 19 1.1 mrg # <http://www.gnu.org/licenses/>. 20 1.1 mrg 21 1.1 mrg # Note - we have separate versions of the lib2div<mode> files 22 1.1 mrg # as the functions are quite large and we do not want to pull 23 1.1 mrg # in unneeded division routines. 24 1.1 mrg 25 1.1 mrg LIB2ADD = \ 26 1.1 mrg $(srcdir)/config/msp430/lib2divQI.c \ 27 1.1 mrg $(srcdir)/config/msp430/lib2divHI.c \ 28 1.1 mrg $(srcdir)/config/msp430/lib2divSI.c \ 29 1.1 mrg $(srcdir)/config/msp430/lib2bitcountHI.c \ 30 1.1 mrg $(srcdir)/config/msp430/lib2mul.c \ 31 1.1 mrg $(srcdir)/config/msp430/lib2shift.c \ 32 1.1 mrg $(srcdir)/config/msp430/epilogue.S \ 33 1.1 mrg $(srcdir)/config/msp430/slli.S \ 34 1.1 mrg $(srcdir)/config/msp430/srai.S \ 35 1.1 mrg $(srcdir)/config/msp430/srli.S \ 36 1.1 mrg $(srcdir)/config/msp430/cmpsi2.S \ 37 1.1 mrg $(srcdir)/config/msp430/floatunhisf.c \ 38 1.1 mrg $(srcdir)/config/msp430/floatunhidf.c \ 39 1.1 mrg $(srcdir)/config/msp430/floathidf.c \ 40 1.1 mrg $(srcdir)/config/msp430/floathisf.c \ 41 1.1 mrg $(srcdir)/config/msp430/cmpd.c 42 1.1 mrg 43 1.7 mrg # 32-bit and F5series hardware multiply have their own version of this function. 44 1.7 mrg # To handle the case when there is no hardware multiply or only 16-bit hardware 45 1.7 mrg # multiply, the libgcc version has been copied to lib2mul.c. 46 1.7 mrg LIB2FUNCS_EXCLUDE += _muldi3 47 1.7 mrg 48 1.1 mrg HOST_LIBGCC2_CFLAGS += -Os -ffunction-sections -fdata-sections -mhwmult=none 49 1.1 mrg 50 1.6 mrg crtbegin_no_eh.o: $(srcdir)/crtstuff.c 51 1.6 mrg $(crt_compile) -U__LIBGCC_EH_FRAME_SECTION_NAME__ -c $< -DCRT_BEGIN 52 1.6 mrg 53 1.6 mrg crtend_no_eh.o: $(srcdir)/crtstuff.c 54 1.6 mrg $(crt_compile) -U__LIBGCC_EH_FRAME_SECTION_NAME__ -c $< -DCRT_END 55 1.6 mrg 56 1.3 mrg mpy.o: $(srcdir)/config/msp430/mpy.c 57 1.3 mrg $(gcc_compile) $< -c 58 1.3 mrg 59 1.3 mrg lib2_mul_none.o: $(srcdir)/config/msp430/lib2mul.c 60 1.3 mrg $(gcc_compile) $< -c -DMUL_NONE 61 1.3 mrg 62 1.3 mrg lib2_mul_16bit.o: $(srcdir)/config/msp430/lib2mul.c 63 1.3 mrg $(gcc_compile) $< -c -DMUL_16 64 1.3 mrg 65 1.3 mrg lib2hw_mul_16.o: $(srcdir)/config/msp430/lib2hw_mul.S 66 1.3 mrg $(gcc_compile) $< -c -DMUL_16 67 1.3 mrg 68 1.3 mrg lib2hw_mul_32.o: $(srcdir)/config/msp430/lib2hw_mul.S 69 1.3 mrg $(gcc_compile) $< -c -DMUL_32 70 1.3 mrg 71 1.3 mrg lib2hw_mul_f5.o: $(srcdir)/config/msp430/lib2hw_mul.S 72 1.3 mrg $(gcc_compile) $< -c -DMUL_F5 73 1.3 mrg 74 1.3 mrg libmul_none.a: lib2_mul_none.o mpy.o 75 1.3 mrg $(AR_CREATE_FOR_TARGET) $@ $(filter %.o,$^) 76 1.3 mrg 77 1.3 mrg libmul_16.a: lib2hw_mul_16.o lib2_mul_16bit.o 78 1.3 mrg $(AR_CREATE_FOR_TARGET) $@ $(filter %.o,$^) 79 1.3 mrg 80 1.3 mrg libmul_32.a: lib2hw_mul_32.o 81 1.3 mrg $(AR_CREATE_FOR_TARGET) $@ $(filter %.o,$^) 82 1.3 mrg 83 1.3 mrg libmul_f5.a: lib2hw_mul_f5.o 84 1.3 mrg $(AR_CREATE_FOR_TARGET) $@ $(filter %.o,$^) 85 1.3 mrg 86 1.1 mrg # Local Variables: 87 1.1 mrg # mode: Makefile 88 1.1 mrg # End: 89