lmi-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[lmi-commits] [lmi] master 1461f1b1 5/7: Assume cygwin is like other msw


From: Greg Chicares
Subject: [lmi-commits] [lmi] master 1461f1b1 5/7: Assume cygwin is like other msw platforms
Date: Thu, 23 Jun 2022 18:33:54 -0400 (EDT)

branch: master
commit 1461f1b13371cf77272c0ba4d0ecce8df6f784db
Author: Gregory W. Chicares <gchicares@sbcglobal.net>
Commit: Gregory W. Chicares <gchicares@sbcglobal.net>

    Assume cygwin is like other msw platforms
    
    Changed the way redistributable runtime files are determined, making
    it the same for cygwin as for all other msw platforms.
    
    Although cygwin is no longer supported, that doesn't mean it doesn't
    work: earlier this month I received email from a stranger who actually
    seems to have built lmi successfully using cygwin, following the
    instructions in 'INSTALL'.
---
 msw_cygwin.make | 13 ++++++++++---
 1 file changed, 10 insertions(+), 3 deletions(-)

diff --git a/msw_cygwin.make b/msw_cygwin.make
index c41f3c9e..82367eb8 100644
--- a/msw_cygwin.make
+++ b/msw_cygwin.make
@@ -80,10 +80,17 @@ RC      := $(gcc_bin_dir)$(host_hyphen)windres
 #   XMLLINT := xmllint
 
 # Identify run-time libraries for redistribution. See:
-#   https://cygwin.com/ml/cygwin/2010-09/msg00553.html
-# Of course manipulating an lmi user's $PATH is out of the question.
+#   https://lists.nongnu.org/archive/html/lmi/2017-05/msg00046.html
+# Perhaps gcc's '-print-sysroot' would be more suitable, but that
+# option returns an empty string with debian cross compilers.
+#
+# It might seem more robust to write something like
+#   compiler_sysroot := $(shell readlink -fn 
/usr/lib/gcc/$(LMI_TRIPLET)/*-win32)
+# but that would actually weaken makefile portability, and there
+# is no guarantee that this directory will be named similarly in
+# future debian releases, much less on other OSs.
 
-compiler_sysroot := $(mingw_dir)/$(LMI_TRIPLET)/lib
+compiler_sysroot := $(dir $(shell $(CXX) -print-libgcc-file-name))
 
 compiler_runtime_files := \
   $(wildcard $(compiler_sysroot)/libgcc*.dll) \



reply via email to

[Prev in Thread] Current Thread [Next in Thread]