Fix all.sh test builds with recent glibc and clang

Fixes strict C99 builds in all.sh with glibc version >2.19 where platform support
wasn't being compiled in automatically.

Also fixes C99 syntax with armclang.
This commit is contained in:
Simon Butcher 2017-01-06 16:14:44 +00:00
parent 105e856143
commit cb587009d6

View File

@ -104,7 +104,7 @@ armc6_build_test()
msg "build: ARM Compiler 6 ($FLAGS), make" msg "build: ARM Compiler 6 ($FLAGS), make"
ARM_TOOL_VARIANT="ult" CC="$ARMC6_CC" AR="$ARMC6_AR" CFLAGS="$FLAGS" \ ARM_TOOL_VARIANT="ult" CC="$ARMC6_CC" AR="$ARMC6_AR" CFLAGS="$FLAGS" \
WARNING_CFLAGS='--strict --c99' make lib WARNING_CFLAGS='-xc -std=c99' make lib
make clean make clean
} }
@ -375,7 +375,9 @@ scripts/config.pl unset MBEDTLS_PLATFORM_EXIT_ALT
scripts/config.pl unset MBEDTLS_ENTROPY_NV_SEED scripts/config.pl unset MBEDTLS_ENTROPY_NV_SEED
scripts/config.pl unset MBEDTLS_MEMORY_BUFFER_ALLOC_C scripts/config.pl unset MBEDTLS_MEMORY_BUFFER_ALLOC_C
scripts/config.pl unset MBEDTLS_FS_IO scripts/config.pl unset MBEDTLS_FS_IO
CC=gcc CFLAGS='-Werror -Wall -Wextra -std=c99 -pedantic -O0' make lib programs # Note, _DEFAULT_SOURCE needs to be defined for platforms using glibc version >2.19,
# to re-enable platform integration features otherwise disabled in C99 builds
CC=gcc CFLAGS='-Werror -Wall -Wextra -std=c99 -pedantic -O0 -D_DEFAULT_SOURCE' make lib programs
CC=gcc CFLAGS='-Werror -Wall -Wextra -O0' make test CC=gcc CFLAGS='-Werror -Wall -Wextra -O0' make test
# catch compile bugs in _uninit functions # catch compile bugs in _uninit functions