Statically (cross) compiled vim for x86, x86-64 and mipsel

Table of Contents

Sometimes I need to manage a few systems with either low resources or a very restricted set of packages. On those systems no compilers or development libraries are available, however it is allowed to bring binaries.

A few of those systems are 32 bit x68 systems, some are MIPS systems, even worse. They serve a secure purpose, I cannot go in to much detail about them, except for they require a high level of security, they process certificates.

I really like vim as my editor, the only editor available by default on those systems is ed. I have an ed cheatsheet for this purpose.

The solution for this problem is to create a statically (cross) compiled version of vim.

These instructions are for Debian/Ubuntu, tested on an Ubuntu 14.04 64 bit machine.

The above LDFLAGS make sure Vim gets statically compiled. The other options disable any GUI support (x) and enable a portion of the features, namely the small featureset. This lacks syntax highlighting and such. See below for a vim :version output.

If you need to compile on a 64 bit machine for a 32 bit machine, export the following CFLAGS: