Re: Statically linking C code into ECL

2016-12-27 Thread Faré
On Tue, Dec 27, 2016 at 3:07 AM, Daniel Kochmański wrote: >> Unhappily, neither *user-cc-flags* nor *ld-flags* allows me to get the >> desired result: >> the former is not used by build-program, and the latter is only used >> *after* passing the list of .a, too late for a -Wl,--whole-archive. >> M

Re: Statically linking C code into ECL

2016-12-27 Thread Daniel Kochmański
Faré writes: > Unhappily, neither *user-cc-flags* nor *ld-flags* allows me to get the > desired result: > the former is not used by build-program, and the latter is only used > *after* passing the list of .a, too late for a -Wl,--whole-archive. > Moreover, on Darwin and/or with lld, I need to use

Re: Statically linking C code into ECL

2016-12-26 Thread Faré
Unhappily, neither *user-cc-flags* nor *ld-flags* allows me to get the desired result: the former is not used by build-program, and the latter is only used *after* passing the list of .a, too late for a -Wl,--whole-archive. Moreover, on Darwin and/or with lld, I need to use -Wl,-force_load before e

Re: Statically linking C code into ECL

2016-12-26 Thread Daniel Kochmański
Gabriel Dos Reis writes: > On Mon, Dec 26, 2016 at 8:06 AM, Daniel Kochmański > wrote: > >> Faré writes: >> >> > Is there an official or encouraged way? >> >> No. >> > > Should there be one? Imho the best way to build C sources against ECL is to produce ELF from ECL (object file, shared object,

Re: Statically linking C code into ECL

2016-12-26 Thread Gabriel Dos Reis
On Mon, Dec 26, 2016 at 8:06 AM, Daniel Kochmański wrote: > Faré writes: > > > Is there an official or encouraged way? > > No. > Should there be one? I've lost (for a year or two) ability to build OpenAxiom with ECL and I've found it more and more difficult and time consuming to debug building

Re: Statically linking C code into ECL

2016-12-26 Thread Daniel Kochmański
Faré writes: > Is there an official or encouraged way? No. >> builder (and all interfaces built on top of it) support ld-flags key >> argument. Additionally if you want to influence how ECL compiles files >> dynamically you may shadow *user-cc-flags* and *user-ld-flags*. >> > This won't work. *

Re: Statically linking C code into ECL

2016-12-26 Thread Faré
On Mon, Dec 26, 2016 at 5:02 AM, Daniel Kochmański wrote: > What do you mean by 'linking C file'? If you want to compile independent > C file with ECL, then you are out of luck, because there is no official > support for that in ECL's builder. It may work by passing file as one of > lisp-files to

Re: Statically linking C code into ECL

2016-12-26 Thread Daniel Kochmański
Faré writes: > What's the official way to link a C file into ECL? What do you mean by 'linking C file'? If you want to compile independent C file with ECL, then you are out of luck, because there is no official support for that in ECL's builder. It may work by passing file as one of lisp-files t