On Sat, Mar 4, 2017 at 4:44 PM, Emil Velikov <emil.l.veli...@gmail.com> wrote: > On 3 March 2017 at 23:37, Timothy Arceri <tarc...@itsqueeze.com> wrote: >> >> I'm tempted to just push this: >> https://patchwork.freedesktop.org/patch/141891/ >> >> And worry about issues later if that's not good enough. >> > Can we use anything like the following and polish later ? We already > use __ILP32__ in mesa so we can assume the compiler is sane. > This has the benefit of a) no build system glue, b) no special casing > for arches - 64bit ppc/sparc/others anyone ? > > const char * > get_arch_bitness_string(void) > { > if (sizeof(void *) == 4) > #ifdef __ILP32__ > return "ilp-32"; > #else > return "32"; > #endif > if (sizeof(void *) == 8) > return "64" > > # paranoia check which will be dropped by the optimiser > assert(!"unknown_arch"); > return "unknown_arch"; > }
Yeah it's exactly what I was trying to suggest, so naturally I vote for this solution. Gražvydas _______________________________________________ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev