[llvm-commits] EABI triples patch (1/2)

Renato Golin Renato.Golin at arm.com
Tue Jan 18 13:27:23 PST 2011


> You'll also want *-none-elf as well while you're doing this.

Hi Eric,

We don't use it here and don't have a good use case to add it to the unit test, so I'm not the best person to actually do that change.

Future additions that I would like to work on are:


1. Separate architecture support from Clang's decisions, to eradicate "if (v6) { do this }" and move to "if (featureImplemented) { use feature }". For that, would be good to use the current LLVM's TargetData to hold target and sub-target information.

We realized that Clang is parsing the target data into command-line options so llc transform that again into TargetData and other options. Would make much more sense if Clang could recognize that the back-end is actually LLVM itself and use the same libraries to create the TargetData and pass it directly to the back-end. No?


2. Separate host triple from target triple. Today, Clang prints "host = arm" when compiling on x86_64 to ARM, and the decisions (both host and target based) are done on that triple, which doesn't make sense.

A critical case is when you have four assemblers in your path: ELF format = { x86, x86_64 } X generating code to { x86, ARM }. If your host triple is ARM, which ELF format do you choose? If you say you want the 64bit binary, how do you choose to create ARM code? Or x86 code?


Both changes will hopefully make cross-compiling much easier on ARM platforms.

cheers,
--renato

-- IMPORTANT NOTICE: The contents of this email and any attachments are confidential and may also be privileged. If you are not the intended recipient, please notify the sender immediately and do not disclose the contents to any other person, use it for any purpose, or store or copy the information in any medium.  Thank you.





More information about the llvm-commits mailing list