From 20715dc73b3604f0a362465c67bd613a79b39dd8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Manuel=20P=C3=A9gouri=C3=A9-Gonnard?= Date: Thu, 7 Jan 2016 13:06:51 +0100 Subject: [PATCH] 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 --- ChangeLog | 3 ++- library/Makefile | 4 ++-- tests/scripts/all.sh | 2 +- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/ChangeLog b/ChangeLog index 9712b15c3..0f81efe4a 100644 --- a/ChangeLog +++ b/ChangeLog @@ -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 1.3.16 released 2016-01-05 diff --git a/library/Makefile b/library/Makefile index c7c5bf0be..6a8d9bacb 100644 --- a/library/Makefile +++ b/library/Makefile @@ -93,9 +93,9 @@ endif libmbedtls.a: $(OBJS) echo " AR $@" - $(AR) rc $@ $(OBJS) + $(AR) -rc $@ $(OBJS) echo " RL $@" - $(AR) s $@ + $(AR) -s $@ libpolarssl.$(DLEXT): libmbedtls.$(DLEXT) echo " LN $@ -> $?" diff --git a/tests/scripts/all.sh b/tests/scripts/all.sh index f51bc7fcd..dfc0061ca 100755 --- a/tests/scripts/all.sh +++ b/tests/scripts/all.sh @@ -213,7 +213,7 @@ scripts/config.pl unset POLARSSL_THREADING_PTHREAD scripts/config.pl unset POLARSSL_THREADING_C scripts/config.pl unset POLARSSL_MEMORY_BACKTRACE # execinfo.h scripts/config.pl unset POLARSSL_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;