public inbox for gentoo-dev@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-dev] [PATCH 0/4] toolchain-funcs.eclass: fix for version checks (v2) + compiler identification
@ 2016-06-22 20:06 Michał Górny
  2016-06-22 20:06 ` [gentoo-dev] [PATCH 1/4] toolchain-funcs.eclass: Fix _tc-getPROG with multi-parameter defaults Michał Górny
                   ` (5 more replies)
  0 siblings, 6 replies; 20+ messages in thread
From: Michał Górny @ 2016-06-22 20:06 UTC (permalink / raw
  To: gentoo-dev; +Cc: toolchain, Michał Górny

Hello, everyone.

Here's my second attempt at improving version checks
in toolchain-funcs.eclass. Currently the functions use $(tc-getCPP)
to determine gcc version. This doesn't trigger expected results when CC
& CXX are overriden but CPP is not which is a common case -- it causes
the eclass to fallback to 'cpp' and therefore use active gcc version
rather than the CC being used.

My initial fix was limited to defaulting the preprocessor to '$(CC) -E'
rather than 'cpp'. However, as eroen pointed out clang reports gcc
version 4.2 which would cause numerous ebuild checks to fail. Therefore,
I've decided to extend the patchset with means to prevent that.

Aside to fixing tc-getCPP and therefore gcc-*version functions to use
the active compiler, it also introduces a generic tc-get-compiler-type
function that identifies the compiler as either gcc and clang (support
for more compilers welcome). Two friendly wrappers are provided as well:
tc-is-gcc and tc-is-clang.

Note that unlike common less and more successful CC/CXX comparisons,
the functions actually use preprocessor macros to identify the compiler.


The common use cases:

a. checking for a specific gcc version:

  [[ $(gcc-major-version) = 5 && $(gcc-minor-version) -le 2 ]]

would become:

  tc-is-gcc && [[ $(gcc-major-version) = 5 && $(gcc-minor-version) -le 2 ]]

i.e. it would not trigger for clang.

b. applying clang-specific quirks (discouraged but people still do
that):

  [[ ${CC} == *clang* ]] && ...

would become:

  tc-is-clang && ...



Michał Górny (4):
  toolchain-funcs.eclass: Fix _tc-getPROG with multi-parameter defaults
  toolchain-funcs.eclass: Assume CPP="$(tc-getCC) -E" when unset,
    #582822
  toolchain-funcs.eclass: Add tc-get-compiler-type()
  toolchain-funcs.eclass: Add helpful tc-is-{gcc,clang} wrappers

 eclass/tests/toolchain-funcs.sh | 15 ++++++++++++++
 eclass/toolchain-funcs.eclass   | 43 ++++++++++++++++++++++++++++++++++++-----
 2 files changed, 53 insertions(+), 5 deletions(-)

-- 
2.9.0



^ permalink raw reply	[flat|nested] 20+ messages in thread

* [gentoo-dev] [PATCH 1/4] toolchain-funcs.eclass: Fix _tc-getPROG with multi-parameter defaults
  2016-06-22 20:06 [gentoo-dev] [PATCH 0/4] toolchain-funcs.eclass: fix for version checks (v2) + compiler identification Michał Górny
@ 2016-06-22 20:06 ` Michał Górny
  2016-06-24  1:33   ` [gentoo-dev] " Mike Frysinger
  2016-06-22 20:06 ` [gentoo-dev] [PATCH 2/4] toolchain-funcs.eclass: Assume CPP="$(tc-getCC) -E" when unset, #582822 Michał Górny
                   ` (4 subsequent siblings)
  5 siblings, 1 reply; 20+ messages in thread
From: Michał Górny @ 2016-06-22 20:06 UTC (permalink / raw
  To: gentoo-dev; +Cc: toolchain, Michał Górny

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 | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/eclass/toolchain-funcs.eclass b/eclass/toolchain-funcs.eclass
index e794559..7119a46 100644
--- a/eclass/toolchain-funcs.eclass
+++ b/eclass/toolchain-funcs.eclass
@@ -34,11 +34,11 @@ _tc-getPROG() {
 	done
 
 	local search=
-	[[ -n $4 ]] && search=$(type -p "$4-${prog}")
-	[[ -z ${search} && -n ${!tuple} ]] && search=$(type -p "${!tuple}-${prog}")
+	[[ -n $4 ]] && search=$(type -p $4-${prog})
+	[[ -z ${search} && -n ${!tuple} ]] && search=$(type -p ${!tuple}-${prog})
 	[[ -n ${search} ]] && prog=${search##*/}
 
-	export ${var}=${prog}
+	export ${var}="${prog}"
 	echo "${!var}"
 }
 tc-getBUILD_PROG() { _tc-getPROG CBUILD "BUILD_$1 $1_FOR_BUILD HOST$1" "${@:2}"; }
-- 
2.9.0



^ permalink raw reply related	[flat|nested] 20+ messages in thread

* [gentoo-dev] [PATCH 2/4] toolchain-funcs.eclass: Assume CPP="$(tc-getCC) -E" when unset, #582822
  2016-06-22 20:06 [gentoo-dev] [PATCH 0/4] toolchain-funcs.eclass: fix for version checks (v2) + compiler identification Michał Górny
  2016-06-22 20:06 ` [gentoo-dev] [PATCH 1/4] toolchain-funcs.eclass: Fix _tc-getPROG with multi-parameter defaults Michał Górny
@ 2016-06-22 20:06 ` Michał Górny
  2016-06-24  1:33   ` [gentoo-dev] " Mike Frysinger
  2016-06-22 20:06 ` [gentoo-dev] [PATCH 3/4] toolchain-funcs.eclass: Add tc-get-compiler-type() Michał Górny
                   ` (3 subsequent siblings)
  5 siblings, 1 reply; 20+ messages in thread
From: Michał Górny @ 2016-06-22 20:06 UTC (permalink / raw
  To: gentoo-dev; +Cc: toolchain, Michał Górny

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
---
 eclass/toolchain-funcs.eclass | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/eclass/toolchain-funcs.eclass b/eclass/toolchain-funcs.eclass
index 7119a46..3398775 100644
--- a/eclass/toolchain-funcs.eclass
+++ b/eclass/toolchain-funcs.eclass
@@ -59,7 +59,7 @@ tc-getCC() { tc-getPROG CC gcc "$@"; }
 # @FUNCTION: tc-getCPP
 # @USAGE: [toolchain prefix]
 # @RETURN: name of the C preprocessor
-tc-getCPP() { tc-getPROG CPP cpp "$@"; }
+tc-getCPP() { tc-getPROG CPP "$(tc-getCC) -E" "$@"; }
 # @FUNCTION: tc-getCXX
 # @USAGE: [toolchain prefix]
 # @RETURN: name of the C++ compiler
@@ -132,7 +132,7 @@ tc-getBUILD_CC() { tc-getBUILD_PROG CC gcc "$@"; }
 # @FUNCTION: tc-getBUILD_CPP
 # @USAGE: [toolchain prefix]
 # @RETURN: name of the C preprocessor for building binaries to run on the build machine
-tc-getBUILD_CPP() { tc-getBUILD_PROG CPP cpp "$@"; }
+tc-getBUILD_CPP() { tc-getBUILD_PROG CPP "$(tc-getBUILD_CC) -E" "$@"; }
 # @FUNCTION: tc-getBUILD_CXX
 # @USAGE: [toolchain prefix]
 # @RETURN: name of the C++ compiler for building binaries to run on the build machine
-- 
2.9.0



^ permalink raw reply related	[flat|nested] 20+ messages in thread

* [gentoo-dev] [PATCH 3/4] toolchain-funcs.eclass: Add tc-get-compiler-type()
  2016-06-22 20:06 [gentoo-dev] [PATCH 0/4] toolchain-funcs.eclass: fix for version checks (v2) + compiler identification Michał Górny
  2016-06-22 20:06 ` [gentoo-dev] [PATCH 1/4] toolchain-funcs.eclass: Fix _tc-getPROG with multi-parameter defaults Michał Górny
  2016-06-22 20:06 ` [gentoo-dev] [PATCH 2/4] toolchain-funcs.eclass: Assume CPP="$(tc-getCC) -E" when unset, #582822 Michał Górny
@ 2016-06-22 20:06 ` Michał Górny
  2016-06-23  6:52   ` Fabian Groffen
  2016-06-22 20:06 ` [gentoo-dev] [PATCH 4/4] toolchain-funcs.eclass: Add helpful tc-is-{gcc,clang} wrappers Michał Górny
                   ` (2 subsequent siblings)
  5 siblings, 1 reply; 20+ messages in thread
From: Michał Górny @ 2016-06-22 20:06 UTC (permalink / raw
  To: gentoo-dev; +Cc: toolchain, Michał Górny

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.
---
 eclass/tests/toolchain-funcs.sh | 15 +++++++++++++++
 eclass/toolchain-funcs.eclass   | 19 +++++++++++++++++++
 2 files changed, 34 insertions(+)

diff --git a/eclass/tests/toolchain-funcs.sh b/eclass/tests/toolchain-funcs.sh
index 41c1ae5..0b9b7d7 100755
--- a/eclass/tests/toolchain-funcs.sh
+++ b/eclass/tests/toolchain-funcs.sh
@@ -111,5 +111,20 @@ tc-ld-disable-gold
 )
 tend $?
 
+tbegin "tc-get-compiler-type (gcc)"
+(
+export CC=gcc
+[[ $(tc-get-compiler-type) == gcc ]]
+)
+tend $?
+
+if type -P clang &>/dev/null; then
+	tbegin "tc-get-compiler-type (clang)"
+	(
+	export CC=clang
+	[[ $(tc-get-compiler-type) == clang ]]
+	)
+	tend $?
+fi
 
 texit
diff --git a/eclass/toolchain-funcs.eclass b/eclass/toolchain-funcs.eclass
index 3398775..116bc43 100644
--- a/eclass/toolchain-funcs.eclass
+++ b/eclass/toolchain-funcs.eclass
@@ -585,6 +585,25 @@ tc-endian() {
 	esac
 }
 
+# @FUNCTION: tc-get-compiler-type
+# @RETURN: keyword identifying the compiler: gcc, clang, unknown
+tc-get-compiler-type() {
+	set -- $($(tc-getCPP "$@") -E -P - <<<"CPP_WORKS __GNUC__ __clang__")
+
+	# CPP_WORKS shouldn't be substituted -- so if it's not there,
+	# cpp is probably broken
+	if [[ $1 != CPP_WORKS ]]; then
+		echo unknown
+	# Check which of the defines were substituted
+	elif [[ $3 != __clang__ ]]; then
+		echo clang
+	elif [[ $2 != __GNUC__ ]]; then
+		echo gcc
+	else
+		echo unknown
+	fi
+}
+
 # Internal func.  The first argument is the version info to expand.
 # Query the preprocessor to improve compatibility across different
 # compilers rather than maintaining a --version flag matrix. #335943
-- 
2.9.0



^ permalink raw reply related	[flat|nested] 20+ messages in thread

* [gentoo-dev] [PATCH 4/4] toolchain-funcs.eclass: Add helpful tc-is-{gcc,clang} wrappers
  2016-06-22 20:06 [gentoo-dev] [PATCH 0/4] toolchain-funcs.eclass: fix for version checks (v2) + compiler identification Michał Górny
                   ` (2 preceding siblings ...)
  2016-06-22 20:06 ` [gentoo-dev] [PATCH 3/4] toolchain-funcs.eclass: Add tc-get-compiler-type() Michał Górny
@ 2016-06-22 20:06 ` Michał Górny
  2016-06-24  1:32   ` [gentoo-dev] " Mike Frysinger
  2016-06-23  9:18 ` [gentoo-dev] [PATCH 0/2] v3: tc-get-compiler-type() & wrappers Michał Górny
  2016-06-24 20:07 ` [gentoo-dev] [PATCH v4] tc-get-compiler-type() + wrappers Michał Górny
  5 siblings, 1 reply; 20+ messages in thread
From: Michał Górny @ 2016-06-22 20:06 UTC (permalink / raw
  To: gentoo-dev; +Cc: toolchain, Michał Górny

---
 eclass/toolchain-funcs.eclass | 14 ++++++++++++++
 1 file changed, 14 insertions(+)

diff --git a/eclass/toolchain-funcs.eclass b/eclass/toolchain-funcs.eclass
index 116bc43..00dec40 100644
--- a/eclass/toolchain-funcs.eclass
+++ b/eclass/toolchain-funcs.eclass
@@ -604,6 +604,20 @@ tc-get-compiler-type() {
 	fi
 }
 
+# @FUNCTION: tc-is-gcc
+# @DESCRIPTION:
+# Return true if the current compiler is pure GCC.
+tc-is-gcc() {
+	[[ $(tc-get-compiler-type) == gcc ]]
+}
+
+# @FUNCTION: tc-is-clang
+# @DESCRIPTION:
+# Return true if the current compiler is clang.
+tc-is-clang() {
+	[[ $(tc-get-compiler-type) == clang ]]
+}
+
 # Internal func.  The first argument is the version info to expand.
 # Query the preprocessor to improve compatibility across different
 # compilers rather than maintaining a --version flag matrix. #335943
-- 
2.9.0



^ permalink raw reply related	[flat|nested] 20+ messages in thread

* Re: [gentoo-dev] [PATCH 3/4] toolchain-funcs.eclass: Add tc-get-compiler-type()
  2016-06-22 20:06 ` [gentoo-dev] [PATCH 3/4] toolchain-funcs.eclass: Add tc-get-compiler-type() Michał Górny
@ 2016-06-23  6:52   ` Fabian Groffen
  2016-06-23  9:01     ` Michał Górny
  0 siblings, 1 reply; 20+ messages in thread
From: Fabian Groffen @ 2016-06-23  6:52 UTC (permalink / raw
  To: gentoo-dev

[-- Attachment #1: Type: text/plain, Size: 864 bytes --]

On 22-06-2016 22:06:53 +0200, Michał Górny wrote:
> +# @FUNCTION: tc-get-compiler-type
> +# @RETURN: keyword identifying the compiler: gcc, clang, unknown
> +tc-get-compiler-type() {
> +	set -- $($(tc-getCPP "$@") -E -P - <<<"CPP_WORKS __GNUC__ __clang__")

% echo "CPP_WORKS __GNUC__ __clang__" | clang -E -P  - 
CPP_WORKS 4 1

The logic below does the right thing, but it might be good for future
reference to make note of this (clang).

> +
> +	# CPP_WORKS shouldn't be substituted -- so if it's not there,
> +	# cpp is probably broken
> +	if [[ $1 != CPP_WORKS ]]; then
> +		echo unknown
> +	# Check which of the defines were substituted
> +	elif [[ $3 != __clang__ ]]; then
> +		echo clang
> +	elif [[ $2 != __GNUC__ ]]; then
> +		echo gcc
> +	else
> +		echo unknown
> +	fi
> +}

-- 
Fabian Groffen
Gentoo on a different level

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 181 bytes --]

^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: [gentoo-dev] [PATCH 3/4] toolchain-funcs.eclass: Add tc-get-compiler-type()
  2016-06-23  6:52   ` Fabian Groffen
@ 2016-06-23  9:01     ` Michał Górny
  0 siblings, 0 replies; 20+ messages in thread
From: Michał Górny @ 2016-06-23  9:01 UTC (permalink / raw
  To: Fabian Groffen; +Cc: gentoo-dev

[-- Attachment #1: Type: text/plain, Size: 1213 bytes --]

On Thu, 23 Jun 2016 08:52:20 +0200
Fabian Groffen <grobian@gentoo.org> wrote:

> On 22-06-2016 22:06:53 +0200, Michał Górny wrote:
> > +# @FUNCTION: tc-get-compiler-type
> > +# @RETURN: keyword identifying the compiler: gcc, clang, unknown
> > +tc-get-compiler-type() {
> > +	set -- $($(tc-getCPP "$@") -E -P - <<<"CPP_WORKS __GNUC__ __clang__")  
> 
> % echo "CPP_WORKS __GNUC__ __clang__" | clang -E -P  - 
> CPP_WORKS 4 1
> 
> The logic below does the right thing, but it might be good for future
> reference to make note of this (clang).

I'm actually thinking of moving the whole logic into cpp using '#if
defined', and just matching the output for the result. This would be
easier to maintain in the future, I guess.

> > +
> > +	# CPP_WORKS shouldn't be substituted -- so if it's not there,
> > +	# cpp is probably broken
> > +	if [[ $1 != CPP_WORKS ]]; then
> > +		echo unknown
> > +	# Check which of the defines were substituted
> > +	elif [[ $3 != __clang__ ]]; then
> > +		echo clang
> > +	elif [[ $2 != __GNUC__ ]]; then
> > +		echo gcc
> > +	else
> > +		echo unknown
> > +	fi
> > +}  
> 



-- 
Best regards,
Michał Górny
<http://dev.gentoo.org/~mgorny/>

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 949 bytes --]

^ permalink raw reply	[flat|nested] 20+ messages in thread

* [gentoo-dev] [PATCH 0/2] v3: tc-get-compiler-type() & wrappers
  2016-06-22 20:06 [gentoo-dev] [PATCH 0/4] toolchain-funcs.eclass: fix for version checks (v2) + compiler identification Michał Górny
                   ` (3 preceding siblings ...)
  2016-06-22 20:06 ` [gentoo-dev] [PATCH 4/4] toolchain-funcs.eclass: Add helpful tc-is-{gcc,clang} wrappers Michał Górny
@ 2016-06-23  9:18 ` Michał Górny
  2016-06-23  9:18   ` [gentoo-dev] [PATCH 1/2] toolchain-funcs.eclass: Add tc-get-compiler-type() Michał Górny
  2016-06-23  9:18   ` [gentoo-dev] [PATCH 2/2] toolchain-funcs.eclass: Add helpful tc-is-{gcc,clang} wrappers Michał Górny
  2016-06-24 20:07 ` [gentoo-dev] [PATCH v4] tc-get-compiler-type() + wrappers Michał Górny
  5 siblings, 2 replies; 20+ messages in thread
From: Michał Górny @ 2016-06-23  9:18 UTC (permalink / raw
  To: gentoo-dev; +Cc: toolchain, Michał Górny

A quick update of patches 3/4.

Changes:

a. the logic in tc-get-compiler-type() has been moved to cpp to make
   the bash side simpler and less likely to break,

b. added tests for tc-is-* wrappers.

Michał Górny (2):
  toolchain-funcs.eclass: Add tc-get-compiler-type()
  toolchain-funcs.eclass: Add helpful tc-is-{gcc,clang} wrappers

 eclass/tests/toolchain-funcs.sh | 43 +++++++++++++++++++++++++++++++++++++++++
 eclass/toolchain-funcs.eclass   | 33 +++++++++++++++++++++++++++++++
 2 files changed, 76 insertions(+)

-- 
2.9.0



^ permalink raw reply	[flat|nested] 20+ messages in thread

* [gentoo-dev] [PATCH 1/2] toolchain-funcs.eclass: Add tc-get-compiler-type()
  2016-06-23  9:18 ` [gentoo-dev] [PATCH 0/2] v3: tc-get-compiler-type() & wrappers Michał Górny
@ 2016-06-23  9:18   ` Michał Górny
  2016-06-23  9:18   ` [gentoo-dev] [PATCH 2/2] toolchain-funcs.eclass: Add helpful tc-is-{gcc,clang} wrappers Michał Górny
  1 sibling, 0 replies; 20+ messages in thread
From: Michał Górny @ 2016-06-23  9:18 UTC (permalink / raw
  To: gentoo-dev; +Cc: toolchain, Michał Górny

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.
---
 eclass/tests/toolchain-funcs.sh | 15 +++++++++++++++
 eclass/toolchain-funcs.eclass   | 19 +++++++++++++++++++
 2 files changed, 34 insertions(+)

diff --git a/eclass/tests/toolchain-funcs.sh b/eclass/tests/toolchain-funcs.sh
index 41c1ae5..0b9b7d7 100755
--- a/eclass/tests/toolchain-funcs.sh
+++ b/eclass/tests/toolchain-funcs.sh
@@ -111,5 +111,20 @@ tc-ld-disable-gold
 )
 tend $?
 
+tbegin "tc-get-compiler-type (gcc)"
+(
+export CC=gcc
+[[ $(tc-get-compiler-type) == gcc ]]
+)
+tend $?
+
+if type -P clang &>/dev/null; then
+	tbegin "tc-get-compiler-type (clang)"
+	(
+	export CC=clang
+	[[ $(tc-get-compiler-type) == clang ]]
+	)
+	tend $?
+fi
 
 texit
diff --git a/eclass/toolchain-funcs.eclass b/eclass/toolchain-funcs.eclass
index 3398775..4a45f78 100644
--- a/eclass/toolchain-funcs.eclass
+++ b/eclass/toolchain-funcs.eclass
@@ -585,6 +585,25 @@ tc-endian() {
 	esac
 }
 
+# @FUNCTION: tc-get-compiler-type
+# @RETURN: keyword identifying the compiler: gcc, clang, unknown
+tc-get-compiler-type() {
+	local code='
+#if defined(__clang__)
+	HAVE_CLANG
+#elif defined(__GNUC__)
+	HAVE_GCC
+#endif
+'
+	local res=$($(tc-getCPP "$@") -E -P - <<<"${code}")
+
+	case ${res} in
+		*HAVE_CLANG*)	echo clang;;
+		*HAVE_GCC*)		echo gcc;;
+		*)				echo unknown;;
+	esac
+}
+
 # Internal func.  The first argument is the version info to expand.
 # Query the preprocessor to improve compatibility across different
 # compilers rather than maintaining a --version flag matrix. #335943
-- 
2.9.0



^ permalink raw reply related	[flat|nested] 20+ messages in thread

* [gentoo-dev] [PATCH 2/2] toolchain-funcs.eclass: Add helpful tc-is-{gcc,clang} wrappers
  2016-06-23  9:18 ` [gentoo-dev] [PATCH 0/2] v3: tc-get-compiler-type() & wrappers Michał Górny
  2016-06-23  9:18   ` [gentoo-dev] [PATCH 1/2] toolchain-funcs.eclass: Add tc-get-compiler-type() Michał Górny
@ 2016-06-23  9:18   ` Michał Górny
  1 sibling, 0 replies; 20+ messages in thread
From: Michał Górny @ 2016-06-23  9:18 UTC (permalink / raw
  To: gentoo-dev; +Cc: toolchain, Michał Górny

---
 eclass/tests/toolchain-funcs.sh | 28 ++++++++++++++++++++++++++++
 eclass/toolchain-funcs.eclass   | 14 ++++++++++++++
 2 files changed, 42 insertions(+)

diff --git a/eclass/tests/toolchain-funcs.sh b/eclass/tests/toolchain-funcs.sh
index 0b9b7d7..d86eee4 100755
--- a/eclass/tests/toolchain-funcs.sh
+++ b/eclass/tests/toolchain-funcs.sh
@@ -118,6 +118,20 @@ export CC=gcc
 )
 tend $?
 
+tbegin "tc-is-gcc (gcc)"
+(
+export CC=gcc
+tc-is-gcc
+)
+tend $?
+
+tbegin "! tc-is-clang (gcc)"
+(
+export CC=gcc
+! tc-is-clang
+)
+tend $?
+
 if type -P clang &>/dev/null; then
 	tbegin "tc-get-compiler-type (clang)"
 	(
@@ -125,6 +139,20 @@ if type -P clang &>/dev/null; then
 	[[ $(tc-get-compiler-type) == clang ]]
 	)
 	tend $?
+
+	tbegin "! tc-is-gcc (clang)"
+	(
+	export CC=clang
+	! tc-is-gcc
+	)
+	tend $?
+
+	tbegin "tc-is-clang (clang)"
+	(
+	export CC=clang
+	tc-is-clang
+	)
+	tend $?
 fi
 
 texit
diff --git a/eclass/toolchain-funcs.eclass b/eclass/toolchain-funcs.eclass
index 4a45f78..67eab38 100644
--- a/eclass/toolchain-funcs.eclass
+++ b/eclass/toolchain-funcs.eclass
@@ -604,6 +604,20 @@ tc-get-compiler-type() {
 	esac
 }
 
+# @FUNCTION: tc-is-gcc
+# @DESCRIPTION:
+# Return true if the current compiler is pure GCC.
+tc-is-gcc() {
+	[[ $(tc-get-compiler-type) == gcc ]]
+}
+
+# @FUNCTION: tc-is-clang
+# @DESCRIPTION:
+# Return true if the current compiler is clang.
+tc-is-clang() {
+	[[ $(tc-get-compiler-type) == clang ]]
+}
+
 # Internal func.  The first argument is the version info to expand.
 # Query the preprocessor to improve compatibility across different
 # compilers rather than maintaining a --version flag matrix. #335943
-- 
2.9.0



^ permalink raw reply related	[flat|nested] 20+ messages in thread

* [gentoo-dev] Re: [PATCH 4/4] toolchain-funcs.eclass: Add helpful tc-is-{gcc,clang} wrappers
  2016-06-22 20:06 ` [gentoo-dev] [PATCH 4/4] toolchain-funcs.eclass: Add helpful tc-is-{gcc,clang} wrappers Michał Górny
@ 2016-06-24  1:32   ` Mike Frysinger
  2016-06-24  5:40     ` Michał Górny
  0 siblings, 1 reply; 20+ messages in thread
From: Mike Frysinger @ 2016-06-24  1:32 UTC (permalink / raw
  To: Michał Górny; +Cc: gentoo-dev, toolchain

[-- Attachment #1: Type: text/plain, Size: 290 bytes --]

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 and is just confusing

shouldn't this be a @RETURN instead of @DESCRIPTION ?  same for clang below.
-mike

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]

^ permalink raw reply	[flat|nested] 20+ messages in thread

* [gentoo-dev] Re: [PATCH 1/4] toolchain-funcs.eclass: Fix _tc-getPROG with multi-parameter defaults
  2016-06-22 20:06 ` [gentoo-dev] [PATCH 1/4] toolchain-funcs.eclass: Fix _tc-getPROG with multi-parameter defaults Michał Górny
@ 2016-06-24  1:33   ` Mike Frysinger
  0 siblings, 0 replies; 20+ messages in thread
From: Mike Frysinger @ 2016-06-24  1:33 UTC (permalink / raw
  To: Michał Górny; +Cc: gentoo-dev, toolchain

[-- Attachment #1: Type: text/plain, Size: 9 bytes --]

OK
-mike

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]

^ permalink raw reply	[flat|nested] 20+ messages in thread

* [gentoo-dev] Re: [PATCH 2/4] toolchain-funcs.eclass: Assume CPP="$(tc-getCC) -E" when unset, #582822
  2016-06-22 20:06 ` [gentoo-dev] [PATCH 2/4] toolchain-funcs.eclass: Assume CPP="$(tc-getCC) -E" when unset, #582822 Michał Górny
@ 2016-06-24  1:33   ` Mike Frysinger
  0 siblings, 0 replies; 20+ messages in thread
From: Mike Frysinger @ 2016-06-24  1:33 UTC (permalink / raw
  To: Michał Górny; +Cc: gentoo-dev, toolchain

[-- Attachment #1: Type: text/plain, Size: 9 bytes --]

OK
-mike

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]

^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: [gentoo-dev] Re: [PATCH 4/4] toolchain-funcs.eclass: Add helpful tc-is-{gcc,clang} wrappers
  2016-06-24  1:32   ` [gentoo-dev] " Mike Frysinger
@ 2016-06-24  5:40     ` Michał Górny
  2016-06-24  7:48       ` Mike Frysinger
  0 siblings, 1 reply; 20+ messages in thread
From: Michał Górny @ 2016-06-24  5:40 UTC (permalink / raw
  To: Mike Frysinger; +Cc: gentoo-dev, toolchain

[-- Attachment #1: Type: text/plain, Size: 589 bytes --]

On Thu, 23 Jun 2016 21:32:34 -0400
Mike Frysinger <vapier@gentoo.org> 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 and is just confusing
> 
> shouldn't this be a @RETURN instead of @DESCRIPTION ?  same for clang below.

I've followed suit with other functions in the eclass. They use @RETURN
for stuff that is echoed, and @DESCRIPTION for exit codes.

-- 
Best regards,
Michał Górny
<http://dev.gentoo.org/~mgorny/>

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 949 bytes --]

^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: [gentoo-dev] Re: [PATCH 4/4] toolchain-funcs.eclass: Add helpful tc-is-{gcc,clang} wrappers
  2016-06-24  5:40     ` Michał Górny
@ 2016-06-24  7:48       ` Mike Frysinger
  0 siblings, 0 replies; 20+ messages in thread
From: Mike Frysinger @ 2016-06-24  7:48 UTC (permalink / raw
  To: Michał Górny; +Cc: gentoo-dev, toolchain

[-- Attachment #1: Type: text/plain, Size: 626 bytes --]

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 and is just confusing
> > 
> > shouldn't this be a @RETURN instead of @DESCRIPTION ?  same for clang below.
> 
> I've followed suit with other functions in the eclass. They use @RETURN
> for stuff that is echoed, and @DESCRIPTION for exit codes.

right ... bash doesn't allow you to @RETURN a string
-mike

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]

^ permalink raw reply	[flat|nested] 20+ messages in thread

* [gentoo-dev] [PATCH v4] tc-get-compiler-type() + wrappers
  2016-06-22 20:06 [gentoo-dev] [PATCH 0/4] toolchain-funcs.eclass: fix for version checks (v2) + compiler identification Michał Górny
                   ` (4 preceding siblings ...)
  2016-06-23  9:18 ` [gentoo-dev] [PATCH 0/2] v3: tc-get-compiler-type() & wrappers Michał Górny
@ 2016-06-24 20:07 ` Michał Górny
  2016-06-24 20:07   ` [gentoo-dev] [PATCH 1/4] toolchain-funcs.eclass: Fix _tc-getPROG with multi-parameter defaults Michał Górny
                     ` (3 more replies)
  5 siblings, 4 replies; 20+ messages in thread
From: Michał Górny @ 2016-06-24 20:07 UTC (permalink / raw
  To: gentoo-dev; +Cc: toolchain

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.



^ permalink raw reply	[flat|nested] 20+ messages in thread

* [gentoo-dev] [PATCH 1/4] toolchain-funcs.eclass: Fix _tc-getPROG with multi-parameter defaults
  2016-06-24 20:07 ` [gentoo-dev] [PATCH v4] tc-get-compiler-type() + wrappers Michał Górny
@ 2016-06-24 20:07   ` Michał Górny
  2016-06-24 20:07   ` [gentoo-dev] [PATCH 2/4] toolchain-funcs.eclass: Assume CPP="$(tc-getCC) -E" when unset, #582822 Michał Górny
                     ` (2 subsequent siblings)
  3 siblings, 0 replies; 20+ messages in thread
From: Michał Górny @ 2016-06-24 20:07 UTC (permalink / raw
  To: gentoo-dev; +Cc: toolchain, Michał Górny

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.eclass b/eclass/toolchain-funcs.eclass
index e794559..8ecc736 100644
--- a/eclass/toolchain-funcs.eclass
+++ b/eclass/toolchain-funcs.eclass
@@ -22,7 +22,7 @@ inherit multilib
 _tc-getPROG() {
 	local tuple=$1
 	local v var vars=$2
-	local prog=$3
+	local prog=( $3 )
 
 	var=${vars%% *}
 	for v in ${vars} ; do
@@ -34,11 +34,11 @@ _tc-getPROG() {
 	done
 
 	local search=
-	[[ -n $4 ]] && search=$(type -p "$4-${prog}")
-	[[ -z ${search} && -n ${!tuple} ]] && search=$(type -p "${!tuple}-${prog}")
-	[[ -n ${search} ]] && prog=${search##*/}
+	[[ -n $4 ]] && search=$(type -p $4-${prog[0]})
+	[[ -z ${search} && -n ${!tuple} ]] && search=$(type -p ${!tuple}-${prog[0]})
+	[[ -n ${search} ]] && prog[0]=${search##*/}
 
-	export ${var}=${prog}
+	export ${var}="${prog[*]}"
 	echo "${!var}"
 }
 tc-getBUILD_PROG() { _tc-getPROG CBUILD "BUILD_$1 $1_FOR_BUILD HOST$1" "${@:2}"; }
-- 
2.9.0



^ permalink raw reply related	[flat|nested] 20+ messages in thread

* [gentoo-dev] [PATCH 2/4] toolchain-funcs.eclass: Assume CPP="$(tc-getCC) -E" when unset, #582822
  2016-06-24 20:07 ` [gentoo-dev] [PATCH v4] tc-get-compiler-type() + wrappers Michał Górny
  2016-06-24 20:07   ` [gentoo-dev] [PATCH 1/4] toolchain-funcs.eclass: Fix _tc-getPROG with multi-parameter defaults Michał Górny
@ 2016-06-24 20:07   ` Michał Górny
  2016-06-24 20:07   ` [gentoo-dev] [PATCH 3/4] toolchain-funcs.eclass: Add tc-get-compiler-type() Michał Górny
  2016-06-24 20:07   ` [gentoo-dev] [PATCH 4/4] toolchain-funcs.eclass: Add helpful tc-is-{gcc,clang} wrappers Michał Górny
  3 siblings, 0 replies; 20+ messages in thread
From: Michał Górny @ 2016-06-24 20:07 UTC (permalink / raw
  To: gentoo-dev; +Cc: toolchain, Michał Górny

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
---
 eclass/toolchain-funcs.eclass | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/eclass/toolchain-funcs.eclass b/eclass/toolchain-funcs.eclass
index 8ecc736..1baab96 100644
--- a/eclass/toolchain-funcs.eclass
+++ b/eclass/toolchain-funcs.eclass
@@ -59,7 +59,7 @@ tc-getCC() { tc-getPROG CC gcc "$@"; }
 # @FUNCTION: tc-getCPP
 # @USAGE: [toolchain prefix]
 # @RETURN: name of the C preprocessor
-tc-getCPP() { tc-getPROG CPP cpp "$@"; }
+tc-getCPP() { tc-getPROG CPP "${CC:-gcc} -E" "$@"; }
 # @FUNCTION: tc-getCXX
 # @USAGE: [toolchain prefix]
 # @RETURN: name of the C++ compiler
@@ -132,7 +132,7 @@ tc-getBUILD_CC() { tc-getBUILD_PROG CC gcc "$@"; }
 # @FUNCTION: tc-getBUILD_CPP
 # @USAGE: [toolchain prefix]
 # @RETURN: name of the C preprocessor for building binaries to run on the build machine
-tc-getBUILD_CPP() { tc-getBUILD_PROG CPP cpp "$@"; }
+tc-getBUILD_CPP() { tc-getBUILD_PROG CPP "$(tc-getBUILD_CC) -E" "$@"; }
 # @FUNCTION: tc-getBUILD_CXX
 # @USAGE: [toolchain prefix]
 # @RETURN: name of the C++ compiler for building binaries to run on the build machine
-- 
2.9.0



^ permalink raw reply related	[flat|nested] 20+ messages in thread

* [gentoo-dev] [PATCH 3/4] toolchain-funcs.eclass: Add tc-get-compiler-type()
  2016-06-24 20:07 ` [gentoo-dev] [PATCH v4] tc-get-compiler-type() + wrappers Michał Górny
  2016-06-24 20:07   ` [gentoo-dev] [PATCH 1/4] toolchain-funcs.eclass: Fix _tc-getPROG with multi-parameter defaults Michał Górny
  2016-06-24 20:07   ` [gentoo-dev] [PATCH 2/4] toolchain-funcs.eclass: Assume CPP="$(tc-getCC) -E" when unset, #582822 Michał Górny
@ 2016-06-24 20:07   ` Michał Górny
  2016-06-24 20:07   ` [gentoo-dev] [PATCH 4/4] toolchain-funcs.eclass: Add helpful tc-is-{gcc,clang} wrappers Michał Górny
  3 siblings, 0 replies; 20+ messages in thread
From: Michał Górny @ 2016-06-24 20:07 UTC (permalink / raw
  To: gentoo-dev; +Cc: toolchain, Michał Górny

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.
---
 eclass/tests/toolchain-funcs.sh | 40 ++++++++++++++++++++++++++++++++++++++++
 eclass/toolchain-funcs.eclass   | 22 ++++++++++++++++++++++
 2 files changed, 62 insertions(+)

diff --git a/eclass/tests/toolchain-funcs.sh b/eclass/tests/toolchain-funcs.sh
index 41c1ae5..6f37996 100755
--- a/eclass/tests/toolchain-funcs.sh
+++ b/eclass/tests/toolchain-funcs.sh
@@ -111,5 +111,45 @@ tc-ld-disable-gold
 )
 tend $?
 
+unset CPP
+
+tbegin "tc-get-compiler-type (gcc)"
+(
+export CC=gcc
+[[ $(tc-get-compiler-type) == gcc ]]
+)
+tend $?
+
+if type -P clang &>/dev/null; then
+	tbegin "tc-get-compiler-type (clang)"
+	(
+	export CC=clang
+	[[ $(tc-get-compiler-type) == clang ]]
+	)
+	tend $?
+fi
+
+if type -P pathcc &>/dev/null; then
+	tbegin "tc-get-compiler-type (pathcc)"
+	(
+	export CC=pathcc
+	[[ $(tc-get-compiler-type) == pathcc ]]
+	)
+	tend $?
+
+	tbegin "! tc-is-gcc (pathcc)"
+	(
+	export CC=pathcc
+	! tc-is-gcc
+	)
+	tend $?
+
+	tbegin "! tc-is-clang (pathcc)"
+	(
+	export CC=pathcc
+	! tc-is-clang
+	)
+	tend $?
+fi
 
 texit
diff --git a/eclass/toolchain-funcs.eclass b/eclass/toolchain-funcs.eclass
index 1baab96..a29784c 100644
--- a/eclass/toolchain-funcs.eclass
+++ b/eclass/toolchain-funcs.eclass
@@ -585,6 +585,28 @@ tc-endian() {
 	esac
 }
 
+# @FUNCTION: tc-get-compiler-type
+# @RETURN: keyword identifying the compiler: gcc, clang, pathcc, unknown
+tc-get-compiler-type() {
+	local code='
+#if defined(__PATHSCALE__)
+	HAVE_PATHCC
+#elif defined(__clang__)
+	HAVE_CLANG
+#elif defined(__GNUC__)
+	HAVE_GCC
+#endif
+'
+	local res=$($(tc-getCPP "$@") -E -P - <<<"${code}")
+
+	case ${res} in
+		*HAVE_PATHCC*)	echo pathcc;;
+		*HAVE_CLANG*)	echo clang;;
+		*HAVE_GCC*)		echo gcc;;
+		*)				echo unknown;;
+	esac
+}
+
 # Internal func.  The first argument is the version info to expand.
 # Query the preprocessor to improve compatibility across different
 # compilers rather than maintaining a --version flag matrix. #335943
-- 
2.9.0



^ permalink raw reply related	[flat|nested] 20+ messages in thread

* [gentoo-dev] [PATCH 4/4] toolchain-funcs.eclass: Add helpful tc-is-{gcc,clang} wrappers
  2016-06-24 20:07 ` [gentoo-dev] [PATCH v4] tc-get-compiler-type() + wrappers Michał Górny
                     ` (2 preceding siblings ...)
  2016-06-24 20:07   ` [gentoo-dev] [PATCH 3/4] toolchain-funcs.eclass: Add tc-get-compiler-type() Michał Górny
@ 2016-06-24 20:07   ` Michał Górny
  3 siblings, 0 replies; 20+ messages in thread
From: Michał Górny @ 2016-06-24 20:07 UTC (permalink / raw
  To: gentoo-dev; +Cc: toolchain, Michał Górny

---
 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-funcs.sh
+++ b/eclass/tests/toolchain-funcs.sh
@@ -120,6 +120,20 @@ export CC=gcc
 )
 tend $?
 
+tbegin "tc-is-gcc (gcc)"
+(
+export CC=gcc
+tc-is-gcc
+)
+tend $?
+
+tbegin "! tc-is-clang (gcc)"
+(
+export CC=gcc
+! tc-is-clang
+)
+tend $?
+
 if type -P clang &>/dev/null; then
 	tbegin "tc-get-compiler-type (clang)"
 	(
@@ -127,6 +141,20 @@ if type -P clang &>/dev/null; then
 	[[ $(tc-get-compiler-type) == clang ]]
 	)
 	tend $?
+
+	tbegin "! tc-is-gcc (clang)"
+	(
+	export CC=clang
+	! tc-is-gcc
+	)
+	tend $?
+
+	tbegin "tc-is-clang (clang)"
+	(
+	export CC=clang
+	tc-is-clang
+	)
+	tend $?
 fi
 
 if type -P pathcc &>/dev/null; then
diff --git a/eclass/toolchain-funcs.eclass b/eclass/toolchain-funcs.eclass
index a29784c..d3abfb5 100644
--- a/eclass/toolchain-funcs.eclass
+++ b/eclass/toolchain-funcs.eclass
@@ -607,6 +607,18 @@ tc-get-compiler-type() {
 	esac
 }
 
+# @FUNCTION: tc-is-gcc
+# @RETURN: Shell true if the current compiler is GCC, false otherwise.
+tc-is-gcc() {
+	[[ $(tc-get-compiler-type) == gcc ]]
+}
+
+# @FUNCTION: tc-is-clang
+# @RETURN: Shell true if the current compiler is clang, false otherwise.
+tc-is-clang() {
+	[[ $(tc-get-compiler-type) == clang ]]
+}
+
 # Internal func.  The first argument is the version info to expand.
 # Query the preprocessor to improve compatibility across different
 # compilers rather than maintaining a --version flag matrix. #335943
-- 
2.9.0



^ permalink raw reply related	[flat|nested] 20+ messages in thread

end of thread, other threads:[~2016-06-24 20:09 UTC | newest]

Thread overview: 20+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-06-22 20:06 [gentoo-dev] [PATCH 0/4] toolchain-funcs.eclass: fix for version checks (v2) + compiler identification Michał Górny
2016-06-22 20:06 ` [gentoo-dev] [PATCH 1/4] toolchain-funcs.eclass: Fix _tc-getPROG with multi-parameter defaults Michał Górny
2016-06-24  1:33   ` [gentoo-dev] " Mike Frysinger
2016-06-22 20:06 ` [gentoo-dev] [PATCH 2/4] toolchain-funcs.eclass: Assume CPP="$(tc-getCC) -E" when unset, #582822 Michał Górny
2016-06-24  1:33   ` [gentoo-dev] " Mike Frysinger
2016-06-22 20:06 ` [gentoo-dev] [PATCH 3/4] toolchain-funcs.eclass: Add tc-get-compiler-type() Michał Górny
2016-06-23  6:52   ` Fabian Groffen
2016-06-23  9:01     ` Michał Górny
2016-06-22 20:06 ` [gentoo-dev] [PATCH 4/4] toolchain-funcs.eclass: Add helpful tc-is-{gcc,clang} wrappers Michał Górny
2016-06-24  1:32   ` [gentoo-dev] " Mike Frysinger
2016-06-24  5:40     ` Michał Górny
2016-06-24  7:48       ` Mike Frysinger
2016-06-23  9:18 ` [gentoo-dev] [PATCH 0/2] v3: tc-get-compiler-type() & wrappers Michał Górny
2016-06-23  9:18   ` [gentoo-dev] [PATCH 1/2] toolchain-funcs.eclass: Add tc-get-compiler-type() Michał Górny
2016-06-23  9:18   ` [gentoo-dev] [PATCH 2/2] toolchain-funcs.eclass: Add helpful tc-is-{gcc,clang} wrappers Michał Górny
2016-06-24 20:07 ` [gentoo-dev] [PATCH v4] tc-get-compiler-type() + wrappers Michał Górny
2016-06-24 20:07   ` [gentoo-dev] [PATCH 1/4] toolchain-funcs.eclass: Fix _tc-getPROG with multi-parameter defaults Michał Górny
2016-06-24 20:07   ` [gentoo-dev] [PATCH 2/4] toolchain-funcs.eclass: Assume CPP="$(tc-getCC) -E" when unset, #582822 Michał Górny
2016-06-24 20:07   ` [gentoo-dev] [PATCH 3/4] toolchain-funcs.eclass: Add tc-get-compiler-type() Michał Górny
2016-06-24 20:07   ` [gentoo-dev] [PATCH 4/4] toolchain-funcs.eclass: Add helpful tc-is-{gcc,clang} wrappers Michał Górny

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox