https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69754
Bug ID: 69754 Summary: --print-{file,prog}-name don't work for liblto_plugin.so Product: gcc Version: 6.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: driver Assignee: unassigned at gcc dot gnu.org Reporter: glebfm at altlinux dot org CC: amker.cheng at gmail dot com, unassigned at gcc dot gnu.org Target Milestone: --- Target: x86_64,arm,aarch64 Created attachment 37656 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=37656&action=edit proposed fix +++ This bug was initially created as a clone of Bug #62290 +++ $ gcc -print-file-name=liblto_plugin.so liblto_plugin.so $ gcc -print-prog-name=liblto_plugin.so liblto_plugin.so gcc -print-prog-name checks for X_OK, but liblto_plugin.so is not executable: -rw-r--r-- /usr/libexec/gcc/x86_64-alt-linux/5/liblto_plugin.so.0.0.0 The problem is that liblto_plugin.so is installed into $(libexecdir) which is intended for executable files. The correct location is inside $(libdir) along with other non-executable files.