From d39d6bf5eb7bf0f54ab65323b4f1501c3ffead84 Mon Sep 17 00:00:00 2001 From: Nick Desaulniers Date: Tue, 29 Sep 2020 15:33:52 -0700 Subject: 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 -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 Change-Id: Iddee3065f5e9df8da276644921aa5fbc1b8c6381 --- aarch64-linux-android-elfedit | 0 aarch64-linux-androidkernel-as | 1 + arm-linux-androidkernel-as | 1 + arm-linux-gnueabi-elfedit | 0 x86_64-linux-android-elfedit | 0 x86_64-linux-androidkernel-as | 1 + 6 files changed, 3 insertions(+) create mode 100755 aarch64-linux-android-elfedit create mode 120000 aarch64-linux-androidkernel-as create mode 120000 arm-linux-androidkernel-as create mode 100755 arm-linux-gnueabi-elfedit create mode 100755 x86_64-linux-android-elfedit create mode 120000 x86_64-linux-androidkernel-as diff --git a/aarch64-linux-android-elfedit b/aarch64-linux-android-elfedit new file mode 100755 index 0000000..e69de29 diff --git a/aarch64-linux-androidkernel-as b/aarch64-linux-androidkernel-as new file mode 120000 index 0000000..73b56dd --- /dev/null +++ b/aarch64-linux-androidkernel-as @@ -0,0 +1 @@ +aarch64-linux-android-as \ No newline at end of file diff --git a/arm-linux-androidkernel-as b/arm-linux-androidkernel-as new file mode 120000 index 0000000..0d3f702 --- /dev/null +++ b/arm-linux-androidkernel-as @@ -0,0 +1 @@ +arm-linux-androideabi-as \ No newline at end of file diff --git a/arm-linux-gnueabi-elfedit b/arm-linux-gnueabi-elfedit new file mode 100755 index 0000000..e69de29 diff --git a/x86_64-linux-android-elfedit b/x86_64-linux-android-elfedit new file mode 100755 index 0000000..e69de29 diff --git a/x86_64-linux-androidkernel-as b/x86_64-linux-androidkernel-as new file mode 120000 index 0000000..dfba2d8 --- /dev/null +++ b/x86_64-linux-androidkernel-as @@ -0,0 +1 @@ +x86_64-linux-android-as \ No newline at end of file -- cgit v1.2.3