This is the exact reason why I hate all these overcomplicated build systems (including CMake). One workaround would be to use the following wrapper for ld:
#!/bin/bash
args=()
for arg in "$@"; do
if [[ $arg != *"--fatal-warnings"* ]]; then
args+=($arg)
fi
done
/usr/bin/ld.real "${args[@]}"
I used this PKGBUILD with 'hwinfo' dependency removed and the build succeeded.