Adding -static in CXXFLAGS tells it that there will be nothing to link in the end, so there's no point in building the "shared" objects.
Hmm, I'm not sure what's going on exactly, but removing -static from leveldb_libleveldb_la_CXXFLAGS
--- a/src/Makefile.leveldb.include
+++ b/src/Makefile.leveldb.include
@@ -43,7 +43,7 @@ leveldb_libleveldb_la_CPPFLAGS = $(AM_CPPFLAGS) $(LEVELDB_CPPFLAGS_INT) $(LEVELD
# static version of this library. We don't need a dynamic version, and a dynamic
# version can't be used on windows anyway because the library doesn't currently
# export DLL symbols.
-leveldb_libleveldb_la_CXXFLAGS = $(filter-out -Wconditional-uninitialized -Werror=conditional-uninitialized -Wsuggest-override -Werror=suggest-override, $(AM_CXXFLAGS)) $(PIE_FLAGS) -static
+leveldb_libleveldb_la_CXXFLAGS = $(filter-out -Wconditional-uninitialized -Werror=conditional-uninitialized -Wsuggest-override -Werror=suggest-override, $(AM_CXXFLAGS)) $(PIE_FLAGS)
leveldb_libleveldb_la_LDFLAGS = $(AM_LDFLAGS) -static
leveldb_libleveldb_la_SOURCES=
changes nothing in building libleveldb.la -- I've compared verbose build logs and build directories.
But many other -libtool: compile: calls are not invoked twice, and .libs/libbitcoinconsensus.so.0.0.0 is not created.
I used the following configuration:
$ ./configure --enable-suppress-external-warnings --disable-wallet --without-gui --without-utils --disable-tests --disable-bench --disable-fuzz-binary --without-zmq CC=clang CXX=clang++