diff --git a/PKGBUILD b/PKGBUILD index 5d75bf1..3629edb 100644 --- a/PKGBUILD +++ b/PKGBUILD @@ -9,7 +9,7 @@ pkgrel=1 arch=('i686' 'x86_64') url="http://www.kernel.org/" license=('GPL2') -makedepends=('xmlto' 'docbook-xsl' 'kmod' 'inetutils' 'bc') +makedepends=('xmlto' 'docbook-xsl' 'kmod' 'inetutils' 'bc' 'elfutils') options=('!strip') source=("https://www.kernel.org/pub/linux/kernel/v4.x/${_srcname}.tar.xz" "https://www.kernel.org/pub/linux/kernel/v4.x/${_srcname}.tar.sign" @@ -243,6 +243,12 @@ _package-headers() { cp ${i} "${pkgdir}/usr/lib/modules/${_kernver}/build/${i}" done + # add objtool for external module building and enabled VALIDATION_STACK option + if [ -f tools/objtool/objtool ]; then + mkdir -p "${pkgdir}/usr/lib/modules/${_kernver}/build/tools/objtool" + cp -a tools/objtool/objtool ${pkgdir}/usr/lib/modules/${_kernver}/build/tools/objtool/ + fi + chown -R root.root "${pkgdir}/usr/lib/modules/${_kernver}/build" find "${pkgdir}/usr/lib/modules/${_kernver}/build" -type d -exec chmod 755 {} \;