Skip to content

🌍 multiarch cross compiling environments

License

Notifications You must be signed in to change notification settings

authelia/crossbuild

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

97 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

crossbuild

🌍 multiarch cross compiling environments

This is a multiarch Docker build environment image. You can use this image to produce binaries for multiple architectures.

Supported targets

Triple Aliases linux freebsd
x86_64-linux-gnu (default), linux, amd64, x86_64
arm-linux-gnueabihf armhf, armv7, armv7l
aarch64-linux-gnu arm64, aarch64
x86_64-pc-freebsd14 freebsd

Using crossbuild

x86_64

$ docker run --rm -v $(pwd):/workdir authelia/crossbuild make helloworld
cc helloworld.c -o helloworld
$ file helloworld
helloworld: ELF 64-bit LSB  executable, x86-64, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.32, BuildID[sha1]=9cfb3d5b46cba98c5aa99db67398afbebb270cb9, not stripped

Misc: using cc instead of make

$ docker run --rm -v $(pwd):/workdir authelia/crossbuild cc test/helloworld.c

armhf

$ docker run --rm -v $(pwd):/workdir -e CROSS_TRIPLE=arm-linux-gnueabihf authelia/crossbuild make helloworld

arm64

$ docker run --rm -v $(pwd):/workdir -e CROSS_TRIPLE=aarch64-linux-gnu authelia/crossbuild make helloworld

freebsd x86_64

$ docker run -it --rm -v $(pwd):/workdir -e CROSS_TRIPLE=x86_64-pc-freebsd14  authelia/crossbuild make helloworld

Credit

This project is inspired by the cross-compiler by the venerable Steeve Morin

License

MIT

About

🌍 multiarch cross compiling environments

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Dockerfile 71.2%
  • Shell 28.8%