dev-vcs/git-2.10.1+ introduced a check to make sure REGSTARTEND is available on the system, and builds appear to fail without it on a system where this isn't supported. In my case, builds are failing when compiled against musl-libc without the NO_REGEX=YesPlease flag being passed to portage. I have temporarily added an environment file to make sure this is always set.
commit 076cafffdbbb06c50da7ab174fbee4c6be05bcb0 Author: Aric Belsito <lluixhi@gmail.com> Date: Sun Dec 25 18:47:52 2016 dev-vcs/git: Fix build on musl 2.10.1+ introduce a configuration option which enables non-posix compatible regex by default, which breaks compilation on musl. Gentoo-Bug: https://bugs.gentoo.org/603710 Closes: https://github.com/gentoo/gentoo/pull/3237