Makefile: consistent include path for out of tree build
PATCH 1/1 Makefile: consistent include path for out of tree build
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.
--- scripts/Makefile.lib | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-)
scripts/Makefile.lib +2 -4
@@ -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
PATCH 1/1 Makefile: consistent include path for out of tree build
Quoted 16 lines · Heinrich Schuchardt
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 <[email protected]>--- scripts/Makefile.lib | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-)scripts/Makefile.lib +0
-0@@ -136,10 +136,8 @@ __cpp_flags = $(_cpp_flags) else
scripts/Makefile.lib __cpp_flags = $(_cpp_flags) · line 143
Quoted 10 lines
scripts/Makefile.lib +2
-4# -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)
As this will make future re-syncs with the Kbuild system harder, NAK.
I would suggest making this problem show up in the Linux kernel, get it addressed there, and then backport. Or, if it can't be and it's just another problem related to our last sync being on v4.19, help syncing up with v4.20 and so forth would be greatly appreciated.
Signature · 8 lines
Tom -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 659 bytes Desc: not available URL: <https://lists.denx.de/pipermail/u-boot/attachments/20201017/8426df82/attachment.sig>
PATCH 1/1 Makefile: consistent include path for out of tree build
Quoted 31 lines · Tom Rini
Quoted 16 lines · Heinrich Schuchardt
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 <[email protected]>--- scripts/Makefile.lib | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-)scripts/Makefile.lib +0
-0@@ -136,10 +136,8 @@ __cpp_flags = $(_cpp_flags) elsescripts/Makefile.lib __cpp_flags = $(_cpp_flags) · line 143
Quoted 10 lines
scripts/Makefile.lib +2
-4# -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)As this will make future re-syncs with the
Kbuildsystem harder, NAK.
Quoted 5 lines
I would suggest making this problem show up in the Linux kernel, get it addressed there, and then backport. Or, if it can't be and it's just another problem related to our last sync being on v4.19, help syncing up with v4.20 and so forth would be greatly appreciated.
v4.20 does not even exist as maintained release. Current Linux stable is v5.9.
addtree() does not exist in scripts/Makefile.lib of Linux next-20201016. So I would not expect the kernel people to fix our outdated script.
Best regards
Heinrich
PATCH 1/1 Makefile: consistent include path for out of tree build
Quoted 32 lines · Heinrich Schuchardt
Quoted 31 lines · Tom Rini
Quoted 16 lines · Heinrich Schuchardt
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 <[email protected]>--- scripts/Makefile.lib | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-)scripts/Makefile.lib +0
-0@@ -136,10 +136,8 @@ __cpp_flags = $(_cpp_flags) elsescripts/Makefile.lib __cpp_flags = $(_cpp_flags) · line 143
Quoted 10 lines
scripts/Makefile.lib +2
-4# -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)As this will make future re-syncs with the
Kbuildsystem harder, NAK.
Quoted 8 lines
Quoted 5 lines
I would suggest making this problem show up in the Linux kernel, get it addressed there, and then backport. Or, if it can't be and it's just another problem related to our last sync being on v4.19, help syncing up with v4.20 and so forth would be greatly appreciated.
v4.20 does not even exist as maintained release. Current Linux stable is v5.9.
Exactly. We move to v4.20 then v5.0 and so on.
Quoted 2 lines
addtree()does not exist inscripts/Makefile.libof Linux next-20201016. So I would not expect the kernel people to fix our outdated script.
Exactly. I'm saying you need to reproduce the problem in the Linux kernel. If it's not a problem there, we just need to continue re-syncing until the problem is fixed.
Signature · 8 lines
Tom -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 659 bytes Desc: not available URL: <https://lists.denx.de/pipermail/u-boot/attachments/20201017/d59c09d6/attachment.sig>