[PATCH] drm/amd/display: Fix dcn30_optc.o unknown argument with clang
Anthony Benware
hyperkvmx86 at gmail.com
Mon Sep 21 21:53:00 UTC 2020
[Why]
Clang can't compile dcn30_optc.o with '-mpreferred-stack-boundary=4'
[How]
use '-mstack-alignment=4' if Clang is CC and '-mpreferred-stack-boundary=4'
if CC is not Clang
Signed-off-by: Anthony Benware <hyperkvmx86 at gmail.com>
---
drivers/gpu/drm/amd/display/dc/dcn30/Makefile | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/drivers/gpu/drm/amd/display/dc/dcn30/Makefile
b/drivers/gpu/drm/amd/display/dc/dcn30/Makefile
index 025637a83c3b..fcded5498393 100644
--- a/drivers/gpu/drm/amd/display/dc/dcn30/Makefile
+++ b/drivers/gpu/drm/amd/display/dc/dcn30/Makefile
@@ -31,7 +31,11 @@ DCN30 = dcn30_init.o dcn30_hubbub.o dcn30_hubp.o
dcn30_dpp.o dcn30_optc.o \
dcn30_dio_link_encoder.o dcn30_resource.o
+ifdef CONFIG_CC_IS_CLANG
+CFLAGS_$(AMDDALPATH)/dc/dcn30/dcn30_optc.o := -mhard-float -msse
-mstack-alignment=4
+else
CFLAGS_$(AMDDALPATH)/dc/dcn30/dcn30_optc.o := -mhard-float -msse
-mpreferred-stack-boundary=4
+endif
CFLAGS_$(AMDDALPATH)/dc/dcn30/dcn30_resource.o := -mhard-float -msse
ifdef CONFIG_CC_IS_GCC
--
2.28.0
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/amd-gfx/attachments/20200921/98a8ffc9/attachment.htm>
More information about the amd-gfx
mailing list