Simple script and config (type-safe) for building custom Linux kernels for Firecracker MicroVMs

route linking around broken base ld with -fuse-ld=bfd master

The MICROVM guest image lacks /usr/lib/libgnuctf.so.2, so /usr/bin/ld (hard-wired into pkgsrc gcc15 via --with-ld) cannot even start and every link fails with "C compiler cannot create executables". When the base ld is unrunnable, point collect2 at pkgsrc's ld through -fuse-ld=bfd, which bypasses the configured DEFAULT_LINKER and searches the -B prefixes. Also symlink libgnuctf.so.2 only when a real library file exists (the previous ln -s silently created a dangling link), prefer exact /usr/pkg/bin names during tool discovery, and fail fast with diagnostics via a compiler smoke test before invoking build.sh.


+37 -5
1 changed file