Message ID | 20240807-macos-build-support-v1-2-4cd1ded85694@samsung.com |
---|---|
State | New |
Headers | show |
Series | Enable build system on macOS hosts | expand |
On Wed, Aug 07, 2024 at 01:09:16AM +0200, Daniel Gomez via B4 Relay wrote: > From: Daniel Gomez <da.gomez@samsung.com> > > Export kernel headers necessary for the tools located in scripts/. This > ensures kernel headers are generated before building scripts/selinux. > > Kernel headers required for building are: asm/types.h, asm/bitsperlong.h > and asm/poix_types.h. > > Signed-off-by: Daniel Gomez <da.gomez@samsung.com> > --- > Makefile | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/Makefile b/Makefile > index 44c02a6f60a1..7ac079955a94 100644 > --- a/Makefile > +++ b/Makefile > @@ -1173,7 +1173,7 @@ include/config/kernel.release: FORCE > # Carefully list dependencies so we do not try to build scripts twice > # in parallel > PHONY += scripts > -scripts: scripts_basic scripts_dtc > +scripts: headers_install scripts_basic scripts_dtc > $(Q)$(MAKE) $(build)=$(@) Since commit 59b2bd05f5f4 ("kbuild: add 'headers' target to build up uapi headers in usr/include", 2019-06-04), composing the user-space header tree is separated from the actual installation to $(INSTALL_HDR_PATH)/include. Thus, you do not want to depend in 'headers_install' but on 'headers' instead. Nevertheless, I am suspecting that this leads to trouble. E.g.: if scripts/* include $(objtree)/usr/include/asm/*.h this will probably break cross-arch-building. Kind regards, Nicolas
diff --git a/Makefile b/Makefile index 44c02a6f60a1..7ac079955a94 100644 --- a/Makefile +++ b/Makefile @@ -1173,7 +1173,7 @@ include/config/kernel.release: FORCE # Carefully list dependencies so we do not try to build scripts twice # in parallel PHONY += scripts -scripts: scripts_basic scripts_dtc +scripts: headers_install scripts_basic scripts_dtc $(Q)$(MAKE) $(build)=$(@) # Things we need to do before we recursively start building the kernel