config.mak.dist 2.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182
  1. #
  2. # config.mak.dist - sample musl-cross-make configuration
  3. #
  4. # Copy to config.mak and edit as desired.
  5. #
  6. # There is no default TARGET; you must select one here or on the make
  7. # command line. Some examples:
  8. # TARGET = i486-linux-musl
  9. # TARGET = x86_64-linux-musl
  10. # TARGET = arm-linux-musleabi
  11. # TARGET = arm-linux-musleabihf
  12. # TARGET = sh2eb-linux-muslfdpic
  13. # ...
  14. # By default, cross compilers are installed to ./output under the top-level
  15. # musl-cross-make directory and can later be moved wherever you want them.
  16. # To install directly to a specific location, set it here. Multiple targets
  17. # can safely be installed in the same location. Some examples:
  18. # OUTPUT = /opt/cross
  19. # OUTPUT = /usr/local
  20. # By default, latest supported release versions of musl and the toolchain
  21. # components are used. You can override those here, but the version selected
  22. # must be supported (under hashes/ and patches/) to work. For musl, you
  23. # can use "git-refname" (e.g. git-master) instead of a release. Setting a
  24. # blank version for gmp, mpc, and mpfr will suppress download and in-tree
  25. # build of these libraries and instead depend on pre-installed libraries.
  26. # Setting a blank version for linux will suppress installation of kernel
  27. # headers, which are not needed unless compiling programs that use them.
  28. # BINUTILS_VER = 2.25.1
  29. # GCC_VER = 5.2.0
  30. # MUSL_VER = git-master
  31. # GMP_VER =
  32. # MPC_VER =
  33. # MPFR_VER =
  34. # LINUX_VER =
  35. # Something like the following can be used to produce a static-linked
  36. # toolchain that's deployable to any system with matching arch, using
  37. # an existing musl-targeted cross compiler. This only # works if the
  38. # system you build on can natively (or via binfmt_misc and # qemu) run
  39. # binaries produced by the existing toolchain (in this example, i486).
  40. # COMMON_CONFIG += CC="i486-linux-musl-gcc -static --static" CXX="i486-linux-musl-g++ -static --static"
  41. # Recommended options for smaller build for deploying binaries:
  42. # COMMON_CONFIG += CFLAGS="-g0 -Os" CXXFLAGS="-g0 -Os" LDFLAGS="-s"
  43. # Recommended options for faster/simpler build:
  44. # COMMON_CONFIG += --disable-nls
  45. # GCC_CONFIG += --enable-languages=c,c++
  46. # GCC_CONFIG += --disable-libquadmath --disable-decimal-float
  47. # GCC_CONFIG += --disable-multilib
  48. # You can keep the local build path out of your toolchain binaries and
  49. # target libraries with the following, but then gdb needs to be told
  50. # where to look for source files.
  51. # COMMON_CONFIG += --with-debug-prefix-map=$(PWD)=
  52. # The following are options needed to make certain targets work right.
  53. # They may be moved to main build logic rather than config.mak at some
  54. # point in the future.
  55. ifeq ($(TARGET),sh2eb-linux-muslfdpic)
  56. GCC_CONFIG += --with-cpu=mj2
  57. GCC_CONFIG += --enable-fdpic
  58. endif
  59. ifeq ($(TARGET),mips64-linux-musl)
  60. GCC_CONFIG += --with-abi=64
  61. endif
  62. ifeq ($(TARGET),arm-linux-musleabihf)
  63. GCC_CONFIG += --with-float=hard
  64. endif