{"id":21813024,"url":"https://github.com/llamasoft/static-cross-bins","last_synced_at":"2025-10-08T01:31:47.045Z","repository":{"id":50384152,"uuid":"518901124","full_name":"llamasoft/static-cross-bins","owner":"llamasoft","description":"Static Cross-compiler Automation Toolkit","archived":false,"fork":false,"pushed_at":"2022-11-15T17:10:14.000Z","size":25,"stargazers_count":10,"open_issues_count":0,"forks_count":5,"subscribers_count":1,"default_branch":"main","last_synced_at":"2024-11-27T14:28:43.836Z","etag":null,"topics":["binaries","hacktoberfest","linux","makefile","static"],"latest_commit_sha":null,"homepage":"","language":"Makefile","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/llamasoft.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2022-07-28T15:32:10.000Z","updated_at":"2024-10-25T14:53:05.000Z","dependencies_parsed_at":"2023-01-23T02:31:21.788Z","dependency_job_id":null,"html_url":"https://github.com/llamasoft/static-cross-bins","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/llamasoft%2Fstatic-cross-bins","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/llamasoft%2Fstatic-cross-bins/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/llamasoft%2Fstatic-cross-bins/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/llamasoft%2Fstatic-cross-bins/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/llamasoft","download_url":"https://codeload.github.com/llamasoft/static-cross-bins/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":235669422,"owners_count":19026822,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["binaries","hacktoberfest","linux","makefile","static"],"created_at":"2024-11-27T14:26:42.884Z","updated_at":"2025-10-08T01:31:41.739Z","avatar_url":"https://github.com/llamasoft.png","language":"Makefile","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Static Cross-compiler Automation Toolkit\n## A toolkit that simplifies cross-compiling static binaries for any Linux target.\n\n[![Automated Releases](https://github.com/llamasoft/static-cross-bins/actions/workflows/release.yml/badge.svg)](https://github.com/llamasoft/static-cross-bins/actions/workflows/release.yml)\n\nCurrently supported:\n- Binaries: \n  [bash](include/bash.mak),\n  [busybox](include/busybox.mak),\n  [curl](include/curl.mak),\n  [dropbear](include/dropbear.mak),\n  [netcat](include/netcat.mak),\n  [nmap](include/nmap.mak),\n  [socat](include/socat.mak),\n  [strace](include/strace.mak),\n  [tcpdump](include/tcpdump.mak),\n  [zstd](include/zstd.mak)\n- Libraries:\n  [curl](include/curl.mak),\n  [libressl](librinclude/libressl.mak),\n  [ncurses](ncuinclude/ncurses.mak),\n  [openssl](opeinclude/openssl.mak),\n  [pcap](include/pcap.mak),\n  [readline](readinclude/readline.mak),\n  [wolfssl](wolinclude/wolfssl.mak),\n  [zlib](include/zlib.mak)\n\n🤖 Pre-compiled binaries for common targets can be found on the [releases page](https://github.com/llamasoft/static-cross-bins/releases)!\n\n**Pull requests are welcome!**  \nWant to add your favorite tool?  See [CONTRIBUTING](CONTRIBUTING.md) for details!\n\n\n# 💻 Supported Targets 💻\n\nAny Linux target supported by [musl-cross-make](https://github.com/richfelker/musl-cross-make) is supported.  \nThis includes, but is not limited to:\n\n- ARM\n- MicroBlaze\n- MIPS\n- PowerPC\n- RISC-V\n- x86\n- x86_64\n\nFor a complete list of targets, consult the latest [musl documentation](https://musl.libc.org/doc/1.1.24/manual.html).\n\n⭐️ Once a target toolchain has been built, a list of all supported CPU *architectures* can be displayed with:  \n`make TARGET=your-target-here archlist`\n\n\n# 🧰 Build Requirements 🧰\n\nThis project uses [musl-cross-make](https://github.com/richfelker/musl-cross-make) to build a cross-compiler toolchain and compile all prerequisites for the output binaries.  \nAs a result, only a small number of common build packages are required:\n\n- curl *or* wget\n- GCC + recommended packages\n  - gcc, g++, make, autoconf, autotools, libtool, flex, bison\n- Archive utilities\n  - tar, gzip, bzip2, xz-utils\n\nAlternately, the provided [Dockerfile](Dockerfile) and [build.sh](build.sh) script can be used for a reproducible build environment.\n\n⭐️ Builds have been successfully completed on Ubuntu, Debian, macOS, and RaspberryPi OS.\n\n\n# 🛠 Usage 🛠\n\n```\nUSAGE: make TARGET=musl-toolchain [ARCH=cpu-arch] [program ...]\nThe TARGET value must be a musl-cross-make toolchain target.\nThe optional ARCH value must be a valid GCC -march CPU type.\n\nExamples targets:\n  TARGET=arm-linux-musleabi\n  TARGET=arm-linux-musleabihf ARCH=armv7-a+fp\n  TARGET=mips-linux-musl\n  TARGET=mipsel-linux-muslsf\n  TARGET=x86_64-linux-musl\n  ...\n  For additional targets, consult the musl manual:\n    https://musl.libc.org/doc/1.1.24/manual.html\n\nGoals:\n  all\n    Builds all available programs:\n    ...\n  default\n    Builds default subset of programs:\n    ...\n  musl\n    Builds the cross-compiler toolchain for TARGET.\n  archlist\n    Shows available CPU architectures for TARGET.\n  env\n    Shows shell commands to activate TARGET toolchain.\n  usage\n    Shows this message.\n  mostlyclean\n    Removes source code and temporary objects.\n  clean\n    Removes cross-compiler toolchain, sources, and objects.\n```\n\n## Basic Examples\n\nBuilding the **default** subset of binaries for MIPS:  \n`make TARGET=mips-linux-musl default`\n\nBuilding **all** binaries for the ARMv7 architecture (with hardware floating point support):  \n`make TARGET=arm-linux-musleabihf ARCH=armv7-a+fp all`\n\nBuilding **only the cross-compiler** toolchain for a generic ARM target:  \n`make TARGET=arm-linux-musleabi musl`\n\n**Listing** all ARCH values supported by the x86 target:  \n`make TARGET=x86-linux-musl archlist`\n\nOutput shell **environment variables** for manual cross-compiling:  \n`make TARGET=mipsel-linux-muslsf env`\n\n## Advanced Examples\n\nOptimizing binaries for speed instead of size:  \n`make TARGET=... CFLAGS=\"-O2\" all`\n\nBuild binaries using OpenSSL instead of LibreSSL:  \n`make TARGET=... OPENSSL=openssl all`\n\nTweaking a package's configuration using `*_CONFIG` flags:  \n`make TARGET=... curl CURL_CONFIG=\"--extra-curl-configs\"`\n\n\n# 📖 FAQ 📖\n\n### What inspired this project?\nI occasionally tinker with embedded Linux environments that don't have access to package managers or compilers.  \nBeing able to statically cross-compile my favorite tools makes it much easier to work on those systems.\n\n### How long does this take to build?\nUsing `make -j` for parallel builds, the musl cross-compiler can be built in 15-30 minutes depending on the target.  \nFrom there, building all of the programs usually takes 10-15 minutes.\n\nFor example build times, check this project's GitHub Actions workflows.\n\n### What if I want *even smaller* binaries?\nYou can shrink the binaries by a further 40% by using a packer like [UPX](https://upx.github.io/).  \nI've decided not to include UPX for a few reasons:\n- Some anti-virus programs will detect UPX packed binaries as potentially malicious.\n- I wanted the pre-compiled binaries on the releases page to be reproducible.\n- Running packed binaries requires additional memory, something most embedded environments don't have.\n\n### Why distribute pre-compiled binaries?\nBecause some people are lazy and I absolutely respect that. 😎\n\n### Are the pre-compiled binaries [reproducible](https://reproducible-builds.org/)?\nTo the best of my ability, *yes*.  \nBuilding the binaries using the [docker_build.sh](docker_build.sh) script *should* result in byte-for-byte identical results.  \nAlternately, fork the repo and trigger the [GitHub Actions workflow](.github/workflows/release.yml) that builds and publishes the releases.\n\n### When will __________ be added to the toolkit?\nAs soon as you submit a [pull request](CONTRIBUTING.md) to add it! 😉\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fllamasoft%2Fstatic-cross-bins","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fllamasoft%2Fstatic-cross-bins","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fllamasoft%2Fstatic-cross-bins/lists"}