Open Quuxplusone opened 13 years ago
Bugzilla Link | PR8897 |
Status | NEW |
Importance | P normal |
Reported by | David Greene (greened@obbligato.org) |
Reported on | 2011-01-03 19:01:58 -0800 |
Last modified on | 2018-10-25 20:12:00 -0700 |
Version | trunk |
Hardware | PC Linux |
CC | llvm-bugs@lists.llvm.org, lu_zero@gentoo.org, rafael@espindo.la, richard-llvm@metafoo.co.uk |
Fixed by commit(s) | |
Attachments | |
Blocks | |
Blocked by | |
See also |
A small summary of the status is that clang only looks for the system compiler.
It doesn't care about the gcc used to build it.
I don't have time to invest in this now, but I think a reasonable
implementation is
*) The "toolchain dir" and other information needed by the driver (like extra
ld options) should be set via the command line. The same clang binary should be
able to handle a host build and being as a cross compiler for arm for example.
*) The default for those options should be produced by configure/cmake and
would normally be those of the compiler used to build clang.
*) During build configure/cmake should accept options so that the clang being
built, by default, behaves differently from the system compiler. For example, --
driver_extra_ld_args="--hash-style=gnu".
I got bitten by this while cross compiling.
if clang is relying on gcc it should extract the sysroot and crtbegin paths using
-print-sysroot AND -print-libgcc-file-name
Currently it gets alternatively wrong either sysroot or the crtbegin path.