summaryrefslogtreecommitdiff
path: root/sys-devel/clang-common/clang-common-16.0.0_pre20221006-r1.ebuild
diff options
context:
space:
mode:
Diffstat (limited to 'sys-devel/clang-common/clang-common-16.0.0_pre20221006-r1.ebuild')
-rw-r--r--sys-devel/clang-common/clang-common-16.0.0_pre20221006-r1.ebuild14
1 files changed, 7 insertions, 7 deletions
diff --git a/sys-devel/clang-common/clang-common-16.0.0_pre20221006-r1.ebuild b/sys-devel/clang-common/clang-common-16.0.0_pre20221006-r1.ebuild
index 993dddec4bf9..9d8ad198445d 100644
--- a/sys-devel/clang-common/clang-common-16.0.0_pre20221006-r1.ebuild
+++ b/sys-devel/clang-common/clang-common-16.0.0_pre20221006-r1.ebuild
@@ -114,12 +114,12 @@ src_install() {
}
pkg_preinst() {
- # TODO: move this to gcc-config and call it here?
-
- local gcc_path=$(gcc-config --get-lib-path 2>/dev/null)
- if [[ -n ${gcc_path} ]]; then
- cat >> "${ED}/etc/clang/gentoo-gcc-install.cfg" <<-EOF
- --gcc-install-dir=${gcc_path%%:*}
- EOF
+ if has_version sys-devel/gcc-config; then
+ local gcc_path=$(gcc-config --get-lib-path 2>/dev/null)
+ if [[ -n ${gcc_path} ]]; then
+ cat >> "${ED}/etc/clang/gentoo-gcc-install.cfg" <<-EOF
+ --gcc-install-dir="${gcc_path%%:*}"
+ EOF
+ fi
fi
}