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 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits