Skip to content

Commit a4a9890

Browse files
carlescufiAnas Nashif
authored andcommitted
build: Fix DTC overlay file paths on MSYS2
On MSYS2, the #include paths for GCC need to be in native format (Windows-style paths) since GCC is a native Windows application and therefore requires standard paths. Signed-off-by: Carles Cufi <[email protected]>
1 parent d3c6f0f commit a4a9890

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

Makefile

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,9 +27,11 @@ UNAME := $(shell uname)
2727
ifeq (MSYS, $(findstring MSYS, $(UNAME)))
2828
DISABLE_TRYRUN=y
2929
HOST_OS=MSYS
30+
NATIVE_PWD_OPT=-W
3031
else ifeq (MINGW, $(findstring MINGW, $(UNAME)))
3132
HOST_OS=MINGW
3233
PWD_OPT=-W
34+
NATIVE_PWD_OPT=-W
3335
DISABLE_TRYRUN=y
3436
CPATH ?= $(MIGW_DIR)/include
3537
LIBRARY_PATH ?= $(MINGW_DIR)/lib
@@ -39,7 +41,7 @@ HOST_OS=Linux
3941
else ifeq (Darwin, $(findstring Darwin, $(UNAME)))
4042
HOST_OS=Darwin
4143
endif
42-
export HOST_OS
44+
export HOST_OS NATIVE_PWD_OPT
4345

4446
# Avoid funny character set dependencies
4547
unexport LC_ALL

scripts/Makefile.lib

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -265,7 +265,9 @@ cmd_gzip = (cat $(filter-out FORCE,$^) | gzip -n -f -9 > $@) || \
265265
# ---------------------------------------------------------------------------
266266

267267
DTC_OVERLAY_DIR ?= $(PROJECT_BASE)
268-
DTC_OVERLAY_FILE = $(abspath $(DTC_OVERLAY_DIR)/$(BOARD_NAME).overlay)
268+
# Since this goes into a file, use the native path
269+
DTC_ABS_OVERLAY_DIR = $(shell cd $(DTC_OVERLAY_DIR) && pwd $(NATIVE_PWD_OPT))
270+
DTC_OVERLAY_FILE = $(DTC_ABS_OVERLAY_DIR)/$(BOARD_NAME).overlay
269271

270272
# Generate an assembly file to wrap the output of the device tree compiler
271273
quiet_cmd_dt_S_dtb= DTB $@

0 commit comments

Comments
 (0)