updates for clang compatibility
update build-common
remove some dead code