xref: /aosp_15_r20/external/arm-trusted-firmware/lib/compiler-rt/compiler-rt.mk (revision 54fd6939e177f8ff529b10183254802c76df6d08)
1*54fd6939SJiyong Park#
2*54fd6939SJiyong Park# Copyright (c) 2017-2019, ARM Limited and Contributors. All rights reserved.
3*54fd6939SJiyong Park#
4*54fd6939SJiyong Park# Redistribution and use in source and binary forms, with or without
5*54fd6939SJiyong Park# modification, are permitted provided that the following conditions are met:
6*54fd6939SJiyong Park#
7*54fd6939SJiyong Park# Redistributions of source code must retain the above copyright notice, this
8*54fd6939SJiyong Park# list of conditions and the following disclaimer.
9*54fd6939SJiyong Park#
10*54fd6939SJiyong Park# Redistributions in binary form must reproduce the above copyright notice,
11*54fd6939SJiyong Park# this list of conditions and the following disclaimer in the documentation
12*54fd6939SJiyong Park# and/or other materials provided with the distribution.
13*54fd6939SJiyong Park#
14*54fd6939SJiyong Park# Neither the name of ARM nor the names of its contributors may be used
15*54fd6939SJiyong Park# to endorse or promote products derived from this software without specific
16*54fd6939SJiyong Park# prior written permission.
17*54fd6939SJiyong Park#
18*54fd6939SJiyong Park# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
19*54fd6939SJiyong Park# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
20*54fd6939SJiyong Park# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
21*54fd6939SJiyong Park# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
22*54fd6939SJiyong Park# LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
23*54fd6939SJiyong Park# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
24*54fd6939SJiyong Park# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
25*54fd6939SJiyong Park# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
26*54fd6939SJiyong Park# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
27*54fd6939SJiyong Park# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
28*54fd6939SJiyong Park# POSSIBILITY OF SUCH DAMAGE.
29*54fd6939SJiyong Park#
30*54fd6939SJiyong Park
31*54fd6939SJiyong ParkCPPFLAGS += -Ilib/compiler-rt/include
32*54fd6939SJiyong Park
33*54fd6939SJiyong ParkCOMPILER_RT_SRCS	:=	lib/compiler-rt/builtins/popcountdi2.c		\
34*54fd6939SJiyong Park				lib/compiler-rt/builtins/popcountsi2.c
35*54fd6939SJiyong Park
36*54fd6939SJiyong Parkifeq (${ARCH},aarch32)
37*54fd6939SJiyong ParkCOMPILER_RT_SRCS	+=	lib/compiler-rt/builtins/arm/aeabi_ldivmod.S	\
38*54fd6939SJiyong Park				lib/compiler-rt/builtins/arm/aeabi_uldivmod.S	\
39*54fd6939SJiyong Park				lib/compiler-rt/builtins/ctzdi2.c		\
40*54fd6939SJiyong Park				lib/compiler-rt/builtins/divdi3.c		\
41*54fd6939SJiyong Park				lib/compiler-rt/builtins/divmoddi4.c		\
42*54fd6939SJiyong Park				lib/compiler-rt/builtins/lshrdi3.c		\
43*54fd6939SJiyong Park				lib/compiler-rt/builtins/udivmoddi4.c
44*54fd6939SJiyong Parkendif
45