When compiling path/foo.c, we should not add -I$(scr_tree)/path to the gcc
flags. Otherwise we get different build results for in tree and out of tree
builds.

Signed-off-by: Heinrich Schuchardt <xypron.g...@gmx.de>
---
 scripts/Makefile.lib | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/scripts/Makefile.lib b/scripts/Makefile.lib
index 56e9d54242..98817084f4 100644
--- a/scripts/Makefile.lib
+++ b/scripts/Makefile.lib
@@ -136,10 +136,8 @@ __cpp_flags     = $(_cpp_flags)
 else

 # -I$(obj) locates generated .h files
-# $(call addtree,-I$(obj)) locates .h files in srctree, from generated .c files
-#   and locates generated .h files
-# FIXME: Replace both with specific CFLAGS* statements in the makefiles
-__c_flags      = $(if $(obj),$(call addtree,-I$(src)) -I$(obj)) \
+# FIXME: Replace with specific CFLAGS* statements in the makefiles
+__c_flags      = $(if $(obj), -I$(obj)) \
                  $(call flags,_c_flags)
 __a_flags      = $(call flags,_a_flags)
 __cpp_flags     = $(call flags,_cpp_flags)
--
2.28.0

Reply via email to