summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* toolchain-funcs.eclass: fix tc-cpp-is-true() to work with clangMattias Nissler2019-11-061-8/+7
| | | | | | | | | | | | | Clang's preprocessor likes to output a leading newline, which makes the comparison always fail. GCC generates additional output with certain flags (e.g. -ggdb3) as well. Hence, switch the test to trigger a preprocessor error when the condition is not true and examine the exit code. Bug: https://bugs.gentoo.org/698912 Signed-off-by: Mattias Nissler <mnissler@chromium.org> Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>
* toolchain-funcs: Add tc-ld-is-lld helper.Manoj Gupta2019-09-131-0/+30
| | | | | | | | LLD is a new linker for LLVM project. Add tc-ld-is-lld helper to be able to detect it. Signed-off-by: Manoj Gupta <manojgupta@google.com> Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>
* toolchain-funcs.eclass: deprecate gen_usr_ldscriptMike Gilbert2019-07-181-11/+4
| | | | Signed-off-by: Mike Gilbert <floppym@gentoo.org>
* eclass: Add risc-v endianness informationArfrever Frehtes Taifersar Arahesis2019-05-111-1/+2
| | | | Signed-off-by: Andreas K. Hüttel <dilfridge@gentoo.org>
* toolchain-funcs.eclass: Fix eclassdoc for tc-detect-is-softfloatMichał Górny2019-03-141-5/+3
| | | | | Closes: https://bugs.gentoo.org/679930 Signed-off-by: Michał Górny <mgorny@gentoo.org>
* toolchain-funcs.eclass: softfloat detection, bug #666896Sergei Trofimovich2018-09-271-0/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | commit 921cb9c10de4d237924a61a1c27f914dfb479a64 "toolchain-funcs.eclass: Update tc-is-softfloat for new ARM tuples" changed autodetection of mst 'arm*' targets from from 'no' to 'yes'. It is incorrect at least for bare-metal targets that tend to pass their taget defaults. Bug #666896 is one example example command: # crossdev -s1 \ --env 'EXTRA_ECONF="--with-multilib-list=rmprofile"' \ arm-none-eabi rmprofile one of special cases for gcc as it explicitky does not myx with any arch-specific options and --with-float=soft breaks it: Error: You cannot use any of --with-arch/cpu/fpu/float/mode with --with-multilib-list=rmprofile The immediate fix is to restore initial autodetection for bare-metal targets. Reported-by: Eugene Bright Closes: https://bugs.gentoo.org/666896 Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>
* toolchain-funcs.eclass: Update tc-is-softfloat for new ARM tuplesJames Le Cuirot2018-08-211-14/+60
| | | | | | | | | | | | | | | | | ARM tuples will change from armv7a-hardfloat-linux-gnueabi to armv7a-unknown-linux-gnueabihf or similar in the 17.0 profiles. The function already treated the latter as hardfloat but this commit will now treat ambiguous tuples such as arm-unknown-linux-gnueabi as softfloat rather than hardfloat. This brings Gentoo in line with most of the ARM Linux community. However, the function will now check existing toolchains to avoid breaking existing systems, if possible. This has been achieved by splitting the function in three, tc-detect-is-softfloat for checking existing toolchains, tc-tuple-is-softfloat for checking just the tuple, and the new tc-is-softfloat that calls the first two. The output from the first two could be compared to inform the user that they are not using a recommended tuplet.
* toolchain-funcs.eclass: tc-cpp-is-true function to simplify helpersJames Le Cuirot2018-08-211-28/+25
| | | | | CTARGET is used, if defined, otherwise CHOST. CHOST was previously assumed but this should not affect existing usage of these helpers.
* toolchain-funcs.eclass: New tc-getTARGET_CPP functionJames Le Cuirot2018-08-211-0/+11
| | | | | | | | | | | This returns the name of the C preprocessor for the toolchain being built if CTARGET is defined, or the toolchain being used otherwise. It is primarily intended to determine characteristics about an existing toolchain's target as these may differ from what the tuple suggests. It is not necessary to add the full set of tc-getTARGET_* helper functions as this is probably the only reason we would ever invoke a toolchain in the context of CTARGET.
* toolchain-funcs.eclass: fix tc-ld-disable-gold when using clangRahul Chaudhry2018-05-261-8/+22
| | | | | | | | | | | | | tc-ld-disable-gold checks gcc version to see if we have gcc-4.8+ The version check fails if clang is set as the compiler. $ clang -E -P - <<<"__GNUC__ __GNUC_MINOR__ __GNUC_PATCHLEVEL__" 4 2 1 i.e. clang returns a gcc version of 4.2.1 This results in incorrectly adding -B ... to LDFLAGS, when clang supports "-fuse-ld" just fine. Support for "-fuse-ld" first appeared in clang-3.5, so check clang version and use the flag if supported.
* tc-export_build_env: handle non-cross compile caseRaul E Rangel2018-05-051-7/+15
| | | | | | | | | | | By handling the non-cross compiler case the meson.eclass can be simplified to `tc-env_build "$@" || die`. See https://bugs.gentoo.org/654424 Change-Id: I1a90da46366c490abbf7d5660bf90482c7f22747 Signed-off-by: Raul E Rangel <rrangel@chromium.org> Closes: https://bugs.gentoo.org/654424
* toolchain-funcs.eclass: Use host vars in tc-getBUILD* when not crossMichał Górny2018-01-011-2/+8
| | | | | | | | | | Make tc-getBUILD* functions respect host variables (CC & co.) when not cross-compiling. This removes the necessity of overriding BUILD_* along with the regular variables on the systems that are not concerned about cross-compilation, and does not change the behavior for those which are. Closes: https://bugs.gentoo.org/630282
* toolchain.eclass: fix tc-enables-* with -ggdb3Luke Dashjr2017-08-101-4/+4
| | | | | | | | | | | | | | -ggdb3 builds debug information for macros into binaries. For this reason, the C preprocessor includes all #defines as-is in the output. The check in tc-enables-* expects only a fixed output of "true", which fails in this scenario. To fix this, `grep` is used to look specifically for "true" in the output from the preprocessor. Closes: https://github.com/gentoo/gentoo/pull/5359 Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org> Signed-off-by: Matthias Maier <tamiko@gentoo.org>
* toolchain-funcs.eclass: We only support little-endian AlphaJames Le Cuirot2017-07-011-1/+1
| | | | | Funny that no one noticed this for 10 years. :) Thanks to klausman for clearing this up.
* toolchain-funcs.eclass: Add functions for detection of PIE / SSP in way ↵Arfrever Frehtes Taifersar Arahesis2017-06-161-0/+67
| | | | | | | | | | compatible with GCC >=6. Newly added tc-enables-pie(), tc-enables-ssp(), tc-enables-ssp-strong() and tc-enables-ssp-all() check macros instead of specs. This solution also works with older GCC and with Clang. Signed-off-by: Matthias Maier <tamiko@gentoo.org>
* toolchain-funcs.eclass: Remove meaningless evalMichał Górny2017-03-081-3/+3
| | | | | The 'eval' as used does not do anything. The function name is expanded anyway.
* Drop $Id$ per council decision in bug #611234.Robin H. Johnson2017-02-281-1/+0
| | | | Signed-off-by: Robin H. Johnson <robbat2@gentoo.org>
* toolchain-funcs.eclass: Add tc-check-openmp() functionDavid Seifert2016-10-221-0/+21
| | | | | | Closes: https://github.com/gentoo/gentoo/pull/2547 Signed-off-by: David Seifert <soap@gentoo.org>
* toolchain-funcs.eclass: add or1k tuple support #589682Siarhei Siamashka2016-08-101-1/+1
|
* eclass/toolchain-funcs: add clang version functionsAustin English2016-07-011-0/+33
|
* eclass/toolchain-funcs: avoid backticksAustin English2016-07-011-1/+1
|
* toolchain-funcs.eclass: Remove code that has become redundant.Ulrich Müller2016-06-271-3/+1
| | | | | | After commit 81c226e451be564a545696f93fc5880ebc160812, type cannot be "kern" in these two places, so ninj would always return its second argument, i.e. it can be replaced by simple echo.
* toolchain-funcs.eclass: tc-ninja_magic_to_arch, remove old KV supportMichał Górny2016-06-271-13/+3
| | | | | | | | Remove the support for old kernel versions that are no longer used in Gentoo, and rely on KV_to_int() function. This functions is provided by Portage but not listed in PMS. Furthermore, for a long time Portage replaced it with 'return 1' in global scope, so they did not really work as expected anyway.
* toolchain-funcs.eclass: Add helpful tc-is-{gcc,clang} wrappersMichał Górny2016-06-261-0/+12
|
* toolchain-funcs.eclass: Add tc-get-compiler-type()Michał Górny2016-06-261-0/+22
| | | | | | | | | | | Add a tc-get-compiler-type() function that can be used to identify the compiler being used, using the preprocessor defines. Alike gcc-*version() routines, it uses CPP (which in turn uses CC). The major usage would be applying compiler-specific quirks and limiting gcc version checks to compilers that actually are gcc, since e.g. clang reports gcc version 4.2 -- which would incorrectly cause numerous gcc version checks in ebuilds to fail.
* toolchain-funcs.eclass: Assume CPP="$(tc-getCC) -E" when unset, #582822Michał Górny2016-06-261-2/+2
| | | | | | | | | | | | | Modify the tc-getCPP and tc-getBUILD_CPP functions to use "$(tc-getCC) -E" (i.e. the C compiler's preprocessing call) instead of falling back to 'cpp'. This ensures that in environment with CC (and CXX) overriden the correct compiler is used rather than the one selected by gcc-config, which in turn fixes gcc version queries. The alternative would be to always override CPP along with CC & CXX. However, that is uncommon and is known to break some packages. Bug: https://bugs.gentoo.org/show_bug.cgi?id=582822
* toolchain-funcs.eclass: Fix _tc-getPROG with multi-parameter defaultsMichał Górny2016-06-261-5/+5
| | | | | | Fix _tc-getPROG function to account correctly for default values that contain program name along with arguments, e.g. the default for CPP containing "$(CC) -E".
* mysql-cmake/mysql-multilib eclasses: set STACK_DIRECTION to fix cross-compilesMike Frysinger2016-06-111-0/+15
|
* toolchain-funcs.eclass: gen_usr_ldscript: integrate multilib_is_native_abi ↵Mike Frysinger2016-03-301-0/+5
| | | | | | | | support #479448 Many ebuilds have started checking multilib_is_native_abi to see if they should call gen_usr_ldscript. Since that logic always makes sense, add it directly to the gen_usr_ldscript function.
* toolchain-funcs.eclass: gen_usr_ldscript: disable for android targetsMike Frysinger2015-10-121-0/+1
| | | | | Android systems are guaranteed to not have split filesystems, so disable ldscript logic for them.
* eclass: gentoo.org has https per defaultJustin Lecher2015-09-251-1/+1
| | | | Signed-off-by: Justin Lecher <jlec@gentoo.org>
* proj/gentoo: Initial commitRobin H. Johnson2015-08-081-0/+839
This commit represents a new era for Gentoo: Storing the gentoo-x86 tree in Git, as converted from CVS. This commit is the start of the NEW history. Any historical data is intended to be grafted onto this point. Creation process: 1. Take final CVS checkout snapshot 2. Remove ALL ChangeLog* files 3. Transform all Manifests to thin 4. Remove empty Manifests 5. Convert all stale $Header$/$Id$ CVS keywords to non-expanded Git $Id$ 5.1. Do not touch files with -kb/-ko keyword flags. Signed-off-by: Robin H. Johnson <robbat2@gentoo.org> X-Thanks: Alec Warner <antarus@gentoo.org> - did the GSoC 2006 migration tests X-Thanks: Robin H. Johnson <robbat2@gentoo.org> - infra guy, herding this project X-Thanks: Nguyen Thai Ngoc Duy <pclouds@gentoo.org> - Former Gentoo developer, wrote Git features for the migration X-Thanks: Brian Harring <ferringb@gentoo.org> - wrote much python to improve cvs2svn X-Thanks: Rich Freeman <rich0@gentoo.org> - validation scripts X-Thanks: Patrick Lauer <patrick@gentoo.org> - Gentoo dev, running new 2014 work in migration X-Thanks: Michał Górny <mgorny@gentoo.org> - scripts, QA, nagging X-Thanks: All of other Gentoo developers - many ideas and lots of paint on the bikeshed