* [Bug 86368] BUILD FAILED: why : forced (dist) upgrade for gcc 3.4.6 over a BIT COUNT, __builtin_ctz
@ 2014-11-17 4:46 bugzilla-daemon
2014-11-17 4:58 ` bugzilla-daemon
` (3 more replies)
0 siblings, 4 replies; 5+ messages in thread
From: bugzilla-daemon @ 2014-11-17 4:46 UTC (permalink / raw)
To: dri-devel
[-- Attachment #1.1: Type: text/plain, Size: 3536 bytes --]
https://bugs.freedesktop.org/show_bug.cgi?id=86368
Bug ID: 86368
Summary: BUILD FAILED: why : forced (dist) upgrade for gcc
3.4.6 over a BIT COUNT, __builtin_ctz
Product: DRI
Version: DRI git
Hardware: All
OS: Linux (All)
Status: NEW
Severity: normal
Priority: medium
Component: DRM/Radeon
Assignee: dri-devel@lists.freedesktop.org
Reporter: johnandsara2@cox.net
__builtin_ctz
see patch below, at end
just counts a few bits at most. possibly it's builtin because some plats have
accel asm in their kernel can use. my mileage is not all accel for i386 are in
linux yet, and the (amd64) ones that are are for tend to be used needlessly and
sparsely in distro installer code - possibly to cause dependancy issues where
they really aren't needed though hardly used.
__builtin_ctz first appears in gcc-3.4.6
https://gcc.gnu.org/onlinedocs/gcc-3.4.6/gcc/Other-Builtins.html#Other-Builtins
$ gcc --version
gcc (GCC) 3.3.5 (Debian 1:3.3.5-13)
# yes, i did build R7.6 w/ i915 on old sarge (target is a few pc's)
the fix below doesn't use any hw accel call, pow or F2XM1 anything elegant, but
it works (and won't ask for fpu if bus busy)
if i upgrade is anyone sending me all new hw ? gee thanks! and really i hear
someone is hacking gcc to be c++ "driven" to force c++ typing in C. wretched.
the more type info you give c++ the more it requires and fails. and most
warnings and some errors are K&R C WRONG today. if default is void or int or
PTR (int) and programmer doesn't say: be quiet the rule already has a default:
a hardware size. C will convert to size, or not if there is no asm that can:
that is the rule in the book it should be assumed it's what programmer INTENDED
EXACTLY: not a new error. any breakage and troubled should be had by those
specifying an option looking for such c++ trouble. don't be adding in forced
c++ brain damage contrived error to what is correct gcc bison parsed c to
varasm.c then output, right? thanks for reading that wish.
finally. i rue everyone compiling against latest libs if earlier ones suffice,
and a policy of never fixing breakage in older libs (which before the 2000's
was not done: they fixed it). it causes dependancy issue havoc to go another
BIG-OH higher. as well often minor lib versions cause breakage: they aren't
supposed to, minors are supposed to be still compatible.
the diff below may apply though used on newer version: but it's pretty obvious
what diff suggests
$ cd libdrm-2.4.20/radeon
$ diff -Naru radeon_cs_gem.c.old radeon_cs_gem.c.new
--- radeon_cs_gem.c.old 2014-11-16 23:44:55.000000000 -0500
+++ radeon_cs_gem.c.new 2014-11-16 22:28:53.000000000 -0500
@@ -76,14 +76,29 @@
/**
* result is undefined if called with ~0
*/
+ /* __builtin_ctz returns number of trailing zeros. */
/*
static uint32_t get_first_zero(const uint32_t n)
{
- /* __builtin_ctz returns number of trailing zeros. */
return 1 << __builtin_ctz(~n);
}
*/
+#include <limits.h>
+static uint32_t get_first_zero(const uint32_t n)
+{
+ unsigned int x,i, s, nn ;
+ nn=(unsigned int) n;
+ x=0;i=0;s=sizeof(n);
+ for(i=1;i<=sizeof(n)*CHAR_BIT;++i)
+ {
+ if( (nn & 1) == 0 ) ++x; else break;
+ nn=nn>>1;
+ }
+ return (uint32_t) x;
+}
+
+
/**
* Returns a free id for cs.
* If there is no free id we return zero
--
You are receiving this mail because:
You are the assignee for the bug.
[-- Attachment #1.2: Type: text/html, Size: 4932 bytes --]
[-- Attachment #2: Type: text/plain, Size: 159 bytes --]
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug 86368] BUILD FAILED: why : forced (dist) upgrade for gcc 3.4.6 over a BIT COUNT, __builtin_ctz
2014-11-17 4:46 [Bug 86368] BUILD FAILED: why : forced (dist) upgrade for gcc 3.4.6 over a BIT COUNT, __builtin_ctz bugzilla-daemon
@ 2014-11-17 4:58 ` bugzilla-daemon
2014-11-17 6:14 ` bugzilla-daemon
` (2 subsequent siblings)
3 siblings, 0 replies; 5+ messages in thread
From: bugzilla-daemon @ 2014-11-17 4:58 UTC (permalink / raw)
To: dri-devel
[-- Attachment #1.1: Type: text/plain, Size: 999 bytes --]
https://bugs.freedesktop.org/show_bug.cgi?id=86368
--- Comment #1 from debguy <johnandsara2@cox.net> ---
(all i meant with comments are: goal is not to continually upgrade gcc, bison,
etc, causing old code to be incompatible and faile: but to compile new
software: which is easily possible with early tools, new ELF or arch aside.
__builtin could be a macro or check to see if accel was avail, rather than
using a tweak in gcc only new gcc has. gcc is not the place to add convenience
functions: it's just not where they go. libc might be. even then for a bit
count that's the wrong avenue to expect C libs to be a "perl, unix in a big
module" of every new new bithack stacked against every kernel support of. i
was pretty user processor support hacks are per arch in kernel, and lib c
sparsely supported them and driver coders commonly checked in the driver code
where useful for such, having both choices on hand)
--
You are receiving this mail because:
You are the assignee for the bug.
[-- Attachment #1.2: Type: text/html, Size: 1845 bytes --]
[-- Attachment #2: Type: text/plain, Size: 159 bytes --]
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug 86368] BUILD FAILED: why : forced (dist) upgrade for gcc 3.4.6 over a BIT COUNT, __builtin_ctz
2014-11-17 4:46 [Bug 86368] BUILD FAILED: why : forced (dist) upgrade for gcc 3.4.6 over a BIT COUNT, __builtin_ctz bugzilla-daemon
2014-11-17 4:58 ` bugzilla-daemon
@ 2014-11-17 6:14 ` bugzilla-daemon
2014-11-17 17:23 ` bugzilla-daemon
2015-01-22 5:21 ` bugzilla-daemon
3 siblings, 0 replies; 5+ messages in thread
From: bugzilla-daemon @ 2014-11-17 6:14 UTC (permalink / raw)
To: dri-devel
[-- Attachment #1.1: Type: text/plain, Size: 401 bytes --]
https://bugs.freedesktop.org/show_bug.cgi?id=86368
--- Comment #2 from Matt Turner <mattst88@gmail.com> ---
Wow. A couple of rants about software engineering best practices from a guy
using a gcc release that's literally more than 10 years old. 3.4.0 (which
supports the builtin) is actually *older* than what you're using.
--
You are receiving this mail because:
You are the assignee for the bug.
[-- Attachment #1.2: Type: text/html, Size: 1240 bytes --]
[-- Attachment #2: Type: text/plain, Size: 159 bytes --]
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug 86368] BUILD FAILED: why : forced (dist) upgrade for gcc 3.4.6 over a BIT COUNT, __builtin_ctz
2014-11-17 4:46 [Bug 86368] BUILD FAILED: why : forced (dist) upgrade for gcc 3.4.6 over a BIT COUNT, __builtin_ctz bugzilla-daemon
2014-11-17 4:58 ` bugzilla-daemon
2014-11-17 6:14 ` bugzilla-daemon
@ 2014-11-17 17:23 ` bugzilla-daemon
2015-01-22 5:21 ` bugzilla-daemon
3 siblings, 0 replies; 5+ messages in thread
From: bugzilla-daemon @ 2014-11-17 17:23 UTC (permalink / raw)
To: dri-devel
[-- Attachment #1.1: Type: text/plain, Size: 791 bytes --]
https://bugs.freedesktop.org/show_bug.cgi?id=86368
--- Comment #3 from Emil Velikov <emil.l.velikov@gmail.com> ---
Dear debguy/johnandsara2
As Matt, pointed out bashing is not most appropriate way to approach any person
or project.
Additionally I'm not sure why you build the radeon code, considering that
(based on your statement) you're not using it.
If you have a patch that adds a fall back in case of missing __builtin_ctz(old
compiler etc.), that follows the surrounding coding style, please submit it to
the dri-devel mailing list via git send-email.
Thanks
P.S. Using autoconf macros might be a nice way to detect the presence of
__builtin**. Take a look at the mesa project if you'd like an example.
--
You are receiving this mail because:
You are the assignee for the bug.
[-- Attachment #1.2: Type: text/html, Size: 1637 bytes --]
[-- Attachment #2: Type: text/plain, Size: 159 bytes --]
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug 86368] BUILD FAILED: why : forced (dist) upgrade for gcc 3.4.6 over a BIT COUNT, __builtin_ctz
2014-11-17 4:46 [Bug 86368] BUILD FAILED: why : forced (dist) upgrade for gcc 3.4.6 over a BIT COUNT, __builtin_ctz bugzilla-daemon
` (2 preceding siblings ...)
2014-11-17 17:23 ` bugzilla-daemon
@ 2015-01-22 5:21 ` bugzilla-daemon
3 siblings, 0 replies; 5+ messages in thread
From: bugzilla-daemon @ 2015-01-22 5:21 UTC (permalink / raw)
To: dri-devel
[-- Attachment #1.1: Type: text/plain, Size: 508 bytes --]
https://bugs.freedesktop.org/show_bug.cgi?id=86368
Matt Turner <mattst88@gmail.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution|--- |WONTFIX
--- Comment #4 from Matt Turner <mattst88@gmail.com> ---
Ball's in the reporter's court.
--
You are receiving this mail because:
You are the assignee for the bug.
[-- Attachment #1.2: Type: text/html, Size: 2087 bytes --]
[-- Attachment #2: Type: text/plain, Size: 159 bytes --]
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2015-01-22 5:21 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-11-17 4:46 [Bug 86368] BUILD FAILED: why : forced (dist) upgrade for gcc 3.4.6 over a BIT COUNT, __builtin_ctz bugzilla-daemon
2014-11-17 4:58 ` bugzilla-daemon
2014-11-17 6:14 ` bugzilla-daemon
2014-11-17 17:23 ` bugzilla-daemon
2015-01-22 5:21 ` bugzilla-daemon
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.