On Wed, Jan 12, 2011 at 06:07:48AM -0500, Bill Cox wrote:
> Unfortunately, while I could implement this idea in a few days, the
> red tape would keep it in limbo so long that I'll likely die of old
> age before it gets into Debian Stable.  Oh, well... here's the dumb
> idea anyway...  In short, support a syntax in gcc like:
> 
>     $ gcc myprog.c -lgit://github/~waywardgeek/sonic=0.1
> 
> In theory, this would cause gcc to do the following:
> 
>     - Check and see if the requested library has already been
> downloaded and built, and still in the cache
>     - If not, download the latest compatible signed version, verify
> the signature, and compile it
>     - link to the library in the cache

At a first glance, I find your idea crazy but nice (but what about header
files *.h of the requested library?). I would be delighted to have it. Maybe
others don't think that way (in particular, those not working on Linux, and
those not working on a compiler running with a network connection).

Very probably ccache is the better place to implement that, since it already do
some (preprocessed) source code cache. http://ccache.samba.org/

However, my personal feeling is that GCC is quite conservative on the user
features it is accepting. So I won't bet that your idea will be positively
accepted.

Nevertheless, you could propose a patch to GCC to implement what you are
dreaming of. See http://gcc.gnu.org/contribute.html for more (and don't
forget the legal part, i.e. the copyright assignment to FSF).

I do find your idea nice, but I am quite pessimistic on the chances it has
to get accepted into the GCC trunk. Don't expect others to work on it. If
you really want it, work hard to make a patch for it and propose that
working patch.

Besides, what you propose probably need mostly also a support in the build
tools, in particular inside GNU make. Probably, ccache & make are a better
place for it.

So while I am intellectually appealed by your idea, I am quite pessimistic
in practice to get it accepted (even within several years), and it probably
belongs more to other tools (make, ccache) than to GCC.

However, to have the GCC Community to consider your idea, you'll have to
first show a patch implementing it.

Maybe, what you are suggesting would be better dealt with a plugin machinery
inside gcc itself (we don't have any plugin hooks inside gcc/gcc.h yet).

Regards.

PS. I would believe most GCC contributors won't be interested.

-- 
Basile STARYNKEVITCH         http://starynkevitch.net/Basile/
email: basile<at>starynkevitch<dot>net mobile: +33 6 8501 2359
8, rue de la Faiencerie, 92340 Bourg La Reine, France
*** opinions {are only mines, sont seulement les miennes} ***

Reply via email to