add symlinks for CLANG_TRIPLE and empty elfedits

In order for Android Common Kernels to use this directory via
LINUX_GCC_CROSS_COMPILE_PREBUILTS_BIN, we need 2 things:

1. to provide <CLANG_TRIPLE>-as where CLANG_TRIPLE is one of
aarch64-linux-androidekernel-, arm-linux-androidkernel-, or
x86_64-linux-androidkernel-. With LLVM=1 changes proposed in
https://android.googlesource.com/platform/prebuilts/clang/host/linux-x86/+/master/BINUTILS_KERNEL_DEPRECATION.md
we should be able to revert CLANG_TRIPLE downstream changes in Android
Common Kernels, but I would prefer to do that *after* moving ACK over to
prebuilts/gas. At that point, we can delete the symlinks added in this
commit.
2. KBUILD invokes `which $(CROSS_COMPILE)elfedit` to find the path to
binutils to use for the --gcc-toolchain arg to clang when cross
compiling. `which` requires a file in the $PATH to have the same name,
and have its executable bit set. Create empty elfedit executables via
touch and chmod.  When we remove this repo dependency in step 8 from the
above URL, I may need to fix KBUILD upstream to not depend on finding
any elfedit in order to cross compile correctly.

Step 5 of the above URL.

Bug: 141693040
Test: uninstall cross binutils from host, remove prebuilts/gcc from
common kernels, then:
$ BUILD_CONFIG=common/build.config.gki.aarch64 ./build/build.sh
$ BUILD_CONFIG=common/build.config.gki.x86_64 ./build/build.sh
$ BUILD_CONFIG=common/build.config.allmodconfig.arm ./build/build.sh
$ BUILD_CONFIG=common-modules/virtual-device/build.config.cuttlefish.aarch64 build/build.sh
$ BUILD_CONFIG=common-modules/virtual-device/build.config.cuttlefish.x86_64 build/build.sh
$ BUILD_CONFIG=common-modules/virtual-device/build.config.cuttlefish.i686 build/build.sh
Signed-off-by: Nick Desaulniers <ndesaulniers@google.com>
Change-Id: Iddee3065f5e9df8da276644921aa5fbc1b8c6381
6 files changed
tree: c21944e82e4609a63f2bfe5c587b235dd01a5e36
  1. aarch64-linux-android-as
  2. aarch64-linux-android-elfedit
  3. arm-linux-androideabi-as
  4. arm-linux-gnueabi-elfedit
  5. COPYING
  6. COPYING.LIB
  7. COPYING3
  8. COPYING3.LIB
  9. MODULE_LICENSE_GPL
  10. OWNERS
  11. README.md
  12. x86_64-linux-android-as
  13. x86_64-linux-android-elfedit
README.md

platform/prebuilts/gas/linux-x86

This repository exists as a temporary repository for containing copies of prebuilt binaries of GNU as (the assembler), copied from

  1. https://android.googlesource.com/platform/prebuilts/gcc/linux-x86/x86/x86_64-linux-android-4.9/
  2. https://android.googlesource.com/platform/prebuilts/gcc/linux-x86/arm/arm-linux-androideabi-4.9/
  3. https://android.googlesource.com/platform/prebuilts/gcc/linux-x86/aarch64/aarch64-linux-android-4.9/

It only contains binaries for linux-x86 host, which can target x86 and ARM (32b and 64b variants).

It will be used to minimize Android Common Kernel dependencies on GNU binutils for the “S” release, as part of: https://android.googlesource.com/platform/prebuilts/clang/host/linux-x86/+/master/BINUTILS_KERNEL_DEPRECATION.md (The creation of this repository is step 4).

If all goes well, then these binaries may never end up being used. Their existence is a hedge in the case of updates to kernel sources requiring the fallback to GNU as instead of Clang's integrated assembler.

As of Sept 29 2020, https://www.kernel.org/doc/html/latest/process/changes.html for a v5.9-rc7 Linux kernel requires binutils version 2.23 or newer. These binaries are based off of 2.27.0.20170315.