[PATCH] D45233: [Driver] Update GCC libraries detection logic for Gentoo.

Manoj Gupta via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Apr 3 15:58:53 PDT 2018


manojgupta added a comment.

MichaƂ, will appreciate if you can test this on your (multiple?) Gentoo configurations.
Will work on updating the testcases after that.

To test it locally, I used the following :

$ cat test.cpp

  #include <iostream>
  #include <string>
  
  int main() {
    std::cout << " Hello, World!" << std::endl;
    return 0;
  }



Setup cross compilers for x86_64 and aarch64.
=============================================

$ sudo crossdev -S x86_64-gentoo-linux-gnu
$ sudo crossdev -S aarch64-gentoo-linux-gnu

$ Build and install clang in a location other than /usr/bin e.g. $HOME/clang-testing/bin
Verify that correct gcc libs are picked.
$ /path/to/clang++ --sysroot=/usr/aarch64-gentoo-linux-gnu -B/usr/libexec/gcc/aarch64-gentoo-linux-gnu -target aarch64-gentoo-linux-gnu test.cpp -o main -Wl,-t -v

Further verify that any lib/headers from x86_64-pc-linux-gnu are NOT picked after the patch is applied.
$ /path/to/clang++ --sysroot=/usr/x86_64-gentoo-linux-gnu -B/usr/libexec/gcc/x86_64-gentoo-linux-gnu -target x86_64-gentoo-linux-gnu test.cpp -o main -Wl,-t -v


Repository:
  rC Clang

https://reviews.llvm.org/D45233





More information about the cfe-commits mailing list