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