lmi-commits
[Top][All Lists]
Advanced

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

[lmi-commits] [lmi] master 655648d 3/3: Don't use auto-import with share


From: Greg Chicares
Subject: [lmi-commits] [lmi] master 655648d 3/3: Don't use auto-import with shared-object attributes
Date: Sat, 4 Apr 2020 20:10:08 -0400 (EDT)

branch: master
commit 655648d765d1267c1a76bcd357e20c9759744272
Author: Gregory W. Chicares <address@hidden>
Commit: Gregory W. Chicares <address@hidden>

    Don't use auto-import with shared-object attributes
    
    Auto-import and explicit DLL {im,ex}port attributes are two distinct
    means to achieve somewhat the same end, so combining them is unholy.
    Changed shared-object builds to disable auto-import (which MinGW-w64
    infelicitously enables by default).
    
    Therefore, ineluctably, added '-static-libstdc++' to work around the
    MinGW-w64 libstdc++ defect alluded to here:
    
    https://sourceforge.net/p/mingw-w64/mailman/message/28623544/
    | As auto-import explicit handles to translate from non-dllexported-
    | symbols to the imported dllexported-symbols, it solves the issues.
    | libstdc++ doesn't provide for Win32 targets proper declspeced symbols
    | for import.  There is already a gcc bug-report for it.
    
    Suppressed linking 'wx_test' with this build type, for which the
    above changes exposed defects that had been hidden by auto-import.
---
 workhorse.make | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/workhorse.make b/workhorse.make
index c8b98a7..438a337 100644
--- a/workhorse.make
+++ b/workhorse.make
@@ -96,8 +96,12 @@ ifneq (safestdlib,$(findstring safestdlib,$(build_type)))
     lmi_wx_shared$(EXEEXT) \
     skeleton$(SHREXT) \
     wx_new$(SHREXT) \
-    wx_test$(EXEEXT) \
 
+  ifneq (so_test,$(findstring so_test,$(build_type)))
+    default_targets += \
+      wx_test$(EXEEXT) \
+
+  endif
 endif
 
 # The product_files target doesn't build with shared-library
@@ -824,6 +828,7 @@ ifeq (3.4.5,$(gcc_version))
 endif
 
 ifneq (,$(USE_SO_ATTRIBUTES))
+  LDFLAGS += -Wl,--disable-auto-import -static-libstdc++
   actually_used_lmi_so_attributes = -DLMI_USE_SO_ATTRIBUTES 
$(lmi_so_attributes)
 endif
 



reply via email to

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