I noticed this on the Sage arm buildbot:
Building bzip2(-shared) from source works:
buildbot@node3eth0:~/Code/bzip2-1.0.6$ ./bzip2-shared
bzip2-shared: I won't write compressed data to a terminal.
bzip2-shared: For help, type: `bzip2-shared --help'.
Run patchelf the same way hashdist does; Now bzip2 is corrupted:
buildbot@node3eth0:~/Code/bzip2-1.0.6$ ../patchelf-0.8/src/patchelf --set-rpath `pwd` bzip2-shared
buildbot@node3eth0:~/Code/bzip2-1.0.6$ ./bzip2-shared
Killed
buildbot@node3eth0:~/Code/bzip2-1.0.6$ ldd bzip2-shared
not a dynamic executable