it seems that the Portage logic for making .so files executable is too greedy. When building sys-libs/libcxx, I get: making executable: usr/lib/libc++.so making executable: usr/lib64/libc++.so However, both files are not really shared libraries but just linker scripts. Making them executable is therefore not necessary, and results in bash attempting to execute them as bash commands (not a good idea). For comparison, regular shared libraries are executed as programs which either triggers some main() function or a reliable SEGV ;-). Furthermore, there is no need for linker scripts to be ever +x. This is only necessary for actual binary libraries; see: http://unix.stackexchange.com/a/48479/22833
May check for .so's `interpreter`?
And maybe it'd be good to have `QA_DONTMAKEEXECUTABLE` option.
(In reply to Alexander Kurakin from comment #2) > And maybe it'd be good to have `QA_DONTMAKEEXECUTABLE` option. QA_* is purely intended for warnings.