From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <gentoo-commits+bounces-899676-garchives=archives.gentoo.org@lists.gentoo.org>
Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80])
	(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
	(No client certificate requested)
	by finch.gentoo.org (Postfix) with ESMTPS id AC3EF138333
	for <garchives@archives.gentoo.org>; Fri,  2 Sep 2016 21:40:15 +0000 (UTC)
Received: from pigeon.gentoo.org (localhost [127.0.0.1])
	by pigeon.gentoo.org (Postfix) with SMTP id 97C0F21C096;
	Fri,  2 Sep 2016 21:40:12 +0000 (UTC)
Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183])
	(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
	(No client certificate requested)
	by pigeon.gentoo.org (Postfix) with ESMTPS id 847BF21C094
	for <gentoo-commits@lists.gentoo.org>; Fri,  2 Sep 2016 21:40:11 +0000 (UTC)
Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52])
	(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
	(No client certificate requested)
	by smtp.gentoo.org (Postfix) with ESMTPS id 7A3F1340B35
	for <gentoo-commits@lists.gentoo.org>; Fri,  2 Sep 2016 21:40:09 +0000 (UTC)
Received: from localhost.localdomain (localhost [127.0.0.1])
	by oystercatcher.gentoo.org (Postfix) with ESMTP id A10EF2473
	for <gentoo-commits@lists.gentoo.org>; Fri,  2 Sep 2016 21:40:07 +0000 (UTC)
From: "Michał Górny" <mgorny@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Content-Transfer-Encoding: 8bit
Content-type: text/plain; charset=UTF-8
Reply-To: gentoo-dev@lists.gentoo.org, "Michał Górny" <mgorny@gentoo.org>
Message-ID: <1472852403.abbca1be052d1edd4b3dc90845a4d39773b2a851.mgorny@gentoo>
Subject: [gentoo-commits] repo/gentoo:master commit in: sys-libs/compiler-rt/files/9999/
X-VCS-Repository: repo/gentoo
X-VCS-Files: sys-libs/compiler-rt/files/9999/0001-compiler-rt-cmake-Support-overriding-llvm-config-que.patch
X-VCS-Directories: sys-libs/compiler-rt/files/9999/
X-VCS-Committer: mgorny
X-VCS-Committer-Name: Michał Górny
X-VCS-Revision: abbca1be052d1edd4b3dc90845a4d39773b2a851
X-VCS-Branch: master
Date: Fri,  2 Sep 2016 21:40:07 +0000 (UTC)
Precedence: bulk
List-Post: <mailto:gentoo-commits@lists.gentoo.org>
List-Help: <mailto:gentoo-commits+help@lists.gentoo.org>
List-Unsubscribe: <mailto:gentoo-commits+unsubscribe@lists.gentoo.org>
List-Subscribe: <mailto:gentoo-commits+subscribe@lists.gentoo.org>
List-Id: Gentoo Linux mail <gentoo-commits.gentoo.org>
X-BeenThere: gentoo-commits@lists.gentoo.org
X-Archives-Salt: 7e3b5d7a-9830-4368-933d-4e36961d0e09
X-Archives-Hash: 0701a22c2defb7cf90827a9dd0e82ae9

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
+