Cross-compiling a port

Yasuhiro KIMURA yasu at
Sun Feb 18 06:33:58 UTC 2018


From: Martin Waschbüsch <martin at>
Subject: Cross-compiling a port
Date: Sun, 18 Feb 2018 07:22:17 +0100

> how would I go about cross-compilinga port for another ARCH?
> E.g. I am running 11.1-RELEASE on amd64 and would like to compile a port for i386.
> It does not seem to be enough to set the ARCH and TARGET_ARCH environment variables:
> e.g. something like
> cd /usr/ports/archivers/zip
> env 'TARGET_ARCH=i386 ARCH=i386' make
> will still produce a 64bit binary.
> file /usr/ports/archivers/zip/work/stage/usr/local/bin/zip
> /usr/ports/archivers/zip/work/stage/usr/local/bin/zip: ELF 64-bit LSB executable, x86-64, version 1 (FreeBSD), dynamically linked, interpreter /libexec/, for FreeBSD 11.1, FreeBSD-style, stripped
> so I must be missing something here.

Probably easiest way is to use ports-mgmt/poudriere.

Yasuhiro KIMURA

More information about the freebsd-ports mailing list