[librsvg] (#239): Add cross compiling document for win32
- From: Federico Mena Quintero <federico src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [librsvg] (#239): Add cross compiling document for win32
- Date: Wed, 19 Jun 2019 21:42:49 +0000 (UTC)
commit 4b10fcdbcdd90e49ed72a89fceaf847b6c5ca003
Author: Takuro Ashie <ashie clear-code com>
Date: Wed May 22 22:47:10 2019 +0900
(#239): Add cross compiling document for win32
Fixes https://gitlab.gnome.org/GNOME/librsvg/issues/239
COMPILING.md | 34 ++++++++++++++++++++++++++++++++++
1 file changed, 34 insertions(+)
---
diff --git a/COMPILING.md b/COMPILING.md
index a70f1223..80d2af3b 100644
--- a/COMPILING.md
+++ b/COMPILING.md
@@ -256,6 +256,38 @@ cd /source/tree/for/librsvg
make RUST_TARGET_PATH=/my/target/definition
```
+## Cross-compiling for win32 target
+
+You can also cross-compile to win32 (Microsoft Windows) target by using
+[MinGW-w64][mingw-w64]. You need to specify the appropriate target in the same way
+as usual:
+
+* Set an appropriate target via the `--host` configure option:
+ * `i686-w64-mingw32` for 32-bit target
+ * `x86_64-w64-mingw32` for 64-bit target
+* Set an appropriate RUST_TARGET:
+ * `i686-pc-windows-gnu` for 32-bit target
+ * `x86_64-pc-windows-gnu` for 64-bit target
+
+In addition you may need to link with some win32 specific libraries like
+`LIBS="-lws2_32 -luserenv"`.
+
+Example:
+
+```sh
+./configure \
+ --host=x86_64-w64-mingw32 \
+ RUST_TARGET=x86_64-pc-windows-gnu \
+ LIBS="-lws2_32 -luserenv"
+make
+```
+
+The most painful aspect of this way of building is preparing a win32
+build for each of librsvg's dependencies. [MXE][mxe] may help you on
+this work.
+
+
+
# Building with no network access
Automated build systems generally avoid network access so that they
@@ -303,3 +335,5 @@ trying to modify your system locations.
[cargo-source-replacement]: http://doc.crates.io/source-replacement.html
[rust-cross]: https://github.com/japaric/rust-cross
[target-json]: https://github.com/japaric/rust-cross#target-specification-files
+[mingw-w64]: https://mingw-w64.org/
+[mxe]: https://mxe.cc/
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]