Make ar invocation more portable

armar doesn't understand the syntax without dash. OTOH, the syntax with dash
is the only one specified by POSIX, and it's accepted by GNU ar, BSD ar (as
bundled with OS X) and armar, so it looks like the most portable syntax.

fixes #386
This commit is contained in:
Manuel Pégourié-Gonnard 2016-01-07 13:06:51 +01:00
parent afbb3101ce
commit 3551901cd1
3 changed files with 9 additions and 8 deletions

View File

@ -5,7 +5,8 @@ mbed TLS ChangeLog (Sorted per branch, date)
Bugfix
* Fix bug in mbedtls_mpi_add_mpi() that caused wrong results when the three
arguments where the same (in-place doubling). Found and fixed by Janos
Follath.
Follath. #309
* Fix issue in Makefile that prevented building using armar. #386
= mbed TLS 2.2.1 released 2016-01-05

View File

@ -90,9 +90,9 @@ shared: libmbedcrypto.$(DLEXT) libmbedx509.$(DLEXT) libmbedtls.$(DLEXT)
# tls
libmbedtls.a: $(OBJS_TLS)
echo " AR $@"
$(AR) rc $@ $(OBJS_TLS)
$(AR) -rc $@ $(OBJS_TLS)
echo " RL $@"
$(AR) s $@
$(AR) -s $@
libmbedtls.$(SOEXT_TLS): $(OBJS_TLS) libmbedx509.so
echo " LD $@"
@ -113,9 +113,9 @@ libmbedtls.dll: $(OBJS_TLS) libmbedx509.dll
# x509
libmbedx509.a: $(OBJS_X509)
echo " AR $@"
$(AR) rc $@ $(OBJS_X509)
$(AR) -rc $@ $(OBJS_X509)
echo " RL $@"
$(AR) s $@
$(AR) -s $@
libmbedx509.$(SOEXT_X509): $(OBJS_X509) libmbedcrypto.so
echo " LD $@"
@ -136,9 +136,9 @@ libmbedx509.dll: $(OBJS_X509) libmbedcrypto.dll
# crypto
libmbedcrypto.a: $(OBJS_CRYPTO)
echo " AR $@"
$(AR) rc $@ $(OBJS_CRYPTO)
$(AR) -rc $@ $(OBJS_CRYPTO)
echo " RL $@"
$(AR) s $@
$(AR) -s $@
libmbedcrypto.$(SOEXT_CRYPTO): $(OBJS_CRYPTO)
echo " LD $@"

View File

@ -233,7 +233,7 @@ scripts/config.pl unset MBEDTLS_THREADING_PTHREAD
scripts/config.pl unset MBEDTLS_THREADING_C
scripts/config.pl unset MBEDTLS_MEMORY_BACKTRACE # execinfo.h
scripts/config.pl unset MBEDTLS_MEMORY_BUFFER_ALLOC_C # calls exit
CC=armcc WARNING_CFLAGS= make lib 2> armcc.stderr
CC=armcc AR=armar WARNING_CFLAGS= make lib 2> armcc.stderr
if [ -s armcc.stderr ]; then
cat armcc.stderr
exit 1;