[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
325/376: Fix library handling on Cygwin
From: |
Ludovic Courtès |
Subject: |
325/376: Fix library handling on Cygwin |
Date: |
Wed, 28 Jan 2015 22:05:56 +0000 |
civodul pushed a commit to tag 1.8
in repository guix.
commit 4872677ffafce60bf863583804bb5700601ad7a4
Author: Marko Durkovic <address@hidden>
Date: Tue Dec 9 12:22:12 2014 +0100
Fix library handling on Cygwin
1. Shared lib extension is .dll
2. Shared libs are installed to $(prefix)/bin
3. Linker does not support -z flag
---
mk/libraries.mk | 16 +++++++++++++---
1 files changed, 13 insertions(+), 3 deletions(-)
diff --git a/mk/libraries.mk b/mk/libraries.mk
index 3b91c69..3b292e9 100644
--- a/mk/libraries.mk
+++ b/mk/libraries.mk
@@ -3,7 +3,11 @@ libs-list :=
ifeq ($(OS), Darwin)
SO_EXT = dylib
else
- SO_EXT = so
+ ifeq (CYGWIN,$(findstring CYGWIN,$(OS)))
+ SO_EXT = dll
+ else
+ SO_EXT = so
+ endif
endif
# Build a library with symbolic name $(1). The library is defined by
@@ -50,7 +54,11 @@ define build-library
$(1)_OBJS := $$(addsuffix .o, $$(basename $$(_srcs)))
_libs := $$(foreach lib, $$($(1)_LIBS), $$($$(lib)_PATH))
- $(1)_INSTALL_DIR ?= $$(libdir)
+ ifeq (CYGWIN,$(findstring CYGWIN,$(OS)))
+ $(1)_INSTALL_DIR ?= $$(bindir)
+ else
+ $(1)_INSTALL_DIR ?= $$(libdir)
+ endif
$(1)_LDFLAGS_USE :=
$(1)_LDFLAGS_USE_INSTALLED :=
@@ -65,7 +73,9 @@ define build-library
endif
else
ifneq ($(OS), Darwin)
- $(1)_LDFLAGS += -Wl,-z,defs
+ ifneq (CYGWIN,$(findstring CYGWIN,$(OS)))
+ $(1)_LDFLAGS += -Wl,-z,defs
+ endif
endif
endif
- 328/376: Provide some fallback defaults for the CA bundle, (continued)
- 328/376: Provide some fallback defaults for the CA bundle, Ludovic Courtès, 2015/01/28
- 329/376: Add option to disable binary cache certificate checking, Ludovic Courtès, 2015/01/28
- 330/376: Doh, Ludovic Courtès, 2015/01/28
- 327/376: Use https://cache.nixos.org instead of http://cache.nixos.org, Ludovic Courtès, 2015/01/28
- 331/376: Fix bad comment, Ludovic Courtès, 2015/01/28
- 320/376: Define ‘environ’, Ludovic Courtès, 2015/01/28
- 333/376: builtins.readFile: realise context associated with the path, Ludovic Courtès, 2015/01/28
- 332/376: Always use https to fetch the Nixpkgs channel, Ludovic Courtès, 2015/01/28
- 326/376: Link against perl.dll on Cygwin, Ludovic Courtès, 2015/01/28
- 324/376: Set custom compiler flags on Cygwin, Ludovic Courtès, 2015/01/28
- 325/376: Fix library handling on Cygwin,
Ludovic Courtès <=
- 335/376: Don't use RPATH on Darwin, Ludovic Courtès, 2015/01/28
- 337/376: Revert "Use posix_spawn to run the pager", Ludovic Courtès, 2015/01/28
- 334/376: Update signing.txt, Ludovic Courtès, 2015/01/28
- 336/376: Cruft, Ludovic Courtès, 2015/01/28
- 339/376: Include cacert in the binary tarball, Ludovic Courtès, 2015/01/28
- 340/376: Rename function, Ludovic Courtès, 2015/01/28
- 342/376: Don't do vfork in conjunction with setuid, Ludovic Courtès, 2015/01/28
- 341/376: Use vfork, Ludovic Courtès, 2015/01/28
- 345/376: allow custom docbook paths/URLs, use a working URL for docbook.rng, Ludovic Courtès, 2015/01/28
- 344/376: Urgh, Ludovic Courtès, 2015/01/28