[Buildroot] [PATCH next v6 10/10] package/pkg-kconfig: handle KCONFIG_DEPENDENCIES with per-package directories

Andreas Naumann dev at andin.de
Thu Dec 6 14:07:53 UTC 2018


Hi Thomas,

Am 05.12.18 um 16:23 schrieb Andreas Naumann:
> Hi Thomas,
> 
> Am 23.11.18 um 15:58 schrieb Thomas Petazzoni:
>> The pkg-kconfig infrastructure hijacks the regular chain of build
>> steps to insert its own step to prepare the configuration of kconfig
>> packages. This additional step may have dependencies of its own, such
>> as host-flex, host-bison or toolchain.
>>
>> In the context of per-package directory support, those dependencies
>> must be copied to the per-package directory of the current package
>> prior to doing the config preparation. This commit implements this
>> logic by adding a call to prepare-per-package-directory at the right
>> spot.
>>
>> Reported-by: Andreas Naumann <anaumann at ultratronik.de>
>> Signed-off-by: Thomas Petazzoni <thomas.petazzoni at bootlin.com>
>> ---
>>   package/pkg-kconfig.mk | 1 +
>>   1 file changed, 1 insertion(+)
>>
>> diff --git a/package/pkg-kconfig.mk b/package/pkg-kconfig.mk
>> index d6c95b897e..bf43632adc 100644
>> --- a/package/pkg-kconfig.mk
>> +++ b/package/pkg-kconfig.mk
>> @@ -113,6 +113,7 @@ endef
>>   # Since the file could be a defconfig file it needs to be expanded to a
>>   # full .config first.
>>   $$($(2)_DIR)/$$($(2)_KCONFIG_DOTCONFIG): $$($(2)_KCONFIG_FILE) 
>> $$($(2)_KCONFIG_FRAGMENT_FILES)
>> +    $$(call prepare-per-package-folder,$$($(2)_KCONFIG_DEPENDENCIES))

just realized that this doesn't match the function definition in 
pkg-utils.mk in this series (prepare-per-package-directories), thus is 
not executed at all. With that fixed ccache is, as part of toolchain, 
properly prepared and I no longer see the issue below.

regards,
Andreas



>>       $$(Q)$$(if $$($(2)_KCONFIG_DEFCONFIG), \
>>           $$($(2)_KCONFIG_MAKE) $$($(2)_KCONFIG_DEFCONFIG), \
>>           $$(INSTALL) -m 0644 -D $$($(2)_KCONFIG_FILE) $$(@))
>>
> 
> Finally I could test this and found an issue. Because I use ccache, the 
> linux/uboot kconfig steps fail, because ccache apparently is not part of 
> UBOOT/LINUX_KCONFIG_DEPENDENCIES.
> Instead of conditionally adding it, my simple proposal would be to not 
> use it, e.g.:
> 
>   # $(HOST_DIR)/lib/libncurses.so (which is not).  We don't actually
>   # need any host-package for kconfig, so remove the HOSTCC/HOSTLDFLAGS
>   # override again.
> -UBOOT_KCONFIG_OPTS = $(UBOOT_MAKE_OPTS) HOSTCC="$(HOSTCC)" HOSTLDFLAGS=""
> +UBOOT_KCONFIG_OPTS = $(UBOOT_MAKE_OPTS) HOSTCC="$(HOSTCC_NOCCACHE)" 
> HOSTLDFLAGS=""
> 
> So after this, I'm not sure if there really was a need for above fix 
> since the fixup/.config creation may not even need the only kconfig 
> dependencies set so far: host-flex and host-bison..
> 
> 
> regards,
> Andreas
> _______________________________________________
> buildroot mailing list
> buildroot at busybox.net
> http://lists.busybox.net/mailman/listinfo/buildroot
> 



More information about the buildroot mailing list