mirror of
https://abf.rosa.ru/djam/kernel-5.15.git
synced 2025-02-23 18:42:55 +00:00
Add ccache switch, useful for local rebuilds
This commit is contained in:
parent
2812a67ad1
commit
ed3d48040b
1 changed files with 11 additions and 3 deletions
14
kernel.spec
14
kernel.spec
|
@ -85,6 +85,8 @@
|
|||
%bcond_with binary_extra_modules
|
||||
%endif
|
||||
|
||||
%bcond_with ccache
|
||||
|
||||
# Kernel flavour
|
||||
%if %{with nickel}
|
||||
%define flavour nickel
|
||||
|
@ -175,11 +177,13 @@
|
|||
%define debug_package %{nil}
|
||||
%endif
|
||||
|
||||
%if %(if [ -z "$CC" ] ; then echo 0; else echo 1; fi)
|
||||
%define kmake %make CC="$CC"
|
||||
# http://nickdesaulniers.github.io/blog/2018/06/02/speeding-up-linux-kernel-builds-with-ccache/
|
||||
%if %{with ccache}
|
||||
%define kmake KBUILD_BUILD_TIMESTAMP='' %make CC='ccache gcc'
|
||||
%else
|
||||
%define kmake %make
|
||||
%define kmake %make CC='gcc'
|
||||
%endif
|
||||
|
||||
# there are places where parallel make don't work
|
||||
%define smake make
|
||||
|
||||
|
@ -338,6 +342,10 @@ BuildRequires: kernel-source-virtualbox
|
|||
BuildRequires: kernel-source-virtualbox-vboxadditions
|
||||
%endif
|
||||
|
||||
%if %{with ccache}
|
||||
BuildRequires: ccache
|
||||
%endif
|
||||
|
||||
# might be useful too:
|
||||
Recommends: microcode
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue