Skip to content

Commit c0e70e1

Browse files
arndbalexdeucher
authored andcommitted
drm/amd/display: fix dcn21 Makefile for clang
Just like all the other variants, this one passes invalid compile-time options with clang after the new code got merged: clang: error: unknown argument: '-mpreferred-stack-boundary=4' scripts/Makefile.build:265: recipe for target 'drivers/gpu/drm/amd/amdgpu/../display/dc/dcn21/dcn21_resource.o' failed Use the same variant that we have for dcn20 to fix compilation. Fixes: eced51f ("drm/amd/display: Add hubp block for Renoir (v2)") Signed-off-by: Arnd Bergmann <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
1 parent 148d31e commit c0e70e1

File tree

1 file changed

+11
-1
lines changed
  • drivers/gpu/drm/amd/display/dc/dcn21

1 file changed

+11
-1
lines changed

drivers/gpu/drm/amd/display/dc/dcn21/Makefile

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,17 @@
33

44
DCN21 = dcn21_hubp.o dcn21_hubbub.o dcn21_resource.o
55

6-
CFLAGS_$(AMDDALPATH)/dc/dcn21/dcn21_resource.o := -mhard-float -msse -mpreferred-stack-boundary=4
6+
ifneq ($(call cc-option, -mpreferred-stack-boundary=4),)
7+
cc_stack_align := -mpreferred-stack-boundary=4
8+
else ifneq ($(call cc-option, -mstack-alignment=16),)
9+
cc_stack_align := -mstack-alignment=16
10+
endif
11+
12+
CFLAGS_$(AMDDALPATH)/dc/dcn21/dcn21_resource.o := -mhard-float -msse $(cc_stack_align)
13+
14+
ifdef CONFIG_CC_IS_CLANG
15+
CFLAGS_$(AMDDALPATH)/dc/dcn21/dcn21_resource.o += -msse2
16+
endif
717

818
AMD_DAL_DCN21 = $(addprefix $(AMDDALPATH)/dc/dcn21/,$(DCN21))
919

0 commit comments

Comments
 (0)