On 11/3/26 17:38, Zhongteng Gui wrote:
Hi, below is a long existing patch in MSYS2's MINGW GCC, and I'm upstreaming it
because I think it's actually needed by all Windows targets, not only MSYS2 /
mingw-w64.
Tested at https://github.com/dragon-archer/gcc-for-windows/pull/16, and it
worked
well for all Windows targets including Cygwin.
-------
From ba748053d3fc59b000a6727780ba707985205174 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?J=C3=BCrgen=20Pfeifer?= <[email protected]>
Date: Wed, 5 Aug 2015 23:36:27 +0100
Subject: [PATCH] ada: Provide shared GNAT implib on Windows
This allow link against shared runtime on Windows.
Original commit:
https://github.com/msys2/MINGW-packages/commit/51b4eb3b702fdb38df0460180c2f8209a686aaec
gcc/ada/ChangeLog:
* gcc-interface/Makefile.in (gnatlib-shared-win32): Provide
import library.
Co-authored-by: Zhongteng Gui <[email protected]>
Signed-off-by: Zhongteng Gui <[email protected]>
---
gcc/ada/gcc-interface/Makefile.in | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/gcc/ada/gcc-interface/Makefile.in
b/gcc/ada/gcc-interface/Makefile.in
index ccd44caa551..2e84d3cb0c8 100644
--- a/gcc/ada/gcc-interface/Makefile.in
+++ b/gcc/ada/gcc-interface/Makefile.in
@@ -797,12 +797,15 @@ gnatlib-shared-win32:
$(PICFLAG_FOR_TARGET) \
-o libgnat$(hyphen)$(LIBRARY_VERSION)$(soext) \
$(GNATRTL_NONTASKING_OBJS) $(LIBGNAT_OBJS) \
- $(SO_OPTS)libgnat$(hyphen)$(LIBRARY_VERSION)$(soext) $(MISCLIB)
+ $(SO_OPTS)libgnat$(hyphen)$(LIBRARY_VERSION)$(soext) \
+ -Wl,-out-implib,libgnat$(hyphen)$(LIBRARY_VERSION).dll.a \
+ $(MISCLIB)
cd $(RTSDIR); $(GCC_FOR_ADA_RTS) -shared -shared-libgcc \
$(PICFLAG_FOR_TARGET) \
-o libgnarl$(hyphen)$(LIBRARY_VERSION)$(soext) \
$(GNATRTL_TASKING_OBJS) \
$(SO_OPTS)libgnarl$(hyphen)$(LIBRARY_VERSION)$(soext) \
+ -Wl,-out-implib,libgnarl$(hyphen)$(LIBRARY_VERSION).dll.a \
$(THREADSLIB) -Wl,libgnat$(hyphen)$(LIBRARY_VERSION)$(soext)
gnatlib-shared-darwin:
Thanks, pushed to master branch.