Gentoo Archives: gentoo-commits

From: "Michał Górny" <mgorny@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: sys-libs/compiler-rt-sanitizers/files/9999/, sys-libs/compiler-rt-sanitizers/
Date: Wed, 16 Jan 2019 14:52:51
Message-Id: 1547650346.2e4c750d4c41beeff9a4243b64cdc3a9fa54342d.mgorny@gentoo
1 commit: 2e4c750d4c41beeff9a4243b64cdc3a9fa54342d
2 Author: Michał Górny <mgorny <AT> gentoo <DOT> org>
3 AuthorDate: Wed Jan 16 13:48:37 2019 +0000
4 Commit: Michał Górny <mgorny <AT> gentoo <DOT> org>
5 CommitDate: Wed Jan 16 14:52:26 2019 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=2e4c750d
7
8 sys-libs/compiler-rt-sanitizers: rpc issues were fixed upstream
9
10 The rpc failures were fixed upstream, so remove the relevant patches.
11 Since interceptors are only meant to intercept libc functions, we just
12 disable relevant code when glibc does not include sunrpc routines.
13
14 Signed-off-by: Michał Górny <mgorny <AT> gentoo.org>
15
16 .../compiler-rt-sanitizers-9999.ebuild | 4 -
17 ...itizer_common-Fix-using-libtirpc-on-Linux.patch | 67 --------------
18 ...0002-test-Support-using-libtirpc-on-Linux.patch | 100 ---------------------
19 3 files changed, 171 deletions(-)
20
21 diff --git a/sys-libs/compiler-rt-sanitizers/compiler-rt-sanitizers-9999.ebuild b/sys-libs/compiler-rt-sanitizers/compiler-rt-sanitizers-9999.ebuild
22 index 93f03059cd6..22e6a9b283c 100644
23 --- a/sys-libs/compiler-rt-sanitizers/compiler-rt-sanitizers-9999.ebuild
24 +++ b/sys-libs/compiler-rt-sanitizers/compiler-rt-sanitizers-9999.ebuild
25 @@ -77,10 +77,6 @@ src_unpack() {
26 src_prepare() {
27 cmake-utils_src_prepare
28
29 - # apply the fixes for new glibc / split tirpc
30 - eapply "${FILESDIR}/9999/0001-sanitizer_common-Fix-using-libtirpc-on-Linux.patch"
31 - eapply "${FILESDIR}/9999/0002-test-Support-using-libtirpc-on-Linux.patch"
32 -
33 if use test; then
34 # remove tests that are (still) broken by new glibc
35 # https://bugs.llvm.org/show_bug.cgi?id=36065
36
37 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
38 deleted file mode 100644
39 index f39645669da..00000000000
40 --- a/sys-libs/compiler-rt-sanitizers/files/9999/0001-sanitizer_common-Fix-using-libtirpc-on-Linux.patch
41 +++ /dev/null
42 @@ -1,67 +0,0 @@
43 -From 6d96ca43ca31bb69d07271696c43b4372ca534d9 Mon Sep 17 00:00:00 2001
44 -From: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= <mgorny@g.o>
45 -Date: Wed, 6 Jun 2018 12:16:38 +0200
46 -Subject: [PATCH 1/2] [sanitizer_common] Fix using libtirpc on Linux
47 -
48 -Fix using libtirpc on Linux by using pkg-config to detect it, and append
49 -appropriate include directory. The libtirpc headers reference one
50 -another via '#include <rpc/...>', so attempting to include it via
51 -'#include <tirpc/...>' just failed and resulted in RPC headers not being
52 -detected at all.
53 -
54 -Additionally, perform the header check without -nodefaultlibs as that
55 -apparently causes it to fail.
56 ----
57 - lib/sanitizer_common/CMakeLists.txt | 11 ++++++++++-
58 - .../sanitizer_platform_limits_posix.cc | 4 +---
59 - 2 files changed, 11 insertions(+), 4 deletions(-)
60 -
61 -diff --git a/lib/sanitizer_common/CMakeLists.txt b/lib/sanitizer_common/CMakeLists.txt
62 -index ad3aba005..f2a6bab51 100644
63 ---- a/lib/sanitizer_common/CMakeLists.txt
64 -+++ b/lib/sanitizer_common/CMakeLists.txt
65 -@@ -191,9 +191,18 @@ include_directories(..)
66 -
67 - set(SANITIZER_COMMON_DEFINITIONS)
68 -
69 -+include(FindPkgConfig)
70 -+pkg_check_modules(TIRPC libtirpc)
71 -+if (TIRPC_FOUND)
72 -+ include_directories(${TIRPC_INCLUDE_DIRS})
73 -+ set(CMAKE_REQUIRED_INCLUDES ${TIRPC_INCLUDE_DIRS})
74 -+endif()
75 -+
76 - include(CheckIncludeFile)
77 -+cmake_push_check_state()
78 -+string(REPLACE "-nodefaultlibs" "" CMAKE_REQUIRED_FLAGS ${CMAKE_REQUIRED_FLAGS})
79 - append_have_file_definition(rpc/xdr.h HAVE_RPC_XDR_H SANITIZER_COMMON_DEFINITIONS)
80 --append_have_file_definition(tirpc/rpc/xdr.h HAVE_TIRPC_RPC_XDR_H SANITIZER_COMMON_DEFINITIONS)
81 -+cmake_pop_check_state()
82 -
83 - set(SANITIZER_CFLAGS ${SANITIZER_COMMON_CFLAGS})
84 - append_rtti_flag(OFF SANITIZER_CFLAGS)
85 -diff --git a/lib/sanitizer_common/sanitizer_platform_limits_posix.cc b/lib/sanitizer_common/sanitizer_platform_limits_posix.cc
86 -index cd1b73d58..c6de2683d 100644
87 ---- a/lib/sanitizer_common/sanitizer_platform_limits_posix.cc
88 -+++ b/lib/sanitizer_common/sanitizer_platform_limits_posix.cc
89 -@@ -146,8 +146,6 @@ typedef struct user_fpregs elf_fpregset_t;
90 - #include <netrom/netrom.h>
91 - #if HAVE_RPC_XDR_H
92 - # include <rpc/xdr.h>
93 --#elif HAVE_TIRPC_RPC_XDR_H
94 --# include <tirpc/rpc/xdr.h>
95 - #endif
96 - #include <scsi/scsi.h>
97 - #include <sys/mtio.h>
98 -@@ -1243,7 +1241,7 @@ CHECK_SIZE_AND_OFFSET(group, gr_passwd);
99 - CHECK_SIZE_AND_OFFSET(group, gr_gid);
100 - CHECK_SIZE_AND_OFFSET(group, gr_mem);
101 -
102 --#if HAVE_RPC_XDR_H || HAVE_TIRPC_RPC_XDR_H
103 -+#if HAVE_RPC_XDR_H
104 - CHECK_TYPE_SIZE(XDR);
105 - CHECK_SIZE_AND_OFFSET(XDR, x_op);
106 - CHECK_SIZE_AND_OFFSET(XDR, x_ops);
107 ---
108 -2.19.1
109 -
110
111 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
112 deleted file mode 100644
113 index c851cae0a6b..00000000000
114 --- a/sys-libs/compiler-rt-sanitizers/files/9999/0002-test-Support-using-libtirpc-on-Linux.patch
115 +++ /dev/null
116 @@ -1,100 +0,0 @@
117 -From a415328c75fe88c5e8e3bd0c01913a25b5705fec Mon Sep 17 00:00:00 2001
118 -From: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= <mgorny@g.o>
119 -Date: Wed, 6 Jun 2018 12:45:55 +0200
120 -Subject: [PATCH 2/2] [test] Support using libtirpc on Linux
121 -
122 -Add compiler flags necessary for using libtirpc on Linux (RPC headers
123 -split out of glibc). The flags are obtained via pkg-config. This fixes
124 -test failures due to tests being unable to find <rpc/...> includes.
125 ----
126 - cmake/base-config-ix.cmake | 4 ++++
127 - lib/sanitizer_common/CMakeLists.txt | 2 --
128 - test/msan/lit.cfg | 3 ++-
129 - test/msan/lit.site.cfg.in | 1 +
130 - test/tsan/lit.cfg | 3 ++-
131 - test/tsan/lit.site.cfg.in | 1 +
132 - 6 files changed, 10 insertions(+), 4 deletions(-)
133 -
134 -diff --git a/cmake/base-config-ix.cmake b/cmake/base-config-ix.cmake
135 -index b92e29a2e..ec0b1b979 100644
136 ---- a/cmake/base-config-ix.cmake
137 -+++ b/cmake/base-config-ix.cmake
138 -@@ -8,6 +8,10 @@ include(CheckCXXSourceCompiles)
139 -
140 - check_include_file(unwind.h HAVE_UNWIND_H)
141 -
142 -+# used in sanitizer_common and tests
143 -+include(FindPkgConfig)
144 -+pkg_check_modules(TIRPC libtirpc)
145 -+
146 - # Top level target used to build all compiler-rt libraries.
147 - add_custom_target(compiler-rt ALL)
148 - add_custom_target(install-compiler-rt)
149 -diff --git a/lib/sanitizer_common/CMakeLists.txt b/lib/sanitizer_common/CMakeLists.txt
150 -index f2a6bab51..a560e7c15 100644
151 ---- a/lib/sanitizer_common/CMakeLists.txt
152 -+++ b/lib/sanitizer_common/CMakeLists.txt
153 -@@ -191,8 +191,6 @@ include_directories(..)
154 -
155 - set(SANITIZER_COMMON_DEFINITIONS)
156 -
157 --include(FindPkgConfig)
158 --pkg_check_modules(TIRPC libtirpc)
159 - if (TIRPC_FOUND)
160 - include_directories(${TIRPC_INCLUDE_DIRS})
161 - set(CMAKE_REQUIRED_INCLUDES ${TIRPC_INCLUDE_DIRS})
162 -diff --git a/test/msan/lit.cfg b/test/msan/lit.cfg
163 -index e08673d5c..e86f6091f 100644
164 ---- a/test/msan/lit.cfg
165 -+++ b/test/msan/lit.cfg
166 -@@ -14,7 +14,8 @@ clang_msan_cflags = (["-fsanitize=memory",
167 - "-fno-omit-frame-pointer",
168 - "-fno-optimize-sibling-calls"] +
169 - [config.target_cflags] +
170 -- config.debug_info_flags)
171 -+ config.debug_info_flags +
172 -+ [config.rpc_cflags])
173 - # Some Msan tests leverage backtrace() which requires libexecinfo on FreeBSD.
174 - if config.host_os == 'FreeBSD':
175 - clang_msan_cflags += ["-lexecinfo", "-fPIC"]
176 -diff --git a/test/msan/lit.site.cfg.in b/test/msan/lit.site.cfg.in
177 -index f744d71fd..35634d324 100644
178 ---- a/test/msan/lit.site.cfg.in
179 -+++ b/test/msan/lit.site.cfg.in
180 -@@ -6,6 +6,7 @@ config.target_cflags = "@MSAN_TEST_TARGET_CFLAGS@"
181 - config.target_arch = "@MSAN_TEST_TARGET_ARCH@"
182 - config.use_lld = @MSAN_TEST_USE_LLD@
183 - config.use_thinlto = @MSAN_TEST_USE_THINLTO@
184 -+config.rpc_cflags = "@TIRPC_CFLAGS@"
185 -
186 - # Load common config for all compiler-rt lit tests.
187 - lit_config.load_config(config, "@COMPILER_RT_BINARY_DIR@/test/lit.common.configured")
188 -diff --git a/test/tsan/lit.cfg b/test/tsan/lit.cfg
189 -index 233d273f3..2776775eb 100644
190 ---- a/test/tsan/lit.cfg
191 -+++ b/test/tsan/lit.cfg
192 -@@ -49,7 +49,8 @@ clang_tsan_cflags = (["-fsanitize=thread",
193 - [config.target_cflags] +
194 - config.debug_info_flags +
195 - extra_cflags +
196 -- ["-I%s" % tsan_incdir])
197 -+ ["-I%s" % tsan_incdir] +
198 -+ [config.rpc_cflags])
199 - clang_tsan_cxxflags = config.cxx_mode_flags + clang_tsan_cflags + ["-std=c++11"] + ["-I%s" % tsan_incdir]
200 - # Add additional flags if we're using instrumented libc++.
201 - # Instrumented libcxx currently not supported on Darwin.
202 -diff --git a/test/tsan/lit.site.cfg.in b/test/tsan/lit.site.cfg.in
203 -index 6dec5f92b..67020f3b9 100644
204 ---- a/test/tsan/lit.site.cfg.in
205 -+++ b/test/tsan/lit.site.cfg.in
206 -@@ -6,6 +6,7 @@ config.has_libcxx = @TSAN_HAS_LIBCXX@
207 - config.apple_platform = "@TSAN_TEST_APPLE_PLATFORM@"
208 - config.target_cflags = "@TSAN_TEST_TARGET_CFLAGS@"
209 - config.target_arch = "@TSAN_TEST_TARGET_ARCH@"
210 -+config.rpc_cflags = "@TIRPC_CFLAGS@"
211 -
212 - # Load common config for all compiler-rt lit tests.
213 - lit_config.load_config(config, "@COMPILER_RT_BINARY_DIR@/test/lit.common.configured")
214 ---
215 -2.19.1
216 -