On Mon, 9 Jan 2006 20:58:19 -0800, Jonathan Leffler
<[EMAIL PROTECTED]> wrote:
> On 1/9/06, Tim Bunce <[EMAIL PROTECTED]> wrote:
> >
> > On Fri, Dec 30, 2005 at 11:31:50PM +0000, Tim Bunce wrote:
> >
> > > the LD_RUN_PATH=foo in the makefile is only exported into the
> > > environment if there's already an env var with the same name defined.
> > > Sigh.
> > >
> > > For gnu make we could add a line that says
> > >
> > > export LD_RUN_PATH
> > >
> > > but I don't know how portable that is to other makes. Can people with
> > > non-gnu make programs let me know if that's valid as a line in a
> > makefile?
> >
> > Ping! Can people with non-gnu makes give this a go?
> > Warnings are okay, but a fatal error would be bad.
>
>
>
> I'd need a bigger context to know. Usually, you can do:
>
> <tab>LD_RUN_PATH=${LD_RUN_PATH} ${LD_COMMAND} ${LD_OPTIONS} ${LD_FILES}
> ${LD_LIBRARIES} ...
>
> This uses the innate Bourne/Korn/POSIX/Bash shell syntax that implicitly
> exports values for the following command.
And thus will not work for the crazy people that have set make's ${SHELL} to
csh or tcsh
For both you can force it to work with 'env'
<tab>env LD_RUN_PATH=${LD_RUN_PATH} ${LD_COMMAND} ${LD_OPTIONS} ${LD_FILES}
${LD_LIBRARIES} ...
> The DBD::Informix code does this a lot.
>
> > > course, forcing it thru using
> > > >
> > > > -Wl,-rpath,/usr/lib/oracle/xe/...
> > > >
> > > > works but I assume it might break non-Linux (non-gcc) installations.
> > >
> > > It would, sadly, but at least we know when we're dealing with gcc
> > > so can add it only in that case.
> > >
> > > Is that option syntax valid for gcc v2.x? Can someone with gcc v2 check?
> >
> > Ping!
>
>
>
> It is valid with GCC, and also with many SVR4-derived Unix systems. The -W
> option takes a letter (l in this case) which indicates a phase to pass the
> following option material to - the loader (ld) in this case. The letters
> available could vary a bit from system to system...
>
> The question should be "is -rpath,/usr/lib/oracle/xe/... understood by the
> loader in every situation?" to which, I suspect, the answer is "No". If
> you're using GNU LD, you are likely OK; if you're using other loaders, maybe
> not.
Definitely not.
i2:/u/usr/merijn 101 > ld -rpath /dev/null
ld: 0706-012 The -p flag is not recognized.
ld: 0706-012 The -a flag is not recognized.
ld: 0706-012 The -t flag is not recognized.
ld: 0706-012 The -h flag is not recognized.
a5:/u/usr/merijn 101 > ld -rpath /dev/null
ld: Unrecognized argument: -rpath
ld: Usage: ld [options] [flags] files
x1:/u/usr/merijn 103 > ld -rpath /dev/null
ld: Unrecognized argument: -rpath
Fatal error.
--
H.Merijn Brand Amsterdam Perl Mongers (http://amsterdam.pm.org/)
using Perl 5.6.2, 5.8.0, 5.8.5, & 5.9.2 on HP-UX 10.20, 11.00 & 11.11,
AIX 4.3 & 5.2, SuSE 9.2 & 9.3, and Cygwin. http://www.cmve.net/~merijn
Smoking perl: http://www.test-smoke.org, perl QA: http://qa.perl.org
reports to: [EMAIL PROTECTED], [email protected]