Your message dated Thu, 7 Jul 2016 08:21:15 +0200 with message-id <ca+7wuswxvfwou3yp1vongcruxdjeftcpprdxwcp3pkvg0dc...@mail.gmail.com> and subject line Re: Bug#826987: gcc-6: __builtin_cpu_supports() doesn't work on powerpc has caused the Debian Bug report #826987, regarding gcc-6: __builtin_cpu_supports() doesn't work on powerpc to be marked as done.
This means that you claim that the problem has been dealt with. If this is not the case it is now your responsibility to reopen the Bug report if necessary, and/or fix the problem forthwith. (NB: If you are a system administrator and have no idea what this message is talking about, this may indicate a serious mail system misconfiguration somewhere. Please contact [email protected] immediately.) -- 826987: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=826987 Debian Bug Tracking System Contact [email protected] with problems
--- Begin Message ---Package: gcc-6 Version: 6.1.1-6 Severity: normal Hi! According to the documentation: (gcc-6.info.gz)PowerPC Built-in Functions __builtin_cpu_supports() can be used for detection of a number of CPU features, such as altivec. This is same as that function on x86, other than understandably a different list of features. The documentation lists no caveats or other hoops that one needs to jump through to get the function to work. Thus, per analogy to x86, I expect the following code to work: .--====[ altivec.c ] int main() { __builtin_cpu_init(); // no-op on powerpc anyway return !__builtin_cpu_supports("altivec"); } `---- yet it always returns false. I've tested both in qemu: QEMU_CPU=7457_v1.2 ./altivec;echo $? # should succeed QEMU_CPU=401 ./altivec2;echo $? # should fail and on real hardware (partch.debian.org) whose /proc/cpuinfo says: cpu : POWER7 (architected), altivec supported On the other hand, detection via a "boom instruction" works: .--====[ altivec2.c ] int main() { asm("vsldoi %v1,%v1,%v1,0"); // or SIGILL return 0; } `---- Any other feature supposed to be supported by __builtin_cpu_supports() that I tested also fails, including "mmu" or "ppc32" which should be true on every powerpc machine that can run Linux. -- System Information: Debian Release: stretch/sid APT prefers unstable APT policy: (500, 'unstable') Architecture: powerpc (ppc) Kernel: Linux 4.6.0+ (SMP w/6 CPU cores) Locale: LANG=C.UTF-8, LC_CTYPE=C.UTF-8 (charmap=UTF-8) Shell: /bin/sh linked to /bin/dash Init: sysvinit (via /sbin/init) Versions of packages gcc-6 depends on: ii binutils 2.26-10 ii cpp-6 6.1.1-6 ii gcc-6-base 6.1.1-6 ii libatomic1 6.1.1-6 ii libc6 2.22-11 ii libcc1-0 6.1.1-6 ii libgcc-6-dev 6.1.1-6 ii libgcc1 1:6.1.1-6 ii libgmp10 2:6.1.0+dfsg-2 ii libisl15 0.17.1-1 ii libmpc3 1.0.3-1 ii libmpfr4 3.1.4-2 ii libstdc++6 6.1.1-6 ii zlib1g 1:1.2.8.dfsg-2+b1 Versions of packages gcc-6 recommends: ii libc6-dev 2.22-11 Versions of packages gcc-6 suggests: pn gcc-6-doc <none> pn gcc-6-locales <none> pn gcc-6-multilib <none> pn libasan3-dbg <none> pn libatomic1-dbg <none> pn libcilkrts5-dbg <none> pn libgcc1-dbg <none> pn libgomp1-dbg <none> pn libitm1-dbg <none> pn liblsan0-dbg <none> pn libmpx2-dbg <none> pn libquadmath0-dbg <none> pn libtsan0-dbg <none> pn libubsan0-dbg <none> -- no debconf information
--- End Message ---
--- Begin Message ---reassign 826987 src:glibc 2.22-13 affects src:gcc-6 fixed 826987 2.23-1 thanks On Wed, Jul 6, 2016 at 8:46 AM, Mathieu Malaterre <[email protected]> wrote: > Control: forwarded -1 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71777 > > On Tue, Jul 5, 2016 at 10:09 PM, Adam Borowski <[email protected]> wrote: >> On Tue, Jul 05, 2016 at 08:31:24AM +0200, Mathieu Malaterre wrote: >>> I cannot see the builtin mentionned anywhere other than on the X86 page: >>> >>> X86 (ok): >>> https://gcc.gnu.org/onlinedocs/gcc-6.1.0/gcc/x86-Built-in-Functions.html#index-g_t_005f_005fbuiltin_005fcpu_005finit-4335 >>> >>> PowerPC (nothing found): >>> https://gcc.gnu.org/onlinedocs/gcc-6.1.0/gcc/PowerPC-Built-in-Functions.html#PowerPC-Built-in-Functions >> >> It's in the third dash point: > > how could I missed that... > > [...] > >> Should I try asking upstream? > > done. I've not tested it on ppc64el. Indeed: malat@partch ~ % /lib64/libc-2.23.so GNU C Library (Debian GLIBC 2.23-1) stable release version 2.23, by Roland McGrath et al. Copyright (C) 2016 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. Compiled by GNU CC version 5.4.0 20160609. Available extensions: crypt add-on version 2.1 by Michael Glad and others GNU Libidn by Simon Josefsson Native POSIX Threads Library by Ulrich Drepper et al BIND-8.2.3-T5B libc ABIs: UNIQUE IFUNC For bug reporting instructions, please see: <http://www.debian.org/Bugs/>. So we need both gcc-6 and glibc ≥ 2.23
--- End Message ---

