From mboxrd@z Thu Jan 1 00:00:00 1970 From: Tobias Platen Subject: Re: Patch adding POWER9 cross compile support Date: Wed, 13 Mar 2019 08:28:02 +0100 Message-ID: <413c3784-3144-2b3f-9738-351a6283d8fa@platen-software.de> 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> <87pnqwchee.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([209.51.188.92]:35655) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1h3yRy-0001Z7-Md for guix-devel@gnu.org; Wed, 13 Mar 2019 03:37:19 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1h3yJ4-0000oG-3Q for guix-devel@gnu.org; Wed, 13 Mar 2019 03:28:07 -0400 In-Reply-To: <87pnqwchee.fsf@gnu.org> Content-Language: de-LU 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: =?UTF-8?Q?Ludovic_Court=c3=a8s?= , Efraim Flashner Cc: Guix-devel I had to work on the core-updates branch, or in the past on the wip-gcc7=20 branch. I mentioned this some month ago. The current branch has an=20 outdated gcc version. On 03/12/2019 03:10 PM, Ludovic Court=C3=A8s wrote: > Hi! >=20 > Efraim Flashner skribis: >=20 >> 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. >>> >>> checking for the Guix system type... powerpc64le-linux >=20 > Sure but that=E2=80=99s the next step. My question was about the tripl= et you > passed to =E2=80=98--target=E2=80=99 when cross-compiling from your Int= el(?) machine, > but I think I can derive the answer now: >=20 > guix build --target=3Dpowerpc64le-linux-gnu =E2=80=A6 >=20 >>> Guix already knows about this architecture, but building glibc will f= ail if >>> gcc does not have the float128 datatype. Once I saw this link[1] on t= he guix >>> mailing list, I knew how to solve the build error. >>> >>> For the second question I could not find an answer. >>> >>> [1] http://lists.busybox.net/pipermail/buildroot/2017-September/20137= 9.html >=20 > Alright. >=20 > Thanks for the info. >=20 >> In the off chance we ever wish to support powerpc64 big endian, I >> suggest instead using (string-prefix? "powerpc64*-" target) >=20 > Yes. >=20 > Unfortunately, with just this extra --with-long-double-128, this: >=20 > guix build sed --target=3Dpowerpc64le-linux-gnu >=20 > eventually leads to a glibc build failure: >=20 > --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 use= s IBM 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= type... no > checking if the target machine is at least POWER8... yes > configure: error: *** binary128 floating point type (GCC >=3D 6.2) is = required on powerpc64le. > --8<---------------cut here---------------end--------------->8--- >=20 > See =E2=80=98config.log=E2=80=99 excerpt below. Do you happen to have = an additional > change needed? >=20 > Thanks, > Ludo=E2=80=99. >=20 > --8<---------------cut here---------------start------------->8--- > configure:6698: result: running configure fragment for sysdeps/powerpc/= powerpc64/le > configure:5: checking if powerpc64le-linux-gnu-gcc supports binary128 f= loating point type > configure:31: powerpc64le-linux-gnu-gcc -c -g -O2 -Werror -mfloat128 c= onftest.c >&5 > powerpc64le-linux-gnu-gcc: error: unrecognized command line option '-mf= loat128' > 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 >=20 > | #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. */ > | > | __float128 a, b, c, d, e; > | int i; > | > | __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); > | } > | > 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 required on powerpc64le. > --8<---------------cut here---------------end--------------->8--- >=20