bug-readline
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Bug-readline] readline does not pick up first ld in PATH


From: Chet Ramey
Subject: Re: [Bug-readline] readline does not pick up first ld in PATH
Date: Mon, 17 Apr 2017 09:44:57 -0400
User-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.12; rv:45.0) Gecko/20100101 Thunderbird/45.8.0

On 4/14/17 12:15 PM, Stewart, Adam James wrote:
> Hi,
> 
> I'm working on the development of a package manager called Spack. One of
> the nice things about Spack is that it uses compiler wrappers to
> automatically add things like "-L/path/to/dependency/lib
> -I/path/to/dependency/include -Wl,rpath..." to the link line. This works
> for most packages, but doesn't seem to work for readline. Despite the fact
> that our ld wrapper comes first in the PATH, the readline build seems to
> pick up /Library/Developer/CommandLineTools/usr/bin/ld anyway. I can't
> figure out how to tell it to use our ld wrapper instead.

In general, Makefiles don't call `ld' directly.  The readline shared
library Makefile certainly doesn't.  It uses `gcc' as the linker, which
allows the compiler driver to call whatever other compatible linkers it
wants, using the appropriate set of private options.  In this case, gcc
calls the standard Xcode ld.

You might be able to get the results you want by specifying the desired
program as the value of the SHOBJ_LD make variable.  You can supply the
correct flags by specifying a value for SHOBJ_LDFLAGS.  For example,

        gmake SHOBJ_LD=ld-wrapper SHOBJ_LDFLAGS='-dynamiclib -dynamic'

The readline shared library build system is described in INSTALL, included
with the readline distribution.

Chet

-- 
``The lyf so short, the craft so long to lerne.'' - Chaucer
                 ``Ars longa, vita brevis'' - Hippocrates
Chet Ramey, UTech, CWRU    address@hidden    http://cnswww.cns.cwru.edu/~chet/



reply via email to

[Prev in Thread] Current Thread [Next in Thread]