sys-devel/clang: Use target symlinks instead of wrappers
authorMichał Górny <mgorny@gentoo.org>
Sun, 2 Oct 2016 07:47:28 +0000 (09:47 +0200)
committerMichał Górny <mgorny@gentoo.org>
Sun, 2 Oct 2016 07:57:53 +0000 (09:57 +0200)
Create symlinks for ABI targets instead of wrappers since clang already
processes target prefixes in argv[0].

sys-devel/clang/clang-9999.ebuild

index cedfc02923f9c86c1cc24134dfe59c9c1f9225ef..adca5ce8a78772d3a19b539714ce2a7dadf6f8d7 100644 (file)
@@ -231,16 +231,12 @@ src_install() {
                dosym "${i}-${clang_version}" "/usr/bin/${i}"
        done
 
-       # now create wrappers for all supported ABIs
+       # now create target symlinks for all supported ABIs
        for abi in $(get_all_abis); do
-               local abi_flags=$(get_abi_CFLAGS "${abi}")
                local abi_chost=$(get_abi_CHOST "${abi}")
                for i in "${clang_tools[@]}"; do
-                       cat > "${T}"/wrapper.tmp <<-_EOF_ || die
-                               #!${EPREFIX}/bin/sh
-                               exec "${i}-${clang_version}" ${abi_flags} "\${@}"
-                       _EOF_
-                       newbin "${T}"/wrapper.tmp "${abi_chost}-${i}-${clang_version}"
+                       dosym "${i}-${clang_version}" \
+                               "/usr/bin/${abi_chost}-${i}-${clang_version}"
                        dosym "${abi_chost}-${i}-${clang_version}" \
                                "/usr/bin/${abi_chost}-${i}"
                done