Re: [PATCH] Prevent LTO wrappers to process a recursive execution

2016-07-06 Thread Jeff Law
On 06/23/2016 02:23 AM, Martin Liška wrote: On 06/23/2016 06:57 AM, Jeff Law wrote: Is this still something you want to pursue? It looks pretty reasonable and one could make an argument that it's a good idea in and of itself. jeff Yeah, I would like to install the patch :) Can I take your r

Re: [PATCH] Prevent LTO wrappers to process a recursive execution

2016-06-23 Thread Martin Liška
On 06/23/2016 06:57 AM, Jeff Law wrote: > Is this still something you want to pursue? It looks pretty reasonable and > one could make an argument that it's a good idea in and of itself. > > jeff Yeah, I would like to install the patch :) Can I take your reply as signal that it's accepted? Tha

Re: [PATCH] Prevent LTO wrappers to process a recursive execution

2016-06-22 Thread Jeff Law
On 04/25/2016 09:49 AM, Martin Liška wrote: Hello. To make LTO wrappers (gcc-nm, gcc-ar, gcc-ranlib) more smart, I would like to prevent execution of the same binary by these wrapper. For LTO testing I symlink ar (nm, ranlib) to these wrappers instead of hacking a build system to respect NM (A

Re: [PATCH] Prevent LTO wrappers to process a recursive execution

2016-04-26 Thread Martin Liška
On 04/25/2016 09:30 PM, Andi Kleen wrote: > Does that really work? When the executable is found in $PATH > av[0] does not contain the full path name. But you seem to assume > it does? > > -Andi Hi. Well, it should be resolved by lrealpath. There's usage from my machine: marxin@marxinbox:~> whic

Re: [PATCH] Prevent LTO wrappers to process a recursive execution

2016-04-25 Thread Andi Kleen
Martin Liška writes: > #endif > + /* Do not search original location in the same folder. */ > + char *exe_folder = lrealpath (av[0]); > + exe_folder[strlen (exe_folder) - strlen (lbasename (exe_folder))] = > '\0'; > + char *location = concat (exe_folder, PERSONALITY, NULL);