From 068a19b6c6826db99910b91b03d5f027c7a6391b Mon Sep 17 00:00:00 2001 From: Josip Ponjavic Date: Sun, 27 Mar 2022 16:02:11 +0200 Subject: [PATCH] 5.16.17-2 (clr 5.16.17-1136) add _debug option --- .SRCINFO | 4 ++-- PKGBUILD | 19 ++++++++++++++++--- 2 files changed, 18 insertions(+), 5 deletions(-) diff --git a/.SRCINFO b/.SRCINFO index 3d27ec1..418fa0c 100644 --- a/.SRCINFO +++ b/.SRCINFO @@ -1,7 +1,7 @@ pkgbase = linux-clear pkgdesc = Clear Linux pkgver = 5.16.17 - pkgrel = 1 + pkgrel = 2 url = https://github.com/clearlinux-pkgs/linux arch = x86_64 license = GPL2 @@ -16,7 +16,7 @@ pkgbase = linux-clear source = https://cdn.kernel.org/pub/linux/kernel/v5.x/linux-5.16.tar.xz source = https://cdn.kernel.org/pub/linux/kernel/v5.x/linux-5.16.tar.sign source = https://cdn.kernel.org/pub/linux/kernel/v5.x/patch-5.16.17.xz - source = linux-clear::git+https://github.com/clearlinux-pkgs/linux.git#tag=5.16.16-1135 + source = linux-clear::git+https://github.com/clearlinux-pkgs/linux.git#tag=5.16.17-1136 source = more-uarches-20211114.tar.gz::https://github.com/graysky2/kernel_compiler_patch/archive/20211114.tar.gz source = 0001-pci-Enable-overrides-for-missing-ACS-capabilities.patch::https://raw.githubusercontent.com/xanmod/linux-patches/6b08df20f31708099a7fbccf5448958b4836118f/linux-5.16.y-xanmod/pci_acso/0001-pci-Enable-overrides-for-missing-ACS-capabilities.patch source = 0001-sysctl-add-sysctl-to-disallow-unprivileged-CLONE_NEW.patch::https://raw.githubusercontent.com/xanmod/linux-patches/6b08df20f31708099a7fbccf5448958b4836118f/linux-5.16.y-xanmod/userns/0001-sysctl-add-sysctl-to-disallow-unprivileged-CLONE_NEW.patch diff --git a/PKGBUILD b/PKGBUILD index 4d1b221..c50f401 100644 --- a/PKGBUILD +++ b/PKGBUILD @@ -74,15 +74,18 @@ # Enable compiling with LLVM : "${_use_llvm_lto:=""}" +# Enable debug options +: "${_debug:=""}" + ### IMPORTANT: Do no edit below this line unless you know what you're doing _major=5.16 _minor=17 _srcname=linux-${_major} -_clr=${_major}.16-1135 +_clr=${_major}.17-1136 pkgbase=linux-clear pkgver=${_major}.${_minor} -pkgrel=1 +pkgrel=2 pkgdesc='Clear Linux' arch=('x86_64') url="https://github.com/clearlinux-pkgs/linux" @@ -225,6 +228,14 @@ prepare() { --enable HAVE_GCC_PLUGINS fi + if [ -n "$_debug" ]; then + scripts/config --enable DEBUG_INFO \ + --enable DEBUG_INFO_BTF \ + --enable DEBUG_INFO_DWARF4 \ + --enable PAHOLE_HAS_SPLIT_BTF \ + --enable DEBUG_INFO_BTF_MODULES + fi + make ${BUILD_FLAGS[*]} olddefconfig diff -u $srcdir/$pkgbase/config .config || : @@ -329,7 +340,9 @@ _package-headers() { install -Dt "$builddir/tools/objtool" tools/objtool/objtool # required when DEBUG_INFO_BTF_MODULES is enabled - #install -Dt "$builddir/tools/bpf/resolve_btfids" tools/bpf/resolve_btfids/resolve_btfids + if [ -n "$_debug" ]; then + install -Dt "$builddir/tools/bpf/resolve_btfids" tools/bpf/resolve_btfids/resolve_btfids + fi echo "Installing headers..." cp -t "$builddir" -a include