[llvm-commits] [llvm] r131205 - in /llvm/trunk/lib/MC: ELFObjectWriter.cpp ELFObjectWriter.h

Rafael Avila de Espindola rafael.espindola at gmail.com
Fri May 13 15:02:32 PDT 2011


>> indicating that a given file is PIC or not. Since the MC interface is
>> isomorphic with the assembler, llc should not pass any flags to mc.
>
> That switch is necessary for producing code that is identical to gas.
>
> This is a tough call.
>
> Either we live with a hidden switch or make it "nicer" by linking the
> two switches, or give MC access to upstream codegen internals.
> Linking the cmdline switches  is the solution of least work, but I'm
> punting on it for now

The option is *not* needed. When building for ARM I get:

$ gcc -c test.c -v
...
as -march=armv5te -mfloat-abi=soft -mfpu=vfp -meabi=4 -o test.o test.s

$ gcc -fPIC -c test.c -v
...
as -march=armv5te -mfloat-abi=soft -mfpu=vfp -meabi=4 -o test.o test.s

Note that the command line to as is the same in both cases. All the 
information gas needs is in the .s file, so all the information MC needs 
is also there.

Please remove the option and figure out what logic gas is using.

Cheers,
Rafael



More information about the llvm-commits mailing list