On 24 Jun 2016 07:40, Michał Górny wrote:
> On Thu, 23 Jun 2016 21:32:34 -0400 Mike Frysinger wrote:
> > On 22 Jun 2016 22:06, Michał Górny wrote:
> > > +# @FUNCTION: tc-is-gcc
> > > +# @DESCRIPTION:
> > > +# Return true if the current compiler is pure GCC.
> >
> > "pure" doesn't make much sense
Here's a quick v4.
Changes:
- fixed CHOST-search logic for multi-parameter default,
- replaced redundant tc-getCC call in tc-getCPP by plain ${CC:-gcc}
since tc-getCPP will perform search anyway,
- changed docs for tc-get* to @OUTPUT.
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".
---
eclass/toolchain-funcs.eclass | 10 +-
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/eclass/toolchain-funcs.e
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
---
eclass/tests/toolchain-funcs.sh | 28
eclass/toolchain-funcs.eclass | 12
2 files changed, 40 insertions(+)
diff --git a/eclass/tests/toolchain-funcs.sh b/eclass/tests/toolchain-funcs.sh
index 6f37996..e6a1538 100755
--- a/eclass/tests/toolchain-fun
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 th