Browse Source

lz4: fix Darwin cross-compile

Waldemar Brodkorb 6 years ago
parent
commit
239226979c
1 changed files with 19 additions and 0 deletions
  1. 19 0
      package/lz4/patches/patch-lib_Makefile

+ 19 - 0
package/lz4/patches/patch-lib_Makefile

@@ -0,0 +1,19 @@
+--- lz4-1.8.2.orig/lib/Makefile	2018-05-07 23:38:45.000000000 +0200
++++ lz4-1.8.2/lib/Makefile	2018-05-22 20:22:31.000000000 +0200
+@@ -45,6 +45,7 @@ LIBVER  := $(shell echo $(LIBVER_SCRIPT)
+ BUILD_SHARED:=yes
+ BUILD_STATIC:=yes
+ 
++OS?=$(shell uname)
+ CPPFLAGS+= -DXXH_NAMESPACE=LZ4_
+ CFLAGS  ?= -O3
+ DEBUGFLAGS:= -Wall -Wextra -Wcast-qual -Wcast-align -Wshadow \
+@@ -58,7 +59,7 @@ SRCFILES := $(sort $(wildcard *.c))
+ 
+ # OS X linker doesn't support -soname, and use different extension
+ # see : https://developer.apple.com/library/mac/documentation/DeveloperTools/Conceptual/DynamicLibraries/100-Articles/DynamicLibraryDesignGuidelines.html
+-ifeq ($(shell uname), Darwin)
++ifeq ($(OS), Darwin)
+ 	SHARED_EXT = dylib
+ 	SHARED_EXT_MAJOR = $(LIBVER_MAJOR).$(SHARED_EXT)
+ 	SHARED_EXT_VER = $(LIBVER).$(SHARED_EXT)