Summary: | sys-devel/llvm: pass --with-c-include-dirs on prefix | ||
---|---|---|---|
Product: | Gentoo/Alt | Reporter: | William Throwe <wtt6> |
Component: | Prefix Support | Assignee: | Gentoo Prefix <prefix> |
Status: | CONFIRMED --- | ||
Severity: | normal | CC: | cognifloyd+gentoobugs, sam |
Priority: | Normal | ||
Version: | unspecified | ||
Hardware: | All | ||
OS: | Linux | ||
Whiteboard: | |||
Package list: | Runtime testing required: | --- |
Description
William Throwe
2014-02-24 04:50:37 UTC
I think this refers to the situation before Darwin switched primary toolchain to Clang. This is still broken with sys-devel/llvm-3.7.0-r1 $ cat bar.c #include <gmp.h> $ gcc bar.c -fsyntax-only $ clang bar.c -fsyntax-only bar.c:1:10: fatal error: 'gmp.h' file not found #include <gmp.h> ^ 1 error generated. $ ls ${EPREFIX}/usr/include/gmp.h /home/supernova/wthrowe/gentoo/usr/include/gmp.h It could be that due to darwin_prefix-include-paths.patch this works on Darwin, but not on other Prefix platforms. the with-c-include-dirs equivalent in cmake setup is unknown, so I figure we need a fix like for Darwin. (In reply to Fabian Groffen from comment #4) > the with-c-include-dirs equivalent in cmake setup is unknown, so I figure we > need a fix like for Darwin. There is a -DC_INCLUDE_DIRS flag, but adding it in the clang ebuild didn't work for me. Maybe the Darwin fix will be needed in all prefix variants. should it be in clang or llvm? I'm not sure on that. I am using C_INCLUDE_DIRS and CPLUS_INCLUDE_DIRS env vars in the bootstrap-prefix.sh script to use the correct dir on darwin prefix. I'm not sure if that will help on linux. I'm not sure if we still need an ebuild fix. For darwin prefix, I'm patching in the appropriate paths. What I've moved to in prefix-standalone on Linux at least is to set -DDEFAULT_SYSROOT=${EPREFIX} when configuring Clang. Clang now works out of the box there with that change. |