summaryrefslogtreecommitdiff
path: root/sys-libs/compiler-rt-sanitizers
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2018-11-03 08:36:22 +0000
committerV3n3RiX <venerix@redcorelinux.org>2018-11-03 08:36:22 +0000
commitf65628136faa35d0c4d3b5e7332275c7b35fcd96 (patch)
tree021998302365c5652e37824b6c26d4d969a62055 /sys-libs/compiler-rt-sanitizers
parent70b82ae359a5538711e103b0e8dfb92654296644 (diff)
gentoo resync : 03.11.2018
Diffstat (limited to 'sys-libs/compiler-rt-sanitizers')
-rw-r--r--sys-libs/compiler-rt-sanitizers/Manifest10
-rw-r--r--sys-libs/compiler-rt-sanitizers/compiler-rt-sanitizers-7.0.0.ebuild4
-rw-r--r--sys-libs/compiler-rt-sanitizers/compiler-rt-sanitizers-7.0.9999.ebuild4
-rw-r--r--sys-libs/compiler-rt-sanitizers/files/7.0.9999/0001-sanitizer_common-Fix-using-libtirpc-on-Linux.patch67
-rw-r--r--sys-libs/compiler-rt-sanitizers/files/7.0.9999/0002-test-Support-using-libtirpc-on-Linux.patch100
-rw-r--r--sys-libs/compiler-rt-sanitizers/files/9999/0001-sanitizer_common-Fix-using-libtirpc-on-Linux.patch14
-rw-r--r--sys-libs/compiler-rt-sanitizers/files/9999/0002-test-Support-using-libtirpc-on-Linux.patch24
7 files changed, 196 insertions, 27 deletions
diff --git a/sys-libs/compiler-rt-sanitizers/Manifest b/sys-libs/compiler-rt-sanitizers/Manifest
index 5eb347bc2dc7..2012748a66b3 100644
--- a/sys-libs/compiler-rt-sanitizers/Manifest
+++ b/sys-libs/compiler-rt-sanitizers/Manifest
@@ -1,5 +1,7 @@
-AUX 9999/0001-sanitizer_common-Fix-using-libtirpc-on-Linux.patch 2583 BLAKE2B be7e9a2cbab8b3bd110346f6c8bda30d104397601950c995b77388fcb91e53ca82f5d3574931c58244403eee698f01209ca9e704fd4c6b9b3ef08e68d41dbea7 SHA512 656a7bbdcf0f678814d0ad0ff56ce43b7fc48c7a549373a4ef77e74490437283c5834e86b1b4e8bcb85578953687d79474ef2bf494c7eed4cf7fa1f17003f385
-AUX 9999/0002-test-Support-using-libtirpc-on-Linux.patch 4161 BLAKE2B 3db2dcebf70ca3e7c399dfb22d8ae50d51863f7a8a15a10b0232f73d4fc2ee0b51ff67e8842b0e4d29dd41e60a326c90670f62a431ca593617f566e03bc7f90a SHA512 2f03f4d0232b600861de0c527d6bef26b0e3273865a7d7344e083a6a7de4033de6d30df3a6b22f4d23be74dfa8864ccaebd42c1f0d4474abc83a66f8997e19fb
+AUX 7.0.9999/0001-sanitizer_common-Fix-using-libtirpc-on-Linux.patch 2583 BLAKE2B be7e9a2cbab8b3bd110346f6c8bda30d104397601950c995b77388fcb91e53ca82f5d3574931c58244403eee698f01209ca9e704fd4c6b9b3ef08e68d41dbea7 SHA512 656a7bbdcf0f678814d0ad0ff56ce43b7fc48c7a549373a4ef77e74490437283c5834e86b1b4e8bcb85578953687d79474ef2bf494c7eed4cf7fa1f17003f385
+AUX 7.0.9999/0002-test-Support-using-libtirpc-on-Linux.patch 4161 BLAKE2B 3db2dcebf70ca3e7c399dfb22d8ae50d51863f7a8a15a10b0232f73d4fc2ee0b51ff67e8842b0e4d29dd41e60a326c90670f62a431ca593617f566e03bc7f90a SHA512 2f03f4d0232b600861de0c527d6bef26b0e3273865a7d7344e083a6a7de4033de6d30df3a6b22f4d23be74dfa8864ccaebd42c1f0d4474abc83a66f8997e19fb
+AUX 9999/0001-sanitizer_common-Fix-using-libtirpc-on-Linux.patch 2583 BLAKE2B 9d7ca157f6a14784e1207d3051719eea3ba069dc1ba34f7067cca630680993f3953a7e2f5600ec3ab184bbc0fb39b59281523481564122eb1580bc91d5c6e18a SHA512 5a74754bd19861ca2cbf28966dd13b6e17fa0024c6e3f1e513e6aabd732fc5d5804b01e25e538e434b48f6c7f10923cc09d0ced10fadef870cb43aa42082a9a4
+AUX 9999/0002-test-Support-using-libtirpc-on-Linux.patch 4183 BLAKE2B 385c8bc659031b6c6a6bb03506b142915f69be36acaf65440da40e7f33af15095a429d177a7be9d75c09dca38842d5ba0c960ce29764f9f8b2fe9df46496b88f SHA512 d06f7248fa18edd360bfb6c481ac260b9e5162550c09d2c4fc99c46d65e6f025e15aa6cc6b629847c26a441db271c7adc5b3d39b9895fce1dfc6326098478ba6
DIST compiler-rt-4.0.1.src.tar.xz 1434100 BLAKE2B ca6bf78fc07f387b7244a52ef648b06a5685effb46a66b241a9ee847ecafb17d02602f49b0dbe473d47202586874a043a6d75141400062f526d2f808da323e1e SHA512 cfeb625884b273f7c0e6767b81a8d3e5f24e0b96a510d5764d9d47a0e215fc841b4cb9d1843c8fb428cd21def720cfbfe8d3593ff5bb390548ebc8c32a902649
DIST compiler-rt-5.0.2.src.tar.xz 1543256 BLAKE2B 09fa84b8f3e9b8627a14387bc6eaa3d6b4588b9c8f1ac5a0114135fd830e3d45922408b237866789eb81bf38defde1186e0f7430a69f825bee12776b7cd9f74e SHA512 605a6d064877a860d6c9097e0220896dfceafed0a2392ad495c97aa347b97899d89f7e21932e29d3274f396615837414a3e730a915fe4f53eaa858ce3642a666
DIST compiler-rt-6.0.1.src.tar.xz 1686820 BLAKE2B 59fa3f6e478bd4d6dfa056c85dcdc4349cbce7cea7fc56519feddc9d66c88c9ca48bad7967432ceb81d754213577f12707035afd827cf630a58627575b73b798 SHA512 69850c1ad92c66977fa217cbfb42a6a3f502fbe3d1a08daa7fc4cfeb617a7736d231f8ad8d93b10b1ae29bd753315d2a2d70f9ff1f4d18a9a7cc81758d91f963
@@ -13,7 +15,7 @@ DIST llvm-7.0.0.src.tar.xz 28324368 BLAKE2B 10168ff9be8f68536db3b2263c85c1c98213
EBUILD compiler-rt-sanitizers-4.0.1.ebuild 4778 BLAKE2B 5689080c9783d288206a9a7f4d8cee487ef73a951d95baf7083719c89239b299a7cb71361e060876a7564701c353a857e9a640ff5e8f5054d76c6ede66523b5e SHA512 937fab2e9791bd122005469704e5cbbc8907d0f52cb277d779bd93451178e49c8f369be0dec5bff22338a7ed3920f0e125337e9ede02c957c123f968b69ec442
EBUILD compiler-rt-sanitizers-5.0.2.ebuild 5095 BLAKE2B 0f3348e8800d24d01231b2460025eb83a3211c44fd2987a0b0d4361372fe4af5695a131886d55029459121e8952e394c526120f12212d20a8a5c995847a04cb0 SHA512 cf13df0bad1be887c621c16f12639e385fff395985007b17a1bf14b00f0dd9dfd609e83287fc890f105d2bd586b3457b1efe3b6f687096a205b1a96f3fd1139e
EBUILD compiler-rt-sanitizers-6.0.1.ebuild 5248 BLAKE2B 02cd036059dc9a038a440dfc356f4b5a9d7bf2ec68790d95d391f05ec62404ecbcf422082d005a9b6a23f16e2500bdcb3bd606f2f5bc53ee04cfe3724caa0771 SHA512 22527b482c1e8fe80273de88e4bcef4fbdba7000149ab31e63fab6bd8b75587eed5ac5b01aaf1c257decfb9af96b3256f19dc462ca84ee5cbf40655328851337
-EBUILD compiler-rt-sanitizers-7.0.0.ebuild 5179 BLAKE2B ee4e58ec9b5b5e8d711b450bd507d60aa1bbc83c99e88f446a5e101b25afe0705482285439c00b59137f8c32f7673291277d0f786b53df9c783ac7b522d586b5 SHA512 f8b193c461bb54ebeae3274afbbc333565d18de1dcec8a6120cb4d4b46aa36aabb87c57f220af10f4686f51a25a853a70685a48a5f4b6a92e398bb144a5590a0
-EBUILD compiler-rt-sanitizers-7.0.9999.ebuild 5122 BLAKE2B c66df84eb6c357e47513a3f6466d760ede9c8cf4f0daea0bf8e83c541d020c9533eee9f8639765f03550c4b0585f748f2882672bfb13cd775e4bce2e485ae6bb SHA512 478d2b61553c4f08edde5d506e9521fe28fdea73e17f337ce49a3ca8f149fe8b11d4141f51c70fa3131887e203d2b0534dc9f7d7470ed3d8516448aa5dbc6cbe
+EBUILD compiler-rt-sanitizers-7.0.0.ebuild 5187 BLAKE2B 6e07adb76426a6c300a12bc5ba97235c11035cc8f7faeb5fcc53d03f0eaf68bd9f6bd5da6e8b0d36af725fe7dc85da069d3638a474a884cb5026984b89c407e1 SHA512 703acf5278cfc31efdb435d986b98269e3516f00b837da3401535063ff3b7ffeb45fc93014abea4422ea15328fb1878bdf5771e836e4fc6edf32c56a5b3af05e
+EBUILD compiler-rt-sanitizers-7.0.9999.ebuild 5130 BLAKE2B 9813a6916df42e3432d5359232b373ee457691bc749a63361cf73e2b6e196af438b395f8f1d4cbe87039699b674b364fcc7362af38e0759496cd7b840e42cea5 SHA512 ab1487cb202744a11462abf25754a49692f1db06f763596d6ea62e2f96f89c0ef8e978e49b45ae87f0dc3dde257593d5bfc6e86efa9f53c1ca732bbbcdaf01a0
EBUILD compiler-rt-sanitizers-9999.ebuild 5097 BLAKE2B 51ca24c61730c556a130c923cd9bdda491dca251351c9f0e8ddd80dbd8f3e8de504ab19b21509e85b84dead62c2ba46dc7f09d961037b9b90998ee31ddd57d83 SHA512 27e5cdb3def5372476f5b762d60ec342482d25fa7839bd5e3aeab7787a1c1c9e264c64bd496a6268495b874c232ff74336f143533450592849ff8a0c7edfddc5
MISC metadata.xml 333 BLAKE2B 24e417cb7b8ab7730b18a3e1e5e29d008042e4fd53cf1ba3cc9d18719160b0410854ddfae52315c690138e61fb0196015968fa09b98af6470cd8bdecc09205ef SHA512 97daa7452a696b7297c47f5f637a33425f82b51426060a75b3de6bc812f9ddcd3c70ae068bc3e88ce937ab1eb10d59b0ab48a2d2c0397a112b8b6a754e333bdc
diff --git a/sys-libs/compiler-rt-sanitizers/compiler-rt-sanitizers-7.0.0.ebuild b/sys-libs/compiler-rt-sanitizers/compiler-rt-sanitizers-7.0.0.ebuild
index b4dec8cc00b0..97f45a06894f 100644
--- a/sys-libs/compiler-rt-sanitizers/compiler-rt-sanitizers-7.0.0.ebuild
+++ b/sys-libs/compiler-rt-sanitizers/compiler-rt-sanitizers-7.0.0.ebuild
@@ -76,8 +76,8 @@ src_prepare() {
cmake-utils_src_prepare
# apply the fixes for new glibc / split tirpc
- eapply "${FILESDIR}/9999/0001-sanitizer_common-Fix-using-libtirpc-on-Linux.patch"
- eapply "${FILESDIR}/9999/0002-test-Support-using-libtirpc-on-Linux.patch"
+ eapply "${FILESDIR}/7.0.9999/0001-sanitizer_common-Fix-using-libtirpc-on-Linux.patch"
+ eapply "${FILESDIR}/7.0.9999/0002-test-Support-using-libtirpc-on-Linux.patch"
if use test; then
# remove tests that are (still) broken by new glibc
diff --git a/sys-libs/compiler-rt-sanitizers/compiler-rt-sanitizers-7.0.9999.ebuild b/sys-libs/compiler-rt-sanitizers/compiler-rt-sanitizers-7.0.9999.ebuild
index d68ca7b8bdfb..a71b3be6becb 100644
--- a/sys-libs/compiler-rt-sanitizers/compiler-rt-sanitizers-7.0.9999.ebuild
+++ b/sys-libs/compiler-rt-sanitizers/compiler-rt-sanitizers-7.0.9999.ebuild
@@ -77,8 +77,8 @@ src_prepare() {
cmake-utils_src_prepare
# apply the fixes for new glibc / split tirpc
- eapply "${FILESDIR}/9999/0001-sanitizer_common-Fix-using-libtirpc-on-Linux.patch"
- eapply "${FILESDIR}/9999/0002-test-Support-using-libtirpc-on-Linux.patch"
+ eapply "${FILESDIR}/7.0.9999/0001-sanitizer_common-Fix-using-libtirpc-on-Linux.patch"
+ eapply "${FILESDIR}/7.0.9999/0002-test-Support-using-libtirpc-on-Linux.patch"
if use test; then
# remove tests that are (still) broken by new glibc
diff --git a/sys-libs/compiler-rt-sanitizers/files/7.0.9999/0001-sanitizer_common-Fix-using-libtirpc-on-Linux.patch b/sys-libs/compiler-rt-sanitizers/files/7.0.9999/0001-sanitizer_common-Fix-using-libtirpc-on-Linux.patch
new file mode 100644
index 000000000000..ca871c37b994
--- /dev/null
+++ b/sys-libs/compiler-rt-sanitizers/files/7.0.9999/0001-sanitizer_common-Fix-using-libtirpc-on-Linux.patch
@@ -0,0 +1,67 @@
+From e198d21b9a5851dbc061f60911e3b3da910bca0a Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= <mgorny@gentoo.org>
+Date: Wed, 6 Jun 2018 12:16:38 +0200
+Subject: [PATCH 7/8] [sanitizer_common] Fix using libtirpc on Linux
+
+Fix using libtirpc on Linux by using pkg-config to detect it, and append
+appropriate include directory. The libtirpc headers reference one
+another via '#include <rpc/...>', so attempting to include it via
+'#include <tirpc/...>' just failed and resulted in RPC headers not being
+detected at all.
+
+Additionally, perform the header check without -nodefaultlibs as that
+apparently causes it to fail.
+---
+ lib/sanitizer_common/CMakeLists.txt | 11 ++++++++++-
+ .../sanitizer_platform_limits_posix.cc | 4 +---
+ 2 files changed, 11 insertions(+), 4 deletions(-)
+
+diff --git a/lib/sanitizer_common/CMakeLists.txt b/lib/sanitizer_common/CMakeLists.txt
+index e0226ae49..4071bc0e8 100644
+--- a/lib/sanitizer_common/CMakeLists.txt
++++ b/lib/sanitizer_common/CMakeLists.txt
+@@ -151,9 +151,18 @@ include_directories(..)
+
+ set(SANITIZER_COMMON_DEFINITIONS)
+
++include(FindPkgConfig)
++pkg_check_modules(TIRPC libtirpc)
++if (TIRPC_FOUND)
++ include_directories(${TIRPC_INCLUDE_DIRS})
++ set(CMAKE_REQUIRED_INCLUDES ${TIRPC_INCLUDE_DIRS})
++endif()
++
+ include(CheckIncludeFile)
++cmake_push_check_state()
++string(REPLACE "-nodefaultlibs" "" CMAKE_REQUIRED_FLAGS ${CMAKE_REQUIRED_FLAGS})
+ append_have_file_definition(rpc/xdr.h HAVE_RPC_XDR_H SANITIZER_COMMON_DEFINITIONS)
+-append_have_file_definition(tirpc/rpc/xdr.h HAVE_TIRPC_RPC_XDR_H SANITIZER_COMMON_DEFINITIONS)
++cmake_pop_check_state()
+
+ set(SANITIZER_CFLAGS ${SANITIZER_COMMON_CFLAGS})
+ append_rtti_flag(OFF SANITIZER_CFLAGS)
+diff --git a/lib/sanitizer_common/sanitizer_platform_limits_posix.cc b/lib/sanitizer_common/sanitizer_platform_limits_posix.cc
+index feb7bad6f..2e736ee26 100644
+--- a/lib/sanitizer_common/sanitizer_platform_limits_posix.cc
++++ b/lib/sanitizer_common/sanitizer_platform_limits_posix.cc
+@@ -146,8 +146,6 @@ typedef struct user_fpregs elf_fpregset_t;
+ #include <netrom/netrom.h>
+ #if HAVE_RPC_XDR_H
+ # include <rpc/xdr.h>
+-#elif HAVE_TIRPC_RPC_XDR_H
+-# include <tirpc/rpc/xdr.h>
+ #endif
+ #include <scsi/scsi.h>
+ #include <sys/mtio.h>
+@@ -1236,7 +1234,7 @@ CHECK_SIZE_AND_OFFSET(group, gr_passwd);
+ CHECK_SIZE_AND_OFFSET(group, gr_gid);
+ CHECK_SIZE_AND_OFFSET(group, gr_mem);
+
+-#if HAVE_RPC_XDR_H || HAVE_TIRPC_RPC_XDR_H
++#if HAVE_RPC_XDR_H
+ CHECK_TYPE_SIZE(XDR);
+ CHECK_SIZE_AND_OFFSET(XDR, x_op);
+ CHECK_SIZE_AND_OFFSET(XDR, x_ops);
+--
+2.18.0
+
diff --git a/sys-libs/compiler-rt-sanitizers/files/7.0.9999/0002-test-Support-using-libtirpc-on-Linux.patch b/sys-libs/compiler-rt-sanitizers/files/7.0.9999/0002-test-Support-using-libtirpc-on-Linux.patch
new file mode 100644
index 000000000000..880284775e22
--- /dev/null
+++ b/sys-libs/compiler-rt-sanitizers/files/7.0.9999/0002-test-Support-using-libtirpc-on-Linux.patch
@@ -0,0 +1,100 @@
+From 4fc99ef388e2f110759dc774428fd194b65614c8 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= <mgorny@gentoo.org>
+Date: Wed, 6 Jun 2018 12:45:55 +0200
+Subject: [PATCH 8/8] [test] Support using libtirpc on Linux
+
+Add compiler flags necessary for using libtirpc on Linux (RPC headers
+split out of glibc). The flags are obtained via pkg-config. This fixes
+test failures due to tests being unable to find <rpc/...> includes.
+---
+ cmake/base-config-ix.cmake | 4 ++++
+ lib/sanitizer_common/CMakeLists.txt | 2 --
+ test/msan/lit.cfg | 3 ++-
+ test/msan/lit.site.cfg.in | 1 +
+ test/tsan/lit.cfg | 3 ++-
+ test/tsan/lit.site.cfg.in | 1 +
+ 6 files changed, 10 insertions(+), 4 deletions(-)
+
+diff --git a/cmake/base-config-ix.cmake b/cmake/base-config-ix.cmake
+index b208f0852..46b88f72b 100644
+--- a/cmake/base-config-ix.cmake
++++ b/cmake/base-config-ix.cmake
+@@ -8,6 +8,10 @@ include(CheckCXXSourceCompiles)
+
+ check_include_file(unwind.h HAVE_UNWIND_H)
+
++# used in sanitizer_common and tests
++include(FindPkgConfig)
++pkg_check_modules(TIRPC libtirpc)
++
+ # Top level target used to build all compiler-rt libraries.
+ add_custom_target(compiler-rt ALL)
+ add_custom_target(install-compiler-rt)
+diff --git a/lib/sanitizer_common/CMakeLists.txt b/lib/sanitizer_common/CMakeLists.txt
+index 4071bc0e8..08d1781a6 100644
+--- a/lib/sanitizer_common/CMakeLists.txt
++++ b/lib/sanitizer_common/CMakeLists.txt
+@@ -151,8 +151,6 @@ include_directories(..)
+
+ set(SANITIZER_COMMON_DEFINITIONS)
+
+-include(FindPkgConfig)
+-pkg_check_modules(TIRPC libtirpc)
+ if (TIRPC_FOUND)
+ include_directories(${TIRPC_INCLUDE_DIRS})
+ set(CMAKE_REQUIRED_INCLUDES ${TIRPC_INCLUDE_DIRS})
+diff --git a/test/msan/lit.cfg b/test/msan/lit.cfg
+index cac260999..fe8525047 100644
+--- a/test/msan/lit.cfg
++++ b/test/msan/lit.cfg
+@@ -14,7 +14,8 @@ clang_msan_cflags = (["-fsanitize=memory",
+ "-fno-omit-frame-pointer",
+ "-fno-optimize-sibling-calls"] +
+ [config.target_cflags] +
+- config.debug_info_flags)
++ config.debug_info_flags +
++ [config.rpc_cflags])
+ # Some Msan tests leverage backtrace() which requires libexecinfo on FreeBSD.
+ if config.host_os == 'FreeBSD':
+ clang_msan_cflags += ["-lexecinfo"]
+diff --git a/test/msan/lit.site.cfg.in b/test/msan/lit.site.cfg.in
+index f744d71fd..35634d324 100644
+--- a/test/msan/lit.site.cfg.in
++++ b/test/msan/lit.site.cfg.in
+@@ -6,6 +6,7 @@ config.target_cflags = "@MSAN_TEST_TARGET_CFLAGS@"
+ config.target_arch = "@MSAN_TEST_TARGET_ARCH@"
+ config.use_lld = @MSAN_TEST_USE_LLD@
+ config.use_thinlto = @MSAN_TEST_USE_THINLTO@
++config.rpc_cflags = "@TIRPC_CFLAGS@"
+
+ # Load common config for all compiler-rt lit tests.
+ lit_config.load_config(config, "@COMPILER_RT_BINARY_DIR@/test/lit.common.configured")
+diff --git a/test/tsan/lit.cfg b/test/tsan/lit.cfg
+index fdbafefbc..82fd2f79d 100644
+--- a/test/tsan/lit.cfg
++++ b/test/tsan/lit.cfg
+@@ -49,7 +49,8 @@ clang_tsan_cflags = (["-fsanitize=thread",
+ [config.target_cflags] +
+ config.debug_info_flags +
+ extra_cflags +
+- ["-I%s" % tsan_incdir])
++ ["-I%s" % tsan_incdir] +
++ [config.rpc_cflags])
+ clang_tsan_cxxflags = config.cxx_mode_flags + clang_tsan_cflags + ["-std=c++11"] + ["-I%s" % tsan_incdir]
+ # Add additional flags if we're using instrumented libc++.
+ # Instrumented libcxx currently not supported on Darwin.
+diff --git a/test/tsan/lit.site.cfg.in b/test/tsan/lit.site.cfg.in
+index a215e664a..142d61bf2 100644
+--- a/test/tsan/lit.site.cfg.in
++++ b/test/tsan/lit.site.cfg.in
+@@ -7,6 +7,7 @@ config.ios = @TSAN_TEST_IOS_PYBOOL@
+ config.iossim = @TSAN_TEST_IOSSIM_PYBOOL@
+ config.target_cflags = "@TSAN_TEST_TARGET_CFLAGS@"
+ config.target_arch = "@TSAN_TEST_TARGET_ARCH@"
++config.rpc_cflags = "@TIRPC_CFLAGS@"
+
+ # Load common config for all compiler-rt lit tests.
+ lit_config.load_config(config, "@COMPILER_RT_BINARY_DIR@/test/lit.common.configured")
+--
+2.18.0
+
diff --git a/sys-libs/compiler-rt-sanitizers/files/9999/0001-sanitizer_common-Fix-using-libtirpc-on-Linux.patch b/sys-libs/compiler-rt-sanitizers/files/9999/0001-sanitizer_common-Fix-using-libtirpc-on-Linux.patch
index ca871c37b994..f39645669da0 100644
--- a/sys-libs/compiler-rt-sanitizers/files/9999/0001-sanitizer_common-Fix-using-libtirpc-on-Linux.patch
+++ b/sys-libs/compiler-rt-sanitizers/files/9999/0001-sanitizer_common-Fix-using-libtirpc-on-Linux.patch
@@ -1,7 +1,7 @@
-From e198d21b9a5851dbc061f60911e3b3da910bca0a Mon Sep 17 00:00:00 2001
+From 6d96ca43ca31bb69d07271696c43b4372ca534d9 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= <mgorny@gentoo.org>
Date: Wed, 6 Jun 2018 12:16:38 +0200
-Subject: [PATCH 7/8] [sanitizer_common] Fix using libtirpc on Linux
+Subject: [PATCH 1/2] [sanitizer_common] Fix using libtirpc on Linux
Fix using libtirpc on Linux by using pkg-config to detect it, and append
appropriate include directory. The libtirpc headers reference one
@@ -17,10 +17,10 @@ apparently causes it to fail.
2 files changed, 11 insertions(+), 4 deletions(-)
diff --git a/lib/sanitizer_common/CMakeLists.txt b/lib/sanitizer_common/CMakeLists.txt
-index e0226ae49..4071bc0e8 100644
+index ad3aba005..f2a6bab51 100644
--- a/lib/sanitizer_common/CMakeLists.txt
+++ b/lib/sanitizer_common/CMakeLists.txt
-@@ -151,9 +151,18 @@ include_directories(..)
+@@ -191,9 +191,18 @@ include_directories(..)
set(SANITIZER_COMMON_DEFINITIONS)
@@ -41,7 +41,7 @@ index e0226ae49..4071bc0e8 100644
set(SANITIZER_CFLAGS ${SANITIZER_COMMON_CFLAGS})
append_rtti_flag(OFF SANITIZER_CFLAGS)
diff --git a/lib/sanitizer_common/sanitizer_platform_limits_posix.cc b/lib/sanitizer_common/sanitizer_platform_limits_posix.cc
-index feb7bad6f..2e736ee26 100644
+index cd1b73d58..c6de2683d 100644
--- a/lib/sanitizer_common/sanitizer_platform_limits_posix.cc
+++ b/lib/sanitizer_common/sanitizer_platform_limits_posix.cc
@@ -146,8 +146,6 @@ typedef struct user_fpregs elf_fpregset_t;
@@ -53,7 +53,7 @@ index feb7bad6f..2e736ee26 100644
#endif
#include <scsi/scsi.h>
#include <sys/mtio.h>
-@@ -1236,7 +1234,7 @@ CHECK_SIZE_AND_OFFSET(group, gr_passwd);
+@@ -1243,7 +1241,7 @@ CHECK_SIZE_AND_OFFSET(group, gr_passwd);
CHECK_SIZE_AND_OFFSET(group, gr_gid);
CHECK_SIZE_AND_OFFSET(group, gr_mem);
@@ -63,5 +63,5 @@ index feb7bad6f..2e736ee26 100644
CHECK_SIZE_AND_OFFSET(XDR, x_op);
CHECK_SIZE_AND_OFFSET(XDR, x_ops);
--
-2.18.0
+2.19.1
diff --git a/sys-libs/compiler-rt-sanitizers/files/9999/0002-test-Support-using-libtirpc-on-Linux.patch b/sys-libs/compiler-rt-sanitizers/files/9999/0002-test-Support-using-libtirpc-on-Linux.patch
index 880284775e22..c851cae0a6b8 100644
--- a/sys-libs/compiler-rt-sanitizers/files/9999/0002-test-Support-using-libtirpc-on-Linux.patch
+++ b/sys-libs/compiler-rt-sanitizers/files/9999/0002-test-Support-using-libtirpc-on-Linux.patch
@@ -1,7 +1,7 @@
-From 4fc99ef388e2f110759dc774428fd194b65614c8 Mon Sep 17 00:00:00 2001
+From a415328c75fe88c5e8e3bd0c01913a25b5705fec Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= <mgorny@gentoo.org>
Date: Wed, 6 Jun 2018 12:45:55 +0200
-Subject: [PATCH 8/8] [test] Support using libtirpc on Linux
+Subject: [PATCH 2/2] [test] Support using libtirpc on Linux
Add compiler flags necessary for using libtirpc on Linux (RPC headers
split out of glibc). The flags are obtained via pkg-config. This fixes
@@ -16,7 +16,7 @@ test failures due to tests being unable to find <rpc/...> includes.
6 files changed, 10 insertions(+), 4 deletions(-)
diff --git a/cmake/base-config-ix.cmake b/cmake/base-config-ix.cmake
-index b208f0852..46b88f72b 100644
+index b92e29a2e..ec0b1b979 100644
--- a/cmake/base-config-ix.cmake
+++ b/cmake/base-config-ix.cmake
@@ -8,6 +8,10 @@ include(CheckCXXSourceCompiles)
@@ -31,10 +31,10 @@ index b208f0852..46b88f72b 100644
add_custom_target(compiler-rt ALL)
add_custom_target(install-compiler-rt)
diff --git a/lib/sanitizer_common/CMakeLists.txt b/lib/sanitizer_common/CMakeLists.txt
-index 4071bc0e8..08d1781a6 100644
+index f2a6bab51..a560e7c15 100644
--- a/lib/sanitizer_common/CMakeLists.txt
+++ b/lib/sanitizer_common/CMakeLists.txt
-@@ -151,8 +151,6 @@ include_directories(..)
+@@ -191,8 +191,6 @@ include_directories(..)
set(SANITIZER_COMMON_DEFINITIONS)
@@ -44,7 +44,7 @@ index 4071bc0e8..08d1781a6 100644
include_directories(${TIRPC_INCLUDE_DIRS})
set(CMAKE_REQUIRED_INCLUDES ${TIRPC_INCLUDE_DIRS})
diff --git a/test/msan/lit.cfg b/test/msan/lit.cfg
-index cac260999..fe8525047 100644
+index e08673d5c..e86f6091f 100644
--- a/test/msan/lit.cfg
+++ b/test/msan/lit.cfg
@@ -14,7 +14,8 @@ clang_msan_cflags = (["-fsanitize=memory",
@@ -56,7 +56,7 @@ index cac260999..fe8525047 100644
+ [config.rpc_cflags])
# Some Msan tests leverage backtrace() which requires libexecinfo on FreeBSD.
if config.host_os == 'FreeBSD':
- clang_msan_cflags += ["-lexecinfo"]
+ clang_msan_cflags += ["-lexecinfo", "-fPIC"]
diff --git a/test/msan/lit.site.cfg.in b/test/msan/lit.site.cfg.in
index f744d71fd..35634d324 100644
--- a/test/msan/lit.site.cfg.in
@@ -70,7 +70,7 @@ index f744d71fd..35634d324 100644
# Load common config for all compiler-rt lit tests.
lit_config.load_config(config, "@COMPILER_RT_BINARY_DIR@/test/lit.common.configured")
diff --git a/test/tsan/lit.cfg b/test/tsan/lit.cfg
-index fdbafefbc..82fd2f79d 100644
+index 233d273f3..2776775eb 100644
--- a/test/tsan/lit.cfg
+++ b/test/tsan/lit.cfg
@@ -49,7 +49,8 @@ clang_tsan_cflags = (["-fsanitize=thread",
@@ -84,11 +84,11 @@ index fdbafefbc..82fd2f79d 100644
# Add additional flags if we're using instrumented libc++.
# Instrumented libcxx currently not supported on Darwin.
diff --git a/test/tsan/lit.site.cfg.in b/test/tsan/lit.site.cfg.in
-index a215e664a..142d61bf2 100644
+index 6dec5f92b..67020f3b9 100644
--- a/test/tsan/lit.site.cfg.in
+++ b/test/tsan/lit.site.cfg.in
-@@ -7,6 +7,7 @@ config.ios = @TSAN_TEST_IOS_PYBOOL@
- config.iossim = @TSAN_TEST_IOSSIM_PYBOOL@
+@@ -6,6 +6,7 @@ config.has_libcxx = @TSAN_HAS_LIBCXX@
+ config.apple_platform = "@TSAN_TEST_APPLE_PLATFORM@"
config.target_cflags = "@TSAN_TEST_TARGET_CFLAGS@"
config.target_arch = "@TSAN_TEST_TARGET_ARCH@"
+config.rpc_cflags = "@TIRPC_CFLAGS@"
@@ -96,5 +96,5 @@ index a215e664a..142d61bf2 100644
# Load common config for all compiler-rt lit tests.
lit_config.load_config(config, "@COMPILER_RT_BINARY_DIR@/test/lit.common.configured")
--
-2.18.0
+2.19.1