Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 314921 Details for
Bug 420609
dev-libs/pcc-libs-1.0.0: redefinition of builtin functions causes build failures with Clang
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch to fix build failure
pcc-libs-1.0.0-check-builtin.patch (text/plain), 1.18 KB, created by
Richard Yao (RETIRED)
on 2012-06-11 00:20:22 UTC
(
hide
)
Description:
Patch to fix build failure
Filename:
MIME Type:
Creator:
Richard Yao (RETIRED)
Created:
2012-06-11 00:20:22 UTC
Size:
1.18 KB
patch
obsolete
>diff --git a/libpcc/bitcnt.c b/libpcc/bitcnt.c >index 26ecc01..c3bd54e 100644 >--- a/libpcc/bitcnt.c >+++ b/libpcc/bitcnt.c >@@ -1,9 +1,22 @@ >+// Only use __has_builtin in compilers that support it. >+#ifndef __has_builtin >+ #define __has_builtin(x) 0 >+#endif > >+#if !__has_builtin(__builtin_clz) > int __builtin_clz(unsigned int); >+#endif >+#if !__has_builtin(__builtin_ctz) > int __builtin_ctz(unsigned int); >+#endif >+#if !__has_builtin(__builtin_clzl) > int __builtin_clzl(unsigned long); >+#endif >+#if !__has_builtin(__builtin_ctzl) > int __builtin_ctzl(unsigned long); >+#endif > >+#if !__has_builtin(__builtin_clz) > int > __builtin_clz(unsigned int v) > { >@@ -14,7 +27,9 @@ __builtin_clz(unsigned int v) > break; > return i; > } >+#endif > >+#if !__has_builtin(__builtin_ctz) > int > __builtin_ctz(unsigned int v) > { >@@ -25,7 +40,9 @@ __builtin_ctz(unsigned int v) > break; > return i; > } >+#endif > >+#if !__has_builtin(__builtin_clzl) > int > __builtin_clzl(unsigned long v) > { >@@ -37,7 +54,9 @@ __builtin_clzl(unsigned long v) > break; > return i; > } >+#endif > >+#if !__has_builtin(__builtin_ctzl) > int > __builtin_ctzl(unsigned long v) > { >@@ -48,3 +67,4 @@ __builtin_ctzl(unsigned long v) > break; > return i; > } >+#endif
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 420609
: 314921