[LLVMdev] MIPS & GP register

Eli Friedman eli.friedman at gmail.com
Wed Aug 15 23:56:51 PDT 2012


On Wed, Aug 15, 2012 at 10:17 PM, Carl Norum <carl at lytro.com> wrote:
>>     -march=mips32r2
>>     -mtune=4kem
>>     -msoft-float
>>     -EL
>>
>>     -Xclang -triple -Xclang mipsel-sde-elf
>>     -Xclang -mrelocation-model -Xclang static
>>
>>     -Xclang -mllvm -Xclang -mips-ssection-threshold=0
>>     -Xclang -mllvm -Xclang -enable-mips-delay-filler

We generally try to discourage people from using -Xclang flags
wherever possible; they're really implementation details, and
considered an unstable interface.

For the triple and relocation model, the flags you're looking for are
"-target mipsel-sde-elf" and "-static".  For the MIPS-specific flags,
I don't think there's an equivalent; please file bugs if it's actually
useful functionality we should be exposing with regular flags.

> Does that stuff looks like it makes sense?  A once-over by someone with some expertise would be much appreciated.  I also see in the LLVM 3.1 release notes that "MIPS32 little-endian direct object code emission is functional" - does that mean we don't need a supporting GCC installation anymore?  What do we do to enable this feature?  Would our flags above need to change if we do that?

"-integrated-as" will force it on.  Not a MIPS expert, so no clue if
it actually works there.  By itself, it's probably not particularly
useful in terms of eliminating other tools from your toolchain; like
the name of flag says, it's basically just an integrated version of
"as".

-Eli




More information about the llvm-dev mailing list