summaryrefslogtreecommitdiff
path: root/recipes/llvm
diff options
context:
space:
mode:
Diffstat (limited to 'recipes/llvm')
-rw-r--r--recipes/llvm/llvm-native.inc4
-rw-r--r--recipes/llvm/llvm.inc52
-rw-r--r--recipes/llvm/llvm2.7_2.7.bb21
3 files changed, 36 insertions, 41 deletions
diff --git a/recipes/llvm/llvm-native.inc b/recipes/llvm/llvm-native.inc
index 15ce0b731c..b3cb7a64ec 100644
--- a/recipes/llvm/llvm-native.inc
+++ b/recipes/llvm/llvm-native.inc
@@ -17,6 +17,10 @@ EXTRA_OECMAKE = "\
-DNM_PATH:FILEPATH=${NM} \
"
+PACKAGES = ""
+
+PACKAGES_DYNAMIC = ""
+
do_stage() {
cd ${OECMAKE_BUILDPATH}
diff --git a/recipes/llvm/llvm.inc b/recipes/llvm/llvm.inc
index 3e11318743..baebe308af 100644
--- a/recipes/llvm/llvm.inc
+++ b/recipes/llvm/llvm.inc
@@ -55,45 +55,57 @@ EXTRA_OECMAKE = "\
-DCMAKE_STRIP:FILEPATH=${STRIP} \
-DNM_PATH:FILEPATH=${NM} \
-DLLVM_ENABLE_PIC:BOOL=ON \
+ -DLLVM_TARGET_ARCH:STRING=${LLVM_ARCH} \
+ -DLLVM_ENABLE_ASSERTIONS:BOOL=ON \
+ -DCMAKE_BUILD_TYPE:STRING=RelWithDebInfo \
+ -DBUILD_SHARED_LIBS:BOOL=ON \
"
+PACKAGES = " ${PN}-dev ${PN}-dbg ${PN}-doc "
+
+PACKAGES_DYNAMIC = "llvm-*"
+
+python populate_packages_prepend () {
+ libllvm_libdir = bb.data.expand('${libdir}/', d)
+
+ do_split_packages(d, libllvm_libdir, '^lib(.*)\.so$', 'libllvm-%s', 'Split package for %s', allow_dirs=True)
+}
+
+FILES_${PN}-dev = "${includedir} ${bindir}/* ${libdir}/LLVMHello.so"
+
llvm_stage() {
# Install into a private directory to be able to reorganize the files.
- oe_runmake DESTDIR=${WORKDIR}/llvm-install install
+ oe_runmake DESTDIR=${WORKDIR}/llvm-install install
# Create our custom target directories
install -d ${STAGING_BINDIR}/llvm${LLVM_RELEASE}
- install -d ${STAGING_INCDIR}/llvm${LLVM_RELEASE}
+ install -d ${STAGING_INCDIR}/llvm${LLVM_RELEASE}
install -d ${STAGING_LIBDIR}/llvm${LLVM_RELEASE}
# Move headers into their own directory
cp -r ${WORKDIR}/llvm-install/${prefix}/include/llvm \
- ${STAGING_INCDIR}/llvm${LLVM_RELEASE}/
+ ${STAGING_INCDIR}/llvm${LLVM_RELEASE}/
cp -r ${WORKDIR}/llvm-install/${prefix}/include/llvm-c \
- ${STAGING_INCDIR}/llvm${LLVM_RELEASE}/
-
- # llvm somehow forgets these
-# find include/llvm -name "*.h" -maxdepth 1 -exec \
-# install {} ${STAGING_INCDIR}/llvm${LLVM_RELEASE}/llvm \;
+ ${STAGING_INCDIR}/llvm${LLVM_RELEASE}/
find ${WORKDIR}/llvm-install/${prefix}/lib -name "*" -maxdepth 1 -exec \
- install {} ${STAGING_LIBDIR}/llvm${LLVM_RELEASE} \;
+ install {} ${STAGING_LIBDIR}/llvm${LLVM_RELEASE} \;
# I dont know another way out. Binaries are installed into a special subdir
find ${WORKDIR}/llvm-install/${prefix}/bin -name "*" -maxdepth 1 -exec \
- install {} ${STAGING_BINDIR}/llvm${LLVM_RELEASE} \;
+ install {} ${STAGING_BINDIR}/llvm${LLVM_RELEASE} \;
# LLVM does not install this by default.
- install bin/tblgen ${STAGING_BINDIR}/llvm${LLVM_RELEASE}
-
- # Fix the paths in the config script to make it find the binaries and
- # library files. Doing so allows 3rd party configure scripts working
- # unmodified.
- sed -e's!my.*ABS_RUN_DIR =.*!my $ABS_RUN_DIR = "${STAGING_DIR_TARGET}";!' \
- -e's!my.*INCLUDEDIR =.*!my $INCLUDEDIR = "${STAGING_INCDIR}/llvm${LLVM_RELEASE}";!' \
- -e's!my.*LIBDIR.*!my $LIBDIR = "${STAGING_LIBDIR}/llvm${LLVM_RELEASE}";!' \
- -e's!my.*BINDIR.*!my $BINDIR = "${STAGING_BINDIR}/llvm${LLVM_RELEASE}";!' \
- bin/llvm-config > bin/llvm-config${LLVM_RELEASE}
+ install bin/tblgen ${STAGING_BINDIR}/llvm${LLVM_RELEASE}
+
+ # Fix the paths in the config script to make it find the binaries and
+ # library files. Doing so allows 3rd party configure scripts working
+ # unmodified.
+ sed -e's!my.*ABS_RUN_DIR =.*!my $ABS_RUN_DIR = "${STAGING_DIR_TARGET}";!' \
+ -e's!my.*INCLUDEDIR =.*!my $INCLUDEDIR = "${STAGING_INCDIR}/llvm${LLVM_RELEASE}";!' \
+ -e's!my.*LIBDIR.*!my $LIBDIR = "${STAGING_LIBDIR}/llvm${LLVM_RELEASE}";!' \
+ -e's!my.*BINDIR.*!my $BINDIR = "${STAGING_BINDIR}/llvm${LLVM_RELEASE}";!' \
+ bin/llvm-config > bin/llvm-config${LLVM_RELEASE}
}
do_stage() {
diff --git a/recipes/llvm/llvm2.7_2.7.bb b/recipes/llvm/llvm2.7_2.7.bb
index 2180c1be98..9ecd8bd8fe 100644
--- a/recipes/llvm/llvm2.7_2.7.bb
+++ b/recipes/llvm/llvm2.7_2.7.bb
@@ -9,27 +9,6 @@ SRC_URI = "\
file://BX_to_BLX.patch;patch=1 \
"
-EXTRA_OECMAKE += "\
- -DLLVM_TARGET_ARCH:STRING=${LLVM_ARCH} \
- -DLLVM_ENABLE_ASSERTIONS:BOOL=ON \
- -DCMAKE_BUILD_TYPE:STRING=RelWithDebInfo \
- -DBUILD_SHARED_LIBS:BOOL=ON \
- "
-
-PACKAGES = " ${PN}-dev ${PN}-dbg ${PN}-doc "
-
-PACKAGES_DYNAMIC = "llvm-*"
-
-
-python populate_packages_prepend () {
- libllvm_libdir = bb.data.expand('${libdir}/', d)
-
- do_split_packages(d, libllvm_libdir, '^lib(.*)\.so$', 'libllvm-%s', 'Splited package for %s', allow_dirs=True)
-}
-
-
-FILES_${PN}-dev = "${includedir} ${bindir}/* ${libdir}/LLVMHello.so"
-
LLVM_RELEASE = "2.7"
SRC_URI[md5sum] = "ac322661f20e7d6c810b1869f886ad9b"