can you give some detail how run_build is set? I agree with you on
principle the fix.
Sun

On Thu, Oct 21, 2010 at 7:49 PM, David Coakley <dcoak...@gmail.com> wrote:
> In the Open64 driver, there is code to add a linker '-rpath' option
> for libraries that are included with the compiler (see
> postprocess_ld_args() in the driver).  The intended effect of this
> code is that programs compiled by Open64 can be run without setting
> LD_LIBRARY_PATH as long as the compiler installation directory still
> exists.  The embedded RPATH in the executable acts as a default
> location to find the shared objects.
>
> We ran into a small problem: for shared objects that are part of the
> compiler build, the RPATH is also set.  This could cause the runtime
> linker to look in the compiler build directory for an
> indirectly-included shared object (e.g. libacml_mv.so is included by
> libmv.so).  If the build directory no longer existed, the library
> would not be found.
>
> One way to fix the problem is just to skip the code that adds '-rpath'
> when we are building the compiler's libraries.  I include a patch
> below that does that.
>
> Can a gatekeeper review the patch?  Thanks,
>
> -David Coakley / AMD Open Source Compiler Engineering
>
>
>
> ===================================================================
> --- osprey/driver/phases.c      (revision 3379)
> +++ osprey/driver/phases.c      (working copy)
> @@ -2315,6 +2315,13 @@
>     }
>
>     /*
> +     * When building the compiler's libraries, do not append any rpath
> +     * options since these would reference the build directory.
> +     */
> +    if (run_build)
> +        return;
> +
> +    /*
>      * For some reason, our cross linker won't find libraries in some
>      * directories unless it's told about them with -rpath-link.
>      * Here, we scan all -L flags and pass them as -rpath-link flags,
>
> ------------------------------------------------------------------------------
> Nokia and AT&T present the 2010 Calling All Innovators-North America contest
> Create new apps & games for the Nokia N8 for consumers in  U.S. and Canada
> $10 million total in prizes - $4M cash, 500 devices, nearly $6M in marketing
> Develop with Nokia Qt SDK, Web Runtime, or Java and Publish to Ovi Store
> http://p.sf.net/sfu/nokia-dev2dev
> _______________________________________________
> Open64-devel mailing list
> Open64-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/open64-devel
>

------------------------------------------------------------------------------
Nokia and AT&T present the 2010 Calling All Innovators-North America contest
Create new apps & games for the Nokia N8 for consumers in  U.S. and Canada
$10 million total in prizes - $4M cash, 500 devices, nearly $6M in marketing
Develop with Nokia Qt SDK, Web Runtime, or Java and Publish to Ovi Store 
http://p.sf.net/sfu/nokia-dev2dev
_______________________________________________
Open64-devel mailing list
Open64-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/open64-devel

Reply via email to