Home
       tsys-libs/compiler-rt-sanitizers: Remove. - parlay - yet another gentoo overlay
  HTML git clone https://git.parazyd.org/parlay
   DIR Log
   DIR Files
   DIR Refs
   DIR README
       ---
   DIR commit c30c7cc28a392a3c4ee8eb44766e84d87b6be43b
   DIR parent b619436c81156db747d2a8a280eddd3b1917e483
  HTML Author: parazyd <parazyd@dyne.org>
       Date:   Sat, 17 Feb 2018 09:53:15 +0100
       
       sys-libs/compiler-rt-sanitizers: Remove.
       
       Diffstat:
         D sys-libs/compiler-rt-sanitizers/Ma… |       2 --
         D sys-libs/compiler-rt-sanitizers/co… |     132 -------------------------------
         D sys-libs/compiler-rt-sanitizers/fi… |      24 ------------------------
         D sys-libs/compiler-rt-sanitizers/fi… |     344 ------------------------------
         D sys-libs/compiler-rt-sanitizers/me… |       7 -------
       
       5 files changed, 0 insertions(+), 509 deletions(-)
       ---
   DIR diff --git a/sys-libs/compiler-rt-sanitizers/Manifest b/sys-libs/compiler-rt-sanitizers/Manifest
       t@@ -1,2 +0,0 @@
       -DIST compiler-rt-4.0.1.src.tar.xz 1434100 SHA256 a3c87794334887b93b7a766c507244a7cdcce1d48b2e9249fc9a94f2c3beb440 SHA512 cfeb625884b273f7c0e6767b81a8d3e5f24e0b96a510d5764d9d47a0e215fc841b4cb9d1843c8fb428cd21def720cfbfe8d3593ff5bb390548ebc8c32a902649 WHIRLPOOL 8b33c6841cacefe98da92435418b13b8f8ed97a982903be827e5c37f937dc9001975d6a709d60423b21509dd5670ee2e90cb34c96473fb4a66c2ab6f47af09e5
       -DIST llvm-4.0.1.src.tar.xz 21065652 SHA256 da783db1f82d516791179fe103c71706046561f7972b18f0049242dee6712b51 SHA512 16adc39b34ddb628f81b171119a8e2a0e9138b25011e803ef0b688e2fbea116fc4953d3a1b61b90a98a75e33619f81566b7cb06a9a2ea4d04ac5e0eb303a2d1d WHIRLPOOL 1626ff270f7ce4801d02a0797b227fda9314ff5c0c01d653111599e9a4d2854c4d9edc3c698a7abee8d79d6bce8b18dc619fbced3c07ca610d44a248d65830cc
   DIR diff --git a/sys-libs/compiler-rt-sanitizers/compiler-rt-sanitizers-4.0.1.ebuild b/sys-libs/compiler-rt-sanitizers/compiler-rt-sanitizers-4.0.1.ebuild
       t@@ -1,132 +0,0 @@
       -# Copyright 1999-2017 Gentoo Foundation
       -# 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 python-any-r1 versionator
       -
       -DESCRIPTION="Compiler runtime libraries for clang (sanitizers & xray)"
       -HOMEPAGE="http://llvm.org/"
       -SRC_URI="http://releases.llvm.org/${PV/_//}/compiler-rt-${PV/_/}.src.tar.xz
       -        test? ( http://releases.llvm.org/${PV/_//}/llvm-${PV/_/}.src.tar.xz )"
       -
       -LICENSE="|| ( UoI-NCSA MIT )"
       -SLOT="${PV%_*}"
       -KEYWORDS="~amd64 ~arm64 ~x86"
       -IUSE="test"
       -
       -LLVM_SLOT=${SLOT%%.*}
       -RDEPEND="!=sys-libs/compiler-rt-sanitizers-${SLOT}*:0"
       -# llvm-4 needed for --cmakedir
       -DEPEND="
       -        >=sys-devel/llvm-4
       -        test? (
       -                app-portage/unsandbox
       -                $(python_gen_any_dep "~dev-python/lit-${PV}[\${PYTHON_USEDEP}]")
       -                =sys-devel/clang-${PV%_*}*:${LLVM_SLOT}
       -                sys-libs/compiler-rt:${SLOT} )
       -        ${PYTHON_DEPS}"
       -
       -S=${WORKDIR}/compiler-rt-${PV/_/}.src
       -
       -PATCHES=(
       -        "${FILESDIR}"/${PN}-4.0.0-musl-patches.patch
       -        "${FILESDIR}"/additional-4.0.1-musl-fix.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() {
       -        default
       -
       -        if use test; then
       -                mv llvm-* llvm || die
       -        fi
       -}
       -
       -src_configure() {
       -        # pre-set since we need to pass it to cmake
       -        BUILD_DIR=${WORKDIR}/${P}_build
       -
       -        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_SANITIZERS=ON
       -                -DCOMPILER_RT_BUILD_XRAY=ON
       -        )
       -        if use test; then
       -                mycmakeargs+=(
       -                        -DLLVM_MAIN_SRC_DIR="${WORKDIR}/llvm"
       -                        -DLIT_COMMAND="${EPREFIX}/usr/bin/unsandbox;${EPREFIX}/usr/bin/lit"
       -
       -                        # they are created during src_test()
       -                        -DCOMPILER_RT_TEST_COMPILER="${BUILD_DIR}/lib/llvm/${LLVM_SLOT}/bin/clang"
       -                        -DCOMPILER_RT_TEST_CXX_COMPILER="${BUILD_DIR}/lib/llvm/${LLVM_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/${LLVM_SLOT}/bin/clang \
       -                CXX=${EPREFIX}/usr/lib/llvm/${LLVM_SLOT}/bin/clang++ \
       -                strip-unsupported-flags
       -        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/${LLVM_SLOT}/{bin,$(get_libdir)},clang/${SLOT}/include} || die
       -                cp "${EPREFIX}"/usr/lib/llvm/${LLVM_SLOT}/bin/clang{,++} \
       -                        "${BUILD_DIR}"/lib/llvm/${LLVM_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/${LLVM_SLOT}/$(get_libdir)/LLVMgold.so ]]; then
       -                        ln -s "${EPREFIX}"/usr/lib/llvm/${LLVM_SLOT}/$(get_libdir)/LLVMgold.so \
       -                                "${BUILD_DIR}"/lib/llvm/${LLVM_SLOT}/$(get_libdir)/ || die
       -                fi
       -        fi
       -}
       -
       -src_test() {
       -        # respect TMPDIR!
       -        local -x LIT_PRESERVES_TMP=1
       -
       -        cmake-utils_src_make check-all
       -}
   DIR diff --git a/sys-libs/compiler-rt-sanitizers/files/additional-4.0.1-musl-fix.patch b/sys-libs/compiler-rt-sanitizers/files/additional-4.0.1-musl-fix.patch
       t@@ -1,24 +0,0 @@
       -diff --git a/lib/sanitizer_common/sanitizer_platform_limits_posix.cc b/lib/sanitizer_common/sanitizer_platform_limits_posix.cc
       -index 245f856..1a09252 100644
       ---- a/lib/sanitizer_common/sanitizer_platform_limits_posix.cc
       -+++ b/lib/sanitizer_common/sanitizer_platform_limits_posix.cc
       -@@ -64,7 +64,7 @@
       - #include <malloc.h>
       - #include <mntent.h>
       - #include <netinet/ether.h>
       --#include <sys/sysinfo.h>
       -+// #include <sys/sysinfo.h>
       - #include <sys/vt.h>
       - #include <linux/cdrom.h>
       - #include <linux/fd.h>
       -@@ -168,7 +168,10 @@ typedef struct user_fpregs elf_fpregset_t;
       - #include <linux/if_eql.h>
       - #include <linux/if_plip.h>
       - #include <linux/lp.h>
       -+#include <netinet/in.h>
       -+#define _LINUX_IN_H
       - #include <linux/mroute.h>
       -+#define _LINUX_IN6_H
       - #include <linux/mroute6.h>
       - #include <linux/scc.h>
       - #include <linux/serial.h>
   DIR diff --git a/sys-libs/compiler-rt-sanitizers/files/compiler-rt-sanitizers-4.0.0-musl-patches.patch b/sys-libs/compiler-rt-sanitizers/files/compiler-rt-sanitizers-4.0.0-musl-patches.patch
       t@@ -1,344 +0,0 @@
       -From 50aa0d694e2fa53b8671e093c42147458ed4e692 Mon Sep 17 00:00:00 2001
       -From: Matthias Maier <tamiko@43-1.org>
       -Date: Fri, 5 May 2017 17:47:39 +0000
       -Subject: [PATCH] Musl patches
       -
       -Ported to compiler-rt-sanitizers-4.0.0. Taken from
       -
       -  https://gist.githubusercontent.com/pwaller/2337f3290f12634cad3e3730cff0a6c1/raw/83c87a8585e2f9662494db5662e5361beb093c26/nongnu.patch
       ----
       - lib/asan/asan_linux.cc                             |  4 +--
       - lib/interception/interception_linux.cc             |  2 +-
       - lib/msan/msan_linux.cc                             |  2 +-
       - .../sanitizer_common_interceptors_ioctl.inc        |  4 +--
       - lib/sanitizer_common/sanitizer_common_syscalls.inc |  2 +-
       - lib/sanitizer_common/sanitizer_linux_libcdep.cc    | 12 +++----
       - lib/sanitizer_common/sanitizer_platform.h          |  7 ++++
       - .../sanitizer_platform_interceptors.h              |  2 +-
       - .../sanitizer_platform_limits_posix.cc             | 37 ++++++++++++----------
       - lib/tsan/rtl/tsan_platform_linux.cc                |  2 +-
       - 10 files changed, 43 insertions(+), 31 deletions(-)
       -
       -diff --git a/lib/asan/asan_linux.cc b/lib/asan/asan_linux.cc
       -index c051573..e295f60 100644
       ---- a/lib/asan/asan_linux.cc
       -+++ b/lib/asan/asan_linux.cc
       -@@ -39,7 +39,7 @@
       - #include <sys/link_elf.h>
       - #endif
       - 
       --#if SANITIZER_ANDROID || SANITIZER_FREEBSD
       -+#if SANITIZER_ANDROID || SANITIZER_FREEBSD || SANITIZER_NONGNU
       - #include <ucontext.h>
       - extern "C" void* _DYNAMIC;
       - #else
       -@@ -80,7 +80,7 @@ void AsanApplyToGlobals(globals_op_fptr op, const void *needle) {
       -   UNIMPLEMENTED();
       - }
       - 
       --#if SANITIZER_ANDROID
       -+#if SANITIZER_ANDROID || SANITIZER_NONGNU
       - // FIXME: should we do anything for Android?
       - void AsanCheckDynamicRTPrereqs() {}
       - void AsanCheckIncompatibleRT() {}
       -diff --git a/lib/interception/interception_linux.cc b/lib/interception/interception_linux.cc
       -index 6e908ac..76c1688 100644
       ---- a/lib/interception/interception_linux.cc
       -+++ b/lib/interception/interception_linux.cc
       -@@ -24,7 +24,7 @@ bool GetRealFunctionAddress(const char *func_name, uptr *func_addr,
       -   return real == wrapper;
       - }
       - 
       --#if !defined(__ANDROID__)  // android does not have dlvsym
       -+#if !defined(__ANDROID__) && defined(__GLIBC__)  // android does not have dlvsym
       - void *GetFuncAddrVer(const char *func_name, const char *ver) {
       -   return dlvsym(RTLD_NEXT, func_name, ver);
       - }
       -diff --git a/lib/msan/msan_linux.cc b/lib/msan/msan_linux.cc
       -index 0a687f6..0852d97 100644
       ---- 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
       -+#if SANITIZER_FREEBSD || SANITIZER_LINUX && !SANITIZER_NONGNU
       - 
       - #include "msan.h"
       - #include "msan_thread.h"
       -diff --git a/lib/sanitizer_common/sanitizer_common_interceptors_ioctl.inc b/lib/sanitizer_common/sanitizer_common_interceptors_ioctl.inc
       -index 4ed9afe..64f584e 100644
       ---- a/lib/sanitizer_common/sanitizer_common_interceptors_ioctl.inc
       -+++ b/lib/sanitizer_common/sanitizer_common_interceptors_ioctl.inc
       -@@ -100,7 +100,7 @@ static void ioctl_table_fill() {
       -   _(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);
       -@@ -361,7 +361,7 @@ static void ioctl_table_fill() {
       -   _(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 --git a/lib/sanitizer_common/sanitizer_common_syscalls.inc b/lib/sanitizer_common/sanitizer_common_syscalls.inc
       -index 469c8eb..24f8786 100644
       ---- a/lib/sanitizer_common/sanitizer_common_syscalls.inc
       -+++ b/lib/sanitizer_common/sanitizer_common_syscalls.inc
       -@@ -2038,7 +2038,7 @@ POST_SYSCALL(setrlimit)(long res, long resource, void *rlim) {
       -   }
       - }
       - 
       --#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 --git a/lib/sanitizer_common/sanitizer_linux_libcdep.cc b/lib/sanitizer_common/sanitizer_linux_libcdep.cc
       -index f99f0b5..3a773a9 100644
       ---- a/lib/sanitizer_common/sanitizer_linux_libcdep.cc
       -+++ b/lib/sanitizer_common/sanitizer_linux_libcdep.cc
       -@@ -152,7 +152,7 @@ bool SanitizerGetThreadName(char *name, int max_len) {
       - #endif
       - }
       - 
       --#if !SANITIZER_FREEBSD && !SANITIZER_ANDROID && !SANITIZER_GO
       -+#if !SANITIZER_FREEBSD && !SANITIZER_ANDROID && !SANITIZER_GO && !SANITIZER_NONGNU
       - static uptr g_tls_size;
       - 
       - #ifdef __i386__
       -@@ -180,11 +180,11 @@ void InitTlsSize() {
       - }
       - #else
       - void InitTlsSize() { }
       --#endif  // !SANITIZER_FREEBSD && !SANITIZER_ANDROID && !SANITIZER_GO
       -+#endif  // !SANITIZER_FREEBSD && !SANITIZER_ANDROID && !SANITIZER_GO && !SANITIZER_NONGNU
       - 
       - #if (defined(__x86_64__) || defined(__i386__) || defined(__mips__) \
       -     || defined(__aarch64__) || defined(__powerpc64__) || defined(__s390__)) \
       --    && SANITIZER_LINUX && !SANITIZER_ANDROID
       -+    && SANITIZER_LINUX && !SANITIZER_ANDROID && !SANITIZER_NONGNU
       - // sizeof(struct pthread) from glibc.
       - static atomic_uintptr_t kThreadDescriptorSize;
       - 
       -@@ -338,7 +338,7 @@ uptr ThreadSelf() {
       - 
       - #if !SANITIZER_GO
       - static void GetTls(uptr *addr, uptr *size) {
       --#if SANITIZER_LINUX && !SANITIZER_ANDROID
       -+#if SANITIZER_LINUX && !SANITIZER_ANDROID && !SANITIZER_NONGNU
       - # if defined(__x86_64__) || defined(__i386__) || defined(__s390__)
       -   *addr = ThreadSelf();
       -   *size = GetTlsSize();
       -@@ -364,7 +364,7 @@ static void GetTls(uptr *addr, uptr *size) {
       -     *addr = (uptr) dtv[2];
       -     *size = (*addr == 0) ? 0 : ((uptr) segbase[0] - (uptr) dtv[2]);
       -   }
       --#elif SANITIZER_ANDROID
       -+#elif SANITIZER_ANDROID || SANITIZER_NONGNU
       -   *addr = 0;
       -   *size = 0;
       - #else
       -@@ -375,7 +375,7 @@ static void GetTls(uptr *addr, uptr *size) {
       - 
       - #if !SANITIZER_GO
       - uptr GetTlsSize() {
       --#if SANITIZER_FREEBSD || SANITIZER_ANDROID
       -+#if SANITIZER_FREEBSD || SANITIZER_ANDROID || SANITIZER_NONGNU
       -   uptr addr, size;
       -   GetTls(&addr, &size);
       -   return size;
       -diff --git a/lib/sanitizer_common/sanitizer_platform.h b/lib/sanitizer_common/sanitizer_platform.h
       -index d9a8e8d..fe01c57 100644
       ---- a/lib/sanitizer_common/sanitizer_platform.h
       -+++ b/lib/sanitizer_common/sanitizer_platform.h
       -@@ -162,6 +162,13 @@
       - # define SANITIZER_PPC64V2 0
       - #endif
       - 
       -+
       -+#if defined(__linux__) && !defined(__GLIBC__)
       -+# define SANITIZER_NONGNU 1
       -+#else
       -+# define SANITIZER_NONGNU 0
       -+#endif
       -+
       - // By default we allow to use SizeClassAllocator64 on 64-bit platform.
       - // But in some cases (e.g. AArch64's 39-bit address space) SizeClassAllocator64
       - // does not work well and we need to fallback to SizeClassAllocator32.
       -diff --git a/lib/sanitizer_common/sanitizer_platform_interceptors.h b/lib/sanitizer_common/sanitizer_platform_interceptors.h
       -index 62875d1..212e6e8 100644
       ---- a/lib/sanitizer_common/sanitizer_platform_interceptors.h
       -+++ b/lib/sanitizer_common/sanitizer_platform_interceptors.h
       -@@ -23,7 +23,7 @@
       - # define SI_NOT_WINDOWS 0
       - #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 --git a/lib/sanitizer_common/sanitizer_platform_limits_posix.cc b/lib/sanitizer_common/sanitizer_platform_limits_posix.cc
       -index 683f019..245f856 100644
       ---- a/lib/sanitizer_common/sanitizer_platform_limits_posix.cc
       -+++ b/lib/sanitizer_common/sanitizer_platform_limits_posix.cc
       -@@ -139,12 +139,14 @@ typedef struct user_fpregs elf_fpregset_t;
       - 
       - #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
       -@@ -160,7 +162,8 @@ typedef struct user_fpregs elf_fpregset_t;
       - # include <sys/procfs.h>
       - #endif
       - #include <sys/user.h>
       --#include <sys/ustat.h>
       -+// #include <sys/ustat.h>
       -+#include <sys/statfs.h>
       - #include <linux/cyclades.h>
       - #include <linux/if_eql.h>
       - #include <linux/if_plip.h>
       -@@ -252,7 +255,7 @@ namespace __sanitizer {
       -   unsigned struct_itimerspec_sz = sizeof(struct itimerspec);
       - #endif // SANITIZER_LINUX || SANITIZER_FREEBSD
       - 
       --#if SANITIZER_LINUX && !SANITIZER_ANDROID
       -+#if SANITIZER_LINUX && !SANITIZER_ANDROID && !SANITIZER_NONGNU
       -   unsigned struct_ustat_sz = sizeof(struct ustat);
       -   unsigned struct_rlimit64_sz = sizeof(struct rlimit64);
       -   unsigned struct_statvfs64_sz = sizeof(struct statvfs64);
       -@@ -310,7 +313,7 @@ unsigned struct_ElfW_Phdr_sz = sizeof(ElfW(Phdr));
       - 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
       -@@ -404,7 +407,7 @@ unsigned struct_ElfW_Phdr_sz = sizeof(Elf_Phdr);
       -   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);
       -@@ -454,7 +457,7 @@ unsigned struct_ElfW_Phdr_sz = sizeof(Elf_Phdr);
       -   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)
       -@@ -822,7 +825,7 @@ unsigned struct_ElfW_Phdr_sz = sizeof(Elf_Phdr);
       -   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;
       -@@ -985,7 +988,7 @@ CHECK_SIZE_AND_OFFSET(dl_phdr_info, dlpi_phdr);
       - 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);
       -@@ -1019,6 +1022,7 @@ CHECK_TYPE_SIZE(iovec);
       - 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);
       -@@ -1032,6 +1036,7 @@ CHECK_TYPE_SIZE(cmsghdr);
       - 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);
       -@@ -1134,7 +1139,7 @@ CHECK_SIZE_AND_OFFSET(mntent, mnt_passno);
       - 
       - 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);
       -@@ -1195,7 +1200,7 @@ CHECK_SIZE_AND_OFFSET(ifaddrs, ifa_dstaddr);
       - 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
       - 
       -@@ -1245,7 +1250,7 @@ COMPILER_CHECK(__sanitizer_XDR_DECODE == XDR_DECODE);
       - 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);
       -@@ -1264,7 +1269,7 @@ CHECK_SIZE_AND_OFFSET(FILE, _chain);
       - 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 --git a/lib/tsan/rtl/tsan_platform_linux.cc b/lib/tsan/rtl/tsan_platform_linux.cc
       -index 3313288..103c7b6 100644
       ---- a/lib/tsan/rtl/tsan_platform_linux.cc
       -+++ b/lib/tsan/rtl/tsan_platform_linux.cc
       -@@ -287,7 +287,7 @@ void InitializePlatform() {
       - // 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;
       -   __res_state *statp = (__res_state*)state;
       -   for (int i = 0; i < MAXNS && cnt < nfd; i++) {
       --- 
       -2.12.2
   DIR diff --git a/sys-libs/compiler-rt-sanitizers/metadata.xml b/sys-libs/compiler-rt-sanitizers/metadata.xml
       t@@ -1,7 +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>
       -</pkgmetadata>