if $(tc-getCC) -Werror -Wl,-l:libobjc.so.${ver} \ "${FILESDIR}"/testlibobjc.m -o /dev/null 2> /dev/null; FILESDIR is not accessible in pkg_setup() yet. This is completely broken for binary packages, and will be completely rejected by Portage soon (~2-4 weeks). Please consider it urgent to fix it. If you insist on early processing of the check, you can just inline the code in a <<.
Ack, I updated current ebuild to test libobjc.so.* support with inlined check. A pkg_* processing is nice as binary packages still need to check for system support (same libobjc.so version as in the build host)