diff options
| author | rawnix ports <ports@rawnix.org> | 2026-09-26 18:19:05 +0000 |
|---|---|---|
| committer | rawnix ports <ports@rawnix.org> | 2026-09-26 18:19:05 +0000 |
| commit | c82e88dd00d1b0b7fcfb4e5628d99611388cef6f (patch) | |
| tree | 56d864b5a5c6c145edd96178ae219a8f90e191a6 /linux/linux-6.18.52/MAKEPKG | |
| download | ports-c82e88dd00d1b0b7fcfb4e5628d99611388cef6f.tar.gz | |
sync 2026-09-26 18:19 UTC
1672 files changed, 151396 insertions(+)
Diffstat (limited to 'linux/linux-6.18.52/MAKEPKG')
| -rw-r--r-- | linux/linux-6.18.52/MAKEPKG | 71 |
1 files changed, 71 insertions, 0 deletions
diff --git a/linux/linux-6.18.52/MAKEPKG b/linux/linux-6.18.52/MAKEPKG new file mode 100644 index 0000000..3b2bc8b --- /dev/null +++ b/linux/linux-6.18.52/MAKEPKG @@ -0,0 +1,71 @@ +#!/bin/mkpkg +# description: Linux kernel +# url: https://www.kernel.org/ +# +# Not in pkg.conf's portdir list, deliberately: `sysup` must never +# decide to install a kernel. Build by hand, addpkg/delpkg by hand. +# Do not "helpfully" add /usr/src to the portdir list. +# +# NM wrapper: with CONFIG_MODVERSIONS the symversion gate runs +# llvm-nm $obj | grep -q ' __export_symbol_' +# grep -q exits on first match, llvm-nm's next write gets EPIPE, and +# LLVM 23.1.0 turns that into "LLVM ERROR: IO failure on output stream" +# followed by a NULL-deref SIGSEGV instead of exiting quietly. Harmless +# -- grep already had its answer, symversions are correct -- but it +# prints ~82 "Segmentation fault" lines per build. The wrapper maps +# signal death to 0. Drop it when llvm-nm handles EPIPE properly. +name=linux-6.18.52 +_name=linux +version=6.18.52 +release=1 +source=(https://cdn.kernel.org/pub/linux/kernel/v6.x/$_name-$version.tar.xz + config) + +sha256sums=( + "2b69564f7d4fea0c859b1959ba33709ee6e9139bd100e30a853b57159a8221b8" + "094361c455ec33eced396ce208b550cf1259c989db65201108786bc3f0dc7445" +) + +build() { + # A kernel controls its own flags; nothing from mkpkg.conf reaches it. + unset CFLAGS CXXFLAGS LDFLAGS CPPFLAGS PKG_CONFIG_PATH MAKEFLAGS + + _nm=$SRC/nm-epipe + rm -f $_nm + printf '%s\n' \ + '#!/bin/sh' \ + 'llvm-nm "$@"' \ + '_s=$?' \ + 'if [ $_s -gt 128 ]; then exit 0; fi' \ + 'exit $_s' > $_nm + chmod 755 $_nm + test -s $_nm || { echo "nm wrapper is empty"; return 1; } + + cd $_name-$version + + for _c in /etc/ports/linux/config-$version \ + /etc/ports/linux/config-${version%.*} \ + /etc/ports/linux/config \ + $SRC/config; do + [ -f "$_c" ] && { echo "config: $_c"; cp "$_c" .config; break; } + done + make LLVM=1 olddefconfig + + make LLVM=1 NM=$_nm -j$(nproc) + make LLVM=1 NM=$_nm INSTALL_MOD_PATH=$PKG INSTALL_MOD_STRIP=1 modules_install + + install -Dm644 arch/x86/boot/bzImage $PKG/boot/vmlinuz-$version + install -Dm644 System.map $PKG/boot/System.map-$version + install -Dm644 .config $PKG/boot/config-$version + + rm -f $PKG/lib/modules/$version/build + rm -f $PKG/lib/modules/$version/source +} + +signify() { + untrusted comment: public key + RWTZ9IduCSQ/mL8337TEUinPwT92xFEUpD92hkS7IxcOnzTt9QdpohT3 +} + +# vim: filetype=sh + |
