summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorJoan Figueras2022-01-12 19:26:18 +0100
committerJoan Figueras2022-01-12 19:26:18 +0100
commit862d7bfd91f11191855c21ee3b1591d3ee008c10 (patch)
tree8dc4700cae0f85752198eebfd5dece6e6a233830
parenta6b2c1a93727bf3f221343ceeb0aa61410369ca6 (diff)
downloadaur-linux-xanmod-git.tar.gz
Updated with latest linux-xanmod options
-rw-r--r--.SRCINFO12
-rw-r--r--PKGBUILD58
2 files changed, 50 insertions, 20 deletions
diff --git a/.SRCINFO b/.SRCINFO
index f3c16d661b24..6840c12927e6 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,17 +1,17 @@
pkgbase = linux-xanmod-git
pkgdesc = Linux Xanmod - git version
- pkgver = 5.12.9.xanmod1.r1.ge2253e02d3ef
+ pkgver = 5.15.14.xanmod1.r0.g33f903b9927e
pkgrel = 1
url = http://www.xanmod.org/
arch = x86_64
license = GPL2
- makedepends = xmlto
- makedepends = kmod
- makedepends = inetutils
makedepends = bc
- makedepends = libelf
makedepends = cpio
- makedepends = git
+ makedepends = kmod
+ makedepends = libelf
+ makedepends = perl
+ makedepends = tar
+ makedepends = xz
options = !strip
source = git+https://github.com/xanmod/linux.git
source = choose-gcc-optimization.sh
diff --git a/PKGBUILD b/PKGBUILD
index bf933df05c1d..942b355916c8 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -8,7 +8,7 @@
##
## The following variables can be customized at build time. Use env or export to change at your wish
##
-## Example: env _microarchitecture=99 use_numa=n use_tracers=n use_pds=n makepkg -sc
+## Example: env _microarchitecture=98 use_numa=n use_tracers=n makepkg -sc
##
## Look inside 'choose-gcc-optimization.sh' to choose your microarchitecture
## Valid numbers between: 0 to 99
@@ -39,6 +39,11 @@ if [ -z ${_compiler+x} ]; then
_compiler=gcc
fi
+# Compress modules with ZSTD (to save disk space)
+if [ -z ${_compress_modules+x} ]; then
+ _compress_modules=n
+fi
+
# Compile ONLY used modules to VASTLY reduce the number of modules built
# and the build time.
#
@@ -57,8 +62,8 @@ _makenconfig=
### IMPORTANT: Do no edit below this line unless you know what you're doing
pkgbase=linux-xanmod-git
-pkgver=5.12.9.xanmod1.r1.ge2253e02d3ef
-xanmod=1
+pkgver=5.15.14.xanmod1.r0.g33f903b9927e
+xanmod=0
pkgrel=1
pkgdesc='Linux Xanmod - git version'
url="http://www.xanmod.org/"
@@ -66,8 +71,11 @@ arch=(x86_64)
license=(GPL2)
makedepends=(
- xmlto kmod inetutils bc libelf cpio git
+ bc cpio kmod libelf perl tar xz
)
+if [ "${_compiler}" = "clang" ]; then
+ makedepends+=(clang llvm lld python)
+fi
options=('!strip')
_srcname="linux-${pkgver}-xanmod${xanmod}"
@@ -78,6 +86,14 @@ validpgpkeys=(
'647F28654894E3BD457199BE38DBBDC86092693E' # Greg Kroah-Hartman
)
+# Archlinux patches
+_commit="ec9e9a4219fe221dec93fa16fddbe44a34933d8d"
+_patches=()
+for _patch in ${_patches[@]}; do
+ #source+=("${_patch}::https://git.archlinux.org/svntogit/packages.git/plain/trunk/${_patch}?h=packages/linux&id=${_commit}")
+ source+=("${_patch}::https://raw.githubusercontent.com/archlinux/svntogit-packages/${_commit}/trunk/${_patch}")
+done
+
sha256sums=('SKIP'
'1ac18cad2578df4a70f9346f7c6fccbb62f042a0ee0594817fdef9f2704904ee')
@@ -110,6 +126,12 @@ prepare() {
# 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
@@ -120,9 +142,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
@@ -130,6 +154,11 @@ prepare() {
scripts/config --disable CONFIG_NUMA
fi
+ # Compress modules by default (following Arch's kernel)
+ if [ "$_compress_modules" = "y" ]; then
+ scripts/config --enable CONFIG_MODULE_COMPRESS_ZSTD
+ fi
+
# Let's user choose microarchitecture optimization in GCC
sh ${srcdir}/choose-gcc-optimization.sh $_microarchitecture
@@ -137,8 +166,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..."
@@ -149,27 +178,28 @@ 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
if [ "$_localmodcfg" = "y" ]; then
if [ -f $HOME/.config/modprobed.db ]; then
msg2 "Running Steven Rostedt's make localmodconfig now"
- make LSMOD=$HOME/.config/modprobed.db localmodconfig
+ make LLVM=$_LLVM LLVM_IAS=$_LLVM LSMOD=$HOME/.config/modprobed.db localmodconfig
else
msg2 "No modprobed.db data found"
exit 1
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"
@@ -177,7 +207,7 @@ prepare() {
build() {
cd linux
- make all
+ make LLVM=$_LLVM LLVM_IAS=$_LLVM all
}
_package() {