mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Sascha Hauer <s.hauer@pengutronix.de>
To: Barebox List <barebox@lists.infradead.org>
Subject: [PATCH] build: Include dts/include/ after include/
Date: Fri, 28 Jan 2022 15:32:12 +0100	[thread overview]
Message-ID: <20220128143212.3950286-1-s.hauer@pengutronix.de> (raw)

dts/include/ contains Kernel upstream dt-binding include files. includes
are searched for in this directory before our own include directories
are used. This becomes a problem when we have files existing in the
barebox include directory which then appear in dts/include/ due to a dts
update. Make sure that we still use the barebox files in this case so
that we can later drop the barebox custom file explicitly along with the
fixes that might be needed to use the upstream file.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
---
 Makefile             | 3 ++-
 scripts/Makefile.lib | 2 +-
 2 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/Makefile b/Makefile
index 3125d62811..a79773513b 100644
--- a/Makefile
+++ b/Makefile
@@ -431,8 +431,9 @@ USERINCLUDE    := \
 
 # Use LINUXINCLUDE when you must reference the include/ directory.
 # Needed to be compatible with the O= option
-LINUXINCLUDE    := -Iinclude -I$(srctree)/dts/include \
+LINUXINCLUDE    := -Iinclude \
                    $(if $(building_out_of_srctree), -I$(srctree)/include) \
+                   -I$(srctree)/dts/include \
 		   -I$(srctree)/arch/$(SRCARCH)/include \
 		   -I$(objtree)/arch/$(SRCARCH)/include \
 		   $(USERINCLUDE)
diff --git a/scripts/Makefile.lib b/scripts/Makefile.lib
index 13b1789c01..b5ff621b07 100644
--- a/scripts/Makefile.lib
+++ b/scripts/Makefile.lib
@@ -203,8 +203,8 @@ ld_flags       = $(KBUILD_LDFLAGS) $(ldflags-y)
 dtc_cpp_flags  = -Wp,-MD,$(depfile).pre -nostdinc                        \
 		 -Wp,-MT,$(basename $(notdir $@)).o                      \
 		 -I$(srctree)/arch/$(SRCARCH)/dts/include		 \
-		 -I$(srctree)/dts/include                                \
 		 -I$(srctree)/include                                    \
+		 -I$(srctree)/dts/include                                \
 		 -I$(srctree)/dts/src/                                   \
 		 $(DTC_CPP_FLAGS_$(basetarget).dtb)                      \
 		 -undef -D__DTS__
-- 
2.30.2


_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox


                 reply	other threads:[~2022-01-28 14:34 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20220128143212.3950286-1-s.hauer@pengutronix.de \
    --to=s.hauer@pengutronix.de \
    --cc=barebox@lists.infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox