* Patch adding POWER9 cross compile support
@ 2019-02-27 18:29 Tobias Platen
2019-02-27 21:24 ` Jonathan Brielmaier
2019-03-06 13:54 ` Ludovic Courtès
0 siblings, 2 replies; 11+ messages in thread
From: Tobias Platen @ 2019-02-27 18:29 UTC (permalink / raw)
To: Guix-devel
[-- Attachment #1: Type: text/plain, Size: 239 bytes --]
I succesfully crosscompiled GNU Hello and all its dependencies including
glibc for POWER9. Without my patch glibc will fail to build. I am using
the core-updates branch, since the default branch uses an outdated
version of GCC.
Tobias
[-- Attachment #2: cross-base.diff --]
[-- Type: text/x-patch, Size: 691 bytes --]
diff --git a/gnu/packages/cross-base.scm b/gnu/packages/cross-base.scm
index 8fe9d5b..f642bad 100644
--- a/gnu/packages/cross-base.scm
+++ b/gnu/packages/cross-base.scm
@@ -138,6 +138,8 @@ base compiler and using LIBC (which may be either a libc package or #f.)"
"--disable-decimal-float" ;would need libc
"--disable-libcilkrts"
+ "--with-long-double-128" ; required for power9 bootstrap
+
;; When target is any OS other than 'none' these
;; libraries will fail if there is no libc
;; present. See
^ permalink raw reply related [flat|nested] 11+ messages in thread
* Re: Patch adding POWER9 cross compile support
2019-02-27 18:29 Patch adding POWER9 cross compile support Tobias Platen
@ 2019-02-27 21:24 ` Jonathan Brielmaier
2019-03-01 6:04 ` Tobias Platen
2019-03-06 13:54 ` Ludovic Courtès
1 sibling, 1 reply; 11+ messages in thread
From: Jonathan Brielmaier @ 2019-02-27 21:24 UTC (permalink / raw)
To: guix-devel
On 2/27/19 7:29 PM, Tobias Platen wrote:
> I succesfully crosscompiled GNU Hello and all its dependencies including
> glibc for POWER9. Without my patch glibc will fail to build. I am using
> the core-updates branch, since the default branch uses an outdated
> version of GCC.
>
> Tobias
Nice! And it's just a simple one-liner :P
I get following result for hello:
/gnu/store/x0372n45l5ckiddra4g2xjl693y2wld3-hello-2.10
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: Patch adding POWER9 cross compile support
2019-02-27 21:24 ` Jonathan Brielmaier
@ 2019-03-01 6:04 ` Tobias Platen
0 siblings, 0 replies; 11+ messages in thread
From: Tobias Platen @ 2019-03-01 6:04 UTC (permalink / raw)
To: guix-devel
In the next step I will try to build the bootstrap binaries.
On 02/27/2019 10:24 PM, Jonathan Brielmaier wrote:
> On 2/27/19 7:29 PM, Tobias Platen wrote:
>> I succesfully crosscompiled GNU Hello and all its dependencies including
>> glibc for POWER9. Without my patch glibc will fail to build. I am using
>> the core-updates branch, since the default branch uses an outdated
>> version of GCC.
>>
>> Tobias
>
> Nice! And it's just a simple one-liner :P
>
> I get following result for hello:
> /gnu/store/x0372n45l5ckiddra4g2xjl693y2wld3-hello-2.10
>
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: Patch adding POWER9 cross compile support
2019-02-27 18:29 Patch adding POWER9 cross compile support Tobias Platen
2019-02-27 21:24 ` Jonathan Brielmaier
@ 2019-03-06 13:54 ` Ludovic Courtès
2019-03-06 17:56 ` Tobias Platen
1 sibling, 1 reply; 11+ messages in thread
From: Ludovic Courtès @ 2019-03-06 13:54 UTC (permalink / raw)
To: Tobias Platen; +Cc: Guix-devel
[-- Attachment #1: Type: text/plain, Size: 703 bytes --]
Hello Tobias,
Tobias Platen <trisquel@platen-software.de> skribis:
> I succesfully crosscompiled GNU Hello and all its dependencies
> including glibc for POWER9. Without my patch glibc will fail to
> build. I am using the core-updates branch, since the default branch
> uses an outdated version of GCC.
Awesome! What triplet did you use, is it “powerpc9-linux-gnu”?
I’d like to change the patch so that it doesn’t affect other targets.
Would the updated patch below work for you?
Could also you succinctly explain why this flag is needed? I’d rather
have a comment in the code so the next person that fiddles with it knows
why it’s there.
Thank you!
Ludo’.
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: Type: text/x-patch, Size: 868 bytes --]
diff --git a/gnu/packages/cross-base.scm b/gnu/packages/cross-base.scm
index bb3d6d916a..c70739b3ab 100644
--- a/gnu/packages/cross-base.scm
+++ b/gnu/packages/cross-base.scm
@@ -141,6 +141,11 @@ base compiler and using LIBC (which may be either a libc package or #f.)"
"--disable-decimal-float" ;would need libc
"--disable-libcilkrts"
+ ,@(if (string-prefix? "powerpc9-" target)
+ ;; On POWER9 we need this because XXX.
+ '("--with-long-double-128")
+ '())
+
;; When target is any OS other than 'none' these
;; libraries will fail if there is no libc
;; present. See
^ permalink raw reply related [flat|nested] 11+ messages in thread
* Re: Patch adding POWER9 cross compile support
2019-03-06 13:54 ` Ludovic Courtès
@ 2019-03-06 17:56 ` Tobias Platen
2019-03-10 17:27 ` Ludovic Courtès
0 siblings, 1 reply; 11+ messages in thread
From: Tobias Platen @ 2019-03-06 17:56 UTC (permalink / raw)
To: Ludovic Courtès; +Cc: Guix-devel
On 03/06/2019 02:54 PM, Ludovic Courtès wrote:
> + ,@(if (string-prefix? "powerpc9-" target)
> + ;; On POWER9 we need this because XXX.
> + '("--with-long-double-128")
> + '())
> +
It needs to be ppc64el I think. I will later do a test in a big endian
vm. POWER9 is a bi-endian architecture, and most distros only support
little-endian. POWER4 only supports big-endian, and is still supported
by some distros. After testing I will send an updated patch.
Tobias
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: Patch adding POWER9 cross compile support
2019-03-06 17:56 ` Tobias Platen
@ 2019-03-10 17:27 ` Ludovic Courtès
2019-03-10 20:20 ` Tobias Platen
0 siblings, 1 reply; 11+ messages in thread
From: Ludovic Courtès @ 2019-03-10 17:27 UTC (permalink / raw)
To: Tobias Platen; +Cc: Guix-devel
Hi Tobias,
Tobias Platen <trisquel@platen-software.de> skribis:
> On 03/06/2019 02:54 PM, Ludovic Courtès wrote:
>> + ,@(if (string-prefix? "powerpc9-" target)
>> + ;; On POWER9 we need this because XXX.
>> + '("--with-long-double-128")
>> + '())
>> +
> It needs to be ppc64el I think. I will later do a test in a big endian
> vm. POWER9 is a bi-endian architecture, and most distros only support
> little-endian. POWER4 only supports big-endian, and is still supported
> by some distros. After testing I will send an updated patch.
I don’t think that answers my questions. :-)
Those were:
1. What GNU triplet do you use?
2. What the reason for this extra configure flag, so we can add it in
the comment above in place of XXX?
TIA!
Ludo’.
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: Patch adding POWER9 cross compile support
2019-03-10 17:27 ` Ludovic Courtès
@ 2019-03-10 20:20 ` Tobias Platen
2019-03-11 7:52 ` Efraim Flashner
0 siblings, 1 reply; 11+ messages in thread
From: Tobias Platen @ 2019-03-10 20:20 UTC (permalink / raw)
To: Ludovic Courtès; +Cc: Guix-devel
[-- Attachment #1: Type: text/plain, Size: 1646 bytes --]
I ran configure on my Talos II, and got the following error message.
checking for the Guix system type... powerpc64le-linux
configure: error: `powerpc64le-linux' is not a supported platform.
See "GNU Distribution" in the manual, or try `--with-courage'.
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.
For the second question I could not find an answer.
[1] http://lists.busybox.net/pipermail/buildroot/2017-September/201379.html
Tobias
On 03/10/2019 06:27 PM, Ludovic Courtès wrote:
> Hi Tobias,
>
> Tobias Platen <trisquel@platen-software.de> skribis:
>
>> On 03/06/2019 02:54 PM, Ludovic Courtès wrote:
>>> + ,@(if (string-prefix? "powerpc9-" target)
>>> + ;; On POWER9 we need this because XXX.
>>> + '("--with-long-double-128")
>>> + '())
>>> +
>> It needs to be ppc64el I think. I will later do a test in a big endian
>> vm. POWER9 is a bi-endian architecture, and most distros only support
>> little-endian. POWER4 only supports big-endian, and is still supported
>> by some distros. After testing I will send an updated patch.
>
> I don’t think that answers my questions. :-)
>
> Those were:
>
> 1. What GNU triplet do you use?
>
> 2. What the reason for this extra configure flag, so we can add it in
> the comment above in place of XXX?
>
> TIA!
>
> Ludo’.
>
[-- Attachment #2: guix.diff --]
[-- Type: text/x-patch, Size: 885 bytes --]
diff --git a/gnu/packages/cross-base.scm b/gnu/packages/cross-base.scm
index 6a09272..0992259 100644
--- a/gnu/packages/cross-base.scm
+++ b/gnu/packages/cross-base.scm
@@ -138,6 +138,10 @@ base compiler and using LIBC (which may be either a libc package or #f.)"
"--disable-libquadmath"
"--disable-decimal-float" ;would need libc
"--disable-libcilkrts"
+ ,@(if (string-prefix? "powerpc64le-" target)
+ ;; On POWER9 (little endian) glibc needs the 128 bit long double type.
+ '("--with-long-double-128")
+ '())
;; When target is any OS other than 'none' these
;; libraries will fail if there is no libc
^ permalink raw reply related [flat|nested] 11+ messages in thread
* Re: Patch adding POWER9 cross compile support
2019-03-10 20:20 ` Tobias Platen
@ 2019-03-11 7:52 ` Efraim Flashner
2019-03-12 14:10 ` Ludovic Courtès
2019-03-12 14:10 ` Ludovic Courtès
0 siblings, 2 replies; 11+ messages in thread
From: Efraim Flashner @ 2019-03-11 7:52 UTC (permalink / raw)
To: Tobias Platen; +Cc: Guix-devel
[-- Attachment #1: Type: text/plain, Size: 3268 bytes --]
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
> configure: error: `powerpc64le-linux' is not a supported platform.
> See "GNU Distribution" in the manual, or try `--with-courage'.
>
> 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.
>
> For the second question I could not find an answer.
>
> [1] http://lists.busybox.net/pipermail/buildroot/2017-September/201379.html
>
> Tobias
>
> On 03/10/2019 06:27 PM, Ludovic Courtès wrote:
> > Hi Tobias,
> >
> > Tobias Platen <trisquel@platen-software.de> skribis:
> >
> > > On 03/06/2019 02:54 PM, Ludovic Courtès wrote:
> > > > + ,@(if (string-prefix? "powerpc9-" target)
> > > > + ;; On POWER9 we need this because XXX.
> > > > + '("--with-long-double-128")
> > > > + '())
> > > > +
> > > It needs to be ppc64el I think. I will later do a test in a big endian
> > > vm. POWER9 is a bi-endian architecture, and most distros only support
> > > little-endian. POWER4 only supports big-endian, and is still supported
> > > by some distros. After testing I will send an updated patch.
> >
> > I don’t think that answers my questions. :-)
> >
> > Those were:
> >
> > 1. What GNU triplet do you use?
>
> >
> > 2. What the reason for this extra configure flag, so we can add it in
> > the comment above in place of XXX?
> >
> > TIA!
> >
> > Ludo’.
> >
> diff --git a/gnu/packages/cross-base.scm b/gnu/packages/cross-base.scm
> index 6a09272..0992259 100644
> --- a/gnu/packages/cross-base.scm
> +++ b/gnu/packages/cross-base.scm
> @@ -138,6 +138,10 @@ base compiler and using LIBC (which may be either a libc package or #f.)"
> "--disable-libquadmath"
> "--disable-decimal-float" ;would need libc
> "--disable-libcilkrts"
> + ,@(if (string-prefix? "powerpc64le-" target)
> + ;; On POWER9 (little endian) glibc needs the 128 bit long double type.
> + '("--with-long-double-128")
> + '())
>
> ;; When target is any OS other than 'none' these
> ;; libraries will fail if there is no libc
In the off chance we ever wish to support powerpc64 big endian, I
suggest instead using (string-prefix? "powerpc64*-" target)
As far as '--with-long-double-128', I think it's worth finding out which
architectures accept it and allowing it for all of those, rather than
making it powerpc64le only.
--
Efraim Flashner <efraim@flashner.co.il> אפרים פלשנר
GPG key = A28B F40C 3E55 1372 662D 14F7 41AA E7DC CA3D 8351
Confidentiality cannot be guaranteed on emails sent or received unencrypted
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: Patch adding POWER9 cross compile support
2019-03-11 7:52 ` Efraim Flashner
@ 2019-03-12 14:10 ` Ludovic Courtès
2019-03-12 14:10 ` Ludovic Courtès
1 sibling, 0 replies; 11+ messages in thread
From: Ludovic Courtès @ 2019-03-12 14:10 UTC (permalink / raw)
To: Efraim Flashner; +Cc: Guix-devel
Hi!
Efraim Flashner <efraim@flashner.co.il> 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.
>>
>> checking for the Guix system type... powerpc64le-linux
Sure but that’s the next step. My question was about the triplet you
passed to ‘--target’ when cross-compiling from your Intel(?) machine,
but I think I can derive the answer now:
guix build --target=powerpc64le-linux-gnu …
>> 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.
>>
>> For the second question I could not find an answer.
>>
>> [1] http://lists.busybox.net/pipermail/buildroot/2017-September/201379.html
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=powerpc64le-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 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 >= 6.2) is required on powerpc64le.
--8<---------------cut here---------------end--------------->8---
See ‘config.log’ excerpt below. Do you happen to have an additional
change needed?
Thanks,
Ludo’.
--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 floating point type
configure:31: powerpc64le-linux-gnu-gcc -c -g -O2 -Werror -mfloat128 conftest.c >&5
powerpc64le-linux-gnu-gcc: error: unrecognized command line option '-mfloat128'
configure:31: $? = 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 "<http://www.gnu.org/software/libc/bugs.html>"
| #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. */
|
| __float128 a, b, c, d, e;
| int i;
|
| __float128
| foobar (__float128 x)
| {
| a = __builtin_nansq ("0");
| b = __builtin_huge_valq ();
| c = __builtin_infq ();
| d = __builtin_fabsq (x);
| e = __builtin_nanq ("0");
| i = __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: $? = 0
configure:68: result: yes
configure:75: error: *** binary128 floating point type (GCC >= 6.2) is required on powerpc64le.
--8<---------------cut here---------------end--------------->8---
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: Patch adding POWER9 cross compile support
2019-03-11 7:52 ` Efraim Flashner
2019-03-12 14:10 ` Ludovic Courtès
@ 2019-03-12 14:10 ` Ludovic Courtès
2019-03-13 7:28 ` Tobias Platen
1 sibling, 1 reply; 11+ messages in thread
From: Ludovic Courtès @ 2019-03-12 14:10 UTC (permalink / raw)
To: Efraim Flashner; +Cc: Guix-devel
Hi!
Efraim Flashner <efraim@flashner.co.il> 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.
>>
>> checking for the Guix system type... powerpc64le-linux
Sure but that’s the next step. My question was about the triplet you
passed to ‘--target’ when cross-compiling from your Intel(?) machine,
but I think I can derive the answer now:
guix build --target=powerpc64le-linux-gnu …
>> 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.
>>
>> For the second question I could not find an answer.
>>
>> [1] http://lists.busybox.net/pipermail/buildroot/2017-September/201379.html
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=powerpc64le-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 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 >= 6.2) is required on powerpc64le.
--8<---------------cut here---------------end--------------->8---
See ‘config.log’ excerpt below. Do you happen to have an additional
change needed?
Thanks,
Ludo’.
--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 floating point type
configure:31: powerpc64le-linux-gnu-gcc -c -g -O2 -Werror -mfloat128 conftest.c >&5
powerpc64le-linux-gnu-gcc: error: unrecognized command line option '-mfloat128'
configure:31: $? = 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 "<http://www.gnu.org/software/libc/bugs.html>"
| #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. */
|
| __float128 a, b, c, d, e;
| int i;
|
| __float128
| foobar (__float128 x)
| {
| a = __builtin_nansq ("0");
| b = __builtin_huge_valq ();
| c = __builtin_infq ();
| d = __builtin_fabsq (x);
| e = __builtin_nanq ("0");
| i = __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: $? = 0
configure:68: result: yes
configure:75: error: *** binary128 floating point type (GCC >= 6.2) is required on powerpc64le.
--8<---------------cut here---------------end--------------->8---
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: Patch adding POWER9 cross compile support
2019-03-12 14:10 ` Ludovic Courtès
@ 2019-03-13 7:28 ` Tobias Platen
0 siblings, 0 replies; 11+ messages in thread
From: Tobias Platen @ 2019-03-13 7:28 UTC (permalink / raw)
To: Ludovic Courtès, Efraim Flashner; +Cc: Guix-devel
I had to work on the core-updates branch, or in the past on the wip-gcc7
branch. I mentioned this some month ago. The current branch has an
outdated gcc version.
On 03/12/2019 03:10 PM, Ludovic Courtès wrote:
> Hi!
>
> Efraim Flashner <efraim@flashner.co.il> 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.
>>>
>>> checking for the Guix system type... powerpc64le-linux
>
> Sure but that’s the next step. My question was about the triplet you
> passed to ‘--target’ when cross-compiling from your Intel(?) machine,
> but I think I can derive the answer now:
>
> guix build --target=powerpc64le-linux-gnu …
>
>>> 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.
>>>
>>> For the second question I could not find an answer.
>>>
>>> [1] http://lists.busybox.net/pipermail/buildroot/2017-September/201379.html
>
> 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=powerpc64le-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 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 >= 6.2) is required on powerpc64le.
> --8<---------------cut here---------------end--------------->8---
>
> See ‘config.log’ excerpt below. Do you happen to have an additional
> change needed?
>
> Thanks,
> Ludo’.
>
> --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 floating point type
> configure:31: powerpc64le-linux-gnu-gcc -c -g -O2 -Werror -mfloat128 conftest.c >&5
> powerpc64le-linux-gnu-gcc: error: unrecognized command line option '-mfloat128'
> configure:31: $? = 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 "<http://www.gnu.org/software/libc/bugs.html>"
> | #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. */
> |
> | __float128 a, b, c, d, e;
> | int i;
> |
> | __float128
> | foobar (__float128 x)
> | {
> | a = __builtin_nansq ("0");
> | b = __builtin_huge_valq ();
> | c = __builtin_infq ();
> | d = __builtin_fabsq (x);
> | e = __builtin_nanq ("0");
> | i = __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: $? = 0
> configure:68: result: yes
> configure:75: error: *** binary128 floating point type (GCC >= 6.2) is required on powerpc64le.
> --8<---------------cut here---------------end--------------->8---
>
^ permalink raw reply [flat|nested] 11+ messages in thread
end of thread, other threads:[~2019-03-13 7:37 UTC | newest]
Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-02-27 18:29 Patch adding POWER9 cross compile support Tobias Platen
2019-02-27 21:24 ` Jonathan Brielmaier
2019-03-01 6:04 ` Tobias Platen
2019-03-06 13:54 ` Ludovic Courtès
2019-03-06 17:56 ` Tobias Platen
2019-03-10 17:27 ` Ludovic Courtès
2019-03-10 20:20 ` Tobias Platen
2019-03-11 7:52 ` Efraim Flashner
2019-03-12 14:10 ` Ludovic Courtès
2019-03-12 14:10 ` Ludovic Courtès
2019-03-13 7:28 ` Tobias Platen
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/guix.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.