aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJory Pratt <anarchy@gentoo.org>2019-12-12 19:58:35 -0600
committerJory Pratt <anarchy@gentoo.org>2019-12-12 19:58:35 -0600
commit86a3525b2733f209e7d3a52bded04ceb6551f82c (patch)
treebb8c5efc11529757aaef24ea703be9061a79930b /sys-libs
parentsys-devel/clang: Remove stale clang (diff)
downloadmusl-86a3525b2733f209e7d3a52bded04ceb6551f82c.tar.gz
musl-86a3525b2733f209e7d3a52bded04ceb6551f82c.tar.bz2
musl-86a3525b2733f209e7d3a52bded04ceb6551f82c.zip
sys-libs/compiler-rt-sanitizers: remove stale
Signed-off-by: Jory Pratt <anarchy@gentoo.org>
Diffstat (limited to 'sys-libs')
-rw-r--r--sys-libs/compiler-rt-sanitizers/Manifest5
-rw-r--r--sys-libs/compiler-rt-sanitizers/compiler-rt-sanitizers-6.0.1.ebuild182
-rw-r--r--sys-libs/compiler-rt-sanitizers/compiler-rt-sanitizers-7.1.0.ebuild179
-rw-r--r--sys-libs/compiler-rt-sanitizers/files/0001-fixup-for-interception_type_test.patch14
-rw-r--r--sys-libs/compiler-rt-sanitizers/files/compiler-rt-sanitizers-6.0.1-musl-patches.patch287
-rw-r--r--sys-libs/compiler-rt-sanitizers/files/compiler-rt-sanitizers-7.1.0-musl-patches.patch287
-rw-r--r--sys-libs/compiler-rt-sanitizers/metadata.xml15
7 files changed, 0 insertions, 969 deletions
diff --git a/sys-libs/compiler-rt-sanitizers/Manifest b/sys-libs/compiler-rt-sanitizers/Manifest
deleted file mode 100644
index 29eab5d..0000000
--- a/sys-libs/compiler-rt-sanitizers/Manifest
+++ /dev/null
@@ -1,5 +0,0 @@
-DIST compiler-rt-6.0.1.src.tar.xz 1686820 BLAKE2B 59fa3f6e478bd4d6dfa056c85dcdc4349cbce7cea7fc56519feddc9d66c88c9ca48bad7967432ceb81d754213577f12707035afd827cf630a58627575b73b798 SHA512 69850c1ad92c66977fa217cbfb42a6a3f502fbe3d1a08daa7fc4cfeb617a7736d231f8ad8d93b10b1ae29bd753315d2a2d70f9ff1f4d18a9a7cc81758d91f963
-DIST compiler-rt-7.1.0.src.tar.xz 1864248 BLAKE2B 42ab86416f7f85c5833cf85dbfb66b18a5d5cf53fa0560ad43b2ef39f5a2cd7ec1dbe4192cc8dac9b3f658b828c8306f26745c4d0e8f846d9f550ac22717eb33 SHA512 54d3ad80936f011dbf2ecebba3f1b7d4a156044b178228411ba855be5ec48eb646155b74dea1a96674adab6f93803456ae1435395e3240a4423a3f65f4566b55
-DIST compiler-rt-sanitizers-6.0.1-patchset.tar.xz 8820 BLAKE2B d53ca357e060d058c7f20c51e74684f4c032fdf3ccec4c9f227dc7a5757206f331b9eda25a72c5c66faf4c44b2cc63eb439bd21bdd55d37a93918ab428fd7cd4 SHA512 782a34c56134bd061da30c1f598ddb9e90cb34a4e4ef058fa9634f6da372fd8693ff5e6cf98b59700942273240f83052b89ee2736b22f4e19bc8b519fbec8cad
-DIST llvm-6.0.1.src.tar.xz 25306628 BLAKE2B 60232d4d22f8096b565cc8d81fea0639f24f14e8fc4f66ade69fa15479181f07f655f26dff3fa24bf105762b495da316c5c9352db234bd0af6b9c3fff6d4d881 SHA512 cbbb00eb99cfeb4aff623ee1a5ba075e7b5a76fc00c5f9f539ff28c108598f5708a0369d5bd92683def5a20c2fe60cab7827b42d628dbfcc79b57e0e91b84dd9
-DIST llvm-7.1.0.src.tar.xz 28313784 BLAKE2B b78d9a7fc5ef6e352e77d339e5c4eef5ccedf67c05e7abd949e72619aa8a5ed65e7e5e2008354be8e7916d75581719b99f34227838fcc86c5d0080913c2fb22c SHA512 a7dbd5693d1f2dae6b6e52893a100f9349cbfcfb25c5fdcad46364acbff0dbd3573f8fbc026c68eb9fd56335198aa94b866cc3dd7ea0cbd2cbfb5f8fe3444a7a
diff --git a/sys-libs/compiler-rt-sanitizers/compiler-rt-sanitizers-6.0.1.ebuild b/sys-libs/compiler-rt-sanitizers/compiler-rt-sanitizers-6.0.1.ebuild
deleted file mode 100644
index 32f6ade..0000000
--- a/sys-libs/compiler-rt-sanitizers/compiler-rt-sanitizers-6.0.1.ebuild
+++ /dev/null
@@ -1,182 +0,0 @@
-# Copyright 1999-2019 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=6
-
-: ${CMAKE_MAKEFILE_GENERATOR:=ninja}
-# (needed due to CMAKE_BUILD_TYPE != Gentoo)
-CMAKE_MIN_VERSION=3.7.0-r1
-PYTHON_COMPAT=( python2_7 )
-
-inherit check-reqs cmake-utils flag-o-matic llvm \
- multiprocessing python-any-r1
-
-MY_P=compiler-rt-${PV/_/}.src
-LLVM_P=llvm-${PV/_/}.src
-
-DESCRIPTION="Compiler runtime libraries for clang (sanitizers & xray)"
-HOMEPAGE="https://llvm.org/"
-SRC_URI="https://releases.llvm.org/${PV/_//}/${MY_P}.tar.xz
- https://dev.gentoo.org/~mgorny/dist/llvm/${P}-patchset.tar.xz
- test? ( https://releases.llvm.org/${PV/_//}/${LLVM_P}.tar.xz )"
-
-LICENSE="|| ( UoI-NCSA MIT )"
-SLOT="${PV%_*}"
-KEYWORDS="amd64 x86"
-IUSE="+clang +libfuzzer +profile +sanitize test +xray elibc_glibc"
-# FIXME: libfuzzer does not enable all its necessary dependencies
-REQUIRED_USE="libfuzzer? ( || ( sanitize xray ) )"
-RESTRICT="!test? ( test ) !clang? ( test )"
-
-CLANG_SLOT=${SLOT%%.*}
-# llvm-6 for new lit options
-DEPEND="
- >=sys-devel/llvm-6
- clang? ( sys-devel/clang )
- test? (
- !<sys-apps/sandbox-2.13
- $(python_gen_any_dep ">=dev-python/lit-5[\${PYTHON_USEDEP}]")
- =sys-devel/clang-${PV%_*}*:${CLANG_SLOT}
- sys-libs/compiler-rt:${SLOT} )
- ${PYTHON_DEPS}"
-
-S=${WORKDIR}/${MY_P}
-
-PATCHES=( "${FILESDIR}"/${PN}-6.0.1-musl-patches.patch
- "${FILESDIR}"/0001-fixup-for-interception_type_test.patch
- )
-
-# least intrusive of all
-CMAKE_BUILD_TYPE=RelWithDebInfo
-
-check_space() {
- if use test; then
- local CHECKREQS_DISK_BUILD=11G
- check-reqs_pkg_pretend
- fi
-}
-
-pkg_pretend() {
- check_space
-}
-
-pkg_setup() {
- check_space
- llvm_pkg_setup
- python-any-r1_pkg_setup
-}
-
-src_unpack() {
- einfo "Unpacking ${MY_P}.tar.xz ..."
- tar -xf "${DISTDIR}/${MY_P}.tar.xz" || die
- einfo "Unpacking ${P}-patchset.tar.xz ..."
- tar -xf "${DISTDIR}/${P}-patchset.tar.xz" || die
-
- if use test; then
- einfo "Unpacking parts of ${LLVM_P}.tar.xz ..."
- tar -xf "${DISTDIR}/${LLVM_P}.tar.xz" \
- "${LLVM_P}"/utils/{lit,unittest} || die
- mv "${LLVM_P}" llvm || die
- fi
-}
-
-src_prepare() {
- cmake-utils_src_prepare
-
- # apply the patchset (new glibc fixes)
- eapply "${WORKDIR}/${P}-patchset"
-
- if use test; then
- # remove tests that are broken by new glibc
- # https://bugs.llvm.org/show_bug.cgi?id=36065
- if use elibc_glibc && has_version '>=sys-libs/glibc-2.25'; then
- rm test/lsan/TestCases/Linux/use_tls_dynamic.cc || die
- rm test/msan/dtls_test.c || die
- rm test/sanitizer_common/TestCases/Posix/sanitizer_set_death_callback_test.cc || die
- fi
- fi
-}
-
-src_configure() {
- # pre-set since we need to pass it to cmake
- BUILD_DIR=${WORKDIR}/${P}_build
-
- if use clang; then
- local -x CC=${CHOST}-clang
- local -x CXX=${CHOST}-clang++
- strip-unsupported-flags
- fi
-
- local mycmakeargs=(
- -DCOMPILER_RT_INSTALL_PATH="${EPREFIX}/usr/lib/clang/${SLOT}"
- # use a build dir structure consistent with install
- # this makes it possible to easily deploy test-friendly clang
- -DCOMPILER_RT_OUTPUT_DIR="${BUILD_DIR}/lib/clang/${SLOT}"
-
- -DCOMPILER_RT_INCLUDE_TESTS=$(usex test)
- # built-ins installed by sys-libs/compiler-rt
- -DCOMPILER_RT_BUILD_BUILTINS=OFF
- -DCOMPILER_RT_BUILD_LIBFUZZER=$(usex libfuzzer)
- -DCOMPILER_RT_BUILD_PROFILE=$(usex profile)
- -DCOMPILER_RT_BUILD_SANITIZERS=$(usex sanitize)
- -DCOMPILER_RT_BUILD_XRAY=$(usex xray)
- )
- if use test; then
- mycmakeargs+=(
- -DLLVM_MAIN_SRC_DIR="${WORKDIR}/llvm"
- -DLLVM_EXTERNAL_LIT="${EPREFIX}/usr/bin/lit"
- -DLLVM_LIT_ARGS="-vv;-j;${LIT_JOBS:-$(makeopts_jobs "${MAKEOPTS}" "$(get_nproc)")}"
-
- # they are created during src_test()
- -DCOMPILER_RT_TEST_COMPILER="${BUILD_DIR}/lib/llvm/${CLANG_SLOT}/bin/clang"
- -DCOMPILER_RT_TEST_CXX_COMPILER="${BUILD_DIR}/lib/llvm/${CLANG_SLOT}/bin/clang++"
- )
-
- # same flags are passed for build & tests, so we need to strip
- # them down to a subset supported by clang
- CC=${EPREFIX}/usr/lib/llvm/${CLANG_SLOT}/bin/clang \
- CXX=${EPREFIX}/usr/lib/llvm/${CLANG_SLOT}/bin/clang++ \
- strip-unsupported-flags
- fi
-
- if use prefix && [[ "${CHOST}" == *-darwin* ]] ; then
- mycmakeargs+=(
- # disable use of SDK for the system itself
- -DDARWIN_macosx_CACHED_SYSROOT=/
- )
- fi
-
- cmake-utils_src_configure
-
- if use test; then
- local sys_dir=( "${EPREFIX}"/usr/lib/clang/${SLOT}/lib/* )
- [[ -e ${sys_dir} ]] || die "Unable to find ${sys_dir}"
- [[ ${#sys_dir[@]} -eq 1 ]] || die "Non-deterministic compiler-rt install: ${sys_dir[*]}"
-
- # copy clang over since resource_dir is located relatively to binary
- # therefore, we can put our new libraries in it
- mkdir -p "${BUILD_DIR}"/lib/{llvm/${CLANG_SLOT}/{bin,$(get_libdir)},clang/${SLOT}/include} || die
- cp "${EPREFIX}"/usr/lib/llvm/${CLANG_SLOT}/bin/clang{,++} \
- "${BUILD_DIR}"/lib/llvm/${CLANG_SLOT}/bin/ || die
- cp "${EPREFIX}"/usr/lib/clang/${SLOT}/include/*.h \
- "${BUILD_DIR}"/lib/clang/${SLOT}/include/ || die
- cp "${sys_dir}"/*builtins*.a \
- "${BUILD_DIR}/lib/clang/${SLOT}/lib/${sys_dir##*/}/" || die
- # we also need LLVMgold.so for gold-based tests
- if [[ -f ${EPREFIX}/usr/lib/llvm/${CLANG_SLOT}/$(get_libdir)/LLVMgold.so ]]; then
- ln -s "${EPREFIX}"/usr/lib/llvm/${CLANG_SLOT}/$(get_libdir)/LLVMgold.so \
- "${BUILD_DIR}"/lib/llvm/${CLANG_SLOT}/$(get_libdir)/ || die
- fi
- fi
-}
-
-src_test() {
- # respect TMPDIR!
- local -x LIT_PRESERVES_TMP=1
- # disable sandbox to have it stop clobbering LD_PRELOAD
- local -x SANDBOX_ON=0
- # wipe LD_PRELOAD to make ASAN happy
- local -x LD_PRELOAD=
-
- cmake-utils_src_make check-all
-}
diff --git a/sys-libs/compiler-rt-sanitizers/compiler-rt-sanitizers-7.1.0.ebuild b/sys-libs/compiler-rt-sanitizers/compiler-rt-sanitizers-7.1.0.ebuild
deleted file mode 100644
index ce00444..0000000
--- a/sys-libs/compiler-rt-sanitizers/compiler-rt-sanitizers-7.1.0.ebuild
+++ /dev/null
@@ -1,179 +0,0 @@
-# Copyright 1999-2019 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=6
-
-: ${CMAKE_MAKEFILE_GENERATOR:=ninja}
-# (needed due to CMAKE_BUILD_TYPE != Gentoo)
-CMAKE_MIN_VERSION=3.7.0-r1
-PYTHON_COMPAT=( python2_7 )
-
-inherit check-reqs cmake-utils flag-o-matic llvm \
- multiprocessing python-any-r1
-
-MY_P=compiler-rt-${PV/_/}.src
-LLVM_P=llvm-${PV/_/}.src
-
-DESCRIPTION="Compiler runtime libraries for clang (sanitizers & xray)"
-HOMEPAGE="https://llvm.org/"
-SRC_URI="https://releases.llvm.org/${PV/_//}/${MY_P}.tar.xz
- test? ( https://releases.llvm.org/${PV/_//}/${LLVM_P}.tar.xz )"
-
-LICENSE="|| ( UoI-NCSA MIT )"
-SLOT="${PV%_*}"
-KEYWORDS="~amd64 ~x86"
-IUSE="+clang +libfuzzer +profile +sanitize test +xray elibc_glibc"
-# FIXME: libfuzzer does not enable all its necessary dependencies
-REQUIRED_USE="libfuzzer? ( || ( sanitize xray ) )"
-RESTRICT="!test? ( test ) !clang? ( test )"
-
-CLANG_SLOT=${SLOT%%.*}
-# llvm-6 for new lit options
-DEPEND="
- >=sys-devel/llvm-6
- clang? ( sys-devel/clang )
- test? (
- !<sys-apps/sandbox-2.13
- $(python_gen_any_dep ">=dev-python/lit-5[\${PYTHON_USEDEP}]")
- =sys-devel/clang-${PV%_*}*:${CLANG_SLOT}
- sys-libs/compiler-rt:${SLOT} )
- ${PYTHON_DEPS}"
-
-S=${WORKDIR}/${MY_P}
-
-PATCHES=( "${FILESDIR}"/${PN}-7.1.0-musl-patches.patch
- "${FILESDIR}"/0001-fixup-for-interception_type_test.patch
- )
-
-# least intrusive of all
-CMAKE_BUILD_TYPE=RelWithDebInfo
-
-check_space() {
- if use test; then
- local CHECKREQS_DISK_BUILD=11G
- check-reqs_pkg_pretend
- fi
-}
-
-pkg_pretend() {
- check_space
-}
-
-pkg_setup() {
- check_space
- llvm_pkg_setup
- python-any-r1_pkg_setup
-}
-
-src_unpack() {
- einfo "Unpacking ${MY_P}.tar.xz ..."
- tar -xf "${DISTDIR}/${MY_P}.tar.xz" || die
-
- if use test; then
- einfo "Unpacking parts of ${LLVM_P}.tar.xz ..."
- tar -xf "${DISTDIR}/${LLVM_P}.tar.xz" \
- "${LLVM_P}"/utils/{lit,unittest} || die
- mv "${LLVM_P}" llvm || die
- fi
-}
-
-src_prepare() {
- cmake-utils_src_prepare
-
- # apply the patchset (new glibc fixes)
- # eapply "${WORKDIR}/${P}-patchset"
-
- if use test; then
- # remove tests that are broken by new glibc
- # https://bugs.llvm.org/show_bug.cgi?id=36065
- if use elibc_glibc && has_version '>=sys-libs/glibc-2.25'; then
- rm test/lsan/TestCases/Linux/use_tls_dynamic.cc || die
- rm test/msan/dtls_test.c || die
- rm test/sanitizer_common/TestCases/Posix/sanitizer_set_death_callback_test.cc || die
- fi
- fi
-}
-
-src_configure() {
- # pre-set since we need to pass it to cmake
- BUILD_DIR=${WORKDIR}/${P}_build
-
- if use clang; then
- local -x CC=${CHOST}-clang
- local -x CXX=${CHOST}-clang++
- strip-unsupported-flags
- fi
-
- local mycmakeargs=(
- -DCOMPILER_RT_INSTALL_PATH="${EPREFIX}/usr/lib/clang/${SLOT}"
- # use a build dir structure consistent with install
- # this makes it possible to easily deploy test-friendly clang
- -DCOMPILER_RT_OUTPUT_DIR="${BUILD_DIR}/lib/clang/${SLOT}"
-
- -DCOMPILER_RT_INCLUDE_TESTS=$(usex test)
- # built-ins installed by sys-libs/compiler-rt
- -DCOMPILER_RT_BUILD_BUILTINS=OFF
- -DCOMPILER_RT_BUILD_LIBFUZZER=$(usex libfuzzer)
- -DCOMPILER_RT_BUILD_PROFILE=$(usex profile)
- -DCOMPILER_RT_BUILD_SANITIZERS=$(usex sanitize)
- -DCOMPILER_RT_BUILD_XRAY=$(usex xray)
- )
- if use test; then
- mycmakeargs+=(
- -DLLVM_MAIN_SRC_DIR="${WORKDIR}/llvm"
- -DLLVM_EXTERNAL_LIT="${EPREFIX}/usr/bin/lit"
- -DLLVM_LIT_ARGS="-vv;-j;${LIT_JOBS:-$(makeopts_jobs "${MAKEOPTS}" "$(get_nproc)")}"
-
- # they are created during src_test()
- -DCOMPILER_RT_TEST_COMPILER="${BUILD_DIR}/lib/llvm/${CLANG_SLOT}/bin/clang"
- -DCOMPILER_RT_TEST_CXX_COMPILER="${BUILD_DIR}/lib/llvm/${CLANG_SLOT}/bin/clang++"
- )
-
- # same flags are passed for build & tests, so we need to strip
- # them down to a subset supported by clang
- CC=${EPREFIX}/usr/lib/llvm/${CLANG_SLOT}/bin/clang \
- CXX=${EPREFIX}/usr/lib/llvm/${CLANG_SLOT}/bin/clang++ \
- strip-unsupported-flags
- fi
-
- if use prefix && [[ "${CHOST}" == *-darwin* ]] ; then
- mycmakeargs+=(
- # disable use of SDK for the system itself
- -DDARWIN_macosx_CACHED_SYSROOT=/
- )
- fi
-
- cmake-utils_src_configure
-
- if use test; then
- local sys_dir=( "${EPREFIX}"/usr/lib/clang/${SLOT}/lib/* )
- [[ -e ${sys_dir} ]] || die "Unable to find ${sys_dir}"
- [[ ${#sys_dir[@]} -eq 1 ]] || die "Non-deterministic compiler-rt install: ${sys_dir[*]}"
-
- # copy clang over since resource_dir is located relatively to binary
- # therefore, we can put our new libraries in it
- mkdir -p "${BUILD_DIR}"/lib/{llvm/${CLANG_SLOT}/{bin,$(get_libdir)},clang/${SLOT}/include} || die
- cp "${EPREFIX}"/usr/lib/llvm/${CLANG_SLOT}/bin/clang{,++} \
- "${BUILD_DIR}"/lib/llvm/${CLANG_SLOT}/bin/ || die
- cp "${EPREFIX}"/usr/lib/clang/${SLOT}/include/*.h \
- "${BUILD_DIR}"/lib/clang/${SLOT}/include/ || die
- cp "${sys_dir}"/*builtins*.a \
- "${BUILD_DIR}/lib/clang/${SLOT}/lib/${sys_dir##*/}/" || die
- # we also need LLVMgold.so for gold-based tests
- if [[ -f ${EPREFIX}/usr/lib/llvm/${CLANG_SLOT}/$(get_libdir)/LLVMgold.so ]]; then
- ln -s "${EPREFIX}"/usr/lib/llvm/${CLANG_SLOT}/$(get_libdir)/LLVMgold.so \
- "${BUILD_DIR}"/lib/llvm/${CLANG_SLOT}/$(get_libdir)/ || die
- fi
- fi
-}
-
-src_test() {
- # respect TMPDIR!
- local -x LIT_PRESERVES_TMP=1
- # disable sandbox to have it stop clobbering LD_PRELOAD
- local -x SANDBOX_ON=0
- # wipe LD_PRELOAD to make ASAN happy
- local -x LD_PRELOAD=
-
- cmake-utils_src_make check-all
-}
diff --git a/sys-libs/compiler-rt-sanitizers/files/0001-fixup-for-interception_type_test.patch b/sys-libs/compiler-rt-sanitizers/files/0001-fixup-for-interception_type_test.patch
deleted file mode 100644
index 746f53c..0000000
--- a/sys-libs/compiler-rt-sanitizers/files/0001-fixup-for-interception_type_test.patch
+++ /dev/null
@@ -1,14 +0,0 @@
-diff --git a/lib/interception/interception_type_test.cc b/lib/interception/interception_type_test.cc
-index 2b3a6d5..21c2fb3 100644
---- a/lib/interception/interception_type_test.cc
-+++ b/lib/interception/interception_type_test.cc
-@@ -32,8 +32,8 @@ COMPILER_CHECK(sizeof(::OFF64_T) == sizeof(off64_t));
- // The following are the cases when pread (and friends) is used instead of
- // pread64. In those cases we need OFF_T to match off_t. We don't care about the
- // rest (they depend on _FILE_OFFSET_BITS setting when building an application).
--# if SANITIZER_ANDROID || !defined _FILE_OFFSET_BITS || \
-- _FILE_OFFSET_BITS != 64
-+# if SANITIZER_ANDROID || !defined _FILE_OFFSET_BITS && !SANITIZER_NONGNU || \
-+ _FILE_OFFSET_BITS != 64 && !SANITIZER_NONGNU
- COMPILER_CHECK(sizeof(::OFF_T) == sizeof(off_t));
- # endif
diff --git a/sys-libs/compiler-rt-sanitizers/files/compiler-rt-sanitizers-6.0.1-musl-patches.patch b/sys-libs/compiler-rt-sanitizers/files/compiler-rt-sanitizers-6.0.1-musl-patches.patch
deleted file mode 100644
index fb76e07..0000000
--- a/sys-libs/compiler-rt-sanitizers/files/compiler-rt-sanitizers-6.0.1-musl-patches.patch
+++ /dev/null
@@ -1,287 +0,0 @@
-diff -Naur compiler-rt-6.0.1.src.orig/lib/asan/asan_linux.cc compiler-rt-6.0.1.src/lib/asan/asan_linux.cc
---- compiler-rt-6.0.1.src.orig/lib/asan/asan_linux.cc 2018-02-07 11:51:13.000000000 -0800
-+++ compiler-rt-6.0.1.src/lib/asan/asan_linux.cc 2018-06-27 13:01:11.942744865 -0700
-@@ -46,7 +46,7 @@
- #include <link.h>
- #endif
-
--#if SANITIZER_ANDROID || SANITIZER_FREEBSD || SANITIZER_SOLARIS
-+#if SANITIZER_ANDROID || SANITIZER_FREEBSD || SANITIZER_SOLARIS || SANITIZER_NONGNU
- #include <ucontext.h>
- extern "C" void* _DYNAMIC;
- #elif SANITIZER_NETBSD
-@@ -139,7 +139,7 @@
- UNIMPLEMENTED();
- }
-
--#if SANITIZER_ANDROID
-+#if SANITIZER_ANDROID || SANITIZER_NONGNU
- // FIXME: should we do anything for Android?
- void AsanCheckDynamicRTPrereqs() {}
- void AsanCheckIncompatibleRT() {}
-diff -Naur compiler-rt-6.0.1.src.orig/lib/interception/interception_linux.cc compiler-rt-6.0.1.src/lib/interception/interception_linux.cc
---- compiler-rt-6.0.1.src.orig/lib/interception/interception_linux.cc 2017-12-14 12:14:29.000000000 -0800
-+++ compiler-rt-6.0.1.src/lib/interception/interception_linux.cc 2018-06-27 13:01:11.942744865 -0700
-@@ -43,7 +43,7 @@
- }
-
- // Android and Solaris do not have dlvsym
--#if !SANITIZER_ANDROID && !SANITIZER_SOLARIS
-+#if !SANITIZER_ANDROID && !SANITIZER_SOLARIS && defined(__GLIBC__)
- void *GetFuncAddrVer(const char *func_name, const char *ver) {
- return dlvsym(RTLD_NEXT, func_name, ver);
- }
-diff -Naur compiler-rt-6.0.1.src.orig/lib/msan/msan_interceptors.cc compiler-rt-6.0.1.src/lib/msan/msan_interceptors.cc
---- compiler-rt-6.0.1.src.orig/lib/msan/msan_interceptors.cc 2017-12-13 17:20:16.000000000 -0800
-+++ compiler-rt-6.0.1.src/lib/msan/msan_interceptors.cc 2018-06-27 13:01:11.942744865 -0700
-@@ -1438,6 +1438,7 @@
- return cbdata->callback(info, size, cbdata->data);
- }
-
-+/* does not compile with musl
- INTERCEPTOR(void *, shmat, int shmid, const void *shmaddr, int shmflg) {
- ENSURE_MSAN_INITED();
- void *p = REAL(shmat)(shmid, shmaddr, shmflg);
-@@ -1450,6 +1451,7 @@
- }
- return p;
- }
-+*/
-
- INTERCEPTOR(int, dl_iterate_phdr, dl_iterate_phdr_cb callback, void *data) {
- void *ctx;
-@@ -1668,7 +1670,7 @@
- INTERCEPT_FUNCTION(pthread_join);
- INTERCEPT_FUNCTION(tzset);
- INTERCEPT_FUNCTION(__cxa_atexit);
-- INTERCEPT_FUNCTION(shmat);
-+ // INTERCEPT_FUNCTION(shmat); // does not compile with musl
- INTERCEPT_FUNCTION(fork);
- INTERCEPT_FUNCTION(openpty);
- INTERCEPT_FUNCTION(forkpty);
-diff -Naur compiler-rt-6.0.1.src.orig/lib/msan/msan_linux.cc compiler-rt-6.0.1.src/lib/msan/msan_linux.cc
---- compiler-rt-6.0.1.src.orig/lib/msan/msan_linux.cc 2017-11-07 15:51:22.000000000 -0800
-+++ compiler-rt-6.0.1.src/lib/msan/msan_linux.cc 2018-06-27 13:01:11.943744865 -0700
-@@ -13,7 +13,7 @@
- //===----------------------------------------------------------------------===//
-
- #include "sanitizer_common/sanitizer_platform.h"
--#if SANITIZER_FREEBSD || SANITIZER_LINUX || SANITIZER_NETBSD
-+#if SANITIZER_FREEBSD || SANITIZER_LINUX && !SANITIZER_NONGNU || SANITIZER_NETBSD
-
- #include "msan.h"
- #include "msan_thread.h"
-diff -Naur compiler-rt-6.0.1.src.orig/lib/sanitizer_common/sanitizer_common_interceptors_ioctl.inc compiler-rt-6.0.1.src/lib/sanitizer_common/sanitizer_common_interceptors_ioctl.inc
---- compiler-rt-6.0.1.src.orig/lib/sanitizer_common/sanitizer_common_interceptors_ioctl.inc 2017-12-14 12:14:29.000000000 -0800
-+++ compiler-rt-6.0.1.src/lib/sanitizer_common/sanitizer_common_interceptors_ioctl.inc 2018-06-27 13:01:11.944744865 -0700
-@@ -102,7 +102,7 @@
- _(SIOCGETVIFCNT, WRITE, struct_sioc_vif_req_sz);
- #endif
-
--#if SANITIZER_LINUX
-+#if SANITIZER_LINUX && !SANITIZER_NONGNU
- // Conflicting request ids.
- // _(CDROMAUDIOBUFSIZ, NONE, 0);
- // _(SNDCTL_TMR_CONTINUE, NONE, 0);
-@@ -363,7 +363,7 @@
- _(VT_WAITACTIVE, NONE, 0);
- #endif
-
--#if SANITIZER_LINUX && !SANITIZER_ANDROID
-+#if SANITIZER_LINUX && !SANITIZER_ANDROID && !SANITIZER_NONGNU
- // _(SIOCDEVPLIP, WRITE, struct_ifreq_sz); // the same as EQL_ENSLAVE
- _(CYGETDEFTHRESH, WRITE, sizeof(int));
- _(CYGETDEFTIMEOUT, WRITE, sizeof(int));
-diff -Naur compiler-rt-6.0.1.src.orig/lib/sanitizer_common/sanitizer_common_syscalls.inc compiler-rt-6.0.1.src/lib/sanitizer_common/sanitizer_common_syscalls.inc
---- compiler-rt-6.0.1.src.orig/lib/sanitizer_common/sanitizer_common_syscalls.inc 2016-06-24 16:09:44.000000000 -0700
-+++ compiler-rt-6.0.1.src/lib/sanitizer_common/sanitizer_common_syscalls.inc 2018-06-27 13:01:11.945744865 -0700
-@@ -2038,7 +2038,7 @@
- }
- }
-
--#if !SANITIZER_ANDROID
-+#if !SANITIZER_ANDROID && !SANITIZER_NONGNU
- PRE_SYSCALL(prlimit64)(long pid, long resource, const void *new_rlim,
- void *old_rlim) {
- if (new_rlim) PRE_READ(new_rlim, struct_rlimit64_sz);
-diff -Naur compiler-rt-6.0.1.src.orig/lib/sanitizer_common/sanitizer_platform.h compiler-rt-6.0.1.src/lib/sanitizer_common/sanitizer_platform.h
---- compiler-rt-6.0.1.src.orig/lib/sanitizer_common/sanitizer_platform.h 2017-12-14 12:14:29.000000000 -0800
-+++ compiler-rt-6.0.1.src/lib/sanitizer_common/sanitizer_platform.h 2018-06-27 13:01:11.945744865 -0700
-@@ -25,6 +25,12 @@
- # define SANITIZER_LINUX 0
- #endif
-
-+#if defined(__linux__) && !defined(__GLIBC__)
-+# define SANITIZER_NONGNU 1
-+#else
-+# define SANITIZER_NONGNU 0
-+#endif
-+
- #if defined(__FreeBSD__)
- # define SANITIZER_FREEBSD 1
- #else
-diff -Naur compiler-rt-6.0.1.src.orig/lib/sanitizer_common/sanitizer_platform_interceptors.h compiler-rt-6.0.1.src/lib/sanitizer_common/sanitizer_platform_interceptors.h
---- compiler-rt-6.0.1.src.orig/lib/sanitizer_common/sanitizer_platform_interceptors.h 2017-12-28 15:06:51.000000000 -0800
-+++ compiler-rt-6.0.1.src/lib/sanitizer_common/sanitizer_platform_interceptors.h 2018-06-27 13:01:11.945744865 -0700
-@@ -38,7 +38,7 @@
- # include "sanitizer_platform_limits_solaris.h"
- #endif
-
--#if SANITIZER_LINUX && !SANITIZER_ANDROID
-+#if SANITIZER_LINUX && !SANITIZER_ANDROID && !SANITIZER_NONGNU
- # define SI_LINUX_NOT_ANDROID 1
- #else
- # define SI_LINUX_NOT_ANDROID 0
-diff -Naur compiler-rt-6.0.1.src.orig/lib/sanitizer_common/sanitizer_platform_limits_posix.cc compiler-rt-6.0.1.src/lib/sanitizer_common/sanitizer_platform_limits_posix.cc
---- compiler-rt-6.0.1.src.orig/lib/sanitizer_common/sanitizer_platform_limits_posix.cc 2018-06-14 15:33:33.000000000 -0700
-+++ compiler-rt-6.0.1.src/lib/sanitizer_common/sanitizer_platform_limits_posix.cc 2018-06-27 13:03:17.471742617 -0700
-@@ -138,12 +138,14 @@
-
- #if SANITIZER_LINUX && !SANITIZER_ANDROID
- #include <glob.h>
--#include <obstack.h>
-+#if !SANITIZER_NONGNU
-+# include <obstack.h>
-+#endif
- #include <mqueue.h>
--#include <net/if_ppp.h>
--#include <netax25/ax25.h>
--#include <netipx/ipx.h>
--#include <netrom/netrom.h>
-+#include <linux/if_ppp.h>
-+#include <linux/ax25.h>
-+#include <linux/ipx.h>
-+#include <linux/netrom.h>
- #if HAVE_RPC_XDR_H
- # include <rpc/xdr.h>
- #elif HAVE_TIRPC_RPC_XDR_H
-@@ -251,7 +253,7 @@
- unsigned struct_itimerspec_sz = sizeof(struct itimerspec);
- #endif // SANITIZER_LINUX || SANITIZER_FREEBSD
-
--#if SANITIZER_LINUX && !SANITIZER_ANDROID
-+#if SANITIZER_LINUX && !SANITIZER_ANDROID && !SANITIZER_NONGNU
- // Use pre-computed size of struct ustat to avoid <sys/ustat.h> which
- // has been removed from glibc 2.28.
- #if defined(__aarch64__) || defined(__s390x__) || defined (__mips64) \
-@@ -286,9 +288,9 @@
- #endif
-
-
--#if (SANITIZER_LINUX || SANITIZER_FREEBSD) && !SANITIZER_ANDROID
-+#if (SANITIZER_LINUX && !SANITIZER_NONGNU || SANITIZER_FREEBSD) && !SANITIZER_ANDROID
- unsigned struct_shminfo_sz = sizeof(struct shminfo);
-- unsigned struct_shm_info_sz = sizeof(struct shm_info);
-+ unsigned struct_shm_info_sz = sizeof(nstruct shm_info);
- int shmctl_ipc_stat = (int)IPC_STAT;
- int shmctl_ipc_info = (int)IPC_INFO;
- int shmctl_shm_info = (int)SHM_INFO;
-@@ -322,7 +324,7 @@
- unsigned struct_ElfW_Phdr_sz = sizeof(Elf_Phdr);
- #endif
-
--#if (SANITIZER_LINUX || SANITIZER_FREEBSD) && !SANITIZER_ANDROID
-+#if (SANITIZER_LINUX || SANITIZER_FREEBSD) && !SANITIZER_ANDROID && !SANITIZER_NONGNU
- int glob_nomatch = GLOB_NOMATCH;
- int glob_altdirfunc = GLOB_ALTDIRFUNC;
- #endif
-@@ -416,7 +418,7 @@
- unsigned struct_termios_sz = sizeof(struct termios);
- unsigned struct_winsize_sz = sizeof(struct winsize);
-
--#if SANITIZER_LINUX
-+#if SANITIZER_LINUX && !SANITIZER_NONGNU
- unsigned struct_arpreq_sz = sizeof(struct arpreq);
- unsigned struct_cdrom_msf_sz = sizeof(struct cdrom_msf);
- unsigned struct_cdrom_multisession_sz = sizeof(struct cdrom_multisession);
-@@ -466,7 +468,7 @@
- unsigned struct_vt_mode_sz = sizeof(struct vt_mode);
- #endif // SANITIZER_LINUX || SANITIZER_FREEBSD
-
--#if SANITIZER_LINUX && !SANITIZER_ANDROID
-+#if SANITIZER_LINUX && !SANITIZER_ANDROID && !SANITIZER_NONGNU
- unsigned struct_ax25_parms_struct_sz = sizeof(struct ax25_parms_struct);
- unsigned struct_cyclades_monitor_sz = sizeof(struct cyclades_monitor);
- #if EV_VERSION > (0x010000)
-@@ -834,7 +836,7 @@
- unsigned IOCTL_VT_WAITACTIVE = VT_WAITACTIVE;
- #endif // SANITIZER_LINUX || SANITIZER_FREEBSD
-
--#if SANITIZER_LINUX && !SANITIZER_ANDROID
-+#if SANITIZER_LINUX && !SANITIZER_ANDROID && !SANITIZER_NONGNU
- unsigned IOCTL_CYGETDEFTHRESH = CYGETDEFTHRESH;
- unsigned IOCTL_CYGETDEFTIMEOUT = CYGETDEFTIMEOUT;
- unsigned IOCTL_CYGETMON = CYGETMON;
-@@ -989,7 +991,7 @@
- CHECK_SIZE_AND_OFFSET(dl_phdr_info, dlpi_phnum);
- #endif // SANITIZER_LINUX || SANITIZER_FREEBSD
-
--#if (SANITIZER_LINUX || SANITIZER_FREEBSD) && !SANITIZER_ANDROID
-+#if (SANITIZER_LINUX || SANITIZER_FREEBSD) && !SANITIZER_ANDROID && !SANITIZER_NONGNU
- CHECK_TYPE_SIZE(glob_t);
- CHECK_SIZE_AND_OFFSET(glob_t, gl_pathc);
- CHECK_SIZE_AND_OFFSET(glob_t, gl_pathv);
-@@ -1023,6 +1025,7 @@
- CHECK_SIZE_AND_OFFSET(iovec, iov_base);
- CHECK_SIZE_AND_OFFSET(iovec, iov_len);
-
-+#if !SANITIZER_NONGNU
- CHECK_TYPE_SIZE(msghdr);
- CHECK_SIZE_AND_OFFSET(msghdr, msg_name);
- CHECK_SIZE_AND_OFFSET(msghdr, msg_namelen);
-@@ -1036,6 +1039,7 @@
- CHECK_SIZE_AND_OFFSET(cmsghdr, cmsg_len);
- CHECK_SIZE_AND_OFFSET(cmsghdr, cmsg_level);
- CHECK_SIZE_AND_OFFSET(cmsghdr, cmsg_type);
-+#endif
-
- COMPILER_CHECK(sizeof(__sanitizer_dirent) <= sizeof(dirent));
- CHECK_SIZE_AND_OFFSET(dirent, d_ino);
-@@ -1138,7 +1142,7 @@
-
- CHECK_TYPE_SIZE(ether_addr);
-
--#if (SANITIZER_LINUX || SANITIZER_FREEBSD) && !SANITIZER_ANDROID
-+#if (SANITIZER_LINUX || SANITIZER_FREEBSD) && !SANITIZER_ANDROID && !SANITIZER_NONGNU
- CHECK_TYPE_SIZE(ipc_perm);
- # if SANITIZER_FREEBSD
- CHECK_SIZE_AND_OFFSET(ipc_perm, key);
-@@ -1199,7 +1203,7 @@
- CHECK_SIZE_AND_OFFSET(ifaddrs, ifa_data);
- #endif
-
--#if SANITIZER_LINUX
-+#if SANITIZER_LINUX && !SANITIZER_NONGNU
- COMPILER_CHECK(sizeof(__sanitizer_mallinfo) == sizeof(struct mallinfo));
- #endif
-
-@@ -1249,7 +1253,7 @@
- COMPILER_CHECK(__sanitizer_XDR_FREE == XDR_FREE);
- #endif
-
--#if SANITIZER_LINUX && !SANITIZER_ANDROID
-+#if SANITIZER_LINUX && !SANITIZER_ANDROID && !SANITIZER_NONGNU
- COMPILER_CHECK(sizeof(__sanitizer_FILE) <= sizeof(FILE));
- CHECK_SIZE_AND_OFFSET(FILE, _flags);
- CHECK_SIZE_AND_OFFSET(FILE, _IO_read_ptr);
-@@ -1268,7 +1272,7 @@
- CHECK_SIZE_AND_OFFSET(FILE, _fileno);
- #endif
-
--#if SANITIZER_LINUX && !SANITIZER_ANDROID
-+#if SANITIZER_LINUX && !SANITIZER_ANDROID && !SANITIZER_NONGNU
- COMPILER_CHECK(sizeof(__sanitizer__obstack_chunk) <= sizeof(_obstack_chunk));
- CHECK_SIZE_AND_OFFSET(_obstack_chunk, limit);
- CHECK_SIZE_AND_OFFSET(_obstack_chunk, prev);
-diff -Naur compiler-rt-6.0.1.src.orig/lib/tsan/rtl/tsan_platform_linux.cc compiler-rt-6.0.1.src/lib/tsan/rtl/tsan_platform_linux.cc
---- compiler-rt-6.0.1.src.orig/lib/tsan/rtl/tsan_platform_linux.cc 2017-11-28 08:28:54.000000000 -0800
-+++ compiler-rt-6.0.1.src/lib/tsan/rtl/tsan_platform_linux.cc 2018-06-27 13:01:11.946744865 -0700
-@@ -285,7 +285,7 @@
- // This is required to properly "close" the fds, because we do not see internal
- // closes within glibc. The code is a pure hack.
- int ExtractResolvFDs(void *state, int *fds, int nfd) {
--#if SANITIZER_LINUX && !SANITIZER_ANDROID
-+#if SANITIZER_LINUX && !SANITIZER_ANDROID && !SANITIZER_NONGNU
- int cnt = 0;
- struct __res_state *statp = (struct __res_state*)state;
- for (int i = 0; i < MAXNS && cnt < nfd; i++) {
diff --git a/sys-libs/compiler-rt-sanitizers/files/compiler-rt-sanitizers-7.1.0-musl-patches.patch b/sys-libs/compiler-rt-sanitizers/files/compiler-rt-sanitizers-7.1.0-musl-patches.patch
deleted file mode 100644
index 939dac6..0000000
--- a/sys-libs/compiler-rt-sanitizers/files/compiler-rt-sanitizers-7.1.0-musl-patches.patch
+++ /dev/null
@@ -1,287 +0,0 @@
---- a/lib/asan/asan_linux.cc
-+++ b/lib/asan/asan_linux.cc
-@@ -46,7 +46,7 @@
- #include <link.h>
- #endif
-
--#if SANITIZER_ANDROID || SANITIZER_FREEBSD || SANITIZER_SOLARIS
-+#if SANITIZER_ANDROID || SANITIZER_FREEBSD || SANITIZER_SOLARIS || SANITIZER_NONGNU
- #include <ucontext.h>
- extern "C" void* _DYNAMIC;
- #elif SANITIZER_NETBSD
-@@ -139,7 +139,7 @@
- UNIMPLEMENTED();
- }
-
--#if SANITIZER_ANDROID
-+#if SANITIZER_ANDROID || SANITIZER_NONGNU
- // FIXME: should we do anything for Android?
- void AsanCheckDynamicRTPrereqs() {}
- void AsanCheckIncompatibleRT() {}
-
---- a/lib/interception/interception_linux.cc
-+++ b/lib/interception/interception_linux.cc
-@@ -43,7 +43,7 @@
- }
-
- // Android and Solaris do not have dlvsym
--#if !SANITIZER_ANDROID && !SANITIZER_SOLARIS && !SANITIZER_OPENBSD
-+#if !SANITIZER_ANDROID && !SANITIZER_SOLARIS && !SANITIZER_OPENBSD && defined(__GLIBC__)
- void *GetFuncAddrVer(const char *func_name, const char *ver) {
- return dlvsym(RTLD_NEXT, func_name, ver);
- }
-
---- a/lib/msan/msan_interceptors.cc
-+++ b/lib/msan/msan_interceptors.cc
-@@ -1406,6 +1406,7 @@
- return cbdata->callback(info, size, cbdata->data);
- }
-
-+/* does not compile with musl
- INTERCEPTOR(void *, shmat, int shmid, const void *shmaddr, int shmflg) {
- ENSURE_MSAN_INITED();
- void *p = REAL(shmat)(shmid, shmaddr, shmflg);
-@@ -1418,6 +1419,7 @@
- }
- return p;
- }
-+*/
-
- INTERCEPTOR(int, dl_iterate_phdr, dl_iterate_phdr_cb callback, void *data) {
- void *ctx;
-@@ -1630,7 +1632,7 @@
- INTERCEPT_FUNCTION(pthread_join);
- INTERCEPT_FUNCTION(tzset);
- INTERCEPT_FUNCTION(__cxa_atexit);
-- INTERCEPT_FUNCTION(shmat);
-+ //INTERCEPT_FUNCTION(shmat); /* Does not compile with musl */
- INTERCEPT_FUNCTION(fork);
- MSAN_MAYBE_INTERCEPT_OPENPTY;
- MSAN_MAYBE_INTERCEPT_FORKPTY;
-
---- a/lib/msan/msan_linux.cc
-+++ b/lib/msan/msan_linux.cc
-@@ -13,7 +13,7 @@
- //===----------------------------------------------------------------------===//
-
- #include "sanitizer_common/sanitizer_platform.h"
--#if SANITIZER_FREEBSD || SANITIZER_LINUX || SANITIZER_NETBSD
-+#if SANITIZER_FREEBSD || SANITIZER_LINUX && !SANITIZER_NONGNU || SANITIZER_NETBSD
-
- #include "msan.h"
- #include "msan_report.h"
-
---- a/lib/sanitizer_common/sanitizer_common_interceptors_ioctl.inc
-+++ b/lib/sanitizer_common/sanitizer_common_interceptors_ioctl.inc
-@@ -104,7 +104,7 @@
- _(SIOCGETVIFCNT, WRITE, struct_sioc_vif_req_sz);
- #endif
-
--#if SANITIZER_LINUX
-+#if SANITIZER_LINUX && !SANITIZER_NONGNU
- // Conflicting request ids.
- // _(CDROMAUDIOBUFSIZ, NONE, 0);
- // _(SNDCTL_TMR_CONTINUE, NONE, 0);
-@@ -365,7 +365,7 @@
- _(VT_WAITACTIVE, NONE, 0);
- #endif
-
--#if SANITIZER_LINUX && !SANITIZER_ANDROID
-+#if SANITIZER_LINUX && !SANITIZER_ANDROID && !SANITIZER_NONGNU
- // _(SIOCDEVPLIP, WRITE, struct_ifreq_sz); // the same as EQL_ENSLAVE
- _(CYGETDEFTHRESH, WRITE, sizeof(int));
- _(CYGETDEFTIMEOUT, WRITE, sizeof(int));
-
---- a/lib/sanitizer_common/sanitizer_common_syscalls.inc
-+++ b/lib/sanitizer_common/sanitizer_common_syscalls.inc
-@@ -2038,7 +2038,7 @@
- }
- }
-
--#if !SANITIZER_ANDROID
-+#if !SANITIZER_ANDROID && !SANITIZER_NONGNU
- PRE_SYSCALL(prlimit64)(long pid, long resource, const void *new_rlim,
- void *old_rlim) {
- if (new_rlim) PRE_READ(new_rlim, struct_rlimit64_sz);
-
---- a/lib/sanitizer_common/sanitizer_platform.h
-+++ b/lib/sanitizer_common/sanitizer_platform.h
-@@ -26,6 +26,13 @@
- # define SANITIZER_LINUX 0
- #endif
-
-+#if defined(__linux__) && !defined(__GLIBC__)
-+# define SANITIZER_NONGNU 1
-+#else
-+# define SANITIZER_NONGNU 0
-+#endif
-+
-+
- #if defined(__FreeBSD__)
- # define SANITIZER_FREEBSD 1
- #else
-
---- a/lib/sanitizer_common/sanitizer_platform_interceptors.h
-+++ b/lib/sanitizer_common/sanitizer_platform_interceptors.h
-@@ -39,7 +39,7 @@
- # include "sanitizer_platform_limits_solaris.h"
- #endif
-
--#if SANITIZER_LINUX && !SANITIZER_ANDROID
-+#if SANITIZER_LINUX && !SANITIZER_ANDROID && !SANITIZER_NONGNU
- # define SI_LINUX_NOT_ANDROID 1
- #else
- # define SI_LINUX_NOT_ANDROID 0
-
---- a/lib/sanitizer_common/sanitizer_platform_limits_posix.cc
-+++ b/lib/sanitizer_common/sanitizer_platform_limits_posix.cc
-@@ -138,12 +138,14 @@
-
- #if SANITIZER_LINUX && !SANITIZER_ANDROID
- #include <glob.h>
--#include <obstack.h>
-+#if !SANITIZER_NONGNU
-+# include <obstack.h>
-+#endif
- #include <mqueue.h>
--#include <net/if_ppp.h>
--#include <netax25/ax25.h>
--#include <netipx/ipx.h>
--#include <netrom/netrom.h>
-+#include <linux/if_ppp.h>
-+#include <linux/ax25.h>
-+#include <linux/ipx.h>
-+#include <linux/netrom.h>
- #if HAVE_RPC_XDR_H
- # include <rpc/xdr.h>
- #endif
-@@ -249,7 +251,7 @@
- unsigned struct_itimerspec_sz = sizeof(struct itimerspec);
- #endif // SANITIZER_LINUX || SANITIZER_FREEBSD
-
--#if SANITIZER_LINUX && !SANITIZER_ANDROID
-+#if SANITIZER_LINUX && !SANITIZER_ANDROID && !SANITIZER_NONGNU
- // Use pre-computed size of struct ustat to avoid <sys/ustat.h> which
- // has been removed from glibc 2.28.
- #if defined(__aarch64__) || defined(__s390x__) || defined (__mips64) \
-@@ -284,9 +286,9 @@
- #endif
-
-
--#if (SANITIZER_LINUX || SANITIZER_FREEBSD) && !SANITIZER_ANDROID
-+#if (SANITIZER_LINUX && !SANITIZER_NONGNU || SANITIZER_FREEBSD) && !SANITIZER_ANDROID
- unsigned struct_shminfo_sz = sizeof(struct shminfo);
-- unsigned struct_shm_info_sz = sizeof(struct shm_info);
-+ unsigned struct_shm_info_sz = sizeof(nstruct shm_info);
- int shmctl_ipc_stat = (int)IPC_STAT;
- int shmctl_ipc_info = (int)IPC_INFO;
- int shmctl_shm_info = (int)SHM_INFO;
-@@ -320,7 +322,7 @@
- unsigned struct_ElfW_Phdr_sz = sizeof(Elf_Phdr);
- #endif
-
--#if (SANITIZER_LINUX || SANITIZER_FREEBSD) && !SANITIZER_ANDROID
-+#if (SANITIZER_LINUX || SANITIZER_FREEBSD) && !SANITIZER_ANDROID && !SANITIZER_NONGNU
- int glob_nomatch = GLOB_NOMATCH;
- int glob_altdirfunc = GLOB_ALTDIRFUNC;
- #endif
-@@ -414,7 +416,7 @@
- unsigned struct_termios_sz = sizeof(struct termios);
- unsigned struct_winsize_sz = sizeof(struct winsize);
-
--#if SANITIZER_LINUX
-+#if SANITIZER_LINUX && !SANITIZER_NONGNU
- unsigned struct_arpreq_sz = sizeof(struct arpreq);
- unsigned struct_cdrom_msf_sz = sizeof(struct cdrom_msf);
- unsigned struct_cdrom_multisession_sz = sizeof(struct cdrom_multisession);
-@@ -464,7 +466,7 @@
- unsigned struct_vt_mode_sz = sizeof(struct vt_mode);
- #endif // SANITIZER_LINUX || SANITIZER_FREEBSD
-
--#if SANITIZER_LINUX && !SANITIZER_ANDROID
-+#if SANITIZER_LINUX && !SANITIZER_ANDROID && !SANITIZER_NONGNU
- unsigned struct_ax25_parms_struct_sz = sizeof(struct ax25_parms_struct);
- unsigned struct_cyclades_monitor_sz = sizeof(struct cyclades_monitor);
- #if EV_VERSION > (0x010000)
-@@ -832,7 +834,7 @@
- unsigned IOCTL_VT_WAITACTIVE = VT_WAITACTIVE;
- #endif // SANITIZER_LINUX || SANITIZER_FREEBSD
-
--#if SANITIZER_LINUX && !SANITIZER_ANDROID
-+#if SANITIZER_LINUX && !SANITIZER_ANDROID && !SANITIZER_NONGNU
- unsigned IOCTL_CYGETDEFTHRESH = CYGETDEFTHRESH;
- unsigned IOCTL_CYGETDEFTIMEOUT = CYGETDEFTIMEOUT;
- unsigned IOCTL_CYGETMON = CYGETMON;
-@@ -987,7 +989,7 @@
- CHECK_SIZE_AND_OFFSET(dl_phdr_info, dlpi_phnum);
- #endif // SANITIZER_LINUX || SANITIZER_FREEBSD
-
--#if (SANITIZER_LINUX || SANITIZER_FREEBSD) && !SANITIZER_ANDROID
-+#if (SANITIZER_LINUX || SANITIZER_FREEBSD) && !SANITIZER_ANDROID && !SANITIZER_NONGNU
- CHECK_TYPE_SIZE(glob_t);
- CHECK_SIZE_AND_OFFSET(glob_t, gl_pathc);
- CHECK_SIZE_AND_OFFSET(glob_t, gl_pathv);
-@@ -1021,6 +1023,7 @@
- CHECK_SIZE_AND_OFFSET(iovec, iov_base);
- CHECK_SIZE_AND_OFFSET(iovec, iov_len);
-
-+#if !SANITIZER_NONGNU
- CHECK_TYPE_SIZE(msghdr);
- CHECK_SIZE_AND_OFFSET(msghdr, msg_name);
- CHECK_SIZE_AND_OFFSET(msghdr, msg_namelen);
-@@ -1034,6 +1037,7 @@
- CHECK_SIZE_AND_OFFSET(cmsghdr, cmsg_len);
- CHECK_SIZE_AND_OFFSET(cmsghdr, cmsg_level);
- CHECK_SIZE_AND_OFFSET(cmsghdr, cmsg_type);
-+#endif
-
- #ifndef __GLIBC_PREREQ
- #define __GLIBC_PREREQ(x, y) 0
-@@ -1143,7 +1147,7 @@
-
- CHECK_TYPE_SIZE(ether_addr);
-
--#if (SANITIZER_LINUX || SANITIZER_FREEBSD) && !SANITIZER_ANDROID
-+#if (SANITIZER_LINUX || SANITIZER_FREEBSD) && !SANITIZER_ANDROID && !SANITIZER_NONGNU
- CHECK_TYPE_SIZE(ipc_perm);
- # if SANITIZER_FREEBSD
- CHECK_SIZE_AND_OFFSET(ipc_perm, key);
-@@ -1204,7 +1208,7 @@
- CHECK_SIZE_AND_OFFSET(ifaddrs, ifa_data);
- #endif
-
--#if SANITIZER_LINUX
-+#if SANITIZER_LINUX && !SANITIZER_NONGNU
- COMPILER_CHECK(sizeof(__sanitizer_mallinfo) == sizeof(struct mallinfo));
- #endif
-
-@@ -1254,7 +1258,7 @@
- COMPILER_CHECK(__sanitizer_XDR_FREE == XDR_FREE);
- #endif
-
--#if SANITIZER_LINUX && !SANITIZER_ANDROID
-+#if SANITIZER_LINUX && !SANITIZER_ANDROID && !SANITIZER_NONGNU
- COMPILER_CHECK(sizeof(__sanitizer_FILE) <= sizeof(FILE));
- CHECK_SIZE_AND_OFFSET(FILE, _flags);
- CHECK_SIZE_AND_OFFSET(FILE, _IO_read_ptr);
-@@ -1273,7 +1277,7 @@
- CHECK_SIZE_AND_OFFSET(FILE, _fileno);
- #endif
-
--#if SANITIZER_LINUX && !SANITIZER_ANDROID
-+#if SANITIZER_LINUX && !SANITIZER_ANDROID && !SANITIZER_NONGNU
- COMPILER_CHECK(sizeof(__sanitizer__obstack_chunk) <= sizeof(_obstack_chunk));
- CHECK_SIZE_AND_OFFSET(_obstack_chunk, limit);
- CHECK_SIZE_AND_OFFSET(_obstack_chunk, prev);
-
---- a/lib/tsan/rtl/tsan_platform_linux.cc
-+++ b/lib/tsan/rtl/tsan_platform_linux.cc
-@@ -294,7 +294,7 @@
- // This is required to properly "close" the fds, because we do not see internal
- // closes within glibc. The code is a pure hack.
- int ExtractResolvFDs(void *state, int *fds, int nfd) {
--#if SANITIZER_LINUX && !SANITIZER_ANDROID
-+#if SANITIZER_LINUX && !SANITIZER_ANDROID && !SANITIZER_NONGNU
- int cnt = 0;
- struct __res_state *statp = (struct __res_state*)state;
- for (int i = 0; i < MAXNS && cnt < nfd; i++) {
diff --git a/sys-libs/compiler-rt-sanitizers/metadata.xml b/sys-libs/compiler-rt-sanitizers/metadata.xml
deleted file mode 100644
index 8f5cbb8..0000000
--- a/sys-libs/compiler-rt-sanitizers/metadata.xml
+++ /dev/null
@@ -1,15 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
-<pkgmetadata>
- <maintainer type="project">
- <email>llvm@gentoo.org</email>
- </maintainer>
- <use>
- <flag name='clang'>Force building using installed clang (rather
- than the default CC/CXX).</flag>
- <flag name='libfuzzer'>Build fuzzing runtime.</flag>
- <flag name='profile'>Build profiling runtime.</flag>
- <flag name='sanitize'>Build sanitizer runtimes.</flag>
- <flag name='xray'>Build XRay runtime.</flag>
- </use>
-</pkgmetadata>