Skip to content

Instantly share code, notes, and snippets.

@dbiesecke
Created December 15, 2018 23:35
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dbiesecke/f662e06aedf07ef8d6332e47f3d8539e to your computer and use it in GitHub Desktop.
Save dbiesecke/f662e06aedf07ef8d6332e47f3d8539e to your computer and use it in GitHub Desktop.
Cross Compile with Musl

Docker and Musl-Multiarch

Cross-Building-and-Running-Multi-Arch-Docker-Images

   https://github.com/multiarch/crossbuild

    $ docker run --rm -v $(pwd):/workdir -e CROSS_TRIPLE=arm-linux-gnueabihf multiarch/crossbuild make helloworld
    cc     helloworld.c   -o helloworld
    $ file helloworld
    helloworld: ELF 32-bit LSB  executable, ARM, EABI5 version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.32, BuildID[sha1]=ad507da0b9aeb78e7b824692d4bae6b2e6084598, not stripped
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment