lmi-commits
[Top][All Lists]
Advanced

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

[lmi-commits] [lmi] master ceb0ac3b 11/11: Fix defect introduced 2022062


From: Greg Chicares
Subject: [lmi-commits] [lmi] master ceb0ac3b 11/11: Fix defect introduced 20220623T2020Z: required information hidden
Date: Mon, 27 Jun 2022 19:56:08 -0400 (EDT)

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

    Fix defect introduced 20220623T2020Z: required information hidden
    
    Commit 0fc04feacde99 of 20220623T2020Z hid compiler-specific details
    that upstream 'GNUmakefile' shouldn't need to know, but inadvertently
    hid the one detail that it does need: $(compiler_runtime_files).
---
 compiler_gcc.make | 22 ----------------------
 msw_common.make   | 26 ++++++++++++++++++++++++++
 2 files changed, 26 insertions(+), 22 deletions(-)

diff --git a/compiler_gcc.make b/compiler_gcc.make
index 293f0ed7..e103cce2 100644
--- a/compiler_gcc.make
+++ b/compiler_gcc.make
@@ -52,28 +52,6 @@ GNU_CXX := $(CXX)
 
 
################################################################################
 
-# Identify msw run-time libraries for redistribution. See:
-#   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.
-
-ifeq (mingw32,$(findstring mingw32,$(LMI_TRIPLET)))
-compiler_sysroot := $(dir $(shell $(gcc_proclitic)g++ -print-libgcc-file-name))
-
-compiler_runtime_files := \
-  $(wildcard $(compiler_sysroot)/libgcc*.dll) \
-  $(wildcard $(compiler_sysroot)/libstdc++*.dll) \
-
-endif
-
-################################################################################
-
 # EXTRA variables.
 #
 # /\w*EXTRA_/ variables such as $(EXTRA_LDFLAGS) are set by other
diff --git a/msw_common.make b/msw_common.make
index c222cd0d..0623e819 100644
--- a/msw_common.make
+++ b/msw_common.make
@@ -41,3 +41,29 @@ platform_defines := \
   -DXSLTWRAPP_USE_DLL \
   -DSTRICT \
 
+# Identify msw run-time libraries for redistribution. See:
+#   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.
+#
+# Invoke the C++ compiler in a direct fashion because $(CXX) has not
+# yet been defined. 'GNUmakefile' needs to install the runtime files
+# to make sure they're always available, but it has no reason to know
+# how $(CXX) is defined. Making any target that uses $(CXX), e.g.:
+#   make unit_tests unit_test_targets=sandbox_test
+# thus ensures that the runtime files are available on $WINEPATH.
+
+ifeq (mingw32,$(findstring mingw32,$(LMI_TRIPLET)))
+compiler_sysroot := $(dir $(shell $(gcc_proclitic)g++ -print-libgcc-file-name))
+
+compiler_runtime_files := \
+  $(wildcard $(compiler_sysroot)/libgcc*.dll) \
+  $(wildcard $(compiler_sysroot)/libstdc++*.dll) \
+
+endif



reply via email to

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