The prefix include path patch needs to be restored in the clang-5.0.1 ebuild so the resulting compiler finds and prefers the prefix includes by default. The compiler-rt ebuild can be adjusted to disable the use of the Xcode SDK on macOS. Reproducible: Always
Created attachment 511968 [details] Updated ebuilds and patches
Created attachment 512074 [details, diff] Disable SDK use in compiler-rt-sanitizers compiler-rt-sanitizers also uses the Xcode SDK and promptly selects the one for 10.9 when compiling on 10.8.
The bug has been closed via the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=a1b84f8898fc23e1cde3a27bc40f2ccc890e9ff4 commit a1b84f8898fc23e1cde3a27bc40f2ccc890e9ff4 Author: Fabian Groffen <grobian@gentoo.org> AuthorDate: 2018-01-02 13:53:46 +0000 Commit: Fabian Groffen <grobian@gentoo.org> CommitDate: 2018-01-02 13:53:56 +0000 sys-devel/clang: add prefix includes patch for darwin too Like for older llvm versions, ensure clang uses the prefix include paths on Darwin. Closes: https://bugs.gentoo.org/642644 Package-Manager: Portage-2.3.13, Repoman-2.3.3 sys-devel/clang/clang-5.0.1.ebuild | 11 +++++++++-- .../files/5.0.0/darwin_prefix-include-paths.patch | 18 ++++++++++++++++++ 2 files changed, 27 insertions(+), 2 deletions(-) Additionally, it has been referenced in the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=0d3c717b69cc1f612070f99cfb923cc713819639 commit 0d3c717b69cc1f612070f99cfb923cc713819639 Author: Fabian Groffen <grobian@gentoo.org> AuthorDate: 2018-01-02 13:24:28 +0000 Commit: Fabian Groffen <grobian@gentoo.org> CommitDate: 2018-01-02 13:53:55 +0000 sys-libs/compiler-rt-sanitizers: prefer compiler from prefix on Darwin Patch by Michael Weiser Bug: https://bugs.gentoo.org/642644 Package-Manager: Portage-2.3.13, Repoman-2.3.3 .../compiler-rt-sanitizers/compiler-rt-sanitizers-5.0.1.ebuild | 9 ++++++++- .../compiler-rt-sanitizers/compiler-rt-sanitizers-9999.ebuild | 9 ++++++++- 2 files changed, 16 insertions(+), 2 deletions(-) https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=4ee391c4a0409d1c03eb47e0ce86050d6572fbea commit 4ee391c4a0409d1c03eb47e0ce86050d6572fbea Author: Fabian Groffen <grobian@gentoo.org> AuthorDate: 2018-01-02 13:20:04 +0000 Commit: Fabian Groffen <grobian@gentoo.org> CommitDate: 2018-01-02 13:53:55 +0000 sys-libs/compiler-rt: prefer compiler from prefix on Darwin Patch by Michael Weiser Bug: https://bugs.gentoo.org/642644 Package-Manager: Portage-2.3.13, Repoman-2.3.3 sys-libs/compiler-rt/compiler-rt-5.0.1.ebuild | 9 ++++++++- sys-libs/compiler-rt/compiler-rt-9999.ebuild | 9 ++++++++- 2 files changed, 16 insertions(+), 2 deletions(-)}
I can confirm that all three build fine and clang has the prefix include paths afterwards.