From mboxrd@z Thu Jan 1 00:00:00 1970 From: =?utf-8?Q?Ludovic_Court=C3=A8s?= Subject: Re: Patch adding POWER9 cross compile support Date: Tue, 12 Mar 2019 15:10:49 +0100 Message-ID: <87pnqwchee.fsf@gnu.org> References: <8736o0hzvs.fsf@gnu.org> <35fe8a38-74ec-9295-2a85-bb2d5e2003a7@platen-software.de> <878sxm3aik.fsf@gnu.org> <3727eb95-933f-0fd5-a98c-98c2ed73b133@platen-software.de> <20190311075204.GC19750@macbook41> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([209.51.188.92]:37902) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1h3iED-0002Zl-Qf for guix-devel@gnu.org; Tue, 12 Mar 2019 10:18:04 -0400 In-Reply-To: <20190311075204.GC19750@macbook41> (Efraim Flashner's message of "Mon, 11 Mar 2019 09:52:04 +0200") List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org Sender: "Guix-devel" To: Efraim Flashner Cc: Guix-devel Hi! Efraim Flashner skribis: > On Sun, Mar 10, 2019 at 09:20:04PM +0100, Tobias Platen wrote: >> I ran configure on my Talos II, and got the following error message. >>=20 >> checking for the Guix system type... powerpc64le-linux Sure but that=E2=80=99s the next step. My question was about the triplet y= ou passed to =E2=80=98--target=E2=80=99 when cross-compiling from your Intel(?= ) machine, but I think I can derive the answer now: guix build --target=3Dpowerpc64le-linux-gnu =E2=80=A6 >> Guix already knows about this architecture, but building glibc will fail= if >> gcc does not have the float128 datatype. Once I saw this link[1] on the = guix >> mailing list, I knew how to solve the build error. >>=20 >> For the second question I could not find an answer. >>=20 >> [1] http://lists.busybox.net/pipermail/buildroot/2017-September/201379.h= tml Alright. Thanks for the info. > In the off chance we ever wish to support powerpc64 big endian, I > suggest instead using (string-prefix? "powerpc64*-" target) Yes. Unfortunately, with just this extra --with-long-double-128, this: guix build sed --target=3Dpowerpc64le-linux-gnu eventually leads to a glibc build failure: --8<---------------cut here---------------start------------->8--- running configure fragment for sysdeps/unix/sysv/linux/powerpc checking whether powerpc64le-linux-gnu-gcc -g -O2 -mlong-double-128 uses IB= M extended format... yes running configure fragment for sysdeps/unix/sysv/linux checking installed Linux kernel header files... 3.2.0 or later configure: WARNING: minimum kernel version reset to 3.10.0 checking for kernel header at least 3.10.0... ok running configure fragment for sysdeps/gnu running configure fragment for sysdeps/powerpc/powerpc64/le checking if powerpc64le-linux-gnu-gcc supports binary128 floating point typ= e... no checking if the target machine is at least POWER8... yes configure: error: *** binary128 floating point type (GCC >=3D 6.2) is requ= ired on powerpc64le. --8<---------------cut here---------------end--------------->8--- See =E2=80=98config.log=E2=80=99 excerpt below. Do you happen to have an a= dditional change needed? Thanks, Ludo=E2=80=99. --8<---------------cut here---------------start------------->8--- configure:6698: result: running configure fragment for sysdeps/powerpc/powe= rpc64/le configure:5: checking if powerpc64le-linux-gnu-gcc supports binary128 float= ing point type configure:31: powerpc64le-linux-gnu-gcc -c -g -O2 -Werror -mfloat128 conft= est.c >&5 powerpc64le-linux-gnu-gcc: error: unrecognized command line option '-mfloat= 128' configure:31: $? =3D 1 configure: failed program was: | /* confdefs.h */ | #define PACKAGE_NAME "GNU C Library" | #define PACKAGE_TARNAME "glibc" | #define PACKAGE_VERSION "(see version.h)" | #define PACKAGE_STRING "GNU C Library (see version.h)" | #define PACKAGE_BUGREPORT "https://sourceware.org/bugzilla/" | #define PACKAGE_URL "http://www.gnu.org/software/glibc/" | #define PKGVERSION "(GNU libc) " | #define REPORT_BUGS_TO "" | #define HAVE_TUNABLES 1 | #define HAVE_CC_NO_STACK_PROTECTOR 1 | #define STACK_PROTECTOR_LEVEL 0 | #define USE_MULTIARCH 1 | #define HAVE_ASM_SET_DIRECTIVE 1 | #define HAVE_SDATA_SECTION 1 | #define NO_CTORS_DTORS_SECTIONS 1 | #define HAVE_Z_COMBRELOC 1 | #define HAVE_CC_INHIBIT_LOOP_TO_LIBCALL 1 | #define HAVE_EHDR_START 1 | #define HAVE_BUILTIN_TRAP 1 | #define HAVE_ELFV2_ABI 1 | #define __LINUX_KERNEL_VERSION (3 * 65536 + 10 * 256 + 0) | #define __ABI_TAG_VERSION 2,6,32 | #define HAVE_INLINED_SYSCALLS 1 | /* end confdefs.h. */ |=20 | __float128 a, b, c, d, e; | int i; |=20 | __float128 | foobar (__float128 x) | { | a =3D __builtin_nansq ("0"); | b =3D __builtin_huge_valq (); | c =3D __builtin_infq (); | d =3D __builtin_fabsq (x); | e =3D __builtin_nanq ("0"); | i =3D __builtin_signbit (x); | return __builtin_copysignq (x, x); | } |=20 configure:39: result: no configure:47: checking if the target machine is at least POWER8 configure:61: powerpc64le-linux-gnu-gcc -c -g -O2 conftest.c >&5 configure:61: $? =3D 0 configure:68: result: yes configure:75: error: *** binary128 floating point type (GCC >=3D 6.2) is r= equired on powerpc64le. --8<---------------cut here---------------end--------------->8---