This is the mail archive of the gcc-patches@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: Objective C/C++ Compiler Drivers


On 4 September 2010 01:29, Joseph S. Myers <joseph@codesourcery.com> wrote:
> On Sat, 4 Sep 2010, Philip Herron wrote:
>
>> Then does it make sense for a compiler driver to be generated from
>> some kind of a config, i agree i've always found the compiler drivers
>> a frustrating thing, since for the most part all will do pretty
>> similar things, most customizations would be add extra linker options
>> i guess. I am not sure if that means we would have a build system to
>> generate it from a bash script and add extra options to the
>> config-lang.in to generate this or something.
>
> I am suggesting something much simpler: incremental refactoring of the
> existing code, moving shared utility functions to gcc.c, so that in the
> end most drivers can call a shared function and pass a C structure to it.
> Not anything requiring generator programs.
>
> For example, you might adapt the Fortran functions such as append_arg to
> allocate space dynamically rather than hardcoding limits on the size of
> the new array of options based on the old one, move them to gcc.c with
> declarations in gcc.h and make all drivers use them. ?That could be one of
> the incremental patches. ?Subsequent ones might try to identify what is
> common about the logic to add language-specific libraries.
>
> There is an idea that we don't really want all these drivers at all - we
> want "gcc" to link in the right libraries automatically for whatever
> languages were used for the object files it is asked to link - which
> certainly requires those libraries to be described by suitable
> datastructures gcc.c can use.
>
> --
> Joseph S. Myers
> joseph@codesourcery.com
>

Ah ok i see what you mean now, thanks by the way. I'll play around
with that now and see what happens and do it for the objc front-end
first.

--Phil


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