* [PATCH] drm/amdgpu/dc: don't pass -mhard-float to clang
@ 2020-05-05 14:24 Arnd Bergmann
2020-05-05 15:48 ` Nick Desaulniers
0 siblings, 1 reply; 2+ messages in thread
From: Arnd Bergmann @ 2020-05-05 14:24 UTC (permalink / raw)
To: Harry Wentland, Leo Li, Alex Deucher, Christian König,
David (ChunMing) Zhou, David Airlie, Daniel Vetter
Cc: Arnd Bergmann, Nick Desaulniers, Timothy Pearson,
Masahiro Yamada, Marc Zyngier, Bhawanpreet Lakha, Charlene Liu,
Anthony Koo, amd-gfx, dri-devel, linux-kernel, clang-built-linux
Clang does not appear to care, and instead prints a warning:
clang: warning: argument unused during compilation: '-mhard-float' [-Wunused-command-line-argument]
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
drivers/gpu/drm/amd/display/dc/calcs/Makefile | 5 +++--
drivers/gpu/drm/amd/display/dc/dcn20/Makefile | 5 +++--
drivers/gpu/drm/amd/display/dc/dcn21/Makefile | 5 +++--
drivers/gpu/drm/amd/display/dc/dml/Makefile | 5 +++--
drivers/gpu/drm/amd/display/dc/dsc/Makefile | 5 +++--
5 files changed, 15 insertions(+), 10 deletions(-)
diff --git a/drivers/gpu/drm/amd/display/dc/calcs/Makefile b/drivers/gpu/drm/amd/display/dc/calcs/Makefile
index 4674aca8f206..64195cacf6fc 100644
--- a/drivers/gpu/drm/amd/display/dc/calcs/Makefile
+++ b/drivers/gpu/drm/amd/display/dc/calcs/Makefile
@@ -26,14 +26,15 @@
#
ifdef CONFIG_X86
-calcs_ccflags := -mhard-float -msse
+calcs_ccflags := -msse
endif
ifdef CONFIG_PPC64
-calcs_ccflags := -mhard-float -maltivec
+calcs_ccflags := -maltivec
endif
ifdef CONFIG_CC_IS_GCC
+calcs_ccflags += -mhard-float
ifeq ($(call cc-ifversion, -lt, 0701, y), y)
IS_OLD_GCC = 1
endif
diff --git a/drivers/gpu/drm/amd/display/dc/dcn20/Makefile b/drivers/gpu/drm/amd/display/dc/dcn20/Makefile
index 5fcaf78334ff..0d3ce716c753 100644
--- a/drivers/gpu/drm/amd/display/dc/dcn20/Makefile
+++ b/drivers/gpu/drm/amd/display/dc/dcn20/Makefile
@@ -10,14 +10,15 @@ DCN20 = dcn20_resource.o dcn20_init.o dcn20_hwseq.o dcn20_dpp.o dcn20_dpp_cm.o d
DCN20 += dcn20_dsc.o
ifdef CONFIG_X86
-CFLAGS_$(AMDDALPATH)/dc/dcn20/dcn20_resource.o := -mhard-float -msse
+CFLAGS_$(AMDDALPATH)/dc/dcn20/dcn20_resource.o := -msse
endif
ifdef CONFIG_PPC64
-CFLAGS_$(AMDDALPATH)/dc/dcn20/dcn20_resource.o := -mhard-float -maltivec
+CFLAGS_$(AMDDALPATH)/dc/dcn20/dcn20_resource.o := -maltivec
endif
ifdef CONFIG_CC_IS_GCC
+CFLAGS_$(AMDDALPATH)/dc/dcn20/dcn20_resource.o += -mhard-float
ifeq ($(call cc-ifversion, -lt, 0701, y), y)
IS_OLD_GCC = 1
endif
diff --git a/drivers/gpu/drm/amd/display/dc/dcn21/Makefile b/drivers/gpu/drm/amd/display/dc/dcn21/Makefile
index 07684d3e375a..fd209d1cf6bb 100644
--- a/drivers/gpu/drm/amd/display/dc/dcn21/Makefile
+++ b/drivers/gpu/drm/amd/display/dc/dcn21/Makefile
@@ -6,14 +6,15 @@ DCN21 = dcn21_init.o dcn21_hubp.o dcn21_hubbub.o dcn21_resource.o \
dcn21_hwseq.o dcn21_link_encoder.o
ifdef CONFIG_X86
-CFLAGS_$(AMDDALPATH)/dc/dcn21/dcn21_resource.o := -mhard-float -msse
+CFLAGS_$(AMDDALPATH)/dc/dcn21/dcn21_resource.o := -msse
endif
ifdef CONFIG_PPC64
-CFLAGS_$(AMDDALPATH)/dc/dcn21/dcn21_resource.o := -mhard-float -maltivec
+CFLAGS_$(AMDDALPATH)/dc/dcn21/dcn21_resource.o := -maltivec
endif
ifdef CONFIG_CC_IS_GCC
+CFLAGS_$(AMDDALPATH)/dc/dcn21/dcn21_resource.o += -mhard-float
ifeq ($(call cc-ifversion, -lt, 0701, y), y)
IS_OLD_GCC = 1
endif
diff --git a/drivers/gpu/drm/amd/display/dc/dml/Makefile b/drivers/gpu/drm/amd/display/dc/dml/Makefile
index 7ee8b8460a9b..fb74e79e15a2 100644
--- a/drivers/gpu/drm/amd/display/dc/dml/Makefile
+++ b/drivers/gpu/drm/amd/display/dc/dml/Makefile
@@ -26,14 +26,15 @@
# subcomponents.
ifdef CONFIG_X86
-dml_ccflags := -mhard-float -msse
+dml_ccflags := -msse
endif
ifdef CONFIG_PPC64
-dml_ccflags := -mhard-float -maltivec
+dml_ccflags := -maltivec
endif
ifdef CONFIG_CC_IS_GCC
+dml_ccflags += -mhard-float
ifeq ($(call cc-ifversion, -lt, 0701, y), y)
IS_OLD_GCC = 1
endif
diff --git a/drivers/gpu/drm/amd/display/dc/dsc/Makefile b/drivers/gpu/drm/amd/display/dc/dsc/Makefile
index 3f66868df171..b0077f5c318d 100644
--- a/drivers/gpu/drm/amd/display/dc/dsc/Makefile
+++ b/drivers/gpu/drm/amd/display/dc/dsc/Makefile
@@ -3,14 +3,15 @@
# Makefile for the 'dsc' sub-component of DAL.
ifdef CONFIG_X86
-dsc_ccflags := -mhard-float -msse
+dsc_ccflags := -msse
endif
ifdef CONFIG_PPC64
-dsc_ccflags := -mhard-float -maltivec
+dsc_ccflags := -maltivec
endif
ifdef CONFIG_CC_IS_GCC
+dsc_ccflags += -mhard-float
ifeq ($(call cc-ifversion, -lt, 0701, y), y)
IS_OLD_GCC = 1
endif
--
2.26.0
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] drm/amdgpu/dc: don't pass -mhard-float to clang
2020-05-05 14:24 [PATCH] drm/amdgpu/dc: don't pass -mhard-float to clang Arnd Bergmann
@ 2020-05-05 15:48 ` Nick Desaulniers
0 siblings, 0 replies; 2+ messages in thread
From: Nick Desaulniers @ 2020-05-05 15:48 UTC (permalink / raw)
To: Arnd Bergmann
Cc: Harry Wentland, Leo Li, Alex Deucher, Christian König,
David (ChunMing) Zhou, David Airlie, Daniel Vetter,
Timothy Pearson, Masahiro Yamada, Marc Zyngier,
Bhawanpreet Lakha, Charlene Liu, Anthony Koo, amd-gfx list,
dri-devel, LKML, clang-built-linux
On Tue, May 5, 2020 at 7:25 AM Arnd Bergmann <arnd@arndb.de> wrote:
>
> Clang does not appear to care, and instead prints a warning:
>
> clang: warning: argument unused during compilation: '-mhard-float' [-Wunused-command-line-argument]
>
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
I want to be super careful here, this part of the build has been super
tricky in the past. Just noting before this potentially gets merged
without any testing; we should verify the generated code does not
change with Clang. In the past, this code compiled but would GPF
sometimes when called into via userspace (see my previous commits
here).
> ---
> drivers/gpu/drm/amd/display/dc/calcs/Makefile | 5 +++--
> drivers/gpu/drm/amd/display/dc/dcn20/Makefile | 5 +++--
> drivers/gpu/drm/amd/display/dc/dcn21/Makefile | 5 +++--
> drivers/gpu/drm/amd/display/dc/dml/Makefile | 5 +++--
> drivers/gpu/drm/amd/display/dc/dsc/Makefile | 5 +++--
> 5 files changed, 15 insertions(+), 10 deletions(-)
>
> diff --git a/drivers/gpu/drm/amd/display/dc/calcs/Makefile b/drivers/gpu/drm/amd/display/dc/calcs/Makefile
> index 4674aca8f206..64195cacf6fc 100644
> --- a/drivers/gpu/drm/amd/display/dc/calcs/Makefile
> +++ b/drivers/gpu/drm/amd/display/dc/calcs/Makefile
> @@ -26,14 +26,15 @@
> #
>
> ifdef CONFIG_X86
> -calcs_ccflags := -mhard-float -msse
> +calcs_ccflags := -msse
> endif
>
> ifdef CONFIG_PPC64
> -calcs_ccflags := -mhard-float -maltivec
> +calcs_ccflags := -maltivec
> endif
>
> ifdef CONFIG_CC_IS_GCC
> +calcs_ccflags += -mhard-float
> ifeq ($(call cc-ifversion, -lt, 0701, y), y)
> IS_OLD_GCC = 1
> endif
> diff --git a/drivers/gpu/drm/amd/display/dc/dcn20/Makefile b/drivers/gpu/drm/amd/display/dc/dcn20/Makefile
> index 5fcaf78334ff..0d3ce716c753 100644
> --- a/drivers/gpu/drm/amd/display/dc/dcn20/Makefile
> +++ b/drivers/gpu/drm/amd/display/dc/dcn20/Makefile
> @@ -10,14 +10,15 @@ DCN20 = dcn20_resource.o dcn20_init.o dcn20_hwseq.o dcn20_dpp.o dcn20_dpp_cm.o d
> DCN20 += dcn20_dsc.o
>
> ifdef CONFIG_X86
> -CFLAGS_$(AMDDALPATH)/dc/dcn20/dcn20_resource.o := -mhard-float -msse
> +CFLAGS_$(AMDDALPATH)/dc/dcn20/dcn20_resource.o := -msse
> endif
>
> ifdef CONFIG_PPC64
> -CFLAGS_$(AMDDALPATH)/dc/dcn20/dcn20_resource.o := -mhard-float -maltivec
> +CFLAGS_$(AMDDALPATH)/dc/dcn20/dcn20_resource.o := -maltivec
> endif
>
> ifdef CONFIG_CC_IS_GCC
> +CFLAGS_$(AMDDALPATH)/dc/dcn20/dcn20_resource.o += -mhard-float
> ifeq ($(call cc-ifversion, -lt, 0701, y), y)
> IS_OLD_GCC = 1
> endif
> diff --git a/drivers/gpu/drm/amd/display/dc/dcn21/Makefile b/drivers/gpu/drm/amd/display/dc/dcn21/Makefile
> index 07684d3e375a..fd209d1cf6bb 100644
> --- a/drivers/gpu/drm/amd/display/dc/dcn21/Makefile
> +++ b/drivers/gpu/drm/amd/display/dc/dcn21/Makefile
> @@ -6,14 +6,15 @@ DCN21 = dcn21_init.o dcn21_hubp.o dcn21_hubbub.o dcn21_resource.o \
> dcn21_hwseq.o dcn21_link_encoder.o
>
> ifdef CONFIG_X86
> -CFLAGS_$(AMDDALPATH)/dc/dcn21/dcn21_resource.o := -mhard-float -msse
> +CFLAGS_$(AMDDALPATH)/dc/dcn21/dcn21_resource.o := -msse
> endif
>
> ifdef CONFIG_PPC64
> -CFLAGS_$(AMDDALPATH)/dc/dcn21/dcn21_resource.o := -mhard-float -maltivec
> +CFLAGS_$(AMDDALPATH)/dc/dcn21/dcn21_resource.o := -maltivec
> endif
>
> ifdef CONFIG_CC_IS_GCC
> +CFLAGS_$(AMDDALPATH)/dc/dcn21/dcn21_resource.o += -mhard-float
> ifeq ($(call cc-ifversion, -lt, 0701, y), y)
> IS_OLD_GCC = 1
> endif
> diff --git a/drivers/gpu/drm/amd/display/dc/dml/Makefile b/drivers/gpu/drm/amd/display/dc/dml/Makefile
> index 7ee8b8460a9b..fb74e79e15a2 100644
> --- a/drivers/gpu/drm/amd/display/dc/dml/Makefile
> +++ b/drivers/gpu/drm/amd/display/dc/dml/Makefile
> @@ -26,14 +26,15 @@
> # subcomponents.
>
> ifdef CONFIG_X86
> -dml_ccflags := -mhard-float -msse
> +dml_ccflags := -msse
> endif
>
> ifdef CONFIG_PPC64
> -dml_ccflags := -mhard-float -maltivec
> +dml_ccflags := -maltivec
> endif
>
> ifdef CONFIG_CC_IS_GCC
> +dml_ccflags += -mhard-float
> ifeq ($(call cc-ifversion, -lt, 0701, y), y)
> IS_OLD_GCC = 1
> endif
> diff --git a/drivers/gpu/drm/amd/display/dc/dsc/Makefile b/drivers/gpu/drm/amd/display/dc/dsc/Makefile
> index 3f66868df171..b0077f5c318d 100644
> --- a/drivers/gpu/drm/amd/display/dc/dsc/Makefile
> +++ b/drivers/gpu/drm/amd/display/dc/dsc/Makefile
> @@ -3,14 +3,15 @@
> # Makefile for the 'dsc' sub-component of DAL.
>
> ifdef CONFIG_X86
> -dsc_ccflags := -mhard-float -msse
> +dsc_ccflags := -msse
> endif
>
> ifdef CONFIG_PPC64
> -dsc_ccflags := -mhard-float -maltivec
> +dsc_ccflags := -maltivec
> endif
>
> ifdef CONFIG_CC_IS_GCC
> +dsc_ccflags += -mhard-float
> ifeq ($(call cc-ifversion, -lt, 0701, y), y)
> IS_OLD_GCC = 1
> endif
> --
> 2.26.0
>
--
Thanks,
~Nick Desaulniers
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2020-05-05 15:48 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-05-05 14:24 [PATCH] drm/amdgpu/dc: don't pass -mhard-float to clang Arnd Bergmann
2020-05-05 15:48 ` Nick Desaulniers
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).