I don't know the build system for this program (and this is a generic bug template so I cannot tell you which program exactly is), but my tests shows that it's not respecting CFLAGS properly.
Please look into it, since it's important to respect user CFLAGS.
+*astrolog-5.40-r1 (04 Apr 2012)
+ 04 Apr 2012; Justin Lecher <firstname.lastname@example.org> +astrolog-5.40-r1.ebuild,
+ Move to EAPI=4, respect LDFLAGS, #240057