This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: -fdump-translation-unit considered harmful
- From: Stefan Strasser <sstrasser at systemhaus-gruppe dot de>
- To: Pjotr Kourzanov <peter dot kourzanov at xs4all dot nl>
- Cc: rms at gnu dot org, gcc at gnu dot org
- Date: Thu, 30 Dec 2004 03:11:58 +0100
- Subject: Re: -fdump-translation-unit considered harmful
- References: <E1CiDby-0004uu-UO@fencepost.gnu.org> <41D34C10.20406@xs4all.nl>
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