public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] repo/gentoo:master commit in: sys-libs/compiler-rt/files/9999/
@ 2016-09-02 21:40 Michał Górny
  0 siblings, 0 replies; 2+ messages in thread
From: Michał Górny @ 2016-09-02 21:40 UTC (permalink / raw
  To: gentoo-commits

commit:     abbca1be052d1edd4b3dc90845a4d39773b2a851
Author:     Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Fri Sep  2 20:52:25 2016 +0000
Commit:     Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Fri Sep  2 21:40:03 2016 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=abbca1be

sys-libs/compiler-rt: Add missing (not committed) patch

 ...-cmake-Support-overriding-llvm-config-que.patch | 46 ++++++++++++++++++++++
 1 file changed, 46 insertions(+)

diff --git a/sys-libs/compiler-rt/files/9999/0001-compiler-rt-cmake-Support-overriding-llvm-config-que.patch b/sys-libs/compiler-rt/files/9999/0001-compiler-rt-cmake-Support-overriding-llvm-config-que.patch
new file mode 100644
index 00000000..5ee5f81
--- /dev/null
+++ b/sys-libs/compiler-rt/files/9999/0001-compiler-rt-cmake-Support-overriding-llvm-config-que.patch
@@ -0,0 +1,46 @@
+From 5c956f1867c268111ec05b443ab8fbe0e3b9d500 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= <mgorny@gentoo.org>
+Date: Mon, 29 Aug 2016 23:18:25 +0200
+Subject: [PATCH] [compiler-rt cmake] Support overriding llvm-config query
+ results
+
+Support overriding LLVM_* variables obtained from llvm-config when doing
+stand-alone builds. The override of LLVM_MAIN_SRC_DIR is necessary to
+provide LLVM sources when the initial directory used to build LLVM does
+no longer exist when compiler-rt is built stand-alone. This is
+especially the case when building the projects separately in temporary
+directories with unpredictable names.
+
+The code is based on existing CMakeLists.txt from clang. Alike clang, it
+extends the override to all queried variables.
+---
+ cmake/Modules/CompilerRTUtils.cmake | 13 +++++++++----
+ 1 file changed, 9 insertions(+), 4 deletions(-)
+
+diff --git a/cmake/Modules/CompilerRTUtils.cmake b/cmake/Modules/CompilerRTUtils.cmake
+index b2f27c0..5523c0a 100644
+--- a/cmake/Modules/CompilerRTUtils.cmake
++++ b/cmake/Modules/CompilerRTUtils.cmake
+@@ -197,10 +197,15 @@ macro(load_llvm_config)
+     message(FATAL_ERROR "llvm-config failed with status ${HAD_ERROR}")
+   endif()
+   string(REGEX REPLACE "[ \t]*[\r\n]+[ \t]*" ";" CONFIG_OUTPUT ${CONFIG_OUTPUT})
+-  list(GET CONFIG_OUTPUT 0 LLVM_BINARY_DIR)
+-  list(GET CONFIG_OUTPUT 1 LLVM_TOOLS_BINARY_DIR)
+-  list(GET CONFIG_OUTPUT 2 LLVM_LIBRARY_DIR)
+-  list(GET CONFIG_OUTPUT 3 LLVM_MAIN_SRC_DIR)
++  list(GET CONFIG_OUTPUT 0 LLVM_OBJ_ROOT)
++  list(GET CONFIG_OUTPUT 1 TOOLS_BINARY_DIR)
++  list(GET CONFIG_OUTPUT 2 LIBRARY_DIR)
++  list(GET CONFIG_OUTPUT 3 MAIN_SRC_DIR)
++
++  set(LLVM_BINARY_DIR ${LLVM_OBJ_ROOT} CACHE PATH "Path to LLVM build tree")
++  set(LLVM_TOOLS_BINARY_DIR ${TOOLS_BINARY_DIR} CACHE PATH "Path to llvm/bin")
++  set(LLVM_LIBRARY_DIR ${LIBRARY_DIR} CACHE PATH "Path to llvm/lib")
++  set(LLVM_MAIN_SRC_DIR ${MAIN_SRC_DIR} CACHE PATH "Path to LLVM source tree")
+ 
+   # Make use of LLVM CMake modules.
+   file(TO_CMAKE_PATH ${LLVM_BINARY_DIR} LLVM_BINARY_DIR_CMAKE_STYLE)
+-- 
+2.9.3
+


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: sys-libs/compiler-rt/files/9999/
@ 2021-04-15 20:44 Michał Górny
  0 siblings, 0 replies; 2+ messages in thread
From: Michał Górny @ 2021-04-15 20:44 UTC (permalink / raw
  To: gentoo-commits

commit:     c9ebc3669dd20fa9c50850cb32842fc22fcf6d43
Author:     Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Thu Apr 15 17:31:12 2021 +0000
Commit:     Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Thu Apr 15 20:44:14 2021 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=c9ebc366

sys-libs/compiler-rt: Use updated prefix patch from Helmut Jarausch

Closes: https://bugs.gentoo.org/767793
Signed-off-by: Michał Górny <mgorny <AT> gentoo.org>

 .../files/9999/compiler-rt-prefix-paths.patch      | 66 ++++++++++++++++++++++
 1 file changed, 66 insertions(+)

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
index e69de29bb2d..0f1bbb86326 100644
--- a/sys-libs/compiler-rt/files/9999/compiler-rt-prefix-paths.patch
+++ b/sys-libs/compiler-rt/files/9999/compiler-rt-prefix-paths.patch
@@ -0,0 +1,66 @@
+--- a/compiler-rt/cmake/config-ix.cmake.ORIG	2021-01-29 09:54:20.880593534 +0100
++++ b/compiler-rt/cmake/config-ix.cmake	2021-01-29 09:58:49.595603555 +0100
+@@ -444,10 +444,7 @@
+     ${DARWIN_COMMON_LINK_FLAGS}
+     ${DARWIN_osx_MIN_VER_FLAG}=${SANITIZER_MIN_OSX_VERSION})
+ 
+-  if(DARWIN_osx_SYSROOT)
+-    list(APPEND DARWIN_osx_CFLAGS -isysroot ${DARWIN_osx_SYSROOT})
+-    list(APPEND DARWIN_osx_LINK_FLAGS -isysroot ${DARWIN_osx_SYSROOT})
+-  endif()
++  # Do not add -isysroot flag on Gentoo Prefix (search paths handled by cmake)
+ 
+   # Figure out which arches to use for each OS
+   darwin_get_toolchain_supported_archs(toolchain_arches)
+--- a/compiler-rt/cmake/base-config-ix.cmakeORIG	2021-01-29 09:54:20.880593534 +0100
++++ b/compiler-rt/cmake/base-config-ix.cmake	2021-01-29 09:59:41.087605475 +0100
+@@ -101,23 +101,8 @@
+ endif()
+ 
+ if(APPLE)
+-  # On Darwin if /usr/include/c++ doesn't exist, the user probably has Xcode but
+-  # not the command line tools (or is using macOS 10.14 or newer). If this is
+-  # the case, we need to find the OS X sysroot to pass to clang.
+-  if(NOT EXISTS /usr/include/c++)
+-    execute_process(COMMAND xcrun -sdk macosx --show-sdk-path
+-       OUTPUT_VARIABLE OSX_SYSROOT
+-       ERROR_QUIET
+-       OUTPUT_STRIP_TRAILING_WHITESPACE)
+-    if (NOT OSX_SYSROOT OR NOT EXISTS ${OSX_SYSROOT})
+-      message(WARNING "Detected OSX_SYSROOT ${OSX_SYSROOT} does not exist")
+-    else()
+-      message(STATUS "Found OSX_SYSROOT: ${OSX_SYSROOT}")
+-      set(OSX_SYSROOT_FLAG "-isysroot${OSX_SYSROOT}")
+-    endif()
+-  else()
+-    set(OSX_SYSROOT_FLAG "")
+-  endif()
++  # Do not add -isysroot flag on Gentoo Prefix (search paths handled by cmake)
++  set(OSX_SYSROOT_FLAG "")
+ 
+   option(COMPILER_RT_ENABLE_IOS "Enable building for iOS" On)
+   option(COMPILER_RT_ENABLE_WATCHOS "Enable building for watchOS - Experimental" Off)
+--- a/compiler-rt/cmake/Modules/CompilerRTDarwinUtils.cmake.ORIG	2021-01-29 09:54:20.879593534 +0100
++++ b/compiler-rt/cmake/Modules/CompilerRTDarwinUtils.cmake	2021-01-29 10:00:45.701607884 +0100
+@@ -273,7 +273,8 @@
+     ${ARGN})
+   set(libname "${name}.${suffix}_${LIB_ARCH}_${LIB_OS}")
+   add_library(${libname} STATIC ${LIB_SOURCES})
+-  if(DARWIN_${LIB_OS}_SYSROOT)
++  # Do not add -isysroot flag on Gentoo Prefix (search paths handled by cmake)
++  if(DARWIN_${LIB_OS}_SYSROOT AND NOT "${LIB_OS}" STREQUAL "osx")
+     set(sysroot_flag -isysroot ${DARWIN_${LIB_OS}_SYSROOT})
+   endif()
+ 
+--- a/compiler-rt/cmake/Modules/AddCompilerRT.cmake.ORIG	2021-01-29 09:54:20.879593534 +0100
++++ b/compiler-rt/cmake/Modules/AddCompilerRT.cmake	2021-01-29 10:01:40.267609919 +0100
+@@ -278,7 +278,8 @@
+       if(CMAKE_C_COMPILER_ID MATCHES Clang AND CMAKE_C_COMPILER_TARGET)
+         list(APPEND extra_cflags_${libname} "--target=${CMAKE_C_COMPILER_TARGET}")
+       endif()
+-      if(CMAKE_SYSROOT)
++      # Do not add --sysroot flag on Gentoo Prefix (search paths handled by cmake)
++      if(CMAKE_SYSROOT AND NOT APPLE)
+         list(APPEND extra_cflags_${libname} "--sysroot=${CMAKE_SYSROOT}")
+       endif()
+       string(REPLACE ";" " " extra_cflags_${libname} "${extra_cflags_${libname}}")


^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2021-04-15 20:44 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-04-15 20:44 [gentoo-commits] repo/gentoo:master commit in: sys-libs/compiler-rt/files/9999/ Michał Górny
  -- strict thread matches above, loose matches on Subject: below --
2016-09-02 21:40 Michał Górny

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox