Merge lp://qastaging/~berolinux/linaro-android-build-tools/support-dual-toolchain-tarballs into lp://qastaging/linaro-android-build-tools

Proposed by Bernhard Rosenkraenzer
Status: Merged
Approved by: Paul Sokolovsky
Approved revision: 360
Merged at revision: 361
Proposed branch: lp://qastaging/~berolinux/linaro-android-build-tools/support-dual-toolchain-tarballs
Merge into: lp://qastaging/linaro-android-build-tools
Diff against target: 15 lines (+5/-1)
1 file modified
build-scripts/build-android (+5/-1)
To merge this branch: bzr merge lp://qastaging/~berolinux/linaro-android-build-tools/support-dual-toolchain-tarballs
Reviewer Review Type Date Requested Status
Bernhard Rosenkraenzer (community) Approve
Paul Sokolovsky Pending
Review via email: mp+81199@code.qastaging.launchpad.net

Description of the change

Handle toolchain tarballs that contain both a generic arm-eabi- and
an arm-linux-androideabi- toolchain.

Introduce a new TOOLCHAIN_TYPE variable that can be used to select
which of those compilers is used for TARGET_TOOLS_PREFIX (if none
is set, use the first compiler we can find)

At this time, this is necessary so we can start using the arm-linux-androideabi- compiler in some subdirectories while sticking with the arm-eabi- compiler in others. In the long run, it will still be necessary because most of the system will be built with arm-linux-androideabi- while u-boot will always need to be built with arm-eabi-

To post a comment you must log in.
Revision history for this message
Paul Sokolovsky (pfalcon) wrote :

Do you expect for toolchain TOOLCHAIN_TYPE to ever contain wildcards? If no, then whole find/head is apparently superfluous, and there would be direct assignment.

Also, is TOOLCHAIN_TYPE really good name for it? Not TOOLCHAIN_ARCH, TOOLCHAIN_TARGET, TOOLCHAIN_TRIPLET (not suggesting any of them, just asking for consideration). And actually, this falls into what was suggested by Michael Hope at that Parametrization session - to use consistent naming across Linaro teams, so maybe worth checking with him right away?

Revision history for this message
Bernhard Rosenkraenzer (berolinux) wrote :

find/head is copied from the old-style build and can probably be simplified a bit - but I'd prefer to leave it in:
find also has the advantage of making sure we get an absolute path there.

I don't expect to use wildcards right now, but I think at some point they may make sense, so there's no point in disallowing them by not using head -- I can for example picture having

TOOLCHAIN_TYPE="*-androideabi"

in a build that can - depending on the toolchain tarball - end up using arm-linux-androideabi (over arm-eabi) or armv8-linux-androideabi (over armv8-eabi) or the exact opposite.

As for the naming, the other names may be better, let's talk to Michael.

Revision history for this message
Michael Hope (michaelh1) wrote :

The naming is fine. This prefix is the triplet so 'TOOLCHAIN_TRIPLET' might be better. Many tools like the kernel use CROSS_COMPILE instead.

See:
 http://www.gnu.org/s/hello/manual/autoconf/Specifying-Target-Triplets.html#Specifying%20Names

We omit the vendor if it is 'none' so instead of the more common/canonical arm-none-linux-gnueabi we use arm-linux-gnueabi. Same for arm-none-eabi where 'none' means no OS.

360. By Bernhard Rosenkraenzer

Rename TOOLCHAIN_TYPE to TOOLCHAIN_TRIPLET

Revision history for this message
Bernhard Rosenkraenzer (berolinux) wrote :

I just pushed a change renaming TOOLCHAIN_TYPE to TOOLCHAIN_TRIPLET, guess this is ready to be merged

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
The diff is not available at this time. You can reload the page or download it.

Subscribers

People subscribed via source and target branches