mirror of
https://github.com/yuzu-emu/mbedtls
synced 2024-11-24 12:48:32 +00:00
Merge remote-tracking branch 'public/pr/1645' into development
This commit is contained in:
commit
1d97cab5f5
3 changed files with 48 additions and 11 deletions
|
@ -12,6 +12,8 @@ Bugfix
|
|||
was creating an invalid ASN.1 tag. Found by Aryeh R. Fixes #1257.
|
||||
* Fix compilation error on C++, because of a variable named new.
|
||||
Found and fixed by Hirotaka Niisato in #1783.
|
||||
* Fix "no symbols" warning issued by ranlib when building on Mac OS X. Fix
|
||||
contributed by tabascoeye in pull request #1600.
|
||||
|
||||
Changes
|
||||
* Change the shebang line in Perl scripts to look up perl in the PATH.
|
||||
|
|
|
@ -101,6 +101,13 @@ if(WIN32)
|
|||
set(libs ${libs} ws2_32)
|
||||
endif(WIN32)
|
||||
|
||||
if(${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
|
||||
SET(CMAKE_C_ARCHIVE_CREATE "<CMAKE_AR> Scr <TARGET> <LINK_FLAGS> <OBJECTS>")
|
||||
SET(CMAKE_CXX_ARCHIVE_CREATE "<CMAKE_AR> Scr <TARGET> <LINK_FLAGS> <OBJECTS>")
|
||||
SET(CMAKE_C_ARCHIVE_FINISH "<CMAKE_RANLIB> -no_warning_for_no_symbols -c <TARGET>")
|
||||
SET(CMAKE_CXX_ARCHIVE_FINISH "<CMAKE_RANLIB> -no_warning_for_no_symbols -c <TARGET>")
|
||||
endif()
|
||||
|
||||
if(USE_PKCS11_HELPER_LIBRARY)
|
||||
set(libs ${libs} pkcs11-helper)
|
||||
endif(USE_PKCS11_HELPER_LIBRARY)
|
||||
|
|
|
@ -21,6 +21,10 @@ endif
|
|||
# if were running on Windows build for Windows
|
||||
ifdef WINDOWS
|
||||
WINDOWS_BUILD=1
|
||||
else ifeq ($(shell uname -s),Darwin)
|
||||
ifeq ($(AR),ar)
|
||||
APPLE_BUILD ?= 1
|
||||
endif
|
||||
endif
|
||||
|
||||
# To compile as a shared library:
|
||||
|
@ -35,16 +39,28 @@ SOEXT_TLS=so.11
|
|||
SOEXT_X509=so.0
|
||||
SOEXT_CRYPTO=so.3
|
||||
|
||||
# Set DLEXT=dylib to compile as a shared library for Mac OS X
|
||||
DLEXT ?= so
|
||||
|
||||
# Set AR_DASH= (empty string) to use an ar implentation that does not accept
|
||||
# the - prefix for command line options (e.g. llvm-ar)
|
||||
AR_DASH ?= -
|
||||
|
||||
# Windows shared library extension:
|
||||
ARFLAGS = $(AR_DASH)src
|
||||
ifdef APPLE_BUILD
|
||||
ifneq ($(APPLE_BUILD),0)
|
||||
ARFLAGS = $(AR_DASH)Src
|
||||
RLFLAGS = -no_warning_for_no_symbols -c
|
||||
RL ?= ranlib
|
||||
endif
|
||||
endif
|
||||
|
||||
DLEXT ?= so
|
||||
ifdef WINDOWS_BUILD
|
||||
DLEXT=dll
|
||||
# Windows shared library extension:
|
||||
DLEXT = dll
|
||||
else ifdef APPLE_BUILD
|
||||
ifneq ($(APPLE_BUILD),0)
|
||||
# Mac OS X shared library extension:
|
||||
DLEXT = dylib
|
||||
endif
|
||||
endif
|
||||
|
||||
OBJS_CRYPTO= aes.o aesni.o arc4.o \
|
||||
|
@ -97,9 +113,13 @@ shared: libmbedcrypto.$(DLEXT) libmbedx509.$(DLEXT) libmbedtls.$(DLEXT)
|
|||
# tls
|
||||
libmbedtls.a: $(OBJS_TLS)
|
||||
echo " AR $@"
|
||||
$(AR) $(AR_DASH)rc $@ $(OBJS_TLS)
|
||||
$(AR) $(ARFLAGS) $@ $(OBJS_TLS)
|
||||
ifdef APPLE_BUILD
|
||||
ifneq ($(APPLE_BUILD),0)
|
||||
echo " RL $@"
|
||||
$(AR) $(AR_DASH)s $@
|
||||
$(RL) $(RLFLAGS) $@
|
||||
endif
|
||||
endif
|
||||
|
||||
libmbedtls.$(SOEXT_TLS): $(OBJS_TLS) libmbedx509.so
|
||||
echo " LD $@"
|
||||
|
@ -120,9 +140,13 @@ libmbedtls.dll: $(OBJS_TLS) libmbedx509.dll
|
|||
# x509
|
||||
libmbedx509.a: $(OBJS_X509)
|
||||
echo " AR $@"
|
||||
$(AR) $(AR_DASH)rc $@ $(OBJS_X509)
|
||||
$(AR) $(ARFLAGS) $@ $(OBJS_X509)
|
||||
ifdef APPLE_BUILD
|
||||
ifneq ($(APPLE_BUILD),0)
|
||||
echo " RL $@"
|
||||
$(AR) $(AR_DASH)s $@
|
||||
$(RL) $(RLFLAGS) $@
|
||||
endif
|
||||
endif
|
||||
|
||||
libmbedx509.$(SOEXT_X509): $(OBJS_X509) libmbedcrypto.so
|
||||
echo " LD $@"
|
||||
|
@ -143,9 +167,13 @@ libmbedx509.dll: $(OBJS_X509) libmbedcrypto.dll
|
|||
# crypto
|
||||
libmbedcrypto.a: $(OBJS_CRYPTO)
|
||||
echo " AR $@"
|
||||
$(AR) $(AR_DASH)rc $@ $(OBJS_CRYPTO)
|
||||
$(AR) $(ARFLAGS) $@ $(OBJS_CRYPTO)
|
||||
ifdef APPLE_BUILD
|
||||
ifneq ($(APPLE_BUILD),0)
|
||||
echo " RL $@"
|
||||
$(AR) $(AR_DASH)s $@
|
||||
$(RL) $(RLFLAGS) $@
|
||||
endif
|
||||
endif
|
||||
|
||||
libmbedcrypto.$(SOEXT_CRYPTO): $(OBJS_CRYPTO)
|
||||
echo " LD $@"
|
||||
|
|
Loading…
Reference in a new issue