Git Product home page Git Product logo

homebrew-musl-cross's Introduction

homebrew-musl-cross

One-click static-friendly musl-based GCC macOS-to-Linux cross-compilers based on richfelker/musl-cross-make.

brew install FiloSottile/musl-cross/musl-cross

By default it will build a full cross compiler toolchain targeting musl Linux amd64.

(It takes a while, getting a cup of coffee won't do. Going for a run might if you are more fit than me.)

You can then use x86_64-linux-musl- versions of the tools to build for the target. For example x86_64-linux-musl-cc will compile C code to run on musl Linux amd64.

The "musl" part of the target is important: the binaries will ONLY run on a musl-based system, like Alpine. However, if you build them as static binaries by passing -static as a LDFLAG they will run anywhere. Musl is specifically engineered to support static binaries.

Other architectures are supported. For example to get a Raspberry Pi cross-compiler use:

brew install FiloSottile/musl-cross/musl-cross --without-x86_64 --with-arm-hf

You can also use --with-i486 (x86 32-bit), --with-aarch64 (ARM 64-bit), --with-arm (ARM soft-float) and --with-mips.

Only tested on Sierra.

homebrew-musl-cross's People

Contributors

ensch avatar filosottile avatar jedisct1 avatar mojotalantikite avatar

Watchers

 avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.