Re: [PATCH] Fix rust on *-w64-mingw32

2024-04-27 Thread LIU Hao via Gcc
Attached is an alternative patch to functionalize `load_macros_array`. It allows GCC to build on x86_64-w64-mingw32. Not tested though, as I know no Rust. As before, please edit the patch at your disposal. -- Best regards, LIU Hao diff --git

Re: [PATCH] Fix rust on *-w64-mingw32

2024-04-27 Thread LIU Hao
Attached is an alternative patch to functionalize `load_macros_array`. It allows GCC to build on x86_64-w64-mingw32. Not tested though, as I know no Rust. As before, please edit the patch at your disposal. -- Best regards, LIU Hao diff --git

Re: [PATCH] Fix rust on *-w64-mingw32

2024-04-26 Thread LIU Hao via Gcc
在 2024-04-26 18:47, Arthur Cohen 写道: Hello, Thanks a lot for the patch :) I agree with Jakub that we should be using the GNU coding style in our call to std::replace - this is what we try to enforce in the rest of the Rust frontend. Please feel welcome to rewrite the patch as necessary. It

Re: [PATCH] Fix rust on *-w64-mingw32

2024-04-26 Thread Arthur Cohen
Hello, Thanks a lot for the patch :) I agree with Jakub that we should be using the GNU coding style in our call to std::replace - this is what we try to enforce in the rest of the Rust frontend. Regarding the changes to `mkdir_wrapped`, the function now looks a bit odd: void mkdir_wrapped

Re: [PATCH] Fix rust on *-w64-mingw32

2024-04-25 Thread Jakub Jelinek via Gcc
On Thu, Apr 25, 2024 at 07:16:31PM +0800, LIU Hao via Gcc wrote: > --- a/gcc/rust/parse/rust-parse.cc > +++ b/gcc/rust/parse/rust-parse.cc > @@ -89,7 +89,7 @@ extract_module_path (const AST::AttrVec _attrs, >// Source: rustc compiler >// >

[PATCH] Fix rust on *-w64-mingw32

2024-04-25 Thread LIU Hao via Gcc
Hello, Attached is a patch for fixing build issues on *-w64-mingw32. Please check and update at your leisure. 'gcc/system.h' contains a macro called `mkdir()` and there is no need to invoke `_mkdir()` within a conditional block. -- Best regards, LIU Hao diff --git