aboutsummaryrefslogtreecommitdiff
path: root/gnu/packages/cross-base.scm
diff options
context:
space:
mode:
authorMarius Bakke <mbakke@fastmail.com>2019-06-06 19:33:05 +0200
committerMarius Bakke <mbakke@fastmail.com>2019-06-16 09:34:39 +0200
commit871dbd6c6e2414353045cf5f5d0045fff945f862 (patch)
tree537d322984c0ed2c75f11b74cc09ef951f1e3677 /gnu/packages/cross-base.scm
parent3f151d90a3ceb9445305ba84588ea56b802e5ce5 (diff)
downloadguix-871dbd6c6e2414353045cf5f5d0045fff945f862.tar
guix-871dbd6c6e2414353045cf5f5d0045fff945f862.tar.gz
gnu: cross-base: Fix C++ cross-compilation problems with GCC 7.
* gnu/packages/cross-base.scm (cross-gcc-arguments)[#:configure-flags]: Add "--with-sysroot=/".
Diffstat (limited to 'gnu/packages/cross-base.scm')
-rw-r--r--gnu/packages/cross-base.scm10
1 files changed, 9 insertions, 1 deletions
diff --git a/gnu/packages/cross-base.scm b/gnu/packages/cross-base.scm
index 3d36dc6198..3fc9ba6540 100644
--- a/gnu/packages/cross-base.scm
+++ b/gnu/packages/cross-base.scm
@@ -121,7 +121,15 @@ base compiler and using LIBC (which may be either a libc package or #f.)"
,@(if libc
`( ;; Disable libcilkrts because it is not
;; ported to GNU/Hurd.
- "--disable-libcilkrts")
+ "--disable-libcilkrts"
+ ;; When building a cross compiler, --with-sysroot is
+ ;; implicitly set to "$gcc_tooldir/sys-root". This does
+ ;; not work for us, because --with-native-system-header-dir
+ ;; is searched for relative to this location. Thus, we set
+ ;; it to "/" so GCC is able to find the target libc headers.
+ ;; This is safe because in practice GCC uses CROSS_CPATH
+ ;; & co to separate target and host libraries.
+ "--with-sysroot=/")
`( ;; Disable features not needed at this stage.
"--disable-shared" "--enable-static"
"--enable-languages=c,c++"