[Buildroot] [PATCH 11/13] cmake: move creation of toolchain file to package/pkg-cmaketargets.mk

Samuel Martin s.martin49 at gmail.com
Fri Mar 9 20:13:14 UTC 2012


Hi Thomas (both), all,

2012/3/9 Thomas Petazzoni <thomas.petazzoni at free-electrons.com>:
> Le Fri, 9 Mar 2012 07:54:32 +0100,
> Thomas De Schampheleire <patrickdepinguin+buildroot at gmail.com> a écrit :
>
>> Currently, BASE_TARGETS is still:
>> $(BASE_TARGETS): dirs
>> $(HOST_DIR)/usr/share/buildroot/toolchainfile.cmake
>>
>> Now that the recipe for toolchainfile.cmake has moved, I find it a bit
>> strange that the 'magic' path to this file still appears here.
>> What about creating a nicer name and using that in BASE_TARGETS, and
>> let the pkg-cmaketargets.mk file resolve the nice name into the actual
>> path?
>
> Something like:
>
> CMAKE_TOOLCHAIN_FILE=$(HOST_DIR)/usr/share/buildroot/toolchainfile.cmake
>
> in pkg-cmaketargets.mk
>
> and then in the main Makefile:
>
> $(BASE_TARGETS): dirs $(CMAKE_TOOLCHAIN_FILE)

Having CMAKE_TOOLCHAIN_FILE as a dependency of BASE_TARGET means that
the CMAKE_TOOLCHAIN_FILE is generated before the building or import+check
of the cross-compiler depending on the chosen backend.
This may leads to some inconsistencies between the toolchain described in
CMAKE_TOOLCHAIN_FILE and the actual one.


Regards,

Sam



More information about the buildroot mailing list