Cross Compiling

From Libreswan
Jump to navigation Jump to search
The printable version is no longer supported and may have rendering errors. Please update your browser bookmarks and please use the default browser print function instead.

libreswan has been cross compiled to many platforms. An example CROSSCOMPILE.sh file is shipped in the main directory of the source tree that demonstrates most of the important variables. See further the various comments in Makefile.inc.

Note that you first need to cross compile all the required libraries. Some features can be disabled in Makefile.inc to reduce the number of libraries needed. libgmp and nss are always needed.

ARM BLFT binary format

Some ARM cross compiles use the BLFT file format instead of the ELF format. Add -Wl,-elf2flt to LDFLAGS, CFLAGS or USERCOMPILE if your cross compile tool chain does not add it for you automatically.

If you toolchain does not support this option, use the script ld-elf2flt . It renams the linker *ld to *ld.real and ld-elf2flt is put in it's place.

Do not attempt to run elf2flt against the binaries after they have been linked already. See the ld-elf2flt script to see the complexity of the process involved.

Cross compiling on Windows

The windows cross compile windows-cross-compile.txt is very old and most likely no longer up to date or correct.