1 |
commit: c9ebc3669dd20fa9c50850cb32842fc22fcf6d43 |
2 |
Author: Michał Górny <mgorny <AT> gentoo <DOT> org> |
3 |
AuthorDate: Thu Apr 15 17:31:12 2021 +0000 |
4 |
Commit: Michał Górny <mgorny <AT> gentoo <DOT> org> |
5 |
CommitDate: Thu Apr 15 20:44:14 2021 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=c9ebc366 |
7 |
|
8 |
sys-libs/compiler-rt: Use updated prefix patch from Helmut Jarausch |
9 |
|
10 |
Closes: https://bugs.gentoo.org/767793 |
11 |
Signed-off-by: Michał Górny <mgorny <AT> gentoo.org> |
12 |
|
13 |
.../files/9999/compiler-rt-prefix-paths.patch | 66 ++++++++++++++++++++++ |
14 |
1 file changed, 66 insertions(+) |
15 |
|
16 |
diff --git a/sys-libs/compiler-rt/files/9999/compiler-rt-prefix-paths.patch b/sys-libs/compiler-rt/files/9999/compiler-rt-prefix-paths.patch |
17 |
index e69de29bb2d..0f1bbb86326 100644 |
18 |
--- a/sys-libs/compiler-rt/files/9999/compiler-rt-prefix-paths.patch |
19 |
+++ b/sys-libs/compiler-rt/files/9999/compiler-rt-prefix-paths.patch |
20 |
@@ -0,0 +1,66 @@ |
21 |
+--- a/compiler-rt/cmake/config-ix.cmake.ORIG 2021-01-29 09:54:20.880593534 +0100 |
22 |
++++ b/compiler-rt/cmake/config-ix.cmake 2021-01-29 09:58:49.595603555 +0100 |
23 |
+@@ -444,10 +444,7 @@ |
24 |
+ ${DARWIN_COMMON_LINK_FLAGS} |
25 |
+ ${DARWIN_osx_MIN_VER_FLAG}=${SANITIZER_MIN_OSX_VERSION}) |
26 |
+ |
27 |
+- if(DARWIN_osx_SYSROOT) |
28 |
+- list(APPEND DARWIN_osx_CFLAGS -isysroot ${DARWIN_osx_SYSROOT}) |
29 |
+- list(APPEND DARWIN_osx_LINK_FLAGS -isysroot ${DARWIN_osx_SYSROOT}) |
30 |
+- endif() |
31 |
++ # Do not add -isysroot flag on Gentoo Prefix (search paths handled by cmake) |
32 |
+ |
33 |
+ # Figure out which arches to use for each OS |
34 |
+ darwin_get_toolchain_supported_archs(toolchain_arches) |
35 |
+--- a/compiler-rt/cmake/base-config-ix.cmakeORIG 2021-01-29 09:54:20.880593534 +0100 |
36 |
++++ b/compiler-rt/cmake/base-config-ix.cmake 2021-01-29 09:59:41.087605475 +0100 |
37 |
+@@ -101,23 +101,8 @@ |
38 |
+ endif() |
39 |
+ |
40 |
+ if(APPLE) |
41 |
+- # On Darwin if /usr/include/c++ doesn't exist, the user probably has Xcode but |
42 |
+- # not the command line tools (or is using macOS 10.14 or newer). If this is |
43 |
+- # the case, we need to find the OS X sysroot to pass to clang. |
44 |
+- if(NOT EXISTS /usr/include/c++) |
45 |
+- execute_process(COMMAND xcrun -sdk macosx --show-sdk-path |
46 |
+- OUTPUT_VARIABLE OSX_SYSROOT |
47 |
+- ERROR_QUIET |
48 |
+- OUTPUT_STRIP_TRAILING_WHITESPACE) |
49 |
+- if (NOT OSX_SYSROOT OR NOT EXISTS ${OSX_SYSROOT}) |
50 |
+- message(WARNING "Detected OSX_SYSROOT ${OSX_SYSROOT} does not exist") |
51 |
+- else() |
52 |
+- message(STATUS "Found OSX_SYSROOT: ${OSX_SYSROOT}") |
53 |
+- set(OSX_SYSROOT_FLAG "-isysroot${OSX_SYSROOT}") |
54 |
+- endif() |
55 |
+- else() |
56 |
+- set(OSX_SYSROOT_FLAG "") |
57 |
+- endif() |
58 |
++ # Do not add -isysroot flag on Gentoo Prefix (search paths handled by cmake) |
59 |
++ set(OSX_SYSROOT_FLAG "") |
60 |
+ |
61 |
+ option(COMPILER_RT_ENABLE_IOS "Enable building for iOS" On) |
62 |
+ option(COMPILER_RT_ENABLE_WATCHOS "Enable building for watchOS - Experimental" Off) |
63 |
+--- a/compiler-rt/cmake/Modules/CompilerRTDarwinUtils.cmake.ORIG 2021-01-29 09:54:20.879593534 +0100 |
64 |
++++ b/compiler-rt/cmake/Modules/CompilerRTDarwinUtils.cmake 2021-01-29 10:00:45.701607884 +0100 |
65 |
+@@ -273,7 +273,8 @@ |
66 |
+ ${ARGN}) |
67 |
+ set(libname "${name}.${suffix}_${LIB_ARCH}_${LIB_OS}") |
68 |
+ add_library(${libname} STATIC ${LIB_SOURCES}) |
69 |
+- if(DARWIN_${LIB_OS}_SYSROOT) |
70 |
++ # Do not add -isysroot flag on Gentoo Prefix (search paths handled by cmake) |
71 |
++ if(DARWIN_${LIB_OS}_SYSROOT AND NOT "${LIB_OS}" STREQUAL "osx") |
72 |
+ set(sysroot_flag -isysroot ${DARWIN_${LIB_OS}_SYSROOT}) |
73 |
+ endif() |
74 |
+ |
75 |
+--- a/compiler-rt/cmake/Modules/AddCompilerRT.cmake.ORIG 2021-01-29 09:54:20.879593534 +0100 |
76 |
++++ b/compiler-rt/cmake/Modules/AddCompilerRT.cmake 2021-01-29 10:01:40.267609919 +0100 |
77 |
+@@ -278,7 +278,8 @@ |
78 |
+ if(CMAKE_C_COMPILER_ID MATCHES Clang AND CMAKE_C_COMPILER_TARGET) |
79 |
+ list(APPEND extra_cflags_${libname} "--target=${CMAKE_C_COMPILER_TARGET}") |
80 |
+ endif() |
81 |
+- if(CMAKE_SYSROOT) |
82 |
++ # Do not add --sysroot flag on Gentoo Prefix (search paths handled by cmake) |
83 |
++ if(CMAKE_SYSROOT AND NOT APPLE) |
84 |
+ list(APPEND extra_cflags_${libname} "--sysroot=${CMAKE_SYSROOT}") |
85 |
+ endif() |
86 |
+ string(REPLACE ";" " " extra_cflags_${libname} "${extra_cflags_${libname}}") |