[llvm-commits] [PATCH] Fix Tool Alias for --program-prefix

Rick Foos rfoos at codeaurora.org
Wed Oct 3 15:32:14 PDT 2012


On 10/03/2012 05:00 PM, Rick Foos wrote:
> There is a problem with --program-prefix.
>
> When make install builds the <program-prefix>clang++, the link in the 
> install directory points to clang. When program_prefix is set, the 
> executable is <program-prefix>clang, and the link fails.
>
> <program-prefix>clang++ should point to <program-prefix>clang
>
> The current builds that do not use program-prefix are not effected, 
> but the behavior needs to be fixed.
>
> ---
> The problem is that the AliasTool steps in Makefile.rules use 
> TOOLEXENAME, rather than the make targets.
>
> The program_prefix modification cannot be added to TOOLEXENAME. 
> program_prefix is only used for install.
>
> The proposed fix changes the two AliasTool rules to take the filename 
> from the path in the make dependency. This insures that any future 
> modifications to the filename in the paths are correctly symlink'ed.
>
> While the absolute path to <program-prefix>clang could be used, it 
> changes behavior. An absolute path in the clang++ link means that the 
> install directory could no longer be copied to a different location 
> without breaking the clang++ link.
>
> The filename is extracted using the make built-in $(notdir <path>). 
> While basename is more common, the make built-in version of basename 
> also strips the filetype. (i.e. $(basename /usr/bin/clang++.exe) => 
> clang)
>
> If this looks reasonable, I need help committing.
>
> Thank you,
> Rick
>
>


-- 
Rick Foos
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, hosted by The Linux Foundation

-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-Fix-Tool-Alias-for-program-prefix.patch
Type: text/x-patch
Size: 1226 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20121003/86153a7d/attachment.bin>


More information about the llvm-commits mailing list