diff options
author | Henning Heinold <h.heinold@tarent.de> | 2011-03-25 20:39:21 +0100 |
---|---|---|
committer | Stefan Schmidt <stefan@buglabs.net> | 2011-05-09 09:01:39 +0200 |
commit | 59112d00be843c12fe0486b62f076fd4160d92a7 (patch) | |
tree | 714bc9a12d71ce858549582a503691c58936950f /recipes/llvm | |
parent | dda8ff6c3b7e006ed3114bc7de15dbf8b1742313 (diff) | |
download | openembedded-59112d00be843c12fe0486b62f076fd4160d92a7.tar.gz |
llvm: merge native recipe into the normal recipe
* use BBCLASSEXTENDED = "native"
* remove do_stage
* bump PR
Signed-off-by: Stefan Schmidt <stefan@buglabs.net>
Diffstat (limited to 'recipes/llvm')
-rw-r--r-- | recipes/llvm/llvm-native.inc | 33 | ||||
-rw-r--r-- | recipes/llvm/llvm.inc | 70 | ||||
-rw-r--r-- | recipes/llvm/llvm2.7-native_2.7.bb | 12 | ||||
-rw-r--r-- | recipes/llvm/llvm2.7_2.7.bb | 5 |
4 files changed, 51 insertions, 69 deletions
diff --git a/recipes/llvm/llvm-native.inc b/recipes/llvm/llvm-native.inc deleted file mode 100644 index b3cb7a64ec..0000000000 --- a/recipes/llvm/llvm-native.inc +++ /dev/null @@ -1,33 +0,0 @@ -require llvm.inc - -DEPENDS = "llvm-common-native cmake-native binutils-cross perl-native" - -inherit native - -# the difference to the non-native build is that we do not need -# to declare the location of the tblgen executable. -EXTRA_OECMAKE = "\ - -DLLVM_TARGETS_TO_BUILD=${LLVM_ARCH} \ - -DCMAKE_LINKER:FILEPATH=${LD} \ - -DCMAKE_AR:FILEPATH=${AR} \ - -DCMAKE_OBJCOPY:FILEPATH=${OBJCOPY} \ - -DCMAKE_OBJDUMP:FILEPATH=${OBJDUMP} \ - -DCMAKE_RANLIB:FILEPATH=${RANLIB} \ - -DCMAKE_STRIP:FILEPATH=${STRIP} \ - -DNM_PATH:FILEPATH=${NM} \ -" - -PACKAGES = "" - -PACKAGES_DYNAMIC = "" - -do_stage() { - cd ${OECMAKE_BUILDPATH} - - llvm_stage - - install -d ${STAGING_BINDIR} - install -m 0755 bin/llvm-config${LLVM_RELEASE} ${STAGING_BINDIR} -} - - diff --git a/recipes/llvm/llvm.inc b/recipes/llvm/llvm.inc index b53af6e756..8f85857dcc 100644 --- a/recipes/llvm/llvm.inc +++ b/recipes/llvm/llvm.inc @@ -20,12 +20,16 @@ DESCRIPTION = "The Low Level Virtual Machine" HOMEPAGE = "http://llvm.org" +BBCLASSEXTEND = "native" + DEPENDS = "llvm-common llvm${LLVM_RELEASE}-native" +DEPENDS_virtclass-native = "llvm-common-native cmake-native perl-native" + # 3-clause BSD-like LICENSE = "University of Illinois/NCSA Open Source License" -SRC_URI = "http://llvm.org/releases/${PV}/llvm-${PV}.tar.gz" +SRC_URI = "http://llvm.org/releases/${PV}/llvm-${PV}.tgz" S = "${WORKDIR}/llvm-${PV}" @@ -63,12 +67,30 @@ EXTRA_OECMAKE = "\ # We need to reset this to avoid breakage as we build out of tree TOOLCHAIN_OPTIONS = "" -PACKAGES = "${PN} ${PN}-dev ${PN}-dbg ${PN}-doc" +PACKAGES = "${PN}-dbg ${PN}-doc ${PN}-dev ${PN}" PACKAGES_DYNAMIC = "llvm-*" + +# the difference to the non-native build is that we do not need +# to declare the location of the tblgen executable. +EXTRA_OECMAKE_virtclass-native = "\ + -DLLVM_TARGETS_TO_BUILD=${LLVM_ARCH} \ + -DCMAKE_LINKER:FILEPATH=${LD} \ + -DCMAKE_AR:FILEPATH=${AR} \ + -DCMAKE_OBJCOPY:FILEPATH=${OBJCOPY} \ + -DCMAKE_OBJDUMP:FILEPATH=${OBJDUMP} \ + -DCMAKE_RANLIB:FILEPATH=${RANLIB} \ + -DCMAKE_STRIP:FILEPATH=${STRIP} \ + -DNM_PATH:FILEPATH=${NM} \ +" + +PACKAGES_virtclass-native = "" + +PACKAGES_DYNAMIC_virtclass-native = "" + python populate_packages_prepend () { - libllvm_libdir = bb.data.expand('${libdir}/', d) + libllvm_libdir = bb.data.expand('${libdir}/llvm${LLVM_RELEASE}', d) do_split_packages(d, libllvm_libdir, '^lib(.*)\.so$', 'libllvm-%s', 'Split package for %s', allow_dirs=True) } @@ -76,32 +98,37 @@ python populate_packages_prepend () { FILES_${PN} = "" ALLOW_EMPTY_${PN} = "1" -FILES_${PN}-dev = "${includedir} ${bindir}/* ${libdir}/LLVMHello.so" +FILES_${PN}-dbg += "${libdir}/llvm${LLVM_RELEASE}/.debug ${bindir}/llvm${LLVM_RELEASE}/.debug" + +FILES_${PN}-dev = "${includedir} ${bindir}/* ${libdir}/llvm${LLVM_RELEASE}/LLVMHello.so" -llvm_stage() { +do_install() { # Install into a private directory to be able to reorganize the files. - oe_runmake DESTDIR=${WORKDIR}/llvm-install install + + cd ${OECMAKE_BUILDPATH} + + 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_LIBDIR}/llvm${LLVM_RELEASE} + install -d ${D}${bindir}/llvm${LLVM_RELEASE} + install -d ${D}${includedir}/llvm${LLVM_RELEASE} + install -d ${D}${libdir}/llvm${LLVM_RELEASE} # Move headers into their own directory cp -R ${WORKDIR}/llvm-install/${prefix}/include/llvm \ - ${STAGING_INCDIR}/llvm${LLVM_RELEASE}/ + ${D}${includedir}/llvm${LLVM_RELEASE}/ cp -R ${WORKDIR}/llvm-install/${prefix}/include/llvm-c \ - ${STAGING_INCDIR}/llvm${LLVM_RELEASE}/ + ${D}${includedir}/llvm${LLVM_RELEASE}/ find ${WORKDIR}/llvm-install/${prefix}/lib -name "*" -maxdepth 1 -exec \ - install {} ${STAGING_LIBDIR}/llvm${LLVM_RELEASE} \; + install {} ${D}${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 {} ${D}${bindir}/llvm${LLVM_RELEASE} \; # LLVM does not install this by default. - install bin/tblgen ${STAGING_BINDIR}/llvm${LLVM_RELEASE} + install bin/tblgen ${D}${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 @@ -112,14 +139,15 @@ llvm_stage() { -e's!my.*BINDIR.*!my $BINDIR = "${STAGING_BINDIR}/llvm${LLVM_RELEASE}";!' \ bin/llvm-config > bin/llvm-config${LLVM_RELEASE} } + +do_install_append_virtclass-native() { + install -d ${D}${bindir} + install -m 0755 bin/llvm-config${LLVM_RELEASE} ${D}${bindir} +} -do_stage() { - cd ${OECMAKE_BUILDPATH} - - llvm_stage - - install -d ${STAGING_BINDIR_CROSS} - install -m 0755 bin/llvm-config${LLVM_RELEASE} ${STAGING_BINDIR_CROSS} +do_install_append() { + install -d ${SYSROOT_DESTDIR}${STAGING_BINDIR_CROSS}/ + install -m 0755 bin/llvm-config${LLVM_RELEASE} ${SYSROOT_DESTDIR}${STAGING_BINDIR_CROSS} } # Retrieve the target in a way that is compatible to the arch diff --git a/recipes/llvm/llvm2.7-native_2.7.bb b/recipes/llvm/llvm2.7-native_2.7.bb deleted file mode 100644 index e438702d9a..0000000000 --- a/recipes/llvm/llvm2.7-native_2.7.bb +++ /dev/null @@ -1,12 +0,0 @@ -require llvm-native.inc - -PR = "r0" - -SRC_URI = "\ - http://llvm.org/releases/${PV}/llvm-${PV}.tgz \ -" - -LLVM_RELEASE = "2.7" - -SRC_URI[md5sum] = "ac322661f20e7d6c810b1869f886ad9b" -SRC_URI[sha256sum] = "99664bdc8503a306038166af33f28eb426d99e297575a59d74a1a0dcbddbbca5" diff --git a/recipes/llvm/llvm2.7_2.7.bb b/recipes/llvm/llvm2.7_2.7.bb index ef2da43e07..4353622323 100644 --- a/recipes/llvm/llvm2.7_2.7.bb +++ b/recipes/llvm/llvm2.7_2.7.bb @@ -1,14 +1,13 @@ require llvm.inc -PR = "r8" +PR = "r9" DEPENDS = "llvm-common llvm2.7-native" # Force arm mode for armv4t until http://llvm.org/bugs/show_bug.cgi?id=6065 is resolved somehow ARM_INSTRUCTION_SET_armv4t = "ARM" -SRC_URI = "\ - http://llvm.org/releases/${PV}/llvm-${PV}.tgz \ +SRC_URI += "\ file://arm_ppc.patch \ file://r97745-llvmPR6480.patch \ file://r104558-VFPmisc.patch \ |