diff --git a/drivers/gpu/drm/amd/display/dc/dml/Makefile b/drivers/gpu/drm/amd/display/dc/dml/Makefile index dca6ea7fc02be31f4fd7d8e74e6eb235b0eb09a3..0271043cf6a267710ca9bb11eb448fb3fa0be5f8 100644 --- a/drivers/gpu/drm/amd/display/dc/dml/Makefile +++ b/drivers/gpu/drm/amd/display/dc/dml/Makefile @@ -24,7 +24,13 @@ # It provides the general basic services required by other DAL # subcomponents. -dml_ccflags := -mhard-float -msse -mpreferred-stack-boundary=4 +ifneq ($(call cc-option, -mpreferred-stack-boundary=4),) + cc_stack_align := -mpreferred-stack-boundary=4 +else ifneq ($(call cc-option, -mstack-alignment=16),) + cc_stack_align := -mstack-alignment=16 +endif + +dml_ccflags := -mhard-float -msse $(cc_stack_align) CFLAGS_display_mode_vba.o := $(dml_ccflags) CFLAGS_display_mode_lib.o := $(dml_ccflags)