From: Carsten Haitzler (The Rasterman) <raster@ra...> - 2010-12-04 01:58:11
On Fri, 3 Dec 2010 18:47:38 +0100 (CET) Vincent Torri <vtorri@...>
> On Fri, 3 Dec 2010, Cedric BAIL wrote:
> > On Fri, Dec 3, 2010 at 5:57 PM, Vincent Torri <vtorri@...> wrote:
> >> On Fri, 3 Dec 2010, Enlightenment SVN wrote:
> >>> Log:
> >>> * edje: improve portability and simplify code.
> >>> + snprintf(buf, sizeof(buf), "%s -I%s %s -E -o %s - < %s",
> >>> + getenv("CC") ? getenv("CC") : "cc",
> >>> inc, def, tmpn, file_in);
> >>> ret = system(buf);
> >> shouldn't you also pass
> >> -x c
> >> to force the language (gcc can rely on the file extension to select the
> > No need as I pass it using redirection instead of directly the
> > filename. That was to avoid complexifying the command line.
> >> language) and
> >> -std=c99
> >> to be sure to remove the c++ comments ?
> > Good question, don't know if it will be supported by other compiler
> > than gcc. What's your opinion ?
> sun (oracle) compiler: -xc99 (no -std option)
> icc: -std=c99
> x86 open64 (amd) : -std=c99
> vc++ (cl.exe): i don't know
> so maybe try first with -std=c99 ; if the command fails, try with -xc99
> I don't know other interesting compiler
actually... this brings up a bit of an issue. using cpp/cc/gcc to handle
#includes and macros and #ifdefs and so on was a handy idea... but it creates a
LOT of problems in the maintainability and portability of edje_cc due to
relying on a nebulous cpp that may or may not behave as we expect.
i'm thinking post 1.0 a lot of these features should go into edje_cc itself.
being able to do includes and macros - maybe we can do much more intelligent
macros that are able to understand the rest of the edc syntax and model.
------------- Codito, ergo sum - "I code, therefore I am" --------------
The Rasterman (Carsten Haitzler) raster@...