the recent change due to bug 3542572  misses an important nuances:
- all linked libraries must come after all source objects
- linker flags must come before all source objects and linked libraries
by moving LDFLAGS after the objects and the local ELF_LIBS before the objects, both those aspects are broken.
to make the original bug report (which i can't comment on let alone re-open) work, you'd have to split the local -L flags into a dedicated variable which would then show up before ldflags.
... -o $(ELF_LIB) $(ELF_OTHER_LDFLAGS) $(LDFLAGS) -Wl,-h,$(ELF_SONAME) $(OBJS) $(ELF_OTHER_LIBS) ...
(tangentally related, if you used libtool to create your shared libraries, it would handle these nuances for you)