[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH] gnu: cross-libc: Cross build the correct libc for GNU/Hurd syste
From: |
Manolis Ragkousis |
Subject: |
[PATCH] gnu: cross-libc: Cross build the correct libc for GNU/Hurd systems. |
Date: |
Wed, 8 Jun 2016 17:43:25 +0300 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.1.0 |
Hello everyone,
This is a simplified version of the patch from wip-hurd for core-updates.
I want to point some things out.
In this version we only have one cross-libc which inherits from the
correct libc in base.scm through the use of the glibc-macro. This
simplifies things a lot.
- (propagated-inputs `(("kernel-headers" ,xlinux-headers)))
+ (propagated-inputs `(("kernel-headers" ,(cross-kernel-headers
target))))
The correct headers are determined by (cross-kernel-headers target).
(native-inputs `(("cross-gcc" ,xgcc)
("cross-binutils" ,xbinutils)
+ ,@(if (string-match (or "i586-pc-gnu" "i586-gnu")
target)
+ `(("cross-mig" ,xmig))
+ '())
,@(package-inputs glibc) ;FIXME: static-bash
,@(package-native-inputs glibc)))))
cross-mig is added only when target is i586-gnu or i586-pc-gnu.
@@ -343,12 +483,14 @@ XBINUTILS and the cross tool chain."
"CROSS_CPLUS_INCLUDE_PATH"
"CROSS_OBJC_INCLUDE_PATH"
"CROSS_OBJCPLUS_INCLUDE_PATH"))
+ ;; We need this for GNU/Hurd.
+ (setenv "CROSS_LIBRARY_PATH" (string-append kernel "/lib"))
#t))
,phases))))
When target is Hurd, we need to setup CROSS_LIBRARY_PATH for libpthread
to find libihash from hurd-core-headers/lib. The way I did it works for
Hurd and doesn't create any problems when targeting Linux.
- ,@(package-arguments glibc))
+ ;; Package-arguments does not use the correct libc, so we use
+ ;; (cross-libc-for-target ...) to determine the correct one.
+ ,@(package-arguments (cross-libc-for-target target)))
,@(package-arguments glibc)) was not detecting the correct libc so I
used (cross-libc-for-target target) to fix that. Maybe there is a better
solution for this.
WDYT?
Thank you,
Manolis
0001-gnu-cross-libc-Cross-build-the-correct-libc-for-GNU-.patch
Description: Text Data
- [PATCH] gnu: cross-libc: Cross build the correct libc for GNU/Hurd systems.,
Manolis Ragkousis <=