all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Marek Benc <merkur32@gmail.com>
To: manolis837@gmail.com
Cc: guix-devel@gnu.org
Subject: Re: problem with building gcc-cross-4.8.3 for i686-pc-gnu
Date: Sat, 31 Jan 2015 11:27:03 +0100	[thread overview]
Message-ID: <54CCADF7.6090708@gmail.com> (raw)

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

Could you try out the patch in this email?

Now, the problem is that GCC is configured with the native ld.so as the 
target system's dynamic linker.

I'm not sure what code is responsible for that, but on the wip-hurd 
branch, this exact same problem happens for other platforms as well.

In particular, it happened when I tried:
$ ./pre-inst-env guix build coreutils --target=i686-pc-linux-gnu -K
on an x86_64 box.

-- 
Marek.

[-- Attachment #2: set-cross-path-fix.patch --]
[-- Type: text/x-patch, Size: 2746 bytes --]

--- guix.old/gnu/packages/cross-base.scm	2015-01-31 11:06:42.025984113 +0100
+++ guix/gnu/packages/cross-base.scm	2015-01-31 10:37:35.290053633 +0100
@@ -151,21 +151,33 @@
                  `(alist-cons-before
                    'configure 'set-cross-path
                    (lambda* (#:key inputs #:allow-other-keys)
-                     ;; Add the cross Linux headers to CROSS_CPATH, and remove
+                     ;; Add the cross kernel headers to CROSS_CPATH, and remove
                      ;; them from CPATH.
                      (let ((libc  (assoc-ref inputs "libc"))
                            (linux (assoc-ref inputs
-                                             "libc/cross-linux-headers")))
+                                             "libc/cross-linux-headers"))
+                           (mach  (assoc-ref inputs
+                                             "libc/cross-gnumach-headers"))
+                           (hurd  (assoc-ref inputs
+                                             "libc/cross-hurd-headers"))
+                           (hurd-minimal (assoc-ref inputs
+                                             "libc/cross-hurd-minimal")))
                        (define (cross? x)
-                         ;; Return #t if X is a cross-libc or cross Linux.
+                         ;; Return #t if X is a cross-libc or a cross-kernel.
                          (or (string-prefix? libc x)
-                             (string-prefix? linux x)))
+                             (if linux        (string-prefix? linux x) #f)
+                             (if hurd         (string-prefix? hurd  x) #f)
+                             (if mach         (string-prefix? mach  x) #f)
+                             (if hurd-minimal (string-prefix? hurd-minimal x) #f)))
 
                        (setenv "CROSS_CPATH"
-                               (string-append libc "/include:"
-                                              linux "/include"))
+                               (string-append libc "/include"
+                                              (if linux (string-append ":" linux "/include") "")
+                                              (if hurd  (string-append ":" hurd "/include"
+                                                                       ":" mach "/include")  "")))
                        (setenv "CROSS_LIBRARY_PATH"
-                               (string-append libc "/lib"))
+                               (string-append libc "/lib"
+                                              (if hurd-minimal (string-append ":" hurd-minimal "/lib") "")))
 
                        (let ((cpath   (search-path-as-string->list
                                        (getenv "CPATH")))

             reply	other threads:[~2015-01-31 10:27 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-01-31 10:27 Marek Benc [this message]
2015-01-31 22:13 ` problem with building gcc-cross-4.8.3 for i686-pc-gnu Marek Benc
2015-02-01 18:56   ` Marek Benc
2015-02-05 12:44     ` Ludovic Courtès
     [not found]       ` <54D3A92A.6060209@gmx.com>
     [not found]         ` <87h9v014wk.fsf@gnu.org>
2015-02-05 20:32           ` Marek Benc
2015-02-07 23:24             ` Ludovic Courtès
2015-02-05 12:38   ` Ludovic Courtès
2015-02-05 16:22     ` [PATCH 0/4] gnu: Fix ld.so detection of cross-compilers for the GNU Hurd system Marek Benc
  -- strict thread matches above, loose matches on Subject: below --
2014-12-30 14:28 problem with building gcc-cross-4.8.3 for i686-pc-gnu Manolis Ragkousis
2015-01-03 21:27 ` Ludovic Courtès

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=54CCADF7.6090708@gmail.com \
    --to=merkur32@gmail.com \
    --cc=guix-devel@gnu.org \
    --cc=manolis837@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.