The hardened-development overlay's libffi-3.0.11-r1.ebuild has a small typo: 33: if [ $? -eq = 0 ]; then The official tree's libffi-3.0.11 has [ $? -eq 0 ].
libffi 3.0.11 removed from overlay.