This revision was automatically updated to reflect the committed changes.
Closed by commit rC329512: [Driver] Update GCC libraries detection logic for
Gentoo. (authored by manojgupta, committed by ).
Changed prior to commit:
https://reviews.llvm.org/D45233?vs=141295&id=141501#toc
Repository:
mgorny accepted this revision.
mgorny added a comment.
This revision is now accepted and ready to land.
Works fine, thanks a lot! Note that I haven't tested crossdev or anything
special, just regular multilib.
Repository:
rC Clang
https://reviews.llvm.org/D45233
__
mgorny added a comment.
I'm sorry, I see the problem now — the diff generated by Phabricator does not
include the empty files x_x (seriously, this thing keeps surprising me in how
broken it could be). I'm going to try again with correct file set tonight or
tomorrow. If you could send the comple
manojgupta added a comment.
I can't reproduce this using the trunk llvm. Does it pass for you if %clang is
replaced by %clang++ in the test case?
Repository:
rC Clang
https://reviews.llvm.org/D45233
___
cfe-commits mailing list
cfe-commits@lists
mgorny added a comment.
Well, it's better:
Failing Tests (1):
Clang :: Driver/linux-header-search.cpp
It is apparently the new test failing:
+
/var/tmp/portage/sys-devel/clang-6.0.0-r1/work/x/y/cfe-6.0.0.src-abi_x86_32.x86/bin/clang
-no-canonical-prefixes
/var/tmp/portage/sys-devel
manojgupta added a comment.
Michał, can you give the latest change a try? Hopefully it should not break any
tests.
Repository:
rC Clang
https://reviews.llvm.org/D45233
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org
manojgupta updated this revision to Diff 141295.
manojgupta edited the summary of this revision.
manojgupta added a comment.
Can solve crossdev issue by passing -gcc-toolchain=/usr
so just detect gcc libs as an offset to sysroot for now.
Repository:
rC Clang
https://reviews.llvm.org/D45233
F
mgorny added a comment.
To be honest, I don't really know. But since we're not installing it straight
to `/usr`, I suppose that's not a problem we need to solve right now.
However, they do work with clang installed in `/usr/lib/llvm/*/bin`, and this
patch must not regress that. So if your `/usr
manojgupta added a comment.
I think the tests are already broken in Gentoo when clang is installed in
/usr/bin even without this patch. The tests only work if clang binary is not
installed in /usr/bin.
RootCause is the existing lines in Gnu.cpp:
// Then look for gcc installed alongs
mgorny added a comment.
Ok, that's a problem. I think we really ought to consider all possibilites of
sysroot first, and either do not fall back to main system at all or do that
only if sysroot doesn't have any install at all. Basically, it is important
that we don't break non-Gentoo sysroots,
manojgupta added a comment.
My understanding is that some of the tests are failing since we are scanning
for Gentoo specific GCC installation first in both sysroot and "/". So, clang
succeeds in find the libraries in "/usr/lib/gcc" even when sysroot argument is
passed.
Previously, "/usr/lib/gcc
mgorny added a comment.
Ok, I've tried it on top of clang-6.0.0 and I get the following test failures:
Failing Tests (8):
Clang :: Driver/android-ndk-standalone.cpp
Clang :: Driver/constructors.c
Clang :: Driver/cuda-detect.cu
Clang :: Driver/env.c
Clang :: Driver/
manojgupta updated this revision to Diff 141182.
manojgupta added a comment.
Updated tests and added a sysroot to test that LDLIBS are picked by
parsing /etc/env.d/gcc/tuple-version file.
Repository:
rC Clang
https://reviews.llvm.org/D45233
Files:
lib/Driver/ToolChains/Gnu.cpp
lib/Driver
mgorny added a comment.
If that's not a problem, then the more tests, the merrier ;-). Preferably
something specific to crossdev would be helpful, given this is a new use case,
and/or something that would actually have directory mismatches with CURRENT
entry name (i.e. that wouldn't have worked
manojgupta updated this revision to Diff 141099.
manojgupta added a comment.
Avoid double appending of sysroot prefix to base path.
Repository:
rC Clang
https://reviews.llvm.org/D45233
Files:
lib/Driver/ToolChains/Gnu.cpp
lib/Driver/ToolChains/Gnu.h
test/Driver/Inputs/gentoo_linux_gcc
manojgupta added a comment.
Modified an existing gentoo sysroot as the test case. Please let me know if you
want me checkin a new sysroot.
Repository:
rC Clang
https://reviews.llvm.org/D45233
___
cfe-commits mailing list
cfe-commits@lists.llvm.o
manojgupta updated this revision to Diff 141096.
manojgupta added a comment.
Fix a bug in passing the actual path when libraries are present in sysroot.
Repository:
rC Clang
https://reviews.llvm.org/D45233
Files:
lib/Driver/ToolChains/Gnu.cpp
lib/Driver/ToolChains/Gnu.h
test/Driver/In
manojgupta updated this revision to Diff 141084.
manojgupta added a comment.
Fix some typos.
Reduced indent in the loop.
Repository:
rC Clang
https://reviews.llvm.org/D45233
Files:
lib/Driver/ToolChains/Gnu.cpp
lib/Driver/ToolChains/Gnu.h
Index: lib/Driver/ToolChains/Gnu.h
=
rnk accepted this revision.
rnk added a comment.
Thousands of lines of C++ to answer one of life's most simple questions: where
are the libraries and where are the headers. =p
lgtm
Comment at: lib/Driver/ToolChains/Gnu.cpp:2275
// CURRENT=triple-version
if (Line
manojgupta added reviewers: thakis, rnk.
manojgupta added a comment.
Adding more reviewers.
Repository:
rC Clang
https://reviews.llvm.org/D45233
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinf
mgorny added a comment.
Thanks. Besides that one tiny nit, looks good at a first glance. I'll test it
tomorrow or the next day (but only for the most basic use, sorry).
However, I do not feel confident enough with Clang code to ack change this
large on my own. So let's wait for @chandlerc to ta
manojgupta marked 3 inline comments as done.
manojgupta added inline comments.
Comment at: lib/Driver/ToolChains/Gnu.cpp:2303
+ std::pair GentooLibs = ConfLine.split(':');
+ GentooScanPaths.push_back(GentooLibs.first.str());
+ if (!GentooLib
manojgupta updated this revision to Diff 141019.
manojgupta added a comment.
Address requested changes.
Repository:
rC Clang
https://reviews.llvm.org/D45233
Files:
lib/Driver/ToolChains/Gnu.cpp
lib/Driver/ToolChains/Gnu.h
Index: lib/Driver/ToolChains/Gnu.h
==
mgorny requested changes to this revision.
mgorny added inline comments.
This revision now requires changes to proceed.
Comment at: lib/Driver/ToolChains/Gnu.cpp:2284
+// Test the path based on the version in /etc/env.d/gcc/config-{tuple}.
+GentooScanPaths.push_ba
manojgupta added a reviewer: chandlerc.
manojgupta added a comment.
Chandler, I recall that you are also a Gentoo user so please take a look.
Repository:
rC Clang
https://reviews.llvm.org/D45233
___
cfe-commits mailing list
cfe-commits@lists.llvm
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
#include
int main() {
std::cout << " Hello, Worl
manojgupta created this revision.
manojgupta added a reviewer: mgorny.
1. Find GCC's LDPATH from the actual GCC config file.
2. Make library detection to take into account crossdev installed
cross-compiler gcc libraries even when a sysroot is specified.
3. Avoid picking libraries from a similar n
27 matches
Mail list logo