unofficial mirror of guix-devel@gnu.org 
 help / color / mirror / code / Atom feed
* Re: problem with building gcc-cross-4.8.3 for i686-pc-gnu
@ 2015-01-31 10:27 Marek Benc
  2015-01-31 22:13 ` Marek Benc
  0 siblings, 1 reply; 8+ messages in thread
From: Marek Benc @ 2015-01-31 10:27 UTC (permalink / raw)
  To: manolis837; +Cc: guix-devel

[-- 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")))

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

end of thread, other threads:[~2015-02-07 23:25 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-01-31 10:27 problem with building gcc-cross-4.8.3 for i686-pc-gnu Marek Benc
2015-01-31 22:13 ` 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

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).