[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: PPC64: gcc currently compiles for power4 by default, causing glibc's sqrtf to fail on e6500



Hi,

mator on #debian-ports compiled gcc-7 for me with the attached patch. With the resulting gcc, I compiled glibc and got a library I can use sqrtf without running into an illegal instruction exception.

Would it be possible to get this applied by default? The resulting binaries work on e6500, and ought to work on all supported CPUs for the ppc64 port.

Bas Vermeulen


On Tue, Feb 6, 2018 at 7:35 PM, John Paul Adrian Glaubitz <glaubitz@physik.fu-berlin.de> wrote:
On 02/06/2018 07:29 PM, Bas Vermeulen wrote:
> I get that. But configure in the gcc sources doesn't actually process those. So while they are in rules2, it doesn't actually change anything.
>
> See https://github.com/gcc-mirror/gcc/blob/da8dff89fa9398f04b107e388cb706517ced9505/configure and search for with-cpu (which would catch both --with-cpu-32 and
> --with-cpu-64), and you won't find it there.

I really don't think that Matthias Klose had put those there without testing.

"--with-cpu-*" is a common configure switch supported by gcc across all
architectures. We use it on sparc64 as well, for example to set the
default CPU to UltraSPARC for 32-bit sparc.

Also, you're looking at the wrong file. It's in gcc/gcc/config.gcc:

> https://github.com/gcc-mirror/gcc/blob/master/gcc/config.gcc

Adrian

--
 .''`.  John Paul Adrian Glaubitz
: :' :  Debian Developer - glaubitz@debian.org
`. `'   Freie Universitaet Berlin - glaubitz@physik.fu-berlin.de
  `-    GPG: 62FF 8A75 84E0 2956 9546  0006 7426 3B37 F5B5 F913

--- debian/rules2.orig	2018-02-08 13:05:05.493117248 +0100
+++ debian/rules2	2018-02-08 13:04:17.870348206 +0100
@@ -388,6 +388,8 @@
     endif
     ifeq ($(derivative),Ubuntu)
       CONFARGS += --with-cpu-32=power7 --with-cpu-64=power7
+    else
+      CONFARGS += --with-cpu-32=powerpc --with-cpu-64=powerpc64
     endif
 endif
 

Reply to: