sys-devel/llvm: Fix bogus flags and paths in llvm-config, #565358
authorMichał Górny <mgorny@gentoo.org>
Wed, 2 Dec 2015 19:27:50 +0000 (20:27 +0100)
committerMichał Górny <mgorny@gentoo.org>
Wed, 2 Dec 2015 19:55:48 +0000 (20:55 +0100)
commit8eff1b80294e92ebc2f0273980ccabdc615f85f3
tree96ad83d5f2e3842489589c815dcc7819862acd04
parent118931f8c4f65885b567bb408be708d8533b116b
sys-devel/llvm: Fix bogus flags and paths in llvm-config, #565358

Fix llvm-config to avoid bogus results. In particular:

1. Limit --cflags and --cxxflags to package-specific flags. Do not
output the whole flag-string used during the build. This fixes libclc
build issues when LLVM build flags were not tolerated by clang.

2. Fix library names and paths to use shared library suffix rather than
static library suffix, especially that we do not install static
libraries.

3. Wipe out --system-libs since they should not be required for dynamic
linking.

4. Ban --obj-root and --src-root when running outside source tree, since
we are not installing any sources and therefore their results would
always be bogus.

Based on patch provided by Steven Newbury.

Fixes: https://bugs.gentoo.org/565358
sys-devel/llvm/files/llvm-3.7-llvm-config.patch [new file with mode: 0644]
sys-devel/llvm/llvm-3.7.0-r3.ebuild [new file with mode: 0644]
sys-devel/llvm/llvm-9999.ebuild