[Crosstoolchain-logs] [device-tree-compiler] 32/57: Makefile: Fix build on MSYS2 and Cygwin

Vagrant Cascadian vagrant at moszumanska.debian.org
Thu Sep 28 22:03:58 UTC 2017


This is an automated email from the git hooks/post-receive script.

vagrant pushed a commit to branch upstream/latest
in repository device-tree-compiler.

commit d990b8013889b816ec054c7e07a77db59c56c400
Author: Cufi, Carles <Carles.Cufi at nordicsemi.no>
Date:   Fri May 19 09:06:54 2017 +0000

    Makefile: Fix build on MSYS2 and Cygwin
    
    The host compiler on MSYS2 and Cygwin does not allow the -fPIC option,
    issuing a warning that is treated as an error and stops the build.
    Detect whether we're running under MSYS2 or Cygwin and avoid adding
    -fPIC to prevent the error from happening.
    
    Tested on Linux, MSYS2 and Cygwin.
    
    Signed-off-by: Carles Cufi <carles.cufi at gmail.com>
    [dwg: Added explicit empty CFLAGS for clarity]
    Signed-off-by: David Gibson <david at gibson.dropbear.id.au>
---
 Makefile | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/Makefile b/Makefile
index 7fa2be8..43957e6 100644
--- a/Makefile
+++ b/Makefile
@@ -33,12 +33,16 @@ LIBDIR = $(PREFIX)/lib
 INCLUDEDIR = $(PREFIX)/include
 
 HOSTOS := $(shell uname -s | tr '[:upper:]' '[:lower:]' | \
-	    sed -e 's/\(cygwin\).*/cygwin/')
+	    sed -e 's/\(cygwin\|msys\).*/\1/')
 
 ifeq ($(HOSTOS),darwin)
 SHAREDLIB_EXT     = dylib
 SHAREDLIB_CFLAGS  = -fPIC
 SHAREDLIB_LDFLAGS = -fPIC -dynamiclib -Wl,-install_name -Wl,
+else ifeq ($(HOSTOS),$(filter $(HOSTOS),msys cygwin))
+SHAREDLIB_EXT     = so
+SHAREDLIB_CFLAGS  =
+SHAREDLIB_LDFLAGS = -shared -Wl,--version-script=$(LIBFDT_version) -Wl,-soname,
 else
 SHAREDLIB_EXT     = so
 SHAREDLIB_CFLAGS  = -fPIC

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/crosstoolchain/device-tree-compiler.git



More information about the Crosstoolchain-logs mailing list