all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* PowerPC & GNU/Hurd cross-compilation
@ 2017-01-21 21:24 Ludovic Courtès
  2017-01-21 21:54 ` Ludovic Courtès
                   ` (2 more replies)
  0 siblings, 3 replies; 7+ messages in thread
From: Ludovic Courtès @ 2017-01-21 21:24 UTC (permalink / raw)
  To: Carlos Sánchez de La Lama, Manolis Ragkousis; +Cc: guix-devel

[-- Attachment #1: Type: text/plain, Size: 4096 bytes --]

Hello Guix!

A picture (?) is worth a thousand words:

--8<---------------cut here---------------start------------->8---
$ file $(./pre-inst-env guix build -q --target=i586-pc-gnu guile )/bin/guile
The following files will be downloaded:
   /gnu/store/8jxpzizhb780cqqn9qk27hfgyv9v224x-guile-2.0.13-debug
   /gnu/store/zl3m30z9rvj15jnfgn43wd6qikahf9l1-guile-2.0.13
   /gnu/store/0p00kg842bpjfj7vvix73iqvz977wnng-readline-7.0
   /gnu/store/1l8jnzmpzivmph26md6wvrbkdi0xlbd9-libgc-7.6.0
   /gnu/store/4icii2kkn8zwgi6qz6varyflp1ms11i7-gcc-cross-i586-pc-gnu-5.4.0
   /gnu/store/5nwkzw2ipzbdmyx0c8jg3zv74p233yg8-glibc-cross-i586-pc-gnu-2.23
   /gnu/store/7j4ni6bliwr5y4f8x6caqcfpw6cayi9x-libunistring-0.9.7
   /gnu/store/9g4lx00ifmgwp47l6n4h0sx72fk1r7jf-libltdl-2.4.6
   /gnu/store/9jfv1vgnag4nc7pfhzyc2j97q9l567x2-gmp-6.1.2
   /gnu/store/v3zi67s9yyfb1cym28chczk5zf9gmczn-libffi-3.2.1
   /gnu/store/xxmdzy6v625fqdafcgp4lxvdipnjqd45-gcc-cross-sans-libc-i586-pc-gnu-5.4.0
   /gnu/store/flwn3xam69q593iinvb9sjl9lzyad2k1-libatomic-ops-7.4.4
   /gnu/store/kh3f6x5d0r3xmqzl79y99drdsn1lsmaz-ncurses-6.0
   /gnu/store/ln735a8nzl427izyb4lfgwr4rfd929wr-pkg-config-i586-pc-gnu-0.29
   /gnu/store/mpz7j090145v0zij8h28v9zvqr2kafw5-bash-4.4.5
/gnu/store/8jxpzizhb780cqqn9qk27hfgyv9v224x-guile-2.0.13-debug:     directory
/gnu/store/zl3m30z9rvj15jnfgn43wd6qikahf9l1-guile-2.0.13/bin/guile: ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV), dynamically linked, interpreter /lib/ld.so, for GNU/Hurd 0.0.0, not stripped
$ file $(./pre-inst-env guix build -q --target=powerpc-linux-gnu guile )/bin/guile
The following files will be downloaded:
   /gnu/store/4cmc36jhjj2qq7z5pd0n9fw48dfq1cr7-guile-2.0.13-debug
   /gnu/store/h153jzzqiz10xc3yh4r2w7lkrm5pbx88-guile-2.0.13
   /gnu/store/253hrca11y3cjh2f83dcjaxiv9a2j5m3-gmp-6.1.2
   /gnu/store/29iq9axvllgdrf6y6zfqz111icmy3pdj-libgc-7.6.0
   /gnu/store/911r5chr83yi6xivavndgb6mcvn71qv1-libunistring-0.9.7
   /gnu/store/hkhffl6c6iap2igbbcap2vqbcgh7xkjv-gcc-cross-sans-libc-powerpc-linux-gnu-5.4.0
   /gnu/store/k2j02w9q58h6i07y1fixvcdq8jply68i-gcc-cross-powerpc-linux-gnu-5.4.0
   /gnu/store/naqawviclvwzixvcjc17c3sss7zj9k1w-readline-7.0
   /gnu/store/qivxbbn03scn5wn932ky8mm5xap5zn93-glibc-cross-powerpc-linux-gnu-2.24
   /gnu/store/rqb8p9f13mfha1xkkjwf7wfjvzv34xlk-libltdl-2.4.6
   /gnu/store/z1qain73n3475p6sdb2ignwyalckvgnx-libffi-3.2.1
   /gnu/store/4dazcdvnbgvhdvi5aj17ci07mz1xwzvq-bash-4.4.5
   /gnu/store/6fzzsp453p3n5axcnl0rddjf1yw9309m-ncurses-6.0
   /gnu/store/r7dbj8y4nf024phn8sd2v4206y71mk8q-pkg-config-powerpc-linux-gnu-0.29
   /gnu/store/rbhdn0wkbgb69w17f1fhridw81msam8v-libatomic-ops-7.4.4
/gnu/store/4cmc36jhjj2qq7z5pd0n9fw48dfq1cr7-guile-2.0.13-debug:     directory
/gnu/store/h153jzzqiz10xc3yh4r2w7lkrm5pbx88-guile-2.0.13/bin/guile: ELF 32-bit MSB executable, PowerPC or cisco 4500, version 1 (SYSV), dynamically linked, interpreter /gnu/store/qivxbbn03scn5wn932ky8mm5xap5zn93-glibc-cross-powerpc-linux-gnu-2.24/lib/ld.so.1, for GNU/Linux 3.2.0, not stripped
$ git describe
v0.12.0-458-g168c40004
--8<---------------cut here---------------end--------------->8---

Coreutils 8.26 fails upon ‘make install’ when cross-compiling, but I
think Manolis has already investigated that so we should be able to fix
it soon:

  https://hydra.gnu.org/build/1817891/nixlog/1/raw

There’s also a small problem with sed:

  https://hydra.gnu.org/build/1817854/nixlog/1/raw

Besides, on GNU/Hurd, the loader file name is incorrect:

--8<---------------cut here---------------start------------->8---
$ readelf -a /gnu/store/zl3m30z9rvj15jnfgn43wd6qikahf9l1-guile-2.0.13/bin/guile |grep -A1 INTERP
  INTERP         0x000134 0x08048134 0x08048134 0x0000b 0x0000b R   0x1
      [Requesting program interpreter: /lib/ld.so]
--8<---------------cut here---------------end--------------->8---

(Should be /gnu/store/…-glibc-2.24/lib/ld.so.)

Looking at gcc/config/i386/gnu.h, I think the problem is fixed with the
patch below, I’ll give it a try and commit if it works.

Enjoy!

Ludo’.


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: Type: text/x-patch, Size: 902 bytes --]

--- a/gnu/packages/gcc.scm
+++ b/gnu/packages/gcc.scm
@@ -213,9 +213,10 @@ where the OS part is overloaded to denote a specific ABI---into GCC
                 ;; Fix the dynamic linker's file name.
                 (substitute* (find-files "gcc/config"
                                          "^(linux|gnu|sysv4)(64|-elf|-eabi)?\\.h$")
-                  (("#define GLIBC_DYNAMIC_LINKER([^ ]*).*$" _ suffix)
-                   (format #f "#define GLIBC_DYNAMIC_LINKER~a \"~a\"~%"
-                           suffix
+                  (("#define (GLIBC|GNU_USER)_DYNAMIC_LINKER([^ ]*).*$"
+                    _ gnu-user suffix)
+                   (format #f "#define ~a_DYNAMIC_LINKER~a \"~a\"~%"
+                           gnu-user suffix
                            (string-append libc ,(glibc-dynamic-linker)))))
 
                 ;; Tell where to find libstdc++, libc, and `?crt*.o', except

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2017-01-30 14:43 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-01-21 21:24 PowerPC & GNU/Hurd cross-compilation Ludovic Courtès
2017-01-21 21:54 ` Ludovic Courtès
2017-01-30 11:33   ` Carlos Sánchez de La Lama
2017-01-30 14:43     ` Ludovic Courtès
2017-01-21 22:30 ` Leo Famulari
2017-01-22 19:47   ` Kei Kebreau
2017-01-22 12:15 ` Ludovic Courtès

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.