From 5dec78bb50198db55ad6597d1f43ff06f79234bc Mon Sep 17 00:00:00 2001 From: Carles Cufi Date: Mon, 29 May 2017 17:19:08 +0200 Subject: [PATCH] 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 --- Makefile | 4 +++- scripts/Makefile.lib | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index c9b115d2a53..122415e1369 100644 --- a/Makefile +++ b/Makefile @@ -27,9 +27,11 @@ UNAME := $(shell uname) ifeq (MSYS, $(findstring MSYS, $(UNAME))) DISABLE_TRYRUN=y HOST_OS=MSYS +NATIVE_PWD_OPT=-W else ifeq (MINGW, $(findstring MINGW, $(UNAME))) HOST_OS=MINGW PWD_OPT=-W +NATIVE_PWD_OPT=-W DISABLE_TRYRUN=y CPATH ?= $(MIGW_DIR)/include LIBRARY_PATH ?= $(MINGW_DIR)/lib @@ -39,7 +41,7 @@ HOST_OS=Linux else ifeq (Darwin, $(findstring Darwin, $(UNAME))) HOST_OS=Darwin endif -export HOST_OS +export HOST_OS NATIVE_PWD_OPT # Avoid funny character set dependencies unexport LC_ALL diff --git a/scripts/Makefile.lib b/scripts/Makefile.lib index 7b25349c53c..57d7f630240 100644 --- a/scripts/Makefile.lib +++ b/scripts/Makefile.lib @@ -265,7 +265,9 @@ cmd_gzip = (cat $(filter-out FORCE,$^) | gzip -n -f -9 > $@) || \ # --------------------------------------------------------------------------- DTC_OVERLAY_DIR ?= $(PROJECT_BASE) -DTC_OVERLAY_FILE = $(abspath $(DTC_OVERLAY_DIR)/$(BOARD_NAME).overlay) +# Since this goes into a file, use the native path +DTC_ABS_OVERLAY_DIR = $(shell cd $(DTC_OVERLAY_DIR) && pwd $(NATIVE_PWD_OPT)) +DTC_OVERLAY_FILE = $(DTC_ABS_OVERLAY_DIR)/$(BOARD_NAME).overlay # Generate an assembly file to wrap the output of the device tree compiler quiet_cmd_dt_S_dtb= DTB $@