Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up

The shortest and fastest script to build working cross compilers targeting musl libc

License

NotificationsYou must be signed in to change notification settings

firasuke/mussel

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

mussel is the shortest and fastest script available today to build working crosscompilers that targetmusl libc

Features

  1. Up-to-date: uses latest available upstream sources for packages
  2. Fast: probably the fastest script around to build a cross compilertargetingmusl libc, and runs fully underdash
  3. Short: has the least amount of steps (seebelow) requiredto build a cross compiler targeting musl libc (even less thanmusl-cross-make)
  4. Small: all installation steps useinstall-strip where applicable
  5. Simple: easy to read, modify and extend
  6. POSIX Compliant: the entire script is POSIX compliant
  7. Well Documented: the script comes with aDOCUMENTATION.mdfile that includes state of the art information explaining what is being doneand why

Requirements:

To confirm you have all required packages, please execute./check

Usage

Building a Cross Compiler

./mussel (arch) (flags)

(arch): SeeSupportedArchitecturesbelow

(flags):

  f | -f | --enable-fortran        Enable optional Fortran support  k | -k | --enable-pkg-config     Enable optional pkg-config support  l | -l | --enable-linux-headers  Enable optional Linux Headers support  o | -o | --enable-openmp         Enable optional OpenMP support  p | -p | --parallel              Use all available cores on the host system  q | -q | --enable-quadmath       Enable optional libquadmath support (default for Fortran)  s | -s | --min-size              Optimize for minimum size  x | -x | --disable-cxx           Disable optional C++ support  g | -g | --disable-isl           Disable isl Library support (Graphite loop optimisations)  T | -T | --custom-vendor         Sets a custom vendor for tuple, requires architecture to be set before

Other Commands

./mussel (command)

(command):

  c| -c| --clean                 Clean mussel's build environment  h | -h | --help                  Display this help message

Sources will be preserved

Supported Architectures

  • aarch64
  • armv4t
  • armv5te
  • armv6
  • armv6kz (Raspberry Pi 1 Models A, B, B+, the Compute Module, and the RaspberryPi Zero)
  • armv7
  • i486
  • i586
  • i686
  • m68k
  • microblaze
  • microblazeel
  • mips
  • mipsel
  • mips64
  • mips64el
  • mipsisa64r6
  • mipsisa64r6el
  • or1k
  • powerpc
  • powerpcle
  • powerpc64
  • powerpc64le
  • riscv64
  • s390x
  • sh2
  • sh2be
  • sh2-fdpic
  • sh2be-fdpic
  • sh4
  • sh4be
  • x86-64

Packages

  1. binutils: 2.43.1
  2. gcc: 14.2.0
  3. gmp: 6.3.0
  4. isl: 0.27
  5. linux: 6.11.8 (Optional Linux Headers Support) (Disabled by default)
  6. mpc: 1.3.1
  7. mpfr: 4.2.1
  8. musl: 1.2.5
  9. pkgconf: 2.3.0 (Optionalpkg-config Support) (Disabled by default)

How Ismussel Doing It?

  1. Installmusl headers
  2. Configure, build and install crossbinutils
  3. Configure, build and install crossgcc (withlibgcc-static)
  4. Configure, build and installmusl
  5. Build, and installlibgcc-shared

Optional Steps

  • Build and installlibstdc++-v3 (Optional C++ Support) (Enabled by default)
  • Build and installlibgomp (Optional OpenMP Support) (Disabled by default)
  • Build and installlibquadmath (Optional Quadruple-precision Support)(Disabled by default,Enabled for Fortran)
  • Build and installlibgfortran (Optional Fortran Support) (Disabled by default)
  • Installlinux-headers (Optional Linux Headers Support) (Disabled by default)
  • Configure, build and installpkgconf (Optionalpkg-config Support)(Disabled by default)

Usingmussel With Host'spkg-config orpkgconf

The reason we includedpkgconf withmussel as anoptional step isbecause we can easily configure the host'spkg-config orpkgconf to workwithmussel without having to build our own version ofpkg-config orpkgconf.

Here are the five magical environment variables that we need to set to configurethe host'spkg-config orpkgconf to work withmussel:

export PKG_CONFIG_PATH=$MSYSROOT/usr/lib/pkgconfig:$MSYSROOT/usr/share/pkgconfigexport PKG_CONFIG_LIBDIR=$MSYSROOT/usr/lib/pkgconfig:$MSYSROOT/usr/share/pkgconfigexport PKG_CONFIG_SYSROOT_DIR=$MSYSROOTexport PKG_CONFIG_SYSTEM_INCLUDE_PATH=$MSYSROOT/usr/includeexport PKG_CONFIG_SYSTEM_LIBRARY_PATH=$MSYSROOT/usr/lib

The last two I believe arepkgconf specific but setting them won't do any harm.

Usingmussel With Host'smeson

mussel now provides cross-compilation configuration files formeson thatsupport all listed architectures, and a wrapper around host'smeson(mussel-meson) in an effort to make dealing withmeson a bit easier.

Projects Usingmussel

Credits and Inspiration

mussel is possible thanks to the awesome work done by Aurelian, Rich Felker,qword,The Managarm Project,glaucus (whereit's actually implemented) andmusl-cross-make

Author

Firas Khalil Khana (firasuke) <firasuke@glaucuslinux.org>

Contributors

License

mussel is licensed under the Internet Systems Consortium (ISC) license

Dedication

mussel is dedicated to all those that believe setting up a cross compilertargeting musl libc is a complicated process.

Community

Mirrors


[8]ページ先頭

©2009-2025 Movatter.jp