This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: How feasible is it to port gold to mingw?
- From: NightStrike <nightstrike at gmail dot com>
- To: Greatwolf <gmane dot greatwolf at mamber dot net>
- Cc: binutils at sources dot redhat dot com
- Date: Sat, 4 Dec 2010 22:32:26 -0500
- Subject: Re: How feasible is it to port gold to mingw?
- References: <Xns9E44BF45A3CD6gmanegreatwolfmamber@80.91.229.10>
On 12/4/10, Greatwolf <gmane.greatwolf@mamber.net> wrote:
> Hi all,
>
> I've been using the mingw-gcc toolset for a while on windows and one of
> the major aspects I really dislike is the build time needed to build
> especially large projects. This is especially noticable during the
> linking phase. This is a shame because this toolset performs very well in
> other aspects like ansi conformance, quality of code generated etc.
>
> I've been looking at ways to help speed the linking process up and gold
> seems like a possible answer. The only problem is it doesn't support the
> PE/Coff format needed on windows.
>
> According to Ian Lance Taylor:
>
> "gold is ELF only, and will never be ported to mingw, at least not as a
> native linker. Sorry about that.
>
> ELF (used on GNU/Linux, Solaris, and most free operating systems) and
> PE/COFF (used on Windows) and Mach-O (used on MacOS X) are all quite
> different. Writing a linker which works for all of them requires a number
> of compromises, which is part of why the GNU linker is so comparatively
> slow (the GNU linker does not support Mach-O, but it does support both
> ELF and PE/COFF, among others). In order to maximize gold's performance,
> I only focused on ELF."
>
> So my questions are:
>
> how feasible would it be to port gold over to windows assuming someone
> is willing to take on this workload?
>
> What part of the code base in gold would likely need to be modified?
>
> How much work would need to be done? Doesn't need to be precise; I'm
> looking for a ballpark figure here. eg. would 20%, 50%, or 80% of the
> code need to be change due to platform specific details?
>
> What sort of technical knowledge would one need to be able to perform
> this task?
>
> Thanks,
> VicT
>
>
I would think that if it's written in C++ in a true object oriented
form, that it would be easy to derive a new target from an existing
template using some random appropriate design pattern.