[PATCHv3] ccache: update to 4.1
Hannu Nyman
hannu.nyman at iki.fi
Wed Dec 23 03:26:35 EST 2020
Rosen Penev kirjoitti 23.12.2020 klo 10.14:
> On Tue, Dec 22, 2020 at 11:53 PM Hannu Nyman <hannu.nyman at iki.fi> wrote:
>> Rosen Penev kirjoitti 23.12.2020 klo 8.33:
>>> Upstream switched to building with CMake. Adjust accordingly.
>>>
>>> Reapplied patch as upstream changed the file format.
>>>
>>> Added HOST_BUILD_PARALLEL for faster compilation.
>>>
>>> Added cmake tool dependency.
>>>
>>> Adjusted dependent tools to use NOCACHE as they are needed to build
>>> ccache.
>>>
>>> Signed-off-by: Rosen Penev <rosenp at gmail.com>
>>> ---
>>> v3: zstd was missing in the commit for some reason
>>> v2: fix compilation issues without OS tools.
>>> tools/Makefile | 1 +
>>> tools/ccache/Makefile | 17 +++++++++--------
>>> tools/ccache/patches/100-honour-copts.patch | 20 ++++++++++----------
>>> tools/libressl/Makefile | 1 +
>>> tools/pkgconf/Makefile | 2 ++
>>> tools/zstd/Makefile | 1 +
>>> 6 files changed, 24 insertions(+), 18 deletions(-)
>>>
>>> diff --git a/tools/Makefile b/tools/Makefile
>>> index c66d4fb991..316ffb5ea6 100644
>>> --- a/tools/Makefile
>>> +++ b/tools/Makefile
>>> @@ -82,6 +82,7 @@ endif
>>> ifneq ($(CONFIG_CCACHE)$(CONFIG_SDK),)
>>> $(foreach tool, $(filter-out xz patch,$(tools-y)), $(eval $(curdir)/$(tool)/compile += $(curdir)/ccache/compile))
>>> tools-y += ccache
>>> +$(curdir)/ccache/compile := $(curdir)/cmake/compile $(curdir)/zstd/compile
>>> endif
>>>
>>> # in case there is no patch tool on the host we need to make patch tool a
>>>
>> I am not sure if that is right. The v3 patch may create a circular dependency.
> That doesn't seem to be the case.
>
> make tools/ccache/compile works perfectly fine with build/staging_dir removed.
Did you also test after make dirclean? So that there are no tools.
>
> Without that addition, ccache will not compile. Removing that line and
> moving the tool names up to line 83 also does not compile.
Hmm... "tool names" ???
I proposed (below) adding cmake to this filter list "$(filter-out xz
patch,$(tools-y))".
That would make cmake not to depend on ccache. And then you can quite nicely
set ccache to depend on cmake on the next line
>
>> * First, on line 83 all tools except xz and patch (and flock, sed and tar
>> that are later handled separately) are marked to depend on ccache. This
>> includes cmake.
>>
>> * Then the new addition to the next line makes ccache to depend on cmake.
>>
>> Sounds circular to me.
>>
>>
>> Maybe we need to filter out also cmake on line 83 (in addition to xz and patch).
>>
>>
Something like this (I also added zstd in the exclusion list, as ccache now
depends on it):
$(foreach tool, $(filter-out xz patch cmake zstd,$(tools-y)), $(eval $(curdir)/$(tool)/compile += $(curdir)/ccache/compile))
tools-y += ccache
+$(curdir)/ccache/compile := $(curdir)/cmake/compile $(curdir)/zstd/compile
More information about the openwrt-devel
mailing list