Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 489038 Details for
Bug 619490
toolchain-funcs.eclass: clang-*version functions return literal string '__clang_major__.__clang_minor__' instead of actual values if CC is not clang (improve doc and change precondition)
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
fix gcc/clang reporting
0001-toolchain-funcs.eclass-fix-clang-version-reporting-w.patch (text/plain), 1.55 KB, created by
Austin English (RETIRED)
on 2017-08-14 18:42:13 UTC
(
hide
)
Description:
fix gcc/clang reporting
Filename:
MIME Type:
Creator:
Austin English (RETIRED)
Created:
2017-08-14 18:42:13 UTC
Size:
1.55 KB
patch
obsolete
>From 5fdf83a41862c7c1649099b2e23079f247fd0d6c Mon Sep 17 00:00:00 2001 >From: Austin English <wizardedit@gentoo.org> >Date: Mon, 14 Aug 2017 13:32:06 -0500 >Subject: [PATCH] toolchain-funcs.eclass: fix clang version reporting when > clang is not the default compiler > >Signed-off-by: Austin English <wizardedit@gentoo.org> >--- > eclass/toolchain-funcs.eclass | 6 ++++-- > 1 file changed, 4 insertions(+), 2 deletions(-) > >diff --git a/eclass/toolchain-funcs.eclass b/eclass/toolchain-funcs.eclass >index aeb6f7c7029..5c0f19f8cbb 100644 >--- a/eclass/toolchain-funcs.eclass >+++ b/eclass/toolchain-funcs.eclass >@@ -630,9 +630,11 @@ tc-is-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 >+# FIXME: should this always call gcc expliticly, or should it show the gcc version that clang >+# pretends to be if the system compiler is clang > _gcc_fullversion() { > local ver="$1"; shift >- set -- $($(tc-getCPP "$@") -E -P - <<<"__GNUC__ __GNUC_MINOR__ __GNUC_PATCHLEVEL__") >+ set -- $(gcc "$@" -E -P - <<<"__GNUC__ __GNUC_MINOR__ __GNUC_PATCHLEVEL__") > eval echo "$ver" > } > >@@ -665,7 +667,7 @@ gcc-micro-version() { > # Internal func. Based on _gcc_fullversion() above. > _clang_fullversion() { > local ver="$1"; shift >- set -- $($(tc-getCPP "$@") -E -P - <<<"__clang_major__ __clang_minor__ __clang_patchlevel__") >+ set -- $(clang "$@" -E -P - <<<"__clang_major__ __clang_minor__ __clang_patchlevel__") > eval echo "$ver" > } > >-- >2.13.0 >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 619490
: 489038