From: Hartmut Goebel <h.goebel@crazy-compilers.com>
To: 38122@debbugs.gnu.org
Cc: Carl Dong <contact@carldong.me>
Subject: [bug#38122] [PATCH 004/197] gnu: make-nsis: Fix cross-compilation.
Date: Fri, 8 Nov 2019 11:33:32 +0100 [thread overview]
Message-ID: <20191108103434.8390-5-h.goebel@crazy-compilers.com> (raw)
In-Reply-To: <20191108103434.8390-1-h.goebel@crazy-compilers.com>
From: Carl Dong <contact@carldong.me>
* gnu/packages/installers.scm (make-nsis)[arguments]: Enforce correct
ordering of search paths (mingw-w64 last).
---
gnu/packages/installers.scm | 27 ++++++++++++++++++++++-----
1 file changed, 22 insertions(+), 5 deletions(-)
diff --git a/gnu/packages/installers.scm b/gnu/packages/installers.scm
index c987254d61..9229359fdf 100644
--- a/gnu/packages/installers.scm
+++ b/gnu/packages/installers.scm
@@ -28,7 +28,10 @@
#:use-module (guix utils))
(define (make-nsis machine target-arch nsis-target-type)
- (let ((triplet (string-append machine "-" "w64-mingw32")))
+ (let* ((triplet (string-append machine "-" "w64-mingw32"))
+ (xbinutils (cross-binutils triplet))
+ (xlibc (cross-libc triplet))
+ (xgcc (cross-gcc triplet #:libc xlibc)))
(package
(name (string-append "nsis-" machine))
(version "3.04")
@@ -41,13 +44,14 @@
"1xgllk2mk36ll2509hd31mfq6blgncmdzmwxj3ymrwshdh23d5b0"))
(patches (search-patches "nsis-env-passthru.patch"))))
(build-system scons-build-system)
- (native-inputs `(("xgcc" ,(cross-gcc triplet #:libc (cross-libc triplet)))
- ("xbinutils" ,(cross-binutils triplet))
- ("mingw-w64" ,(cross-libc triplet))))
+ (native-inputs `(("xgcc" ,xgcc)
+ ("xbinutils" ,xbinutils)
+ ("mingw-w64" ,xlibc)))
(inputs `(("zlib" ,zlib)))
(arguments
`(#:scons ,scons-python2
#:modules ((srfi srfi-1)
+ (srfi srfi-26)
(guix build utils)
(guix build scons-build-system))
#:tests? #f
@@ -92,7 +96,20 @@
;; 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"
+ ,@(map (cut string-append "/lib/gcc/" ,triplet "/" ,(package-version xgcc) <>)
+ '("/include"
+ "/include-fixed"))))
+ ,(getenv "CROSS_CPATH"))
+ ":"))))
(add-before 'build 'fix-target-detection
(lambda _
;; NSIS target detection is screwed up, manually
--
2.21.0
next prev parent reply other threads:[~2019-11-08 10:35 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-11-08 10:33 [bug#38122] [PATCH 0/1] qtwebkit: Uses sqlite-with-column-metadata Hartmut Goebel
2019-11-08 10:33 ` [bug#38122] [PATCH 001/197] gnu: Add emacs-eshell-prompt-extras Hartmut Goebel
2019-11-08 10:33 ` [bug#38122] [PATCH 1/1] gnu: qtwebkit: Uses sqlite-with-column-metadata Hartmut Goebel
2019-11-08 10:33 ` [bug#38122] [PATCH 002/197] gnu: Add emacs-eshell-did-you-mean Hartmut Goebel
2019-11-08 10:33 ` [bug#38122] [PATCH 003/197] gnu: Fix attribution Hartmut Goebel
2019-11-08 10:33 ` Hartmut Goebel [this message]
2019-11-08 10:33 ` [bug#38122] [PATCH 005/197] gnu: Add dxvk Hartmut Goebel
2019-11-08 10:33 ` [bug#38122] [PATCH 006/197] gnu: Fix make-gcc-libc Hartmut Goebel
2019-11-08 10:33 ` [bug#38122] [PATCH 007/197] gnu: Add gitg Hartmut Goebel
2019-11-08 10:33 ` [bug#38122] [PATCH 008/197] gnu: Add python-keyutils Hartmut Goebel
2019-11-08 10:33 ` [bug#38122] [PATCH 009/197] gnu: Add udiskie Hartmut Goebel
2019-11-08 10:33 ` [bug#38122] [PATCH 010/197] services: ntp: Ensure no double quotes are output to config file Hartmut Goebel
2019-11-08 10:33 ` [bug#38122] [PATCH 011/197] gnu: pingus: Update source URI Hartmut Goebel
2019-11-08 10:33 ` [bug#38122] [PATCH 012/197] gnu: pingus: Adjust for GCC 7 Hartmut Goebel
2019-11-08 10:33 ` [bug#38122] [PATCH 013/197] gnu: Remove python2-feather-format Hartmut Goebel
2019-11-08 10:33 ` [bug#38122] [PATCH 014/197] gnu: u-boot: Remove redundant GCC input Hartmut Goebel
2019-11-08 10:33 ` [bug#38122] [PATCH 015/197] gnu: pocl: Update to 1.4 Hartmut Goebel
2019-11-08 10:33 ` [bug#38122] [PATCH 016/197] gnu: icecat: Update to 68.2.0-guix0-preview3 Hartmut Goebel
2019-11-08 10:33 ` [bug#38122] [PATCH 017/197] gnu: Chibi-Scheme: Update to 0.8 Hartmut Goebel
2019-11-08 10:33 ` [bug#38122] [PATCH 018/197] gnu: Chibi-Scheme: Do not use unstable tarball Hartmut Goebel
2019-11-08 10:33 ` [bug#38122] [PATCH 019/197] gnu: bitcoin-abc: Update to 0.20.4 Hartmut Goebel
2019-11-08 10:33 ` [bug#38122] [PATCH 020/197] services: ntp: Fix a crash when using legacy configuration Hartmut Goebel
2019-11-08 10:33 ` [bug#38122] [PATCH 021/197] gnu: musescore: Update to 3.3 Hartmut Goebel
2019-11-08 10:36 ` bug#38122: Faulty patchset Hartmut Goebel
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=20191108103434.8390-5-h.goebel@crazy-compilers.com \
--to=h.goebel@crazy-compilers.com \
--cc=38122@debbugs.gnu.org \
--cc=contact@carldong.me \
/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.