[Ecls-list] compile-file, user-supplied cc flags

Andy Hefner ahefner at gmail.com
Thu Jan 7 21:09:52 UTC 2010


Is it possible to add a keyword to compile-file letting the user
supply custom flags that are passed along to the C compiler? I rely on
this for passing extending the include path, enabling C99 mode, etc.
So far I've achieved this by binding C::*CC-FLAGS* in my application's
build script, but this doesn't work from my application compiled via
C:BUILD-PROGRAM. I use inline C heavily, and many of my source files
can't be compiled without some control over the C compiler.

Tonight I tried to add a feature to my app which would recompile and
reload modified source files from disk while the app was running
(useful since SLIME is perpetually unusable on ECL), but after a few
hours struggle I couldn't find a way to control the compiler falgs
that worked from my executable. The compiler is still there, but
C::*CC-FLAGS* is unbound. My attempts to add a new special
*user-cflags* variable failed, as did adding a user-cflags keyword to
COMPILE-FILE and COMPILER-CC (I always end up with an error about it
being an unknown keyword). This should be trivial, so I can only
assume there's some package weirdness causing the problems, where the
symbols I'm seeing are not EQ to those that existed when cmpmain.lsp
was compiled. Or perhaps I'm doing something unbelievably stupid.




More information about the ecl-devel mailing list