This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: -fdump-translation-unit considered harmful


Pjotr Kourzanov schrieb:
Hence my question: would GPL cover an executable that runs in a separate address space, albeit having some sections /readonly pairwise shared/ with GCC's cc1(plus)?


the problem some people may see isn't some technical way to link to gcc while circumventing the GPL. if this isn't covered by GPL by law an interface in gcc is the smallest problem of free software in general.
it is that you could easily export the data from the interface to a file and e.g. write a proprietary backend which only needs the file. this isn't covered by the GPL(compare loading an image by gimp into your proprierty app).
but I think this shouldn't be a reason to make gcc less useful for free software.


BTW, the GCC's backend(s) need not undergo dramatic patching, since all they need to do is to pause when the tree has been built and wait until the source-analyzing code has done its job

as has been pointed out by robert using a seperate address space because of licensing isn't necassary.
so, I don't know the possible problems with gcc's current architecture, but a source code analysis tool invoking gcc and reading the output pipe obviously isn't the best design, and invoking gcc with argument which loads a dynamic library by the analysis tool, what you're trying to avoid, isn't either.


is there a reason for not making the front ends dynamic libraries which could be linked by any program that wants to parse source code?
gcc backend would be one of those programs.



btw it would be great if this interface is two-way, for translations. so you could link the frontend, parse code, modify the tree, and pass it to the backend. without the long way round of writing modified source code and invoking gcc.



-- Stefan Strasser


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]