[cfe-dev] clang sparc backend

Fangrui Song via cfe-dev cfe-dev at lists.llvm.org
Fri May 1 17:03:26 PDT 2020


On 2020-05-01, James Y Knight via cfe-dev wrote:
>The sparc integrated assembler does generally work, you can enable with
>-fintegrated-as. IIRC, it was disabled by default because there's some edge
>cases it didn't handle, but I don't remember the details.

https://reviews.llvm.org/rL254199 listed some issues with the integrated
assembler.

>On Fri, May 1, 2020 at 5:32 AM David Chisnall via cfe-dev <
>cfe-dev at lists.llvm.org> wrote:
>
>> Hi,
>>
>> It sounds as if the sparc back end is not using the integrated assembler
>> and so it will call out to the default assembler for your toolchain.
>> Because you have not specified a -B option, the default search path will
>> be /usr/bin, where it is finding an assembler.  This assembler,
>> unfortunately, cannot handle SPARC assembly (it sounds as if it's an
>> x86-64 build of gas).
>>
>> If you want to assemble the output from clang, you will need to install
>> a SPARC assembler (and, for it to be useful, also install a SPARC
>> linker) and specify -B {path/to/tools} in the flags that you pass to clang.
>>
>> David
>>
>> On 01/05/2020 07:40, suyash singh via cfe-dev wrote:
>> > does clang support sparc backend?
>> > I tried " clang -target sparc " to compile a simple c program on
>> > ubuntu(x86_64), clang detects sparc as a valid target but does not work
>> > with it.
>> >
>> > /usr/bin/as: unrecognized option '-Av8'
>> > clang-11: error: assembler command failed with exit code 1
>> >
>> > _______________________________________________
>> > cfe-dev mailing list
>> > cfe-dev at lists.llvm.org
>> > https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev
>> >
>> _______________________________________________
>> cfe-dev mailing list
>> cfe-dev at lists.llvm.org
>> https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev
>>

>_______________________________________________
>cfe-dev mailing list
>cfe-dev at lists.llvm.org
>https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev



More information about the cfe-dev mailing list