I've made append-ldflags throw a warning when libraries are passed through it to link them in. The reason is that LDFLAGS should _not_ be used for libraries, as it has to be positioned before the list of objects to link together, while libraries should go after. This mistake in commandline is what causes as-needed to either fail or not apply at all (if LDFLAGS are put at the end). Please fix your package not to pass libraries through LDFLAGS.
Do you mean this patched line in the Makefile?: LIBS = $(TIFFLIB) $(JPEGLIB) $(PNGLIB) $(ZLIBLIB) $(JP2KLIB) -L/usr/X11R6/lib -lX11 -lm $(LDFLAGS) Are you suggesting not putting $(LDFLAGS) in LIBS, but rather putting it on the subsequent lines after $(LIBS) instead? If not, please let me know what you are thinking.
The command link for link should be $(LD) $(LDFLAGS) -o $@ $< $(LIBS) so yeah putting $(LDFLAGS) inside and after $(LIBS) is an error. As is using append-ldflags to pass further libraries to link.
Currently, the Makefile uses $(CC) for linking and compiling. I have gotten rid of the append-ldflags stuff now. Any reason not to now do?: emake CC="$(tc-getCC)" CCOPTS="${CFLAGS} ${LDFLAGS}" \ PREFIX=/usr \ DOCDIR=/usr/share/doc/${PF} \ LIBDIR="${T}" || die (i.e. combine non-modified ${LDFLAGS} and ${CFLAGS} together?) Anything else will be a lot more altering of the Makefile.
Fixed by putting libs in $(LIBS) and adding $(LDFLAGS) to link lines. Makefile patch to add LDFLAGS sent upstream.