On November 28, 2002 01:35 pm, Alexandre Julliard wrote:
> > -CC=gcc
> > +CC=wcc
> >
> > Q: Alexandre, would you accept such a utility in the tree?
>> I don't know, I don't think you can write a one-size-fits-all script,
> different apps will require different options, and then it will get
> even more confusing IMO if you have two different ways of doing it
> depending on your options. Maybe we should simply have a script
> example in the documentation that people can adapt and ship with their
> app if the makefile really makes it hard to set options.
Sorry, maybe I was unclear. This wrapper will probably be a small C
program that understands gcc's options. It needs to do the following:
-- add the include dirs first
-- add -fshort-wchar
-- add -D__int8=char -D__int16=short -D__int32=int "-D__int64=long long"
-- remove cygwin options not recognized by the Linux gcc
If you think about them, it kindda makes sense, as under a Windowish
environment these options are _implied_ in the invocation of gcc,
just like -I /usr/include is implied when you invoke gcc under Linux.
So to be honest, I don't see why it would be confusing, and second,
why we can not have a one-size-fits-all wrapper.
As I said, this is more a porting tool, to help you with the initial port.
If the app has a configure script, you would want to instrument it to
generate the correct flags for the compiler, and use gcc directly. But this
is time consuming, and you have to worry about so many things at the
beginning, I find it so much easier to have something working, and tweak
only one thing at a time.
--
Dimi.