Provide example of appropriate CFLAGS for exposing registers on i386 required for inline assembly in tfm.c

pull/1925/head
kaleb-himes 2018-11-27 15:22:42 -07:00
parent 8399a7a517
commit 6ed462f564
3 changed files with 22 additions and 7 deletions

View File

@ -56,10 +56,12 @@ You can make an archive for a device, as well. That is a release build.
## Known issues: ## Known issues:
When building for older iPhone models that support the i386 architecture some When building for older i386 architectures and using tfm.c there are specific
inline assembly in the fast math library assumes 64-bit registers and must be CFLAGS required to expose the necessary registers for inline assembly in tfm.c.
disabled. This inline assembly can be disabled with `#define TFM_NO_ASM` when An example script has been provided "build-for-i386.sh" that targets the watchos
using the setting `#define USE_FAST_MATH` on i386 targets. by default. If using SDK iphonesimulator10.1 or older you can change the SDK
variable in that script however newer versions of the SDK no longer support
i386 for the iphones.
# Installing libwolfssl.a # Installing libwolfssl.a

View File

@ -0,0 +1,16 @@
#!/bin/sh
WORKSPACE=$(eval "pwd")
PROJ=wolfssl.xcodeproj
CONFIG=Release
SCHEME=wolfssl_ios
ARCH=i386
SDK=watchsimulator5.1
CONF_BUILD_DIR=${WORKSPACE}/simulator
xcodebuild clean build -project ${PROJ} -configuration ${CONFIG} \
-scheme ${SCHEME} -arch ${ARCH} -sdk ${SDK} \
BITCODE_GENERATION_MODE=bitcode \
OTHER_CFLAGS="-fembed-bitcode -O3 -fomit-frame-pointer" \
CONFIGURATION_BUILD_DIR=${CONF_BUILD_DIR} \
-quiet

View File

@ -18,9 +18,6 @@
/* fast math */ /* fast math */
#define USE_FAST_MATH #define USE_FAST_MATH
#ifdef __i386__
#define TFM_NO_ASM
#endif
#define HAVE_ECC #define HAVE_ECC
/* ECC speedups */ /* ECC speedups */