summaryrefslogtreecommitdiffhomepage
path: root/sysinfo
diff options
context:
space:
mode:
authormidipix <writeonce@midipix.org>2017-10-25 01:33:27 -0400
committermidipix <writeonce@midipix.org>2017-10-25 01:38:17 -0400
commitb6abc337906e43f92f50e075f49df407946fc6fe (patch)
tree8cd81ae9b8a34eed90c2de548ab2934d32958cd3 /sysinfo
parentb69310c235d0df594e51caf3ed3bf2ddd7f8c42b (diff)
downloadslibtool-b6abc337906e43f92f50e075f49df407946fc6fe.tar.bz2
slibtool-b6abc337906e43f92f50e075f49df407946fc6fe.tar.xz
build system: PE targets: added mdso-based import library generation support.
Diffstat (limited to 'sysinfo')
-rw-r--r--sysinfo/os/cygwin.mk1
-rw-r--r--sysinfo/os/midipix.mk1
-rw-r--r--sysinfo/os/mingw.mk1
-rw-r--r--sysinfo/os/msys.mk1
-rw-r--r--sysinfo/os/pe.mk27
-rw-r--r--sysinfo/toolchain/binutils.mk1
-rw-r--r--sysinfo/toolchain/llvm.mk1
7 files changed, 30 insertions, 3 deletions
diff --git a/sysinfo/os/cygwin.mk b/sysinfo/os/cygwin.mk
index a257b88..21cb1a1 100644
--- a/sysinfo/os/cygwin.mk
+++ b/sysinfo/os/cygwin.mk
@@ -8,5 +8,6 @@ OS_LIBDEF_EXT = .def
OS_ARCHIVE_EXT = .a
OS_SONAME = copy
OS_BINFMT = PE
+OS_IMPLIB_TOOL = dlltool
CFLAGS_PIC =
diff --git a/sysinfo/os/midipix.mk b/sysinfo/os/midipix.mk
index 96c178c..b2d7096 100644
--- a/sysinfo/os/midipix.mk
+++ b/sysinfo/os/midipix.mk
@@ -8,3 +8,4 @@ OS_LIBDEF_EXT = .so.def
OS_ARCHIVE_EXT = .a
OS_SONAME = symlink
OS_BINFMT = PE
+OS_IMPLIB_TOOL = mdso
diff --git a/sysinfo/os/mingw.mk b/sysinfo/os/mingw.mk
index c13e61d..53fe2d6 100644
--- a/sysinfo/os/mingw.mk
+++ b/sysinfo/os/mingw.mk
@@ -8,6 +8,7 @@ OS_LIBDEF_EXT = .def
OS_ARCHIVE_EXT = .a
OS_SONAME = copy
OS_BINFMT = PE
+OS_IMPLIB_TOOL = dlltool
CFLAGS_PIC =
CFLAGS_OS += -U__STRICT_ANSI__
diff --git a/sysinfo/os/msys.mk b/sysinfo/os/msys.mk
index b70cc78..27482e0 100644
--- a/sysinfo/os/msys.mk
+++ b/sysinfo/os/msys.mk
@@ -8,6 +8,7 @@ OS_LIBDEF_EXT = .def
OS_ARCHIVE_EXT = .a
OS_SONAME = copy
OS_BINFMT = PE
+OS_IMPLIB_TOOL = dlltool
CFLAGS_PIC =
CFLAGS_OS += -U__STRICT_ANSI__
diff --git a/sysinfo/os/pe.mk b/sysinfo/os/pe.mk
index bbb74b2..1b02484 100644
--- a/sysinfo/os/pe.mk
+++ b/sysinfo/os/pe.mk
@@ -19,9 +19,6 @@ implib-solink: shared-lib $(IMPLIB_SOLINK)
$(IMPLIB_DEF): shared-lib
-$(IMPLIB_VER): $(IMPLIB_DEF)
- $(DLLTOOL) -l $(IMPLIB_VER) -d $(IMPLIB_DEF) -D $(DSO_VER)
-
install-implib: install-implib-ver \
package-install-implib-soname \
package-install-implib-solink
@@ -38,6 +35,20 @@ clean-implib:
rm -f $(IMPLIB_SOLINK)
+ifeq ($(OS_IMPLIB_TOOL),mdso)
+
+$(IMPLIB_VER): $(IMPLIB_DEF)
+ $(MDSO) -m $(HOST_BITS) -i $(IMPLIB_VER) -n $(DSO_VER) $(IMPLIB_DEF)
+
+else ifeq ($(OS_IMPLIB_TOOL),dlltool)
+
+$(IMPLIB_VER): $(IMPLIB_DEF)
+ $(DLLTOOL) -l $(IMPLIB_VER) -d $(IMPLIB_DEF) -D $(DSO_VER)
+
+endif
+
+
+
ifeq ($(AVOID_VERSION),yes)
package-implib-soname:
@@ -53,9 +64,19 @@ package-install-implib-soname: install-implib-soname
package-install-implib-solink: install-implib-solink
+ifeq ($(OS_IMPLIB_TOOL),mdso)
+
+$(IMPLIB_SONAME): $(IMPLIB_DEF)
+ $(MDSO) -m $(HOST_BITS) -i $(IMPLIB_SONAME) -n $(DSO_SONAME) $(IMPLIB_DEF)
+
+else ifeq ($(OS_IMPLIB_TOOL),dlltool)
+
$(IMPLIB_SONAME): $(IMPLIB_DEF)
$(DLLTOOL) -l $(IMPLIB_SONAME) -d $(IMPLIB_DEF) -D $(DSO_SONAME)
+endif
+
+
$(IMPLIB_SOLINK): $(IMPLIB_SONAME)
rm -f $(IMPLIB_SOLINK).tmp
ln -s $(IMP_SONAME) $(IMPLIB_SOLINK).tmp
diff --git a/sysinfo/toolchain/binutils.mk b/sysinfo/toolchain/binutils.mk
index 3232915..728eb66 100644
--- a/sysinfo/toolchain/binutils.mk
+++ b/sysinfo/toolchain/binutils.mk
@@ -16,3 +16,4 @@ ELFEDIT = $(CROSS_COMPILE)elfedit
OBJCOPY = $(CROSS_COMPILE)objcopy
READELF = $(CROSS_COMPILE)readelf
DLLTOOL = $(CROSS_COMPILE)dlltool
+MDSO = $(CROSS_COMPILE)mdso
diff --git a/sysinfo/toolchain/llvm.mk b/sysinfo/toolchain/llvm.mk
index 65b5396..b863456 100644
--- a/sysinfo/toolchain/llvm.mk
+++ b/sysinfo/toolchain/llvm.mk
@@ -16,3 +16,4 @@ ELFEDIT = $(CROSS_COMPILE)elfedit
OBJCOPY = $(CROSS_COMPILE)objcopy
READELF = $(CROSS_COMPILE)readelf
DLLTOOL = $(CROSS_COMPILE)dlltool
+MDSO = $(CROSS_COMPILE)mdso