Re: [edk2] [edk2-buildtools] [PATCH] BaseTools: Add support for a CROSS_COMPILE ELFGCC

Subject: Re: [edk2] [edk2-buildtools] [PATCH] BaseTools: Add support for a CROSS_COMPILE ELFGCC

From: Jordan Justen <jljusten@gmail.com>

To: Andrew Fish <afish@apple.com>

Date: 2013-05-28 22:32:12

On Tue, May 28, 2013 at 12:26 PM, Andrew Fish  wrote:
> On May 28, 2013, at 12:10 PM, Jordan Justen  wrote:
>>> Anyway, I am not sure GCC for ARM architectures supports PE/COFF (I guess
>>> that would 'only' required to add the PE/COFF relocation symbols). But if
>>> ELFGCC is deprecated for IA32/X64 usage and ARM GCC only supports ELF
>>> output, do you see any issue to re-use ELFGCC as a cross-toolchain ?
>>
>> I don't think UEFI supports ELF images for any architecture. For that
>> reason, I don't think a toolchain named "*ELF*" is a good idea.
>
> Well the ELF bit is important as it has to do with which debugger you can use. It is the reason we compile to ELF and convert, so we can use debuggers that know about ELF images.
>
>> Maybe GCCCROSS is a better name?
>
> The problem is a gcc cross compiler could also directly produce a PE/COFF image, so which tool chain are you talking about?
>
> I vote to leave ELF in the name as it is the debug format being used. Well I guess we could call it DWARF to be pedantic, but Mach-O uses DWARF too, so ELF better maps what the debugger knows how to deal with.
>

If the debugging format is the critical element, then maybe DWARFGCC
is the right answer. I don't agree with this though. It doesn't seem
to follow the model of VS*/GCC*.

ELFGCC seems additionally problematic given its baggage as a 'hack'
toolchain for UnixPkg. I'd been hoping to deprecate it after
deprecating UnixPkg. (Hmm, probably time to follow through with that.)

Why this support can't be merged into the actively maintained GCC4*
toolchains? Or, will this introduce too much confusion on these
toolchains?

I like the CROSS_COMPILE idea, but maybe instead it should be TOOLS_PFX?

Although, doesn't CROSS_COMPILE/TOOLS_PFX gloss over the fact that
changing the GCC version like this may mean changes are required to
the tool arguments?

-Jordan

------------------------------------------------------------------------------
Introducing AppDynamics Lite, a free troubleshooting tool for Java/.NET
Get 100% visibility into your production application - at no cost.
Code-level diagnostics for performance bottlenecks with <2% overhead
Download for free and get started troubleshooting in minutes.
http://p.sf.net/sfu/appdyn_d2d_ap1
_______________________________________________
edk2-devel mailing list
edk2-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/edk2-devel