all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* [bug#37870] [PATCH] gnu: make-nsis: Fix cross-compilation.
@ 2019-10-22 16:14 Carl Dong
  2019-10-29 16:02 ` [bug#37870] [PATCH v2] " Carl Dong
  2019-10-29 20:11 ` [bug#37870] [PATCH v3] " Carl Dong
  0 siblings, 2 replies; 9+ messages in thread
From: Carl Dong @ 2019-10-22 16:14 UTC (permalink / raw)
  To: 37870

Hi all, here's the somewhat hacky patch from #37801, I will follow up on #30756
about using `-idirafter` as a potentially cleaner fix for #30756, but this
should make nsis work for now!

* gnu/packages/installers.scm (make-nsis)[arguments]: Enforce correct
ordering of search paths (mingw-w64 last).
---
 gnu/packages/installers.scm | 16 +++++++++++++++-
 1 file changed, 15 insertions(+), 1 deletion(-)

diff --git a/gnu/packages/installers.scm b/gnu/packages/installers.scm
index c987254d61..e5e38af152 100644
--- a/gnu/packages/installers.scm
+++ b/gnu/packages/installers.scm
@@ -92,7 +92,21 @@
                              ;; 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-append
+                                 (string-join
+                                  (map (lambda (x) (string-append (assoc-ref %build-inputs "xgcc") x))
+                                       `("/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

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

end of thread, other threads:[~2019-11-16 16:26 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-10-22 16:14 [bug#37870] [PATCH] gnu: make-nsis: Fix cross-compilation Carl Dong
2019-10-29 16:02 ` [bug#37870] [PATCH v2] " Carl Dong
2019-10-29 19:22   ` Efraim Flashner
2019-11-04 22:11     ` Ludovic Courtès
2019-10-29 20:11 ` [bug#37870] [PATCH v3] " Carl Dong
2019-10-30  7:42   ` Efraim Flashner
2019-11-05 13:58   ` Ludovic Courtès
2019-11-16 16:25   ` bug#37870: " Ludovic Courtès
2019-11-16 16:25   ` [bug#37870] " Ludovic Courtès

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.