1# SPDX-License-Identifier: MIT
2#
3# Makefile for the 'dsc' sub-component of DAL.
4
5ifdef CONFIG_X86
6dsc_ccflags := -mhard-float -msse
7endif
8
9ifdef CONFIG_PPC64
10dsc_ccflags := -mhard-float -maltivec
11endif
12
13ifdef CONFIG_CC_IS_GCC
14ifeq ($(call cc-ifversion, -lt, 0701, y), y)
15IS_OLD_GCC = 1
16endif
17endif
18
19ifdef CONFIG_X86
20ifdef IS_OLD_GCC
21# Stack alignment mismatch, proceed with caution.
22# GCC < 7.1 cannot compile code using `double` and -mpreferred-stack-boundary=3
23# (8B stack alignment).
24dsc_ccflags += -mpreferred-stack-boundary=4
25else
26dsc_ccflags += -msse2
27endif
28endif
29
30CFLAGS_$(AMDDALPATH)/dc/dsc/rc_calc.o := $(dsc_ccflags)
31
32DSC = dc_dsc.o rc_calc.o rc_calc_dpi.o
33
34AMD_DAL_DSC = $(addprefix $(AMDDALPATH)/dc/dsc/,$(DSC))
35
36AMD_DISPLAY_FILES += $(AMD_DAL_DSC)
37