What's the supported language for clang driver?

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

What's the supported language for clang driver?

Yonggang Luo
def x : JoinedOrSeparate<["-"], "x">, Flags<[DriverOption,CC1Option]>,
  HelpText<"Treat subsequent input files as having type <language>">,
  MetaVarName<"<language>">;


Is there a list for this.

I want to compile a gas style x86 assembly file to COFF object file by
the driver clang, how to do that.

--
         此致

罗勇刚
Yours
    sincerely,
Yonggang Luo

_______________________________________________
cfe-dev mailing list
[hidden email]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev
Reply | Threaded
Open this post in threaded view
|

Re: What's the supported language for clang driver?

Yonggang Luo
to be exact, I want to do this but failed:
H:\CI\bld\compilers\musl\src\math\x86_64>clang sqrt.s /Xassembler -filetype=obj
-triple i686-pc-win32
clang.exe: error: unknown argument: '-filetype=obj'
clang.exe: error: unknown argument: '-triple'
clang.exe: error: no such file or directory: '/Xassembler'
clang.exe: error: no such file or directory: 'i686-pc-win32'

2013/10/19 罗勇刚(Yonggang Luo) <[hidden email]>:

> def x : JoinedOrSeparate<["-"], "x">, Flags<[DriverOption,CC1Option]>,
>   HelpText<"Treat subsequent input files as having type <language>">,
>   MetaVarName<"<language>">;
>
>
> Is there a list for this.
>
> I want to compile a gas style x86 assembly file to COFF object file by
> the driver clang, how to do that.
>
> --
>          此致
> 礼
> 罗勇刚
> Yours
>     sincerely,
> Yonggang Luo



--
         此致

罗勇刚
Yours
    sincerely,
Yonggang Luo

_______________________________________________
cfe-dev mailing list
[hidden email]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev
Reply | Threaded
Open this post in threaded view
|

Re: What's the supported language for clang driver?

Hans Wennborg
Does something like this work:

  clang -c sqrt.s

Clang should detect the file type based on the extension and assemble it.

 - Hans

On Fri, Oct 18, 2013 at 11:30 AM, 罗勇刚(Yonggang Luo)
<[hidden email]> wrote:

> to be exact, I want to do this but failed:
> H:\CI\bld\compilers\musl\src\math\x86_64>clang sqrt.s /Xassembler -filetype=obj
> -triple i686-pc-win32
> clang.exe: error: unknown argument: '-filetype=obj'
> clang.exe: error: unknown argument: '-triple'
> clang.exe: error: no such file or directory: '/Xassembler'
> clang.exe: error: no such file or directory: 'i686-pc-win32'
>
> 2013/10/19 罗勇刚(Yonggang Luo) <[hidden email]>:
>> def x : JoinedOrSeparate<["-"], "x">, Flags<[DriverOption,CC1Option]>,
>>   HelpText<"Treat subsequent input files as having type <language>">,
>>   MetaVarName<"<language>">;
>>
>>
>> Is there a list for this.
>>
>> I want to compile a gas style x86 assembly file to COFF object file by
>> the driver clang, how to do that.
>>
>> --
>>          此致
>> 礼
>> 罗勇刚
>> Yours
>>     sincerely,
>> Yonggang Luo
>
>
>
> --
>          此致
> 礼
> 罗勇刚
> Yours
>     sincerely,
> Yonggang Luo
>
> _______________________________________________
> cfe-dev mailing list
> [hidden email]
> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev

_______________________________________________
cfe-dev mailing list
[hidden email]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev
Reply | Threaded
Open this post in threaded view
|

Re: What's the supported language for clang driver?

Yonggang Luo
H:\CI\bld\compilers\musl\src\math\i386>clang -v
clang version 3.4 (trunk)
Target: i686-pc-win32
Thread model: posix

H:\CI\bld\compilers\musl\src\math\i386>clang -c sqrt.s
sqrt.s:2:7: error: expected absolute expression
.type sqrt,@function
      ^

H:\CI\bld\compilers\musl\src\math\i386>type sqrt.s
.global sqrt
.type sqrt,@function
sqrt:   fldl 4(%esp)
        fsqrt
        fstsw %ax
        sub $12,%esp
        fld %st(0)
        fstpt (%esp)
        mov (%esp),%ecx
        and $0x7ff,%ecx
        cmp $0x400,%ecx
        jnz 1f
        and $0x200,%eax
        sub $0x100,%eax
        sub %eax,(%esp)
        fstp %st(0)
        fldt (%esp)
1:      add $12,%esp
        fstpl 4(%esp)
        fldl 4(%esp)
        ret

H:\CI\bld\compilers\musl\src\math\i386>




2013/10/19 Hans Wennborg <[hidden email]>:

> Does something like this work:
>
>   clang -c sqrt.s
>
> Clang should detect the file type based on the extension and assemble it.
>
>  - Hans
>
> On Fri, Oct 18, 2013 at 11:30 AM, 罗勇刚(Yonggang Luo)
> <[hidden email]> wrote:
>> to be exact, I want to do this but failed:
>> H:\CI\bld\compilers\musl\src\math\x86_64>clang sqrt.s /Xassembler -filetype=obj
>> -triple i686-pc-win32
>> clang.exe: error: unknown argument: '-filetype=obj'
>> clang.exe: error: unknown argument: '-triple'
>> clang.exe: error: no such file or directory: '/Xassembler'
>> clang.exe: error: no such file or directory: 'i686-pc-win32'
>>
>> 2013/10/19 罗勇刚(Yonggang Luo) <[hidden email]>:
>>> def x : JoinedOrSeparate<["-"], "x">, Flags<[DriverOption,CC1Option]>,
>>>   HelpText<"Treat subsequent input files as having type <language>">,
>>>   MetaVarName<"<language>">;
>>>
>>>
>>> Is there a list for this.
>>>
>>> I want to compile a gas style x86 assembly file to COFF object file by
>>> the driver clang, how to do that.
>>>
>>> --
>>>          此致
>>> 礼
>>> 罗勇刚
>>> Yours
>>>     sincerely,
>>> Yonggang Luo
>>
>>
>>
>> --
>>          此致
>> 礼
>> 罗勇刚
>> Yours
>>     sincerely,
>> Yonggang Luo
>>
>> _______________________________________________
>> cfe-dev mailing list
>> [hidden email]
>> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev



--
         此致

罗勇刚
Yours
    sincerely,
Yonggang Luo

_______________________________________________
cfe-dev mailing list
[hidden email]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev