aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/amd/display/dc/calcs/Makefile
diff options
context:
space:
mode:
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>2019-11-11 06:23:37 +0100
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2019-11-11 06:23:37 +0100
commitf0cb9b5dfd1a6014349354e63768500a860cad53 (patch)
treeb18478292c622b7cfbc4f49dc52e1f3816ac1b99 /drivers/gpu/drm/amd/display/dc/calcs/Makefile
parentstaging: vchiq: Have vchiu_queue_init() return 0 on success. (diff)
parentLinux 5.4-rc7 (diff)
downloadlinux-dev-f0cb9b5dfd1a6014349354e63768500a860cad53.tar.xz
linux-dev-f0cb9b5dfd1a6014349354e63768500a860cad53.zip
Merge 5.4-rc7 into staging-next
We want the staging fixes in here, and it resolves some merge issues. Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/gpu/drm/amd/display/dc/calcs/Makefile')
-rw-r--r--drivers/gpu/drm/amd/display/dc/calcs/Makefile19
1 files changed, 12 insertions, 7 deletions
diff --git a/drivers/gpu/drm/amd/display/dc/calcs/Makefile b/drivers/gpu/drm/amd/display/dc/calcs/Makefile
index 985633c08a26..26c6d735cdc7 100644
--- a/drivers/gpu/drm/amd/display/dc/calcs/Makefile
+++ b/drivers/gpu/drm/amd/display/dc/calcs/Makefile
@@ -24,15 +24,20 @@
# It calculates Bandwidth and Watermarks values for HW programming
#
-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
+calcs_ccflags := -mhard-float -msse
-calcs_ccflags := -mhard-float -msse $(cc_stack_align)
+ifdef CONFIG_CC_IS_GCC
+ifeq ($(call cc-ifversion, -lt, 0701, y), y)
+IS_OLD_GCC = 1
+endif
+endif
-ifdef CONFIG_CC_IS_CLANG
+ifdef IS_OLD_GCC
+# Stack alignment mismatch, proceed with caution.
+# GCC < 7.1 cannot compile code using `double` and -mpreferred-stack-boundary=3
+# (8B stack alignment).
+calcs_ccflags += -mpreferred-stack-boundary=4
+else
calcs_ccflags += -msse2
endif