diff --git a/build.sh b/build.sh index d2a759d348c..609ab8751cc 100644 --- a/build.sh +++ b/build.sh @@ -945,7 +945,8 @@ EOF (cd openssl && mv Makefile Makefile.dep && sed -e 's/\-mandroid//g' Makefile.dep > Makefile) || exit 1 DEPFLAGS="$(grep DEPFLAG= Makefile | head -1 | cut -f2 -d=)" $MAKE -C "openssl" DEPFLAG="$DEPFLAGS -I$temp_dir/sysroot/usr/include -I$temp_dir/sysroot/usr/include/linux -I$temp_dir/include/c++/4.9/tr1 -I$temp_dir/include/c++/4.9" depend || exit 1 - (cd openssl && mv Makefile.dep Makefile) || exit 1 + # -O3 seems to be buggy on Android + (cd openssl && sed -e 's/O3/Os/g' Makefile.dep > Makefile && rm -f Makefile.dep) || exit 1 PATH="$path" CC="$cc" CFLAGS="$cflags_arch" PERL="perl" $MAKE -C "openssl" build_crypto || exit 1 cp "openssl/libcrypto.a" "$ANDROID_DIR/$libcrypto_name" || exit 1 fi diff --git a/release_notes.md b/release_notes.md index 4ee792d379f..a0124727783 100644 --- a/release_notes.md +++ b/release_notes.md @@ -53,6 +53,7 @@ (#1478) * New feature in the unit test framework: Ability to specify log level threshold for custom intra test logging (`UNITTEST_LOG_LEVEL`). +* Switch from `-O3` to `-Os` to compile OpenSSL: https://github.com/android-ndk/ndk/issues/110 ----------------------------------------------