summaryrefslogtreecommitdiffstats
path: root/classes/clang.bbclass
Commit message (Collapse)AuthorAgeFilesLines
...
* clang: Switch c++ default to gnu++14 standardKhem Raj2017-08-121-1/+1
| | | | | | | | | | | | | | | Using cmdline options -std doesnt always work e.g. boost where it uses c++ driver (clang++) to invoke compilation but then passes '-x c' to choose the language for compilation Which ends in errors like below error: invalid argument '-std=c++14' not allowed with 'C' Therefore change the defaults in driver itself to use gnu++14 which is default with g++ from gcc7+ too. Signed-off-by: Khem Raj <raj.khem@gmail.com>
* clang++: Default to c++14 stdKhem Raj2017-08-121-1/+1
| | | | | | | | | | latest gcc7 also defaults to c++14, some packages have started to use c++11 and newer features without specifying -std option and rightly so now that gcc defaults are c++14, applications can safely assume c++14 as default Signed-off-by: Khem Raj <raj.khem@gmail.com>
* llvm-libunwind: DeleteKhem Raj2017-07-311-3/+2
| | | | | | build llvm libunwind along with libcxx Signed-off-by: Khem Raj <raj.khem@gmail.com>
* clang: Default to PIE when GCCPIE is setKhem Raj2017-07-291-2/+0
| | | | | | | | This matches with OE-Core expectations and we do not need to inject PIE flags manually via SECURITY_CFLAGS which does not always work Signed-off-by: Khem Raj <raj.khem@gmail.com>
* clang.bbclass: Add -pie -fPIE to SECURITY_PIE_CFLAGS explicitlyKhem Raj2017-07-211-0/+3
| | | | | | | | gcc in core now is configured with these options but clang does not have a configuration level knob so we still need to pass it old way Signed-off-by: Khem Raj <raj.khem@gmail.com>
* clang.bbclass: Add -Qunused-arguments to clang argumentsKhem Raj2017-06-091-1/+1
| | | | | | | | GCC ignores unused arguements by default, but Clang needs this extra parameter to stop printing warnings about LDFLAGS passed during compiling stage and CFLAGS passed during linking stage. Signed-off-by: Khem Raj <raj.khem@gmail.com>
* clang.bbclass: Disable llvm-libunwind for mipsKhem Raj2017-03-231-0/+1
| | | | | | Its not ported to mips yet Signed-off-by: Khem Raj <raj.khem@gmail.com>
* clang.bbclass: Add CCACHE prefix and use HOST_PREFIX instead of TARGET_PREFIXKhem Raj2017-03-211-4/+4
| | | | Signed-off-by: Khem Raj <raj.khem@gmail.com>
* clang: Add clang runtime to dependencies when toolchain is clangKhem Raj2017-03-161-2/+2
| | | | | | A step towards unplugging gcc runtime Signed-off-by: Khem Raj <raj.khem@gmail.com>
* Ony use llvm-libunwind if clang is selectedRoss Burton2016-05-251-0/+3
|
* clang-libs: Fix build on x86_64 and use gcc for all cross recipesKhem Raj2016-05-081-0/+1
| | | | Signed-off-by: Khem Raj <raj.khem@gmail.com>
* Switch default compiler option to remain gccKhem Raj2016-05-051-1/+1
| | | | | | | | | | | Users find it too intrusive that clang becomes the default compiler, they would like to invoke it on demand for certain packages only. Use TOOLCHAIN ?= "clang" in local.conf if you want clang to become default Signed-off-by: Khem Raj <raj.khem@gmail.com>
* clang: Remove -mno-spe option from cmdline on ppcKhem Raj2016-03-031-0/+1
| | | | | | | This gcc option is not supported in clang hence remove it Signed-off-by: Khem Raj <raj.khem@gmail.com>
* clang: Move -Wno-error=unused-command-line-argument setting to TUNE_CCARGSKhem Raj2016-03-011-3/+1
| | | | | | | Adding it to TOOLCHAIN_OPTIONS renders libtool useless and its not able to build .so Signed-off-by: Khem Raj <raj.khem@gmail.com>
* Pass -Wno-error=unused-command-line-argument to clangKhem Raj2016-02-291-0/+2
| | | | | | | | | | | We can get past the errors due to -Werror when unused cmdline options appear on compiler cmdline e.g. error: argument unused during compilation: '-pie' Signed-off-by: Khem Raj <raj.khem@gmail.com>
* clang.bbclass: remove gcc from deps when appropriateChristopher Larson2016-02-151-15/+4
| | | | Signed-off-by: Christopher Larson <chris_larson@mentor.com>
* clang.bbclass: Replace -march=armv7ve with -march=armv7aKhem Raj2016-01-091-0/+3
| | | | | | | OE-Core now uses -march=armv7ve for cortext-a7 and clang/llvm doesnt have arch tunable for armv7ve, we revert to prior art of using armv7-a Signed-off-by: Khem Raj <raj.khem@gmail.com>
* clang.bbclass: use gcc form nativesdk, crosssdk, cross-canadian recipesKhem Raj2015-10-011-0/+3
| | | | | | | | These are not part of target image and many of these tools are still not ported to be buildable with clang, so lets use gcc for building them at this moment Signed-off-by: Khem Raj <raj.khem@gmail.com>
* clang.bbclass: Remove -mhard-float for ppcKhem Raj2015-10-011-0/+2
| | | | | | | The option is not defined for llvm/clang but the defaults are hard-float anyway so not needed Signed-off-by: Khem Raj <raj.khem@gmail.com>
* clang: Convert gcc specific endian options to clang accepted onesKhem Raj2015-09-251-0/+4
| | | | Signed-off-by: Khem Raj <raj.khem@gmail.com>
* clang/classes: Invert the logic to select toolchain and default to clangKhem Raj2015-08-211-6/+37
| | | | | | | | | | | | | | | | | | | | | So far we have been selecting which packages are compiled using clang this patch changes the logic to use clang by default unless selecting TOOLCHAIN = "gcc" explicitly in the recipe We have not yet enabled clang for native recipes, its only enabled for target recipes needing cross compilation as of now. Get rid of configuration file and move the code to clang.bbclass, simplifies the logic If needed to select gcc to be default system compiler set TOOLCHAIN = "gcc" in local.conf Signed-off-by: Khem Raj <raj.khem@gmail.com>
* classes: Add a mechanism, to select components to be able to select default ↵Khem Raj2015-03-121-0/+10
compiler We add clang as an alternative compiler, it sitll uses underlying binutils and compiler runtime, it will only do the compilation and defer link, to GNU ld/gold, to compile a component usign clang add TOOLCHAIN_pn-<recipe-name> = "clang" DEPENDS_append_pn-<recipe-name> = " clang-cross " And OE will start using clang to compile <recipe-name> Signed-off-by: Khem Raj <raj.khem@gmail.com>