[opam-devel] passing through environment variables to builds

Anil Madhavapeddy anil at recoil.org
Sat Dec 13 20:35:46 GMT 2014

On 5 Dec 2014, at 04:19, ygrek <ygrek at autistici.org> wrote:
> On Thu, 04 Dec 2014 23:19:00 +0300
> Peter Zotov <whitequark at whitequark.org> wrote:
>> I believe this should be done at the compiler level. Requiring every
>> native package to figure out what CFLAGS/LDFLAGS the current platform
>> wants is unreasonable.
> Agreed, and that's why (at least) gcc has C_INCLUDE_PATH and LIBRARY_PATH and those
> should be set by user in the environment (maybe permanently) if he wants to use packages
> installed in /usr/local or /opt or whatever, and this shouldn't be the deal of package manager
> to automatically make various paths available to the compiler without user's approval
> (because that can lead to conflicts if there are several versions of same library installed
> in different locations), IIUC.

Doing it at the compiler level is orthogonal to the question I
asked.  It's still very important for a source-level package 
manager to support flexible passthrough of CFLAGS for other reasons.
(for instance, to crank up warnings, pass cross-compilation targets,
 preface CC with static analysis tools, etc...)

Note that I'm not asking for every package to support these.  I'm
asking how OPAM passes through the variables so that *my* packages
can support them.


More information about the opam-devel mailing list