This is the mail archive of the gcc-help@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: about gcc native on Microsoft Windows


在 2019/9/26 19:47, Stefan Ring 写道:
> On Thu, Sep 26, 2019 at 1:06 PM Liu Hao <lh_mouse@126.com> 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 Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]