Cross compilation issue

Description of problem:

I am trying to cross compile libtasn1 4.16 to armv7 iOS, but i am getting a linker error that i can't solve

Undefined symbols for architecture armv7:
  "_c_isdigit", referenced from:
      __asn1_expand_object_id in libtasn1.a(parser_aux.o)
      __asn1_check_identifier in libtasn1.a(parser_aux.o)

Version of libtasn1 used:

4.16

https://ftp.gnu.org/gnu/libtasn1/libtasn1-4.16.0.tar.gz

Distributor of libtasn1 (e.g., Ubuntu, Fedora, RHEL)

I am compiling the source code itself

How reproducible:

export SDKPATH=/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk
export MIN_IOS_VERSION=10.0
export HOST=arm-apple-darwin
export BUILD=armv7
export LDFLAGS_NATIVE="-isysroot $SDKPATH "
export ARCHES=armv7

export LDFLAGS=$LDFLAGS_NATIVE
export CFLAGS="-arch $ARCH $LDFLAGS -miphoneos-version-min=$MIN_IOS_VERSION -fembed-bitcode -Wno-sign-compare "
./configure --host=$HOST --build=$BUILD --enable-static --disable-shared --prefix=$PWD/build/$ARCH && make && make install

Actual results:

/Applications/Xcode.app/Contents/Developer/usr/bin/make  all-recursive
Making all in lib
Making all in gl
/Applications/Xcode.app/Contents/Developer/usr/bin/make  all-recursive
make[5]: Nothing to be done for `all-am'.
  CC       coding.lo
  CC       decoding.lo
  CC       element.lo
  CC       errors.lo
  CC       gstr.lo
  CC       parser_aux.lo
  CC       structure.lo
  CC       version.lo
  CCLD     libtasn1.la
Making all in src
  CC       asn1Parser.o
  CCLD     asn1Parser
Undefined symbols for architecture armv7:
  "_c_isdigit", referenced from:
      __asn1_expand_object_id in libtasn1.a(parser_aux.o)
      __asn1_check_identifier in libtasn1.a(parser_aux.o)
ld: symbol(s) not found for architecture armv7
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make[2]: *** [asn1Parser] Error 1
make[1]: *** [all-recursive] Error 1
make: *** [all] Error 2

I found in one of the logs this:

/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/usr/include/sys/_types/_timespec.h \
  parser_aux.h structure.h gl/c-ctype.h \

It looks like it's importing from the default SDK not from the lib itself.

Expected results:

I see the lib now has a custom c-ctype implementation and it should be included for cross compilation

Edited by Fernando Martinez