--- /dev/null
+# Copyright 1999-2015 Gentoo Foundation.
+# Distributed under the terms of the GNU General Public License v2
+
+ARCH="amd64"
+ACCEPT_KEYWORDS="${ARCH}"
+
+CHOST="x86_64-gentoo-linux-musl"
+CFLAGS="-O2 -pipe"
+CXXFLAGS="${CFLAGS}"
+FFLAGS="${CFLAGS}"
+FCFLAGS="${CFLAGS}"
+
+# Anthony G. Basile <blueness@gentoo.org> (01 Jul 2014)
+# Multilib-related setup, bug #515130
+ABI="amd64"
+DEFAULT_ABI="amd64"
+MULTILIB_ABIS="amd64"
+CHOST_amd64="${CHOST}"
+LIBDIR_amd64="lib"
+IUSE_IMPLICIT="abi_x86_64"
+
+# Anthony G. Basile <blueness@gentoo.org> (31 Aug 2015)
+# Relect these flags from arch/amd64 which we don't inherit
+CPU_FLAGS_X86="mmx mmxext sse sse2"
+
+# Anthony G. Basile <blueness@gentoo.org> (26 Jan 2013)
+# Unhide the CPU_FLAGS_X86 USE_EXPANDs.
+USE_EXPAND_HIDDEN="-CPU_FLAGS_X86"
--- /dev/null
+# Copyright 1999-2015 Gentoo Foundation.
+# Distributed under the terms of the GNU General Public License v2
+
+# Ulrich Müller <ulm@gentoo.org> (18 Mar 2013)
+# Packages that rely on multilib
+=app-editors/emacs-18*
+net-misc/icaclient
--- /dev/null
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+# Michał Górny <mgorny@gentoo.org> (24 Sep 2016)
+# Force the host target to avoid dependency hell
+sys-devel/clang llvm_targets_X86
+sys-devel/llvm llvm_targets_X86
--- /dev/null
+# Copyright 1999-2017 Gentoo Foundation.
+# Distributed under the terms of the GNU General Public License v2
--- /dev/null
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+# Force the flag which corresponds to arch/abi, bug #515130
+amd64
+abi_x86_64
--- /dev/null
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+# Force the flag which corresponds to arch/abi, bug #515130
+-amd64
+-abi_x86_64
+
+# unmask all SIMD assembler flags
+-cpu_flags_x86_3dnow
+-cpu_flags_x86_3dnowext
+-cpu_flags_x86_aes
+-cpu_flags_x86_avx
+-cpu_flags_x86_avx2
+-cpu_flags_x86_fma3
+-cpu_flags_x86_fma4
+-cpu_flags_x86_mmx
+-cpu_flags_x86_mmxext
+-cpu_flags_x86_padlock
+-cpu_flags_x86_popcnt
+-cpu_flags_x86_sse
+-cpu_flags_x86_sse2
+-cpu_flags_x86_sse3
+-cpu_flags_x86_sse4_1
+-cpu_flags_x86_sse4_2
+-cpu_flags_x86_sse4a
+-cpu_flags_x86_ssse3
+-cpu_flags_x86_xop
+
+# Lilo works on amd64
+-lilo
+
+# These work
+-input_devices_synaptics
+-input_devices_wacom
+-video_cards_qxl
--- /dev/null
+# Copyright 1999-2015 Gentoo Foundation.
+# Distributed under the terms of the GNU General Public License v2
+
+CHOST="x86_64-gentoo-linux-muslx32"
+
+# Anthony G. Basile <blueness@gentoo.org> (31 Aug 2015)
+# Multilib-related setup, bug #515130
+ABI="x32"
+DEFAULT_ABI="x32"
+MULTILIB_ABIS="x32"
+CHOST_x32="${CHOST}"
+LIBDIR_x32="lib"
+IUSE_IMPLICIT="abi_x86_x32"
--- /dev/null
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+# Force the flag which corresponds to arch/abi, bug #515130
+-abi_x86_64
+abi_x86_x32
--- /dev/null
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+# Force the flag which corresponds to arch/abi, bug #515130
+-abi_x86_x32
+abi_x86_64
--- /dev/null
+# Copyright 1999-2014 Gentoo Foundation.
+# Distributed under the terms of the GNU General Public License v2
+
+CHOST="armv7a-hardfloat-linux-musleabi"
+CFLAGS="-O2 -pipe -march=armv7-a -mfpu=vfpv3-d16 -mfloat-abi=hard"
+CXXFLAGS="${CFLAGS}"
+FFLAGS="${CFLAGS}"
+FCFLAGS="${CFLAGS}"
--- /dev/null
+# Copyright 1999-2014 Gentoo Foundation.
+# Distributed under the terms of the GNU General Public License v2
+
+ARCH="arm"
+ACCEPT_KEYWORDS="${ARCH}"
+
+CHOST="arm-unknown-linux-musleabi"
+CFLAGS="-O2"
+CXXFLAGS="${CFLAGS}"
+FFLAGS="${CFLAGS}"
+FCFLAGS="${CFLAGS}"
+
+# Anthony G. Basile <blueness@gentoo.org> (25 Oct 2015)
+# Multilib-related setup, bug #515130
+ABI="arm"
+DEFAULT_ABI="arm"
+MULTILIB_ABIS="arm"
+CHOST_arm="${CHOST}"
+LIBDIR_arm="lib"
+
+# Michał Górny <mgorny@gentoo.org> (14 Mar 2017)
+# Unhide the ARM-specific USE_EXPANDs.
+USE_EXPAND_HIDDEN="-CPU_FLAGS_ARM"
--- /dev/null
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+# Michał Górny <mgorny@gentoo.org> (24 Sep 2016)
+# Force the host target to avoid dependency hell
+sys-devel/clang llvm_targets_ARM
+sys-devel/llvm llvm_targets_ARM
--- /dev/null
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+# Force the flag which corresponds to ARCH.
+arm
--- /dev/null
+# Copyright 1999-2014 Gentoo Foundation.
+# Distributed under the terms of the GNU General Public License v2
+
+# Unmask the flag which corresponds to ARCH.
+-arm
--- /dev/null
+# Copyright 1999-2016 Gentoo Foundation.
+# Distributed under the terms of the GNU General Public License v2
+
+ARCH="arm64"
+ACCEPT_KEYWORDS="${ARCH}"
+
+CHOST="aarch64-gentoo-linux-musl"
+CFLAGS="-O2"
+CXXFLAGS="${CFLAGS}"
+FFLAGS="${CFLAGS}"
+FCFLAGS="${CFLAGS}"
+
+# Anthony G. Basile <blueness@gentoo.org> (25 Oct 2015)
+# Multilib-related setup, bug #515130
+ABI="arm64"
+DEFAULT_ABI="arm64"
+MULTILIB_ABIS="arm64"
+CHOST_arm64="${CHOST}"
+LIBDIR_arm64="lib"
+
+# Michał Górny <mgorny@gentoo.org> (14 Mar 2017)
+# Unhide the ARM-specific USE_EXPANDs.
+USE_EXPAND_HIDDEN="-CPU_FLAGS_ARM"
--- /dev/null
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+# Michał Górny <mgorny@gentoo.org> (24 Sep 2016)
+# Force the host target to avoid dependency hell
+sys-devel/clang llvm_targets_AArch64
+sys-devel/llvm llvm_targets_AArch64
--- /dev/null
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+# Force the flag which corresponds to ARCH.
+arm64
--- /dev/null
+# Copyright 1999-2016 Gentoo Foundation.
+# Distributed under the terms of the GNU General Public License v2
+
+# Unmask the flag which corresponds to ARCH.
+-arm64
--- /dev/null
+# Copyright 1999-2017 Gentoo Foundation.
+# Distributed under the terms of the GNU General Public License v2
+
+PORTAGE_LIBC="musl"
+ELIBC="musl"
+
+FEATURES="sandbox sfperms strict"
+
+USE="nptl unicode -berkdb"
+BOOTSTRAP_USE="${BOOTSTRAP_USE} nptl -berkdb"
+
+SYMLINK_LIB="no"
+
+# TODO: fix so musl doesn't generate this for all packages
+# that use a charset, it causes package collisons.
+INSTALL_MASK="charset.alias"
--- /dev/null
+# Copyright 1999-2014 Gentoo Foundation.
+# Distributed under the terms of the GNU General Public License v2
+
+ARCH="mips"
+ACCEPT_KEYWORDS="${ARCH} ~${ARCH}"
+
+CHOST="mips-gentoo-linux-musl"
+CFLAGS="-O2 -pipe"
+CXXFLAGS="${CFLAGS}"
+FFLAGS="${CFLAGS}"
+FCFLAGS="${CFLAGS}"
+
+# Anthony G. Basile <blueness@gentoo.org> (01 Jul 2014)
+# Multilib-related setup, bug #515130
+ABI="o32"
+DEFAULT_ABI="o32"
+MULTILIB_ABIS="o32"
+CHOST_o32="${CHOST}"
+LIBDIR_o32="lib"
+IUSE_IMPLICIT="abi_mips_o32"
--- /dev/null
+# Copyright 1999-2014 Gentoo Foundation.
+# Distributed under the terms of the GNU General Public License v2
+
+CHOST="mipsel-gentoo-linux-musl"
+CHOST_o32="${CHOST}"
+
+# Disable sandbox because its currently broken on mipsel-musl
+FEATURES="-sandbox"
+
--- /dev/null
+# Copyright 1999-2015 Gentoo Foundation.
+# Distributed under the terms of the GNU General Public License v2
+
+dev-util/pkgconfig
+>sys-apps/kbd-1.15.5-r99
--- /dev/null
+# Michał Górny <mgorny@gentoo.org> (24 Sep 2016)
+# Force the host target to avoid dependency hell
+sys-devel/clang llvm_targets_Mips
+sys-devel/llvm llvm_targets_Mips
+
+# The only working option
+dev-util/pkgconf pkg-config
--- /dev/null
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+# Force the flag which corresponds to arch/abi, bug #515130
+mips
+abi_mips_o32
--- /dev/null
+# Copyright 1999-2014 Gentoo Foundation.
+# Distributed under the terms of the GNU General Public License v2
+
+# Unmask the flag which corresponds to arch/abi, bug #515130
+-mips
+-abi_mips_o32
--- /dev/null
+# Copyright 1999-2017 Gentoo Foundation.
+# Distributed under the terms of the GNU General Public License v2
+
+sys-libs/uclibc
+sys-libs/uclibc-ng
+sys-libs/glibc
+
+# Older versions of net-mail/mailutils fail on musl, bug #604212
+<net-mail/mailutils-3.2
+
+# We use eudev which is tested on both uclibc and musl
+sys-apps/systemd
+sys-fs/udev
+
+# dev-libs/elfutils needs a port to musl, bug #602126
+dev-libs/elfutils
+
+# packages that unconditionally depend on dev-libs/elfutils
+<net-firewall/fwbuilder-5.3.7
+
+# packages that need masked packages or multilib
+dev-games/gtkradiant
+dev-games/ps2-packer
+games-action/beathazardultra
+games-action/brutal-legend
+games-action/descent3
+games-action/descent3-demo
+games-action/heretic2-demo
+games-action/hotline-miami
+games-action/intrusion2
+games-action/rune
+games-action/shadowgrounds-bin
+games-action/shadowgrounds-survivor-bin
+games-action/solar2
+games-action/spacetripper-demo
+games-action/swordandsworcery
+games-action/trine-bin
+games-action/trine2
+games-arcade/aquaria
+games-arcade/barbarian-bin
+games-arcade/dynamitejack
+games-arcade/jardinains
+games-arcade/marbleblastgold-demo
+games-arcade/thinktanks-demo
+games-emulation/nestra
+games-emulation/zinc
+games-emulation/zsnes
+games-fps/enemy-territory
+games-fps/enemy-territory-etpro
+games-fps/enemy-territory-truecombat
+games-fps/etqw-demo
+games-fps/glxquake-bin
+games-fps/legends
+games-fps/postal2mp-demo
+games-fps/quake3-bin
+games-fps/quake3-demo
+games-fps/rtcwmp-demo
+games-fps/rtcwsp-demo
+games-fps/soldieroffortune
+games-fps/soldieroffortune-demo
+games-fps/transfusion-bin
+games-fps/tribes2
+games-fps/ut2003
+games-fps/ut2003-bonuspack-cm
+games-fps/ut2003-bonuspack-de
+games-fps/ut2003-bonuspack-epic
+games-fps/ut2003-demo
+games-fps/ut2004
+games-fps/ut2004-action
+games-fps/ut2004-airbuccaneers
+games-fps/ut2004-bonuspack-cbp1
+games-fps/ut2004-bonuspack-cbp2
+games-fps/ut2004-bonuspack-ece
+games-fps/ut2004-bonuspack-mega
+games-fps/ut2004-cor
+games-fps/ut2004-crossfire
+games-fps/ut2004-data
+games-fps/ut2004-deathball
+games-fps/ut2004-demo
+games-fps/ut2004-fragops
+games-fps/ut2004-hamsterbash
+games-fps/ut2004-muralis
+games-fps/ut2004-strikeforce
+games-fps/ut2004-troopers
+games-fps/ut2004-unwheel
+games-kids/crayon-physics
+games-misc/little-inferno
+games-misc/papers-please
+games-puzzle/hoh-bin
+games-puzzle/world-of-goo
+games-puzzle/world-of-goo-demo
+games-roguelike/adom
+games-rpg/dear-esther
+games-rpg/dungeon-defenders
+games-rpg/eschalon-book-1-demo
+games-rpg/penumbra-collection
+games-rpg/wasteland2
+games-server/etqw-ded
+games-server/ut2004-ded
+games-simulation/bcs-demo
+games-strategy/darwinia
+games-strategy/darwinia-demo
+games-strategy/defcon-demo
+games-strategy/dominions2
+games-strategy/knights-demo
+games-strategy/majesty-demo
+media-video/binkplayer
+
+# Ian Stakenvicius, 2017-06-14
+# on behalf of mozilla@gentoo.org
+# Mask firefox-54 and above as it requires rust
+# now, and rust reportedly will not build yet.
+>=www-client/firefox-54.0
--- /dev/null
+# Copyright 1999-2016 Gentoo Foundation.
+# Distributed under the terms of the GNU General Public License v2
+
+# Anthony G. Basile <blueness@gentoo.org> (14 Jul 2016)
+# We need this to break a circular dependency with
+# 'sys-libs/libcap pam' in stage3 catalyst builds
+sys-libs/pam -filecaps
--- /dev/null
+# Copyright 1999-2015 Gentoo Foundation.
+# Distributed under the terms of the GNU General Public License v2
+
+# Force system-libevent use flag on mozilla packages, since the building of
+# bundled libevent cannot accomodate a system without sysctl.h
+# See bug 574830 for more info.
+>=www-client/firefox-45.0 system-libevent
+>=www-client/seamonkey-2.40 system-libevent
+>=mail-client/thunderbird-45.0 system-libevent
--- /dev/null
+# Copyright 1999-2015 Gentoo Foundation.
+# Distributed under the terms of the GNU General Public License v2
+
+# Matthias Maier <tamiko@genoto.org> (11 May 2017)
+# masked in base, unmask for hardened/musl/
+sys-devel/gcc -pie
+
+# See bug #504200
+sys-devel/gcc sanitize
+
+# llvm's sanitizers are also incompatible with musl
+sys-devel/llvm sanitize
+
+# These cause collisions with <libintl.h>
+# even with --without-included-gettext
+sys-devel/gettext nls
+sys-fs/e2fsprogs nls
+
+# Broken
+dev-vcs/git gpg
+
+# See bug #576928
+media-libs/mesa nptl
+x11-base/xorg-server nptl
--- /dev/null
+# Copyright 1999-2014 Gentoo Foundation.
+# Distributed under the terms of the GNU General Public License v2
+
+*app-misc/pax-utils
+*sys-apps/sandbox
+-*sys-apps/man-pages
--- /dev/null
+# Copyright 1999-2014 Gentoo Foundation.
+# Distributed under the terms of the GNU General Public License v2
+
+# This file lists extra packages needed to build for
+# a stage 1 based on this profile.
+
+dev-util/pkgconf
+sys-apps/attr
+sys-apps/sandbox
+dev-python/pyxattr
--- /dev/null
+../../../arch/base
+../../../base
+..
--- /dev/null
+# Copyright 1999-2014 Gentoo Foundation.
+# Distributed under the terms of the GNU General Public License v2
+
+ARCH="ppc"
+ACCEPT_KEYWORDS="${ARCH}"
+
+CHOST="powerpc-gentoo-linux-musl"
+CFLAGS="-O2 -pipe"
+CXXFLAGS="${CFLAGS}"
+FFLAGS="${CFLAGS}"
+FCFLAGS="${CFLAGS}"
+
+ABI="ppc"
+DEFAULT_ABI="ppc"
+MULTILIB_ABIS="ppc"
+CHOST_ppc="${CHOST}"
+LIBDIR_ppc="lib"
+IUSE_IMPLICIT="abi_ppc_32"
--- /dev/null
+# gcc-4.8 still doesn't work on ppc musl
+>sys-devel/gcc-4.8
--- /dev/null
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+# Michał Górny <mgorny@gentoo.org> (24 Sep 2016)
+# Force the host target to avoid dependency hell
+sys-devel/clang llvm_targets_PowerPC
+sys-devel/llvm llvm_targets_PowerPC
--- /dev/null
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+# Force the flag which corresponds to ARCH.
+ppc
+
+# Force the flag corresponding to the only ABI.
+abi_ppc_32
--- /dev/null
+# Copyright 1999-2014 Gentoo Foundation.
+# Distributed under the terms of the GNU General Public License, v2
+
+# Unmask the flag which corresponds to ARCH.
+-ppc
+
+# Unmask the flag corresponding to the only ABI.
+-abi_ppc_32
--- /dev/null
+# Copyright 1999-2013 Gentoo Foundation.
+# Distributed under the terms of the GNU General Public License v2
+
+elibc_musl
+
--- /dev/null
+# Copyright 1999-2017 Gentoo Foundation.
+# Distributed under the terms of the GNU General Public License v2
+
+-elibc_musl
+elibc_uclibc
+elibc_glibc
--- /dev/null
+# Copyright 1999-2015 Gentoo Foundation.
+# Distributed under the terms of the GNU General Public License v2
+
+ARCH="x86"
+ACCEPT_KEYWORDS="${ARCH}"
+
+CHOST="i686-gentoo-linux-musl"
+CFLAGS="-O2 -pipe"
+CXXFLAGS="${CFLAGS}"
+FFLAGS="${CFLAGS}"
+FCFLAGS="${CFLAGS}"
+
+# Anthony G. Basile <blueness@gentoo.org> (01 Jul 2014)
+# Multilib-related setup, bug #515130
+ABI="x86"
+DEFAULT_ABI="x86"
+MULTILIB_ABIS="x86"
+CHOST_x86="${CHOST}"
+LIBDIR_x86="lib"
+IUSE_IMPLICIT="abi_x86_32"
+
+# Anthony G. Basile <blueness@gentoo.org> (26 Jan 2013)
+# Unhide the CPU_FLAGS_X86 USE_EXPANDs.
+USE_EXPAND_HIDDEN="-CPU_FLAGS_X86"
--- /dev/null
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+# Michał Górny <mgorny@gentoo.org> (24 Sep 2016)
+# Force the host target to avoid dependency hell
+sys-devel/clang llvm_targets_X86
+sys-devel/llvm llvm_targets_X86
--- /dev/null
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+# Force the flag which corresponds to arch/abi, bug #515130
+x86
+abi_x86_32
--- /dev/null
+# Copyright 1999-2017 Gentoo Foundation.
+# Distributed under the terms of the GNU General Public License, v2
+
+# Force the flag which corresponds to arch/abi, bug #515130
+-x86
+-abi_x86_32
+
+# ssp is broken on x86 musl. This is critical for gcc-6.
+ssp
+
+# unmask all SIMD assembler flags
+-cpu_flags_x86_3dnow
+-cpu_flags_x86_3dnowext
+-cpu_flags_x86_aes
+-cpu_flags_x86_avx
+-cpu_flags_x86_avx2
+-cpu_flags_x86_fma3
+-cpu_flags_x86_fma4
+-cpu_flags_x86_mmx
+-cpu_flags_x86_mmxext
+-cpu_flags_x86_padlock
+-cpu_flags_x86_popcnt
+-cpu_flags_x86_sse
+-cpu_flags_x86_sse2
+-cpu_flags_x86_sse3
+-cpu_flags_x86_sse4_1
+-cpu_flags_x86_sse4_2
+-cpu_flags_x86_sse4a
+-cpu_flags_x86_ssse3
+-cpu_flags_x86_xop
+
+# Masked on all profiles but x86, bug #458354
+-video_cards_geode
amd64 hardened/linux/amd64/no-multilib stable
amd64 hardened/linux/amd64/no-multilib/selinux stable
amd64 hardened/linux/amd64/x32 dev
-amd64 hardened/linux/musl/amd64 exp
-amd64 hardened/linux/musl/amd64/x32 exp
arm hardened/linux/arm/armv7a dev
arm hardened/linux/arm/armv6j dev
-arm hardened/linux/musl/arm/armv7a exp
-arm64 hardened/linux/musl/arm64 exp
ia64 hardened/linux/ia64 dev
-mips hardened/linux/musl/mips exp
-mips hardened/linux/musl/mips/mipsel exp
mips hardened/linux/mips/mipsel/multilib/n32 exp
mips hardened/linux/mips/mipsel/multilib/n64 exp
mips hardened/linux/mips/mipsel/n32 exp
mips hardened/linux/mips/n64 exp
ppc hardened/linux/powerpc/ppc32 dev
ppc hardened/linux/powerpc/ppc64/32bit-userland dev
-ppc hardened/linux/musl/ppc exp
ppc64 hardened/linux/powerpc/ppc64/64bit-userland dev
x86 hardened/linux/x86 stable
x86 hardened/linux/x86/selinux stable
+
+# musl profiles
+amd64 default/linux/musl/amd64 exp
+amd64 hardened/linux/musl/amd64 exp
+amd64 default/linux/musl/amd64/x32 exp
+amd64 hardened/linux/musl/amd64/x32 exp
+arm default/linux/musl/arm/armv7a exp
+arm hardened/linux/musl/arm/armv7a exp
+arm64 default/linux/musl/arm64 exp
+arm64 hardened/linux/musl/arm64 exp
+mips default/linux/musl/mips exp
+mips hardened/linux/musl/mips exp
+mips default/linux/musl/mips/mipsel exp
+mips hardened/linux/musl/mips/mipsel exp
+ppc default/linux/musl/ppc exp
+ppc hardened/linux/musl/ppc exp
+x86 default/linux/musl/x86 exp
x86 hardened/linux/musl/x86 exp
# Non-embedded uclibc profiles