From fdb9872cef3d3469b0c255575bfe77a88fa6c655 Mon Sep 17 00:00:00 2001 From: Alexander Neumann Date: Thu, 9 Mar 2017 11:37:06 +0100 Subject: [PATCH] Add cross-compilation to README and Manual --- README.md | 10 ++++++++++ doc/Manual.md | 12 +++++++++++- 2 files changed, 21 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 3fe4c0edb..69811582a 100644 --- a/README.md +++ b/README.md @@ -44,6 +44,16 @@ afterwards you'll find the binary in the current directory: restic [OPTIONS] [...] +You can easily cross-compile restic for all supported platforms, just supply +the target OS and platform via the command-line options like this (for Windows +and FreeBSD respectively): + + $ go run build.go --goos windows --goarch amd64 + + $ go run build.go --goos freebsd --goarch 386 + +The resulting binary is statically linked and does not require any libraries. + More documentation can be found in the [user manual](doc/Manual.md). At the moment, the only tested compiler for restic is the official Go compiler. diff --git a/doc/Manual.md b/doc/Manual.md index 5f2a470ff..603640035 100644 --- a/doc/Manual.md +++ b/doc/Manual.md @@ -1,4 +1,4 @@ -Thanks for using restic. This document will give you an overview of the basic +nhanks for using restic. This document will give you an overview of the basic functionality provided by restic. # Installing restic @@ -43,6 +43,16 @@ $ cd restic $ go run build.go ``` +You can easily cross-compile restic for all supported platforms, just supply +the target OS and platform via the command-line options like this (for Windows +and FreeBSD respectively): + + $ go run build.go --goos windows --goarch amd64 + + $ go run build.go --goos freebsd --goarch 386 + +The resulting binary is statically linked and does not require any libraries. + At the moment, the only tested compiler for restic is the official Go compiler. Building restic with gccgo may work, but is not supported.