https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105302

--- Comment #7 from Brecht Sanders <brechtsanders at users dot sourceforge.net> 
---
I'm still trying to understand how it all works, but to avoid \n versus \r\n
issues on Windows I would already recommend these changes:
```
patch -ulbf gcc/go/gofrontend/gogo.cc << EOF
@@ -5252,3 +5252,3 @@
   std::ofstream out;
-  out.open(this->c_header_.c_str());
+  out.open(this->c_header_.c_str(), std::ios_base::binary);
   if (out.fail())
EOF
patch -ulbf gcc/go/gofrontend/ast-dump.cc << EOF
@@ -197,3 +197,3 @@
   dumpname += ".dump.ast";
-  out.open(dumpname.c_str());
+  out.open(dumpname.c_str(), std::ios_base::binary);

EOF
```
Unfortanately this doesn't solve the issue though.

I couldn't figure out yet where the code is that makes go_read_export_data in
gcc/go/go-backend.cc skip the part before the magic string...

Reply via email to