When building musl with pnacl-clang compiler I found a bug: crt/rcrt1.c defines the SHARED macro which enables the conditional block in src/ldso/dlstart.c, this breaks for us because pnacl-clang doesn't support shared libraries nor inline assembly. If my understanding is correct, the SHARED macro should be (and already is) defined only in CFLAGS_ALL_SHARED. The attached patch fixes that.