@alexcrichton and others: heres a proof of concept patch for configure that (for now is OS X only) checks at the very end of the configure script if ``cc``, ``gcc``, and ``g++`` possibly point to the same compiler or not.
The way its currently done is i call ```cc --version```, ``gcc --version`` and ``g++ --version`` and check if theres any matchings for the word ``clang``, ``gcc`` or ``g++``. So it doesn't rule out miss matched gcc versions or the like, but thats a bit more implausible I think.
This PR improves the stepping experience in GDB. It contains some fine tuning of line information and makes *rustc* produce nearly the same IR/DWARF as Clang. The focus of the changes is function prologue handling which has caused some problems in the past (https://github.com/mozilla/rust/issues/9641).
It seems that GDB does not properly handle function prologues when the function uses segmented stacks, i.e. it does not recognize that the `__morestack` check is part of the prologue. When setting a breakpoint like `break foo` it will set the break point before the arguments of `foo()` have been loaded and still contain bogus values. For function with the #[no_split_stack] attribute this problem has never occurred for me so I'm pretty sure that segmented stacks are the cause of the problem. @jdm mentioned that segmented stack won't be completely abandoned after all. I'd be grateful if you could tell me about what the future might bring in this regard (@brson, @cmr).
Anyway, this PR should alleviate this problem at least in the case when setting breakpoints using line numbers and also make it less confusing when setting them via function names because then GDB will break *before* the first statement where one could conceivably argue that arguments need not be initialized yet.
Also, a koala: 🐨
Cheers,
Michael
Understand 'pkgid' in stage0. As a bonus, the snapshot now contains now metadata
(now that those changes have landed), and the snapshot download is half as large
as it used to be!
Understand 'pkgid' in stage0. As a bonus, the snapshot now contains now metadata
(now that those changes have landed), and the snapshot download is half as large
as it used to be!
This modifies the `configure` to set `CFG_ENABLE_CLANG=1` if `gcc` is actually `clang`. This is needed because OS X's clang enables warning on unused command line arguments. Our build system suppresses this by default, but when `CFG_ENABLE_CLANGE=0`, we do not. This causes one of the tests to fail. This patch changes rust to directly use clang, which fixes the build failure.
Closes#10811