Don't worry about what the option does (it's 64-bit specific); it's just an example. It is just one of many hundreds of switches that gcc takes, and I can't see any way that filters could deal with options like this. Take a simpler one: -I. How does a filter on the output of gcc tell it where to look for include files? Not every option to a program can be applied as a filter on its output. Not just that, but the option actually conveys other information to the program. Even if you could apply it as a filter you somehow have to supply that information - the path where include files can be found.Sandras wrote:I do not know what that option stands for (what does it stand for?), but I agree, that some things may be better left for command line flags. I was talking about what I think Jezze wants, not what gcc needs. For example, he could use a different compiler, which does not take your mentioned option, if he decides to self-host. Whatever that option does, I do not believe it is essential for a self hosting OS.iansjack wrote:And have a separate filter program to process -mno-red-zone?Sandras wrote:As far as I understand, Jezze intends to pass only files as arguments, but no flags or anything. That means you could do cc file.c.
I guess you could say that simple programs, like ls, use some sort of filter paradigm whilst more complicated ones, like gcc, use a combination of filters and options file; yet others would probably still need switches. But that's just inconsistent, and plain ugly. A good OS should rely on the least number of simple paradigms, not leave it to the user to remember different ways of working with different programs.