[Android Software/Hacking General [Developers Only]] frap129:
From the looks of it, it's an error with the androideabi toolchain, not the optimizations itself. I suggest using JustArchi's toolchain, so make sure your roomservice.xml has

<!-- LINARO TOOLCHAIN -->
<project name="JustArchi/Linaro" path="prebuilts/gcc/linux-x86/arm/arm-eabi-4.8" remote="github" revision="4.8-eabi" />
<project name="JustArchi/Linaro" path="prebuilts/gcc/linux-x86/arm/arm-linux-androideabi-4.8" remote="github" revision="4.8-androideabi" />

After that is done, in terminal paste this and run it (yes I know its long but I'm trying to make this simple)

cd ~/euclidean/prebuilts/gcc/linux-x86/arm/ && rm -rf arm-linux-androideabi-4.8 && git clone -b 4.8-androideabi --single-branch https://github.com/JustArchi/Linaro.git arm-linux-androideabi-4.8 && cd ~/euclidean && repo sync -f && make clean && make clobber && rm -rf ~/.ccache

Then re-cherry pick the commit and make sure that after you do git status and fix all the conflicts and do git add, run "git cherry-pick --continue" , I got a bunch of errors because I fixed all the conflicts but forgot to continue the cherry pick. Just build and you should be good! Hope this helps and isn't something you already tried.

---------- Post added at 08:16 PM ---------- Previous post was at 08:06 PM ----------

Well, I guess I spoke too soon. Thought mine was going to compile but i got this error right near then end

/home/frap129/carbon/out/target/product/d2lte/obj/SHARED_LIBRARIES/hwcomposer.msm8960_intermediates/hwc_fbupdate.o:hwc_fbupdate.cpp:function qhwc::FBUpdateLowRes::preRotateExtDisplay(hwc_context_t*, hwc_layer_1*, overlay::utils::Whf&, hwc_rect&, overlay::utils::eMdpFlags&, int&): error: undefined reference to 'qhwc::configRotator(overlay::Rotator*, overlay::utils::Whf&, overlay::utils::Whf const&, overlay::utils::eMdpFlags const&, overlay::utils::eTransform const&, int const&)'
/home/frap129/carbon/out/target/product/d2lte/obj/SHARED_LIBRARIES/hwcomposer.msm8960_intermediates/hwc_fbupdate.o:hwc_fbupdate.cpp:function qhwc::FBUpdateLowRes::preRotateExtDisplay(hwc_context_t*, hwc_layer_1*, overlay::utils::Whf&, hwc_rect&, overlay::utils::eMdpFlags&, int&): error: undefined reference to 'qhwc::updateSource(overlay::utils::eTransform&, overlay::utils::Whf&, hwc_rect&)'
/home/frap129/carbon/out/target/product/d2lte/obj/SHARED_LIBRARIES/hwcomposer.msm8960_intermediates/hwc_fbupdate.o:hwc_fbupdate.cpp:function qhwc::FBUpdateLowRes::configure(hwc_context_t*, hwc_display_contents_1*, int): error: undefined reference to 'qhwc::configMdp(overlay::eek:verlay*, overlay::utils::PipeArgs const&, overlay::utils::eTransform const&, hwc_rect const&, hwc_rect const&, MetaData_t const*, overlay::utils::eDest const&)'
collect2: error: ld returned 1 exit status
make: *** [/home/frap129/carbon/out/target/product/d2lte/obj/SHARED_LIBRARIES/hwcomposer.msm8960_intermediates/LINKED/hwcomposer.msm8960.so] Error 1
make: *** Waiting for unfinished jobs....
Note: packages/apps/CellBroadcastReceiver/src/com/android/cellbroadcastreceiver/CellBroadcastAlertAudio.java uses or overrides a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Reading library jar [/home/frap129/carbon/out/target/common/obj/JAVA_LIBRARIES/framework2_intermediates/classes.jar]
Note: frameworks/testing/uiautomator/library/core-src/com/android/uiautomator/core/UiScrollable.java uses or overrides a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Preparing output jar [/home/frap129/carbon/out/target/common/obj/APPS/FusedLocation_intermediates/proguard.classes.jar]
Copying resources from program jar [/home/frap129/carbon/out/target/common/obj/APPS/FusedLocation_intermediates/classes.jar]

Any help?