build-32.sh
authorJan Nieuwenhuizen <janneke@gnu.org>
Mon, 16 Apr 2018 18:25:31 +0000 (20:25 +0200)
committerJan Nieuwenhuizen <janneke@gnu.org>
Mon, 16 Apr 2018 18:25:31 +0000 (20:25 +0200)
build-32.sh [new file with mode: 0755]
guile/guix/make.scm
guix.scm

diff --git a/build-32.sh b/build-32.sh
new file mode 100755 (executable)
index 0000000..085f365
--- /dev/null
@@ -0,0 +1,6 @@
+rm -r .store src/mes.gcc src/mes.o lib/*.o
+rm -f crt*
+cp $GUIX_ENVIRONMENT/lib/crt* .
+CC=i686-unknown-linux-gnu-gcc ./make.scm src/mes.gcc
+/gnu/store/3kjpz1shbp7hqf5y1garxarz9d027qh6-profile/bin/patchelf --set-interpreter /gnu/store/vcix667q0565nsd9gxk42nj2pmph5i6v-glibc-cross-i686-unknown-linux-gnu-2.26.105-g0890d5379c/lib/ld-linux.so.2 src/mes.gcc
+mv src/mes.gcc src/mes.gcc-32
index 724da3b6e8e1650b066bd2cc38393b393920de67..9253d45949bb767b09034b6255ad2809970d332f 100644 (file)
     "-I" "src"
     "-I" "lib"
     "-I" "include"
+    "-v"
+    "-I" "/gnu/store/dhjqp2qd3h3d2n4ann2n2p3b06jc26q6-profile/include" ;; i686-unknown-linux-gnu-glibc for debugging
+    "-L" "/gnu/store/dhjqp2qd3h3d2n4ann2n2p3b06jc26q6-profile/lib"
+    "-Wl,-L/gnu/store/dhjqp2qd3h3d2n4ann2n2p3b06jc26q6-profile/lib"
     "--include=lib/libc-gcc.c"))
 
 (define %C32-FLAGS
index eeb768979cdf0b94bc32f54b9aed4408a341e6de..584a24cebdedd214cd6b900bfeecfebf663d6a48 100644 (file)
--- a/guix.scm
+++ b/guix.scm
@@ -48,6 +48,7 @@
              (gnu packages base)
              (gnu packages commencement)
              (gnu packages cross-base)
+             (gnu packages elf)
              (gnu packages gcc)
              (gnu packages guile)
              (gnu packages mes)
@@ -189,6 +190,8 @@ hex2 linker.")
                ;; Use cross-compiler rather than #:system "i686-linux" to get
                ;; MesCC 64 bit .go files installed ready for use with Guile.
                `(("i686-linux-binutils" ,(cross-binutils triplet))
+                 ("patchelf" ,patchelf)
+                 ("i686-linux-libc" ,(cross-libc triplet)) ;; FIXME: for debugging only
                  ("i686-linux-gcc" ,(cross-gcc triplet)))
                '())
          ("perl" ,perl)))               ;build-aux/gitlog-to-changelog