summarylogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.SRCINFO11
-rw-r--r--PKGBUILD51
2 files changed, 42 insertions, 20 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 6badef8df37a..b8e35bb44b7d 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,6 +1,6 @@
pkgbase = linux-manjaro-xanmod
pkgdesc = Linux Xanmod
- pkgver = 5.12.6
+ pkgver = 5.12.13
pkgrel = 1
url = http://www.xanmod.org/
arch = x86_64
@@ -19,17 +19,17 @@ pkgbase = linux-manjaro-xanmod
options = !strip
source = https://cdn.kernel.org/pub/linux/kernel/v5.x/linux-5.12.tar.xz
source = https://cdn.kernel.org/pub/linux/kernel/v5.x/linux-5.12.tar.sign
- source = https://github.com/xanmod/linux/releases/download/5.12.6-xanmod1/patch-5.12.6-xanmod1.xz
+ source = https://github.com/xanmod/linux/releases/download/5.12.13-xanmod1/patch-5.12.13-xanmod1.xz
source = choose-gcc-optimization.sh
- source = https://gitlab.manjaro.org/packages/core/linux512/-/archive/5e97ee4d5ba960c3bfd5d79a4b2fb509041f3440/linux512-5e97ee4d5ba960c3bfd5d79a4b2fb509041f3440.tar.gz
+ source = https://gitlab.manjaro.org/packages/core/linux512/-/archive/058db47a791a706d4c3b343f928cd7753eeabddd/linux512-058db47a791a706d4c3b343f928cd7753eeabddd.tar.gz
source = sphinx-workaround.patch::https://git.archlinux.org/svntogit/packages.git/plain/trunk/sphinx-workaround.patch?h=packages/linux&id=be7d4710850020de55bce930c83fa80347c02fc3
validpgpkeys = ABAF11C65A2970B130ABE3C479BE3E4300411886
validpgpkeys = 647F28654894E3BD457199BE38DBBDC86092693E
sha256sums = 7d0df6f2bf2384d68d0bd8e1fe3e071d64364dcdc6002e7b5c87c92d48fac366
sha256sums = SKIP
- sha256sums = 2bb72c4ac95cfd63abd2890d23fc12a946874114ca1c48c5a75143866821953c
+ sha256sums = d92f080fffa287fbdbc0a9c58dec0031d1368d94401d5ebeb9fce56a34ea35d3
sha256sums = 1ac18cad2578df4a70f9346f7c6fccbb62f042a0ee0594817fdef9f2704904ee
- sha256sums = b9c5aea1781f9caba4d3e0aa37155756c20a98676e4f1d146d3f9fae92b16f3e
+ sha256sums = 4073bbe2cc4eeeaebdff93fe62b20f51db8f7ab19d34671da41e577b3aa61a75
sha256sums = 52fc0fcd806f34e774e36570b2a739dbdf337f7ff679b1c1139bee54d03301eb
pkgname = linux-manjaro-xanmod
@@ -53,4 +53,3 @@ pkgname = linux-manjaro-xanmod-headers
provides =
conflicts =
replaces =
-
diff --git a/PKGBUILD b/PKGBUILD
index def50b499093..c0b81a09ab4b 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -37,13 +37,18 @@ if [ -z ${use_numa+x} ]; then
fi
## For performance you can disable FUNCTION_TRACER/GRAPH_TRACER. Limits debugging and analyzing of the kernel.
-## Stock Archlinux and Xanmod have this enabled.
+## Stock Archlinux and Xanmod have this enabled.
## Set variable "use_tracers" to: n to disable (possibly increase performance)
## y to enable (stock default)
if [ -z ${use_tracers+x} ]; then
use_tracers=y
fi
+## Choose between GCC and CLANG config (default is GCC)
+if [ -z ${_compiler+x} ]; then
+ _compiler=gcc
+fi
+
# Compile ONLY used modules to VASTLY reduce the number of modules built
# and the build time.
#
@@ -65,7 +70,7 @@ _makenconfig=
pkgbase=linux-manjaro-xanmod
pkgname=("${pkgbase}" "${pkgbase}-headers")
_major=5.12
-pkgver=${_major}.6
+pkgver=${_major}.13
_branch=5.x
xanmod=1
pkgrel=1
@@ -73,13 +78,16 @@ pkgdesc='Linux Xanmod'
url="http://www.xanmod.org/"
arch=(x86_64)
-__commit="5e97ee4d5ba960c3bfd5d79a4b2fb509041f3440" # 5.12.6-1
+__commit="058db47a791a706d4c3b343f928cd7753eeabddd" # 5.12.13-1
license=(GPL2)
makedepends=(
xmlto kmod inetutils bc libelf cpio
python-sphinx python-sphinx_rtd_theme graphviz imagemagick git
)
+if [ "${_compiler}" = "clang" ]; then
+ makedepends+=(clang llvm)
+fi
options=('!strip')
_srcname="linux-${pkgver}-xanmod${xanmod}"
source=("https://cdn.kernel.org/pub/linux/kernel/v${_branch}/linux-${_major}.tar."{xz,sign}
@@ -97,9 +105,9 @@ done
sha256sums=('7d0df6f2bf2384d68d0bd8e1fe3e071d64364dcdc6002e7b5c87c92d48fac366' # kernel tar.xz
'SKIP' # tar.sign
- '2bb72c4ac95cfd63abd2890d23fc12a946874114ca1c48c5a75143866821953c' # xanmod
+ 'd92f080fffa287fbdbc0a9c58dec0031d1368d94401d5ebeb9fce56a34ea35d3' # xanmod
'1ac18cad2578df4a70f9346f7c6fccbb62f042a0ee0594817fdef9f2704904ee' # choose-gcc-optimization.sh
- 'b9c5aea1781f9caba4d3e0aa37155756c20a98676e4f1d146d3f9fae92b16f3e' # manjaro
+ '4073bbe2cc4eeeaebdff93fe62b20f51db8f7ab19d34671da41e577b3aa61a75' # manjaro
'52fc0fcd806f34e774e36570b2a739dbdf337f7ff679b1c1139bee54d03301eb')
validpgpkeys=(
'ABAF11C65A2970B130ABE3C479BE3E4300411886' # Linux Torvalds
@@ -150,7 +158,14 @@ prepare() {
git apply -p1 < "../linux512-$__commit/0513-bootsplash.gitpatch"
scripts/config --enable CONFIG_BOOTSPLASH
-
+ # Applying configuration
+ cp -vf CONFIGS/xanmod/${_compiler}/config .config
+ # enable LTO_CLANG_THIN
+ if [ "${_compiler}" = "clang" ]; then
+ scripts/config --disable LTO_CLANG_FULL
+ scripts/config --enable LTO_CLANG_THIN
+ _LLVM=1
+ fi
# CONFIG_STACK_VALIDATION gives better stack traces. Also is enabled in all official kernel packages by Archlinux team
scripts/config --enable CONFIG_STACK_VALIDATION
@@ -161,9 +176,11 @@ prepare() {
# User set. See at the top of this file
if [ "$use_tracers" = "n" ]; then
- msg2 "Disabling FUNCTION_TRACER/GRAPH_TRACER..."
- scripts/config --disable CONFIG_FUNCTION_TRACER \
- --disable CONFIG_STACK_TRACER
+ msg2 "Disabling FUNCTION_TRACER/GRAPH_TRACER only if we are not compiling with clang..."
+ if [ "${_compiler}" = "gcc" ]; then
+ scripts/config --disable CONFIG_FUNCTION_TRACER \
+ --disable CONFIG_STACK_TRACER
+ fi
fi
if [ "$use_numa" = "n" ]; then
@@ -189,8 +206,8 @@ prepare() {
# Put the file "myconfig" at the package folder (this will take preference) or "${XDG_CONFIG_HOME}/linux-xanmod/myconfig"
# If we detect partial file with scripts/config commands, we execute as a script
# If not, it's a full config, will be replaced
- for _myconfig in "${SRCDEST}/myconfig" "${XDG_CONFIG_HOME}/linux-xanmod/myconfig" ; do
- if [ -f "${_myconfig}" ]; then
+ for _myconfig in "${SRCDEST}/myconfig" "${HOME}/.config/linux-xanmod/myconfig" "${XDG_CONFIG_HOME}/linux-xanmod/myconfig" ; do
+ if [ -f "${_myconfig}" ] && [ "$(wc -l <"${_myconfig}")" -gt "0" ]; then
if grep -q 'scripts/config' "${_myconfig}"; then
# myconfig is a partial file. Executing as a script
msg2 "Applying myconfig..."
@@ -201,10 +218,10 @@ prepare() {
cp -f "${_myconfig}" .config
fi
echo
+ break
fi
done
- make olddefconfig
### Optionally load needed modules for the make localmodconfig
# See https://aur.archlinux.org/packages/modprobed-db
@@ -218,10 +235,12 @@ prepare() {
fi
fi
+ make LLVM=$_LLVM LLVM_IAS=$_LLVM olddefconfig
+
make -s kernelrelease > version
msg2 "Prepared %s version %s" "$pkgbase" "$(<version)"
- [[ -z "$_makenconfig" ]] || make nconfig
+ [[ -z "$_makenconfig" ]] || make LLVM=$_LLVM LLVM_IAS=$_LLVM nconfig
# save configuration for later reuse
cat .config > "${SRCDEST}/config.last"
@@ -229,7 +248,11 @@ prepare() {
build() {
cd linux-${_major}
- make all
+ if [ "${_compiler}" = "clang" ]; then
+ make LLVM=1 LLVM_IAS=1 all
+ else
+ make all
+ fi
}
_package() {