New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 769790 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Closed: Oct 2017
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Chrome
Pri: 2
Type: Bug



Sign in to add a comment

Update cmake-utils.class for LLVM 4.0 Android build.

Project Member Reported by teravest@chromium.org, Sep 28 2017

Issue description

LLVM 3.9 or newer is needed to turn on amdgpu in arc-mesa (b/65414758). Currently, calling arc-build-select-clang in src_configure() incorrectly sets up CMAKE_C_CONFIGURE as described here: 

With arc-build-select-clang in src_configure(), working off of https://chromium-review.googlesource.com/c/chromiumos/overlays/chromiumos-overlay/+/688662:

$ cat /build/kahlee/tmp/portage/sys-devel/arc-llvm-4.0.1-r3/work/llvm-4.0.1.src-abi_x86_64.amd64/gentoo_toolchain.cmake

SET (CMAKE_C_COMPILER /opt/android-n/arc-llvm/3.8/bin/clang -I/build/kahlee/opt/google/containers/android/usr/include/arch-x86_64/include/ --gcc-toolchain=/opt/android-n/arc-gcc/x86_64/x86_64-linux-android-4.9 -target x86_64-linux-android)
SET (CMAKE_CXX_COMPILER /opt/android-n/arc-llvm/3.8/bin/clang++ -I/build/kahlee/opt/google/containers/android/usr/include/arch-x86_64/include/ --gcc-toolchain=/opt/android-n/arc-gcc/x86_64/x86_64-linux-android-4.9 -target x86_64-linux-android)
SET (CMAKE_Fortran_COMPILER gfortran -I/build/kahlee/opt/google/containers/android/usr/include/arch-x86_64/include/ --gcc-toolchain=/opt/android-n/arc-gcc/x86_64/x86_64-linux-android-4.9 -target x86_64-linux-android)
SET (CMAKE_SYSTEM_NAME "Linux")
set(CMAKE_FIND_ROOT_PATH "/build/kahlee")
set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)
set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)
set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)

so we get errors like this during the build:
 The CMAKE_C_COMPILER: /opt/android-n/arc-llvm/3.8/bin/clang;-I/build/kahlee/opt/google/containers/android/usr/include/arch-x86_64/include/;--g cc-toolchain=/opt/android-n/arc-gcc/x86_64/x86_64-linux-android-4.9;-target;x86_64-linux-android is not a full path to an existing compiler tool.

Patching this change locally appeared to fix the issue:
https://gitweb.gentoo.org/repo/gentoo.git/commit/eclass/cmake-utils.eclass?id=4e427b97d5579b858e76b68fbecdfb811e0c24a1

I'll try to import the latest version from upstream.
 
Project Member

Comment 1 by bugdroid1@chromium.org, Sep 29 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/overlays/portage-stable/+/317041f158d31a1268bbdeee15e898952e374f5b

commit 317041f158d31a1268bbdeee15e898952e374f5b
Author: Justin TerAvest <teravest@chromium.org>
Date: Fri Sep 29 21:35:32 2017

Update cmake-utils to 4e427b97d5.

This is needed to clean up errors when building LLVM 4.0 for ARC++.

I didn't pick the latest commit as support is removed for EAPI 0-4,
which seems like it would cause a bunch of other problems.

A link to the commit is here:
https://gitweb.gentoo.org/repo/gentoo.git/commit/eclass/cmake-utils.eclass?id=4e427b97d5579b858e76b68fbecdfb811e0c24a1

BUG= chromium:769790 
TEST=sudo emerge cmake

Change-Id: I0470772ea1efbe9129b57eb484a27c997b35216e
Reviewed-on: https://chromium-review.googlesource.com/690746
Commit-Ready: Justin TerAvest <teravest@chromium.org>
Tested-by: Justin TerAvest <teravest@chromium.org>
Reviewed-by: Mike Frysinger <vapier@chromium.org>

[modify] https://crrev.com/317041f158d31a1268bbdeee15e898952e374f5b/eclass/cmake-utils.eclass

Status: Fixed (was: Started)

Comment 3 by dchan@chromium.org, Jan 22 2018

Status: Archived (was: Fixed)

Comment 4 by dchan@chromium.org, Jan 23 2018

Status: Fixed (was: Archived)

Sign in to add a comment