Builds can not be compiled with the original AOSP GCC 4.4 toolchain

Bug #878973 reported by Zach Pfeffer
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Linaro Android
Fix Released
High
Andy Doan

Bug Description

Builds can no longer be compiled with the original 4.4 toolchain. See https://android-build.linaro.org/builds/~pfefferz/staging-panda-gcc4.4/#build=2

Zach Pfeffer (pfefferz)
Changed in linaro-android:
status: New → Confirmed
importance: Undecided → Medium
assignee: nobody → Zach Pfeffer (pfefferz)
milestone: none → 11.10
Changed in linaro-android:
milestone: 11.10 → 11.11
Zach Pfeffer (pfefferz)
Changed in linaro-android:
milestone: 11.11 → 11.12
Revision history for this message
Zach Pfeffer (pfefferz) wrote :
Changed in linaro-android:
assignee: Zach Pfeffer (pfefferz) → vishal (vishalbhoj)
Zach Pfeffer (pfefferz)
Changed in linaro-android:
assignee: vishal (vishalbhoj) → Bernhard Rosenkraenzer (berolinux)
importance: Medium → High
milestone: 11.12 → 12.01
Revision history for this message
Andy Doan (doanac) wrote :

I hit this problem today playing with 4.4 toolchain benchmarks. I've found an easy way to reproduce the first bug I'm encountering:

tmp.cpp:
 int main() {return 0;}

Then run:
 prebuilt/linux-x86/toolchain/arm-linux-androideabi-4.4.x/bin/arm-linux-androideabi-g++ -c -Werror -march=armv7-a -mcpu=cortex-a9 tmp.cpp

You'll get this error:
 cc1plus: warnings being treated as errors
 tmp.cpp:1: error: switch -mcpu=cortex-a9 conflicts with -march= switch

Revision history for this message
Andy Doan (doanac) wrote :

I've done a little more research into this. I think we can work around the issue I spotted in comment #2 with a change like this patch. The change basically makes sure the "-march" and "-mcpu/-mtune" options can co-exist with each other.

Revision history for this message
Andy Doan (doanac) wrote :

I'm getting closer. I just uncovered an issue compiling u-boot on panda. There's logic in devices/linaro/common/tasks/uboot.mk that picks the systems arm cross-compiler if the Google prebuilt toolchain is being used. According to the docs its too old.

The problem I hit was that GCC 4.6 hits an internal error. I switch to the GCC 4.5 cross-compiler and was able to work around that issue.

Revision history for this message
Andy Doan (doanac) wrote :

I've also hit issues with a symbol being defined twice in window.h/native_window.h. I'll attach a patch for this shortly.

Revision history for this message
Andy Doan (doanac) wrote :

this fixes a duplicate symbol error when using the google prebuilt toolchain

Revision history for this message
Andy Doan (doanac) wrote :

this is needed after the previous framework-base.patch is applied to pull in definitions for memset when C++ compiles are done.

Revision history for this message
Andy Doan (doanac) wrote :

This patch fixes an issue where the pre-built compiler doesn't support the "-mno-unligned-access" flag.

Andy Doan (doanac)
Changed in linaro-android:
status: Confirmed → In Progress
Andy Doan (doanac)
Changed in linaro-android:
assignee: Bernhard Rosenkraenzer (berolinux) → Andy Doan (doanac)
Andy Doan (doanac)
Changed in linaro-android:
status: In Progress → Fix Committed
Changed in linaro-android:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.