Add support for Linux ARM64 to third_party/binutils |
||||
Issue descriptionIt seems https://cs.chromium.org/chromium/src/third_party/binutils/download.py only supports Intel ia32 and x64 today and also depends on old GYP syntax (!). It is obviously possible to build for Linux ARM without any additions to this but as part of the work in http://bugs.webrtc.org/7024 it is not possible to build for Linux ARM64 with the current toolchain (the binutils-aarch64-linux-gnu package is missing). Would it be possible to add support for Linux ARM64 to the binutils package? I assume third_party/binutils is the location for this (I was thinking about adding the library to install-build-deps.sh but it seemed wrong).
,
Jan 25 2017
We got arm64 going in bug 613452 . I won't have time to work on this; happy to consult though. (Not clear to me what exactly isn't working, given that other bug.)
,
Jan 25 2017
+mcgrathr, krasin in hope they'll be able to provide expertise here. I don't see any trace of either ARM or ARM64 in https://cs.chromium.org/chromium/src/third_party/binutils/ - shouldn't there be directories with .sha1 files in there then? Since Linux ARM config is building fine on Chromium without it, I guess the 'ar' executable is found in some other way. Obviously, as seen in http://bugs.webrtc.org/7024 the ARM64 'ar' is not found (at least not when specified as --ar="aarch64-linux-gnu-ar" to the build/toolchain/gcc_ar_wrapper.py script. Looking up the executable on my system (after installing the binutils-aarch64-linux-gnu package), I find: $ locate aarch64-linux-gnu-ar /usr/bin/aarch64-linux-gnu-ar $ dpkg -S /usr/bin/aarch64-linux-gnu-ar binutils-aarch64-linux-gnu: /usr/bin/aarch64-linux-gnu-ar I guess that's why it's able to find aarch64-linux-gnu-ar after installing it. Is the right way to get this library into install-build-deps.sh rather than getting it into a new binutils bundle? It seems the latter is preferred to avoid depending on system libraries, but I'm not enough familiar how all this works.
,
Jan 25 2017
The report seems to confuse the issues of host where the tools run with the target the tools build for. The third_party/binutils/ binaries are built only for Linux x86 hosts, since that's what people develop on and bots build on. If you want to build on an arm or aarch64 host, that is not something we've really tried to support before AFAIK (e.g. the Chromium-built Clang does not have any non-x86 binaries either). AFAIK the only tool we really use from third_party/binutils is the Gold linker. Gold always supports all targets, so the ld.gold there should work fine for arm and aarch64. Note that aarch64 support is somewhat new, so it might need a newer upstream version to include fixes for known bugs than is needed for x86 and arm. When building with Clang, we mostly use the integrated assembler and so don't need the binutils assembler. There might still be some Chromium components using -no-integrated-as, though I'm not aware of any off hand. If so, those would need the binutils assembler. For arm, we just install the Ubuntu cross-compiler packages in install-build-deps.sh, so that's probably what we want to do for aarch64 as well.
,
Jan 26 2017
Thanks for the thorough explanation mcgrathr@. Now I understand the whole picture here. I'm not interested in buildin _on_ an arm/aarch64 host, so I created https://codereview.chromium.org/2650823010/ for adding the library to install-build-deps.sh.
,
Jan 27 2017
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/74c7e4b3a075d01cb9f04b8c746fa8bc888ed768 commit 74c7e4b3a075d01cb9f04b8c746fa8bc888ed768 Author: kjellander <kjellander@chromium.org> Date: Fri Jan 27 13:15:44 2017 Add binutils-aarch64-linux-gnu to support Linux ARM64 build. This is needed to avoid AR errors in build/toolchain/gcc_ar_wrapper.py during compile when building for Linux ARM64. The size of thew new dependency is ~19MB on Linux. BUG= 684356 , webrtc:7024 Review-Url: https://codereview.chromium.org/2650823010 Cr-Commit-Position: refs/heads/master@{#446656} [modify] https://crrev.com/74c7e4b3a075d01cb9f04b8c746fa8bc888ed768/build/install-build-deps.sh
,
Jan 27 2017
I believe that's all that was needed, at least for WebRTC's case of building Linux ARM64. Thanks for all the useful input guys!
,
Mar 30 2017
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/95504aea9818ec4e593358d0373f9c41531a3b67 commit 95504aea9818ec4e593358d0373f9c41531a3b67 Author: kjellander <kjellander@chromium.org> Date: Thu Mar 30 12:30:31 2017 Fix case error in install-build-deps.sh It appears the "*" path in the case statement is never matched due to the double-quotes (tested with bash 4.3.11 on Trusty 14.04). Removing the quoting aligns with other case statements in the script, and solves the problem. This bug made https://codereview.chromium.org/2650823010 not have any effect, which was discovered when deploying ARM 64 bots for WebRTC. BUG= 684356 , webrtc:7024 Review-Url: https://codereview.chromium.org/2790453002 Cr-Commit-Position: refs/heads/master@{#460733} [modify] https://crrev.com/95504aea9818ec4e593358d0373f9c41531a3b67/build/install-build-deps.sh |
||||
►
Sign in to add a comment |
||||
Comment 1 by kjellander@chromium.org
, Jan 24 2017Owner: thakis@chromium.org