switch from gcc to llvm
This commit is contained in:
parent
bc5d5e4ea0
commit
ff6d4099a0
@ -1,5 +1,5 @@
|
|||||||
# change version here
|
# change version here
|
||||||
%global rel_ver 2
|
%global rel_ver 3
|
||||||
%global major_ver 6
|
%global major_ver 6
|
||||||
%global minor_ver 1
|
%global minor_ver 1
|
||||||
%global patch_ver 56
|
%global patch_ver 56
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
# change version here
|
# change version here
|
||||||
%global rel_ver 2
|
%global rel_ver 3
|
||||||
%global next_snapshot_date 20231006
|
%global next_snapshot_date 20231006
|
||||||
%global target_config defconfig
|
%global target_config defconfig
|
||||||
%global kname next
|
%global kname next
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
# change version here
|
# change version here
|
||||||
%global rel_ver 2
|
%global rel_ver 3
|
||||||
%global patch_ver 0
|
%global patch_ver 0
|
||||||
%global major_ver 6
|
%global major_ver 6
|
||||||
%global minor_ver 6
|
%global minor_ver 6
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
# change version here
|
# change version here
|
||||||
%global rel_ver 7
|
%global rel_ver 8
|
||||||
%global major_ver 6
|
%global major_ver 6
|
||||||
%global minor_ver 6
|
%global minor_ver 6
|
||||||
%global rc_ver 4
|
%global rc_ver 4
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
# change version here
|
# change version here
|
||||||
%global rel_ver 2
|
%global rel_ver 3
|
||||||
%global major_ver 6
|
%global major_ver 6
|
||||||
%global minor_ver 5
|
%global minor_ver 5
|
||||||
%global patch_ver 6
|
%global patch_ver 6
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
# change version here
|
# change version here
|
||||||
%global rel_ver 3
|
%global rel_ver 4
|
||||||
%global major_ver 5
|
%global major_ver 5
|
||||||
%global minor_ver 10
|
%global minor_ver 10
|
||||||
%global patch_ver 160
|
%global patch_ver 160
|
||||||
|
17
master.inc
17
master.inc
@ -12,7 +12,8 @@ URL: https://www.kernel.org
|
|||||||
Provides: %{name}-%{KVERREL}
|
Provides: %{name}-%{KVERREL}
|
||||||
BuildRequires: bc binutils bison dwarves
|
BuildRequires: bc binutils bison dwarves
|
||||||
BuildRequires: (elfutils-libelf-devel or libelf-devel) flex
|
BuildRequires: (elfutils-libelf-devel or libelf-devel) flex
|
||||||
BuildRequires: gcc make openssl openssl-devel perl python3 rsync
|
BuildRequires: make openssl openssl-devel perl python3 rsync
|
||||||
|
BuildRequires: clang lld llvm llvm-devel
|
||||||
BuildRequires: opencsd-devel
|
BuildRequires: opencsd-devel
|
||||||
BuildRequires: kmod
|
BuildRequires: kmod
|
||||||
BuildRequires: python3-devel
|
BuildRequires: python3-devel
|
||||||
@ -31,7 +32,7 @@ Requires: linux-firmware
|
|||||||
%global make_targets Image.gz modules dtbs
|
%global make_targets Image.gz modules dtbs
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
%global make make KERNELRELEASE=%{KVERREL}
|
%global make make -j$(( $(nproc) + 2 )) KERNELRELEASE=%{KVERREL}
|
||||||
|
|
||||||
Source2: https://git.resf.org/thefossguy/kernel-tfg/archive/master.tar.gz
|
Source2: https://git.resf.org/thefossguy/kernel-tfg/archive/master.tar.gz
|
||||||
|
|
||||||
@ -89,6 +90,7 @@ pathfix.py -i "%{__python3} %{py3_shbang_opts}" -n -p \
|
|||||||
Documentation \
|
Documentation \
|
||||||
drivers >/dev/null 2>&1
|
drivers >/dev/null 2>&1
|
||||||
|
|
||||||
|
export LLVM=1 AR=llvm-ar CC=clang HOSTAR=llvm-ar HOSTCC=clang HOSTCXX=clang++ HOSTLD=ld.lld LD=ld.lld NM=llvm-nm OBJCOPY=llvm-objcopy OBJDUMP=llvm-objdump READELF=llvm-readelf STRIP=llvm-strip
|
||||||
[ -f .config ] && rm -vf .config*
|
[ -f .config ] && rm -vf .config*
|
||||||
%{make} distclean
|
%{make} distclean
|
||||||
|
|
||||||
@ -110,7 +112,8 @@ make olddefconfig
|
|||||||
diff .config .config.%{target_config} || echo "Diffing done"
|
diff .config .config.%{target_config} || echo "Diffing done"
|
||||||
|
|
||||||
%build
|
%build
|
||||||
%{make} %{?_smp_mflags} PYTHON=%{__python3} %{make_targets}
|
#export LLVM=1 AR=llvm-ar CC=clang HOSTAR=llvm-ar HOSTCC=clang HOSTCXX=clang++ HOSTLD=ld.lld LD=ld.lld NM=llvm-nm OBJCOPY=llvm-objcopy OBJDUMP=llvm-objdump READELF=llvm-readelf STRIP=llvm-strip
|
||||||
|
%{make} PYTHON=%{__python3} %{make_targets}
|
||||||
|
|
||||||
%install
|
%install
|
||||||
rm -rf $RPM_BUILD_ROOT
|
rm -rf $RPM_BUILD_ROOT
|
||||||
@ -124,7 +127,7 @@ echo "%{KVERREL}" > $RPM_BUILD_ROOT/boot/.uname-%{KVERREL}
|
|||||||
|
|
||||||
# install DTBs
|
# install DTBs
|
||||||
%ifarch aarch64 || riscv64
|
%ifarch aarch64 || riscv64
|
||||||
%{make} %{?_smp_mflags} INSTALL_DTBS_PATH=$RPM_BUILD_ROOT/boot/dtb-%{KVERREL} dtbs_install
|
%{make} INSTALL_DTBS_PATH=$RPM_BUILD_ROOT/boot/dtb-%{KVERREL} dtbs_install
|
||||||
find arch/%{build_arch}/boot/dts -name '*.dtb' -type f -delete
|
find arch/%{build_arch}/boot/dts -name '*.dtb' -type f -delete
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
@ -132,13 +135,13 @@ find arch/%{build_arch}/boot/dts -name '*.dtb' -type f -delete
|
|||||||
# '$(mod-fw)' is overridden because there is no reason to install any firmware
|
# '$(mod-fw)' is overridden because there is no reason to install any firmware
|
||||||
# since we already have 'linux-firmware' package as the dependency of this package.
|
# since we already have 'linux-firmware' package as the dependency of this package.
|
||||||
%if "%{name}" == "kernel-next-tfg"
|
%if "%{name}" == "kernel-next-tfg"
|
||||||
%{make} %{?_smp_mflags} INSTALL_MOD_STRIP=1 INSTALL_MOD_PATH=$RPM_BUILD_ROOT mod-fw= DEPMOD=/doesnt/exist modules_install
|
%{make} INSTALL_MOD_STRIP=1 INSTALL_MOD_PATH=$RPM_BUILD_ROOT mod-fw= DEPMOD=/doesnt/exist modules_install
|
||||||
%else
|
%else
|
||||||
%{make} %{?_smp_mflags} INSTALL_MOD_STRIP=1 INSTALL_MOD_PATH=$RPM_BUILD_ROOT mod-fw= modules_install
|
%{make} INSTALL_MOD_STRIP=1 INSTALL_MOD_PATH=$RPM_BUILD_ROOT mod-fw= modules_install
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
# install headers
|
# install headers
|
||||||
%{make} %{?_smp_mflags} INSTALL_HDR_PATH=$RPM_BUILD_ROOT/usr headers_install
|
%{make} INSTALL_HDR_PATH=$RPM_BUILD_ROOT/usr headers_install
|
||||||
|
|
||||||
# install other key files too
|
# install other key files too
|
||||||
install -m 644 .config $RPM_BUILD_ROOT/boot/config-%{KVERREL}
|
install -m 644 .config $RPM_BUILD_ROOT/boot/config-%{KVERREL}
|
||||||
|
Loading…
Reference in New Issue
Block a user