drm/amd/display: fix dml-wrapper file discovery for out-of-tree builds
Subsystems (3)
PATCH 1/1 drm/amd/display: fix dml-wrapper file discovery for out-of-tree builds
Anchor the object search to the DML wrapper top-level Makefile directory. This allows source files in subdirectories to be properly discovered and compiled with the required FPU CFLAGS, fixing SSE compilation errors.
Signed-off-by Prike Liang <[email protected]>
--- drivers/gpu/drm/amd/display/dc/dml2_wrapper/Makefile | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-)
drivers/gpu/drm/amd/display/dc/dml2_wrapper/Makefile +3 -2
@@ -32,8 +32,9 @@ subdir-ccflags-y += -I$(FULL_AMD_DISPLAY_PATH)/dc/dml2_wrapper/dml21_wrapper # Add FPU flags to all dml2_wrapper files by default, remove NO_FPU flags. # FPU flags step 1: Find all .c files in dal/dc/dml2_wrapper and it's subfolders -DML2_WRAPPER_ABS_PATH := $(FULL_AMD_DISPLAY_PATH)/dc/dml2_wrapper -DML2_WRAPPER_C_FILES := $(shell find $(DML2_WRAPPER_ABS_PATH) -name '*.c' -type f) +THIS_MAKEFILE_PATH := $(abspath $(lastword $(MAKEFILE_LIST))) +DML2_WRAPPER_ABS_PATH := $(patsubst %/,%,$(dir $(THIS_MAKEFILE_PATH))) +DML2_WRAPPER_C_FILES := $(shell find $(DML2_WRAPPER_ABS_PATH) -name '*.c') # FPU flags step 2: Convert to .o and make paths relative to $(AMDDALPATH)/dc/dml2_wrapper/ DML2_WRAPPER_RELATIVE_O_FILES := $(patsubst $(DML2_WRAPPER_ABS_PATH)/%,dc/dml2_wrapper/%,$(patsubst %.c,%.o,$(DML2_WRAPPER_C_FILES)))
Signature · 1 line
2.34.1
Quoted 5 lines · Prike Liang
Anchor the object search to the DML wrapper top-level
Makefiledirectory. This allows source files in subdirectories to be properly discovered and compiled with the required FPU CFLAGS, fixing SSE compilation errors.Signed-off-by Prike Liang <[email protected]>
Reviewed-by Leo Li <[email protected]>
Thanks!
Quoted 20 lines
--- drivers/gpu/drm/amd/display/dc/dml2_wrapper/Makefile | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-)drivers/gpu/drm/amd/display/dc/dml2_wrapper/Makefile +3
-2@@ -32,8 +32,9 @@ subdir-ccflags-y += -I$(FULL_AMD_DISPLAY_PATH)/dc/dml2_wrapper/dml21_wrapper # Add FPU flags to all dml2_wrapper files by default, remove NO_FPU flags. # FPU flags step 1: Find all .c files in dal/dc/dml2_wrapper and it's subfolders -DML2_WRAPPER_ABS_PATH := $(FULL_AMD_DISPLAY_PATH)/dc/dml2_wrapper -DML2_WRAPPER_C_FILES := $(shell find $(DML2_WRAPPER_ABS_PATH) -name '*.c' -type f) +THIS_MAKEFILE_PATH := $(abspath $(lastword $(MAKEFILE_LIST))) +DML2_WRAPPER_ABS_PATH := $(patsubst %/,%,$(dir $(THIS_MAKEFILE_PATH))) +DML2_WRAPPER_C_FILES := $(shell find $(DML2_WRAPPER_ABS_PATH) -name '*.c') # FPU flags step 2: Convert to .o and make paths relative to $(AMDDALPATH)/dc/dml2_wrapper/ DML2_WRAPPER_RELATIVE_O_FILES := $(patsubst $(DML2_WRAPPER_ABS_PATH)/%,dc/dml2_wrapper/%,$(patsubst %.c,%.o,$(DML2_WRAPPER_C_FILES)))