Patchwork don't check for execute bits of the liblto plugin

login
register
mail settings
Submitter Matthias Klose
Date May 7, 2012, 11:07 p.m.
Message ID <4FA855BE.9000103@ubuntu.com>
Download mbox | patch
Permalink /patch/157489/
State New
Headers show

Comments

Matthias Klose - May 7, 2012, 11:07 p.m.
The lto plugin is installed without x bits set, but gcc-ar.c still checks for
the execute bits. There is no need to have the lto plugin to have the x bits
set, so just check that it is readable.

Ok for the trunk and the 4.7 branch?

  Matthias
* (main): Don't check for execute bits for the plugin.
Richard Guenther - May 8, 2012, 8:44 a.m.
On Tue, May 8, 2012 at 1:07 AM, Matthias Klose <doko@ubuntu.com> wrote:
> The lto plugin is installed without x bits set, but gcc-ar.c still checks for
> the execute bits. There is no need to have the lto plugin to have the x bits
> set, so just check that it is readable.
>
> Ok for the trunk and the 4.7 branch?

Ok.

Thanks,
Richard.

>  Matthias

Patch

--- gcc/gcc-ar.c
+++ gcc/gcc-ar.c
@@ -70,7 +70,7 @@ 
 	           dir_separator,
 		   LTOPLUGINSONAME,
 		   NULL);
-  if (access (plugin, X_OK))
+  if (access (plugin, R_OK))
     {
       fprintf (stderr, "%s: Cannot find plugin %s\n", av[0], plugin);
       exit (1);