| #!/bin/sh |
| |
| . $(dirname $0)/functions |
| |
| PATCHES=0 |
| if [ -n "$1" ]; then |
| AOSP="$1" |
| else |
| AOSP="`pwd`" |
| fi |
| |
| if ! [ -d "$AOSP" ] && ! [ -d "$AOSP/bionic" ] && [ -d "$AOSP"/build ]; then |
| echo "This script must be run from the AOSP source directory" |
| echo "or with the AOSP source directory as its first parameter." |
| exit 1 |
| fi |
| |
| # Fix libatomic.a detection with gcc 5+ |
| # Not submitted upstream yet, looking for a cleaner solution. |
| # (But this one works without drawbacks) |
| apply --linaro build 16156/1 |
| # Fix uchar.h for use with gcc 5+ |
| # Accepted upstream, already on master |
| apply --linaro bionic 16161/1 |
| # Fix gcc 5+ compiler warning in code built with -Werror |
| # Submitted upstream, not yet accepted |
| # https://android-review.googlesource.com/175288 |
| apply frameworks/base 175288/1 |
| # Fix build with gcc 5+ |
| # Not yet submitted upstream, need to check if it breaks gcc 4.x |
| apply --linaro external/compiler-rt 16187/1 |
| apply --linaro external/compiler-rt 16230/1 |
| |
| # make unused-variable and strict-overflow only warning |
| # instead of error for benchmarks and linker when compiled with linaro gcc5.2 |
| apply --linaro bionic 16407/1 |
| |
| #workaround for 32bit libbacktrace with linaro gcc5.3 |
| #for errors like: |
| #/tmp/ccI9OLbI.s:1755: Error: selected processor does not support ARM mode `cbnz r6,.L91' |
| apply --linaro system/core 16521/3 |
| |
| # needed for extra warnings in gcc 5.4 |
| apply --linaro frameworks/av 16992/1 |
| |
| # Optional components -- let's fix them only if they're checked out |
| if [ -d "$AOSP/external/powerdebug" ]; then |
| apply --linaro external/powerdebug 16185/1 |
| fi |