I'm going to attach two patches, one to the ebuild and one to the source makefiles, so that they respects CFLAGS and LDFLAGS and links to libtommath dynamically instead of statically (it's a C++ library, it makes a quite big binary without that).
Created attachment 82591 [details, diff]
Created attachment 82592 [details, diff]
Thanks, this is fixed in CVS. (libtommath.so is not created in <libtommath-0.36-r1 so I added >=dev-libs/libtommath-0.36-r1)