summaryrefslogtreecommitdiffstats
path: root/package/llvm
Commit message (Collapse)AuthorAgeFilesLines
* package/llvm: set the path to llvm-configRomain Naour2019-01-171-0/+3
| | | | | | | | | | | | | | | | | | | | While building llvm for the target (x86_64), the build failed due to path poisoning (-I/usr/include/libxml2) while building NATIVE tools (i.e for the host). The llvm package tries to build a tool for the host with the cross-compiler which doesn't work when the paranoid toolchain wrapper (BR2_COMPILER_PARANOID_UNSAFE_PATH) is enabled. We know that llvm (target) needs llvm-tablegen and llvm-config built by host-llvm, but only LLVM_TABLEGEN is provided by llvm.mk. Adding LLVM_CONFIG_PATH=$(HOST_DIR)/bin/llvm-config for llvm (target) fixes the path poisoining issue since llvm doesn't build the NATIVE variant. Signed-off-by: Romain Naour <romain.naour@smile.fr> Cc: Valentin Korenblit <valentinkorenblit@gmail.com> Cc: Matthew Weber <matthew.weber@rockwellcollins.com> Tested-by: Matthew Weber <matthew.weber@rockwellcollins.com> Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
* package/llvm: bump to version 7.0.1Valentin Korenblit2018-12-272-2/+2
| | | | | Signed-off-by: Valentin Korenblit <valentinkorenblit@gmail.com> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
* package/llvm: bump to version 7.0.0Valentin Korenblit2018-09-302-8/+3
| | | | | | | | | | | LLVM_BUILD_GLOBAL_ISEL does no longer exist LICENSE.TXT hash changed due to the Copyright date update. Signed-off-by: Valentin Korenblit <valentinkorenblit@gmail.com> Reviewed-by: Romain Naour <romain.naour@gmail.com> Tested-by: Romain Naour <romain.naour@gmail.com> Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
* package/llvm: bump to version 6.0.1Romain Naour2018-07-272-2/+2
| | | | | | | | | http://releases.llvm.org/6.0.1/docs/ReleaseNotes.html Signed-off-by: Romain Naour <romain.naour@gmail.com> Cc: Joseph Kogut <joseph.kogut@gmail.com> Cc: Valentin Korenblit <valentinkorenblit@gmail.com> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
* llvm: bump to version 6.0.0Joseph Kogut2018-06-153-39/+2
| | | | | | Signed-off-by: Joseph Kogut <joseph.kogut@gmail.com> Tested-by: Valentin Korenblit <valentin.korenblit@smile.fr> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
* package/llvm: fix host-llvm build with GCC8Valentin Korenblit2018-05-171-0/+37
| | | | | | | | | | | | | | | This patch fixes the build of lli for host-llvm when using GCC 8. It was taken from llvm-5.0 package for Fedora 28. Link to bug: https://bugzilla.redhat.com/show_bug.cgi?id=1540620 Fixes: http://autobuild.buildroot.net/results/824c70e982d8ec7e518cf4db058767df42db6b04/ Signed-off-by: Valentin Korenblit <valentin.korenblit@smile.fr> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
* package/llvm: bump to version 5.0.2Valentin Korenblit2018-05-172-2/+2
| | | | | | | | 5.0.2 is API and ABI compatible with 5.0.0 and 5.0.1 and includes mitigations for CVE-2017-5715 (Spectre Variant 2) for X86 and MIPS. Signed-off-by: Valentin Korenblit <valentin.korenblit@smile.fr> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
* package/llvm: delete LLVMHello.so from /usr/libValentin Korenblit2018-05-021-2/+2
| | | | | | | | LLVMHello.so contains the Hello World example of an LLVM pass. It is not needed on the target. Signed-off-by: Valentin Korenblit <valentin.korenblit@smile.fr> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
* package/llvm: fix typo in llvm.mkValentin Korenblit2018-04-121-2/+2
| | | | | | | | "+=" was missing in -DLLVM_TARGETS_TO_BUILD, so LLVM_CONF_OPTS and HOST_LLVM_CONF_OPTS before this option weren't being considered. Signed-off-by: Valentin Korenblit <valentin.korenblit@smile.fr> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
* package/llvm: remove $ORIGIN/../lib from RPATHValentin Korenblit2018-04-121-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | AddLLVM.cmake adds $ORIGIN/../lib to the RPATH of llvm binaries. This causes a problem when llvm-config built for the host, installed in STAGING_DIR, is executed under the following conditions: * Target architecture same as host architecture (normally x86_64) * Target's libc different from host's libc (normally glibc) llvm-config will try to link with the target's libc, resulting in: ./llvm-config: error while loading shared libraries: libc.so.0: cannot open shared object file: No such file or directory. To avoid this, we simply add pass -DCMAKE_INSTALL_RPATH="$(HOST_DIR)/lib" in HOST_LLVM_CONF_OPTS. Link to discussion: http://lists.busybox.net/pipermail/buildroot/2018-April/218627.html Fixes: http://autobuild.buildroot.net/results/b81c12d529c66a028e2297ea5ce1d6930324fa69/ Signed-off-by: Valentin Korenblit <valentin.korenblit@smile.fr> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
* package/llvm: add dependency on wcharValentin Korenblit2018-04-091-2/+3
| | | | | | | | | | | | | Extract from log: output/build/llvm-5.0.1/include/llvm/Support/ConvertUTF.h:203:53: error: ‘std::wstring’ has not been declared bool ConvertUTF8toWide(llvm::StringRef Source, std::wstring &Result); Also propagate dependency to mesa3d Signed-off-by: Valentin Korenblit <valentin.korenblit@smile.fr> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
* package/llvm: add dependency on shared librariesValentin Korenblit2018-04-091-2/+4
| | | | | | | | | | | | llvm generates libLLVM.so, so it won't work if BR2_STATIC_LIBS is set Also propagate llvm dependency to mesa3d. Link to report from autobuilders: http://lists.busybox.net/pipermail/buildroot/2018-April/218296.html Signed-off-by: Valentin Korenblit <valentin.korenblit@smile.fr> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
* llvm: add dependency on !BR2_TOOLCHAIN_HAS_GCC_BUG_64735Thomas Petazzoni2018-04-061-0/+5
| | | | | | | | | | | | | | | | | | | LLVM uses std::shared_future, which until gcc 7.x isn't available on architectures that don't provide lock-free atomics, see https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64735. Buildroot already has a BR2_TOOLCHAIN_HAS_GCC_BUG_64735 option to handle such a case, so simply add this new dependency to LLVM. It will make sure LLVM doesn't get built on ARMv5 platforms using a gcc older than 7.x. Fixes: http://autobuild.buildroot.net/results/ada497f6a8d20fa1a9adb2b17a138d7b726a6cdc/ Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com> Acked-by: Valentin Korenblit <valentin.korenblit@smile.fr> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
* package/llvm: enable AMDGPUValentin Korenblit2018-04-042-0/+19
| | | | | | | | | | | | | The AMDGPU backend provides ISA code generation for AMD GPU's, starting with the R600 family up until the current GCN families. It should not be confused with the AMDGPU Linux kernel DRM driver. For more info: https://llvm.org/docs/AMDGPUUsage.html Signed-off-by: Valentin Korenblit <valentin.korenblit@smile.fr> Tested-by: Jérôme Oufella <jerome.oufella@savoirfairelinux.com> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
* package/llvm: new packageValentin Korenblit2018-04-043-0/+296
This patch installs LLVM tools and libraries for the host and libLLVM.so for the target. In order to cross-compile LLVM for the target, LLVM must be installed on the host, or at least llvm-tblgen. This is necessary as the path to host's llvm-tblgen must be specified when cross-compiling using the LLVM_TABLEGEN option. Also, a version of llvm-config that can run on the host will be required by packages that link with LLVM libraries, so we need to generate it and install it in STAGING_DIR/usr/bin. It is important to remark why we need llvm-config(host variant) installed in STAGING dir. This tool is necessary to build applications that use LLVM, as it prints the compiler flags, linker flags and object libraries needed to link against LLVM libs. More info: https://bugs.chromium.org/p/chromium/issues/detail?id=219369 The original idea was to compile only llvm-tblgen and llvm-config for the host, as they are the only necessary components. However, llvm-config tool does not work as expected if it is not linked with libLLVM.so, so we must also enable LLVM_LINK_LLVM_DYLIB, what builds LLVM as a single shared library and links LLVM tools with it. More info: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=224847 in comment #11. If we don't build full LLVM for the host, it would be necessary to patch configure.ac from mesa3d if we want dynamic linking, because it uses llvm-config (host variant installed in STAGING_DIR) to get the necessary LLVM libraries to link with, which has the following problems: - llvm-config --shared mode outputs static (even if LLVM is built as one shared library) which leads to link issues with libgallium. - llvm-config --libs outputs all LLVM tiny libs: -lLLVMLTO, -lLLVMPasses,etc instead of the single shared library containing all LLVM components (-lLLVM-5.0) Mesa tries to execute: llvm-config --link-shared --libs, but this outputs llvm-config: error: libLLVM-5.0.so is missing. Given that these problems may arise with other packages that use LLVM, it is preferable to do a full build for the host. Also, having a complete installation of LLVM on the host will also facilitate the integration of Clang front-end, which is going to be added in a future patch. As option LLVM_BUILD_LLVM_DYLIB is enabled for the llvm target variant, a single shared library containing all LLVM components is built. This option is not compatible with BUILD_SHARED_LIBS, which generates one .so per library and is only recommended for use by LLVM developers. Tools and utils are not built for the target. The patch aims to provide LLVM support for other packages. The main options needed to cross-compile LLVM are the following ones: LLVM_TABLEGEN CMAKE_CROSSCOMPILING LLVM_DEFAULT_TARGET_TRIPLE LLVM_HOST_TRIPLE LLVM_TARGET_ARCH LLVM_TARGETS_TO_BUILD Signed-off-by: Valentin Korenblit <valentin.korenblit@smile.fr> [Thomas: - add dependency on thread and C++ and update the Config.in comment accordingly. - make the Config.in comment depend on BR2_PACKAGE_LLVM_ARCH_SUPPORTS so that it isn't disabled on architectures where LLVM is anyway not supported.] Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
OpenPOWER on IntegriCloud