All of lore.kernel.org
 help / color / mirror / Atom feed
From: Romain Naour <romain.naour@gmail.com>
To: buildroot@busybox.net
Subject: [Buildroot] [RFC 4/9] package/llvm: RFC: install llvm-config in staging
Date: Mon,  3 Jul 2017 12:18:41 +0200	[thread overview]
Message-ID: <20170703101846.1158-5-romain.naour@gmail.com> (raw)
In-Reply-To: <20170703101846.1158-1-romain.naour@gmail.com>

Signed-off-by: Romain Naour <romain.naour@gmail.com>
---
 package/llvm/llvm.mk | 16 ++++++++++++++++
 1 file changed, 16 insertions(+)

diff --git a/package/llvm/llvm.mk b/package/llvm/llvm.mk
index 3d0a052..45ce4b4 100644
--- a/package/llvm/llvm.mk
+++ b/package/llvm/llvm.mk
@@ -24,6 +24,22 @@ LLVM_DEPENDENCIES = host-llvm zlib
 # Use native llvm-tblgen from host-llvm.
 LLVM_CONF_OPTS += -DLLVM_TABLEGEN=$(HOST_DIR)/usr/bin/llvm-tblgen
 
+# Copy llvm-config (host variant) to STAGING_DIR since llvm-config
+# provided by llvm target variant can't run on the host.
+# Also llvm-config (host variant) return include and lib directories
+# for the host if it's installed in host/usr/bin:
+# output/host/usr/bin/llvm-config --includedir
+# output/host/usr/include
+# When istalled in STAGING_DIR llvm-config return include and lib
+# directories from STAGING_DIR.
+# output/staging/usr/bin/llvm-config --includedir
+# output/staging/usr/include
+define LLVM_COPY_LLVM_CONFIG_TO_STAGING_DIR
+	$(INSTALL) -D -m 0755 $(HOST_DIR)/usr/bin/llvm-config \
+		$(STAGING_DIR)/usr/bin/llvm-config
+endef
+LLVM_POST_INSTALL_STAGING_HOOKS = LLVM_COPY_LLVM_CONFIG_TO_STAGING_DIR
+
 # Use "Unix Makefiles" generator for generating make-compatible parallel makefiles.
 # Ninja is not supported yet by Buildroot
 HOST_LLVM_CONF_OPTS += -G "Unix Makefiles"
-- 
2.9.4

  parent reply	other threads:[~2017-07-03 10:18 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-07-03 10:18 [Buildroot] [RFC 0/9] Add llvm/clang + openCL Romain Naour
2017-07-03 10:18 ` [Buildroot] [RFC 1/9] package/llvm: new host package Romain Naour
2017-07-03 10:18 ` [Buildroot] [RFC 2/9] package/clang: " Romain Naour
2017-07-03 10:18 ` [Buildroot] [RFC 3/9] package/llvm: enable target variant Romain Naour
2017-07-03 10:18 ` Romain Naour [this message]
2017-07-03 10:18 ` [Buildroot] [RFC 5/9] package/clang: " Romain Naour
2017-07-03 10:18 ` [Buildroot] [RFC 6/9] package/llvm: add AMDGPU support Romain Naour
2017-07-03 10:18 ` [Buildroot] [RFC 7/9] package/mesa3d: enable llvm support Romain Naour
2017-07-03 10:18 ` [Buildroot] [RFC 8/9] package/libclc: new package Romain Naour
2017-07-03 10:18 ` [Buildroot] [RFC 9/9] package/mesa3d: enable openCL support Romain Naour

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20170703101846.1158-5-romain.naour@gmail.com \
    --to=romain.naour@gmail.com \
    --cc=buildroot@busybox.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.