Originally Posted by trailblazerz11
perhaps just disable some flags on bluetooth. Will try later
Sent from my Nexus 7 using Tapatalk HD
Yeah, probably it's just a matter of adding LOCAL_CFLAGS := -O2 in the bluedroid makefile. Best thing would be to find out exactly what is the optimization flag included in -O3 that breaks it and disable just that... If you want to try these are the flags that are enabled with -O3 that are not included in -O2: -finline-functions, -funswitch-loops, -fpredictive-commoning, -fgcse-after-reload, -ftree-vectorize, -fvect-cost-model, -ftree-partial-pre and -fipa-cp-clone. I'm not sure but if you want to disable just one flag you should add a -fno in front of the flag, for example:
LOCAL_CFLAGS += -fno-inline-functions to disable -finline-functions.