Document how to regenerate crypto/chacha/chacha_vec_arm.S.
Also, organize the links in BUILDING.md sensibly.
Reviewed-by: Adam Langley <firstname.lastname@example.org>
diff --git a/BUILDING.md b/BUILDING.md
index cc0ee0e..e87f2a6 100644
@@ -2,27 +2,40 @@
## Build Prerequisites
- * [CMake]  2.8.8 or later is required.
+ * [CMake](http://www.cmake.org/download/) 2.8.8 or later is required.
- * Perl 5.6.1 or later is required. On Windows, [Strawberry Perl]  and MSYS
- Perl have both been reported to work. If not found by CMake, it may be
- configured explicitly by setting `PERL_EXECUTABLE`.
+ * Perl 5.6.1 or later is required. On Windows,
+ [Strawberry Perl](http://strawberryperl.com/) and MSYS Perl have both been
+ reported to work. If not found by CMake, it may be configured explicitly by
+ setting `PERL_EXECUTABLE`.
- * On Windows you currently must use [Ninja]  to build; on other platforms,
- it is not required, but recommended, because it makes builds faster.
+ * On Windows you currently must use [Ninja](https://martine.github.io/ninja/)
+ to build; on other platforms, it is not required, but recommended, because
+ it makes builds faster.
* If you need to build Ninja from source, then a recent version of
- [Python]  is required (Python 2.7.5 works).
+ [Python](https://www.python.org/downloads/) is required (Python 2.7.5 works).
- * On Windows only, [Yasm]  is required. If not found by CMake, it may be
- configured explicitly by setting `CMAKE_ASM_NASM_COMPILER`.
+ * On Windows only, [Yasm](http://yasm.tortall.net/) is required. If not found
+ by CMake, it may be configured explicitly by setting
* A C compiler is required. On Windows, MSVC 12 (Visual Studio 2013) or later
with Platform SDK 8.1 or later are supported. Recent versions of GCC and
Clang should work on non-Windows platforms, and maybe on Windows too.
- * [Go]  is required. If not found by CMake, the go executable may be
- configured explicitly by setting `GO_EXECUTABLE`.
+ * [Go](https://golang.org/dl/) is required. If not found by CMake, the go
+ executable may be configured explicitly by setting `GO_EXECUTABLE`.
+ * If you change crypto/chacha/chacha_vec.c, you will need the
+ arm-linux-gnueabihf-gcc compiler:
+ $ wget https://releases.linaro.org/14.11/components/toolchain/binaries/arm-linux-gnueabihf/gcc-linaro-4.9-2014.11-x86_64_arm-linux-gnueabihf.tar.xz
+ $ echo bc4ca2ced084d2dc12424815a4442e19cb1422db87068830305d90075feb1a3b gcc-linaro-4.9-2014.11-x86_64_arm-linux-gnueabihf.tar.xz | sha256sum -c
+ $ tar xf gcc-linaro-4.9-2014.11-x86_64_arm-linux-gnueabihf.tar.xz
+ $ sudo mv gcc-linaro-4.9-2014.11-x86_64_arm-linux-gnueabihf /opt/
@@ -124,11 +137,3 @@
Both sets of tests may also be run with `ninja -C build run_tests`, but CMake
3.2 or later is required to avoid Ninja's output buffering.
- : http://www.cmake.org/download/
- : http://strawberryperl.com/
- : https://martine.github.io/ninja/
- : https://www.python.org/downloads/
- : http://yasm.tortall.net/
- : https://golang.org/dl/
diff --git a/crypto/chacha/chacha_vec_arm_generate.go b/crypto/chacha/chacha_vec_arm_generate.go
index 6d167b9..b803ef5 100644
@@ -12,7 +12,10 @@
// OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
// CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
-// This package generates chacha_vec_arm.S from chacha_vec.c.
+// This package generates chacha_vec_arm.S from chacha_vec.c. Install the
+// arm-linux-gnueabihf-gcc compiler as described in BUILDING.md. Then:
+// `(cd crypto/chacha && go run chacha_vec_arm_generate.go)`.