[Ecls-list] Using different C compilers or settings...

Juan Jose Garcia-Ripoll jjgarcia at users.sourceforge.net
Mon Mar 3 13:24:42 UTC 2008

On Mon, Mar 3, 2008 at 1:11 PM, Pascal Costanza <pc at p-cos.net> wrote:
>  Is there an easy way to use different C compilers or compiler settings
>  when doing a compile-file? We would like to generate code for
>  different processors from the same running image, and we're trying to
>  figure out whether there is an easier way than to compile to C and
>  then "manually" trigger the invocation of C compiler...

Hi Pascal,

switching compilers is relatively easy, as far as all generated files
share the same dynamically or statically linked library as the core.

The relevant special variables are *cc*, *ld*, *cc-flags*, *ld-flags*,
*ld-bundle-flags* and *ld-shared-flags*, which define the name of the
compiler and of the linker (gcc, typically), and the flags for
compiling C files, and for linking executables, fasl files and shared

These variables are used in cmpmain.lsp by a bunch of functions that
abstract the tasks of compiling and linking various types of binaries,
and their combination is done using two format strings *cc-format* and
*ld-format*, as you will easily deduce from the code.

If you just want to change the compiler optimization and code
generation settings, extending *cc-flags* is the preferred way.


Facultad de Fisicas, Universidad Complutense,
Ciudad Universitaria s/n Madrid 28040 (Spain)

More information about the ecl-devel mailing list