Re: about gcc native on Microsoft Windows

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



在 2019/9/26 19:47, Stefan Ring 写道:
> On Thu, Sep 26, 2019 at 1:06 PM Liu Hao <lh_mouse@xxxxxxx> wrote:
>>
>> 在 2019/9/25 20:43, Tamar Christina 写道:
>>>
>>
>> Building GCC requires a POSIX-compliant shell. Both Cygwin and MSYS2 are
>> an option. I am not clear about WSL; I haven't heard of anybody who ever
>> had built GCC in it.
> 
> You could easily build a cross compiler for mingw using it, but that
> probably does not count as "native".
> 
> I don’t remember right now: Is WSL capable of running Windows binaries?
> 

[Disclaimer: This is merely my presumption. Although I occasionally
cross-compile other projects from Linux to Windows, I haven't tried
cross-compiling GCC itself from Linux at all.]

It should be easy to build a native compiler without having a cross
compiler first, as those pre-built CRT objects and libraries are already
everywhere and can be copied into the build system directly, so
configuring GCC with `--{host,target}=x86_64-w64-mingw32` for example
should be enough for creating a native compiler.

It is a cross binutils that is a must-have.

-- 
Best regards,
LH_Mouse

Attachment: signature.asc
Description: OpenPGP digital signature


[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux