GNU bug report logs -
#37870
[PATCH] gnu: make-nsis: Fix cross-compilation.
Previous Next
Reported by: Carl Dong <contact <at> carldong.me>
Date: Tue, 22 Oct 2019 16:15:01 UTC
Severity: normal
Tags: patch
Done: Ludovic Courtès <ludo <at> gnu.org>
Bug is archived. No further changes may be made.
Full log
Message #8 received at 37870 <at> debbugs.gnu.org (full text, mbox):
Updated the patch to make it look a little better :-)
Will push to master tomorrow if no objections.
-----
* gnu/packages/installers.scm (make-nsis)[arguments]: Enforce correct
ordering of search paths (mingw-w64 last).
---
gnu/packages/installers.scm | 15 ++++++++++++++-
1 file changed, 14 insertions(+), 1 deletion(-)
diff --git a/gnu/packages/installers.scm b/gnu/packages/installers.scm
index c987254d61..035d38ac5a 100644
--- a/gnu/packages/installers.scm
+++ b/gnu/packages/installers.scm
@@ -48,6 +48,7 @@
(arguments
`(#:scons ,scons-python2
#:modules ((srfi srfi-1)
+ (srfi srfi-26)
(guix build utils)
(guix build scons-build-system))
#:tests? #f
@@ -92,7 +93,19 @@
;; CROSS_-prefixed version of env vars
(setenv (string-append "CROSS_" env-name)
(filter-delimited-string env-val mingw-path?))))
- '("CPLUS_INCLUDE_PATH" "LIBRARY_PATH" "C_INCLUDE_PATH"))))
+ '("CPATH" "LIBRARY_PATH"))
+ ;; Hack to place mingw-w64 path at the end of search
+ ;; paths. Could probably use a specfile and dirafter
+ (setenv "CROSS_CPLUS_INCLUDE_PATH"
+ (string-join
+ `(,@(map (cut string-append (assoc-ref %build-inputs "xgcc") <>)
+ `("/include/c++"
+ ,(string-append "/include/c++/" ,triplet)
+ "/include/c++/backward"
+ "/lib/gcc/x86_64-w64-mingw32/7.4.0/include"
+ "/lib/gcc/x86_64-w64-mingw32/7.4.0/include-fixed"))
+ ,(getenv "CROSS_CPATH"))
+ ":"))))
(add-before 'build 'fix-target-detection
(lambda _
;; NSIS target detection is screwed up, manually
--
2.23.0
This bug report was last modified 5 years and 243 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.