From 0f5de042070bcfb2ba8d380c03699efb40e1bd9a Mon Sep 17 00:00:00 2001 From: Giacomo Tesio Date: Sat, 22 Apr 2017 18:04:56 +0200 Subject: [PATCH] newlib: travis-ci madness... why? --- cross/pkgs/newlib.sh | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/cross/pkgs/newlib.sh b/cross/pkgs/newlib.sh index 167488b..8e3a4b7 100755 --- a/cross/pkgs/newlib.sh +++ b/cross/pkgs/newlib.sh @@ -50,6 +50,15 @@ if [ "$NEWLIB_OPTIMIZATION" = "" ]; then NEWLIB_OPTIMIZATION=2 fi +if [ "$TRAVIS_BUILD_DIR" != "" ]; then + # something weird happens on Travis-CI so that newlib requires + # explicit set of the HOST compiler or it will use the + # Jehanne cross compiler and try to run the executable on linux + # + # I can't understand why... + export CC=gcc +fi +export CC=gcc # NOTE: we use -O0 because apparently vsprintf functions do not # work with -O2. export CFLAGS_FOR_TARGET="-g -gdwarf-2 -ggdb -O$NEWLIB_OPTIMIZATION"