CC is set to $(XTENSA_TOOLS_ROOT)$(TOOLPREFIX)gcc in libesphttpd Makefile.
When calling mkespfsimage Makefile, it will also use this CC variable which is set to xtensa toolchain.
So passing CC=$(HOSTCC) when calling mkespfsimage Makefile should fix the issue.
But I don't understand why I'm the only one to have the issue. It could be an environment issue.
Anyway, please let me know if you want me to upload a patch for this. I would be pleased to help.