[LLVMdev] Add --program-prefix support with AC_CANONICAL_TARGET override.

Dmitry Mikushin dmitry at kernelgen.org
Tue Dec 18 17:02:56 PST 2012


Hi Rick and Jaroslav,

I'm looking for ways to apply prefixes to llvm binaries, similar to 
gcc's --program-prefix configure option.

@Rick, were you able to commit a suitable version of your patch?

@Jaroslav, you were asking the same question question last year - have 
you solved it yourself?

Thanks,
- Dima.


On 09/26/2012 11:14 PM, Rick Foos wrote:
> Adding --program-prefix support to the autoconf build has been an 
> adventure.
>
> A patch was applied. It worked on the usual llvm bots, but failed on 
> other bots with different configure options.
>
> The patch was reverted as it broke on bots specifying --build, --host, 
> and --target in configure.
>
> An option is proposed here to change the behavior of program-prefix to 
> it's normal behavior when AC_CANONICAL_TARGET is not specified. 
> Meaning --program-prefix can only be set from the configure command line.
>
> --- background
>
> LLVM autoconf/configure.ac uses the AC_CANONICAL_TARGET.
>
> This rule adds a test that can set program_prefix=target if 
> --program-prefix is not specified on the configure line.
> test -n "$target_alias" &&
>   test "$program_prefix$program_suffix$program_transform_name" = \
>     NONENONEs,x,x, &&
>   program_prefix=${target_alias}-[]dnl
>
> ./configure --target=blah
> results in
> program_prefix=blah
>
> --- Proposed patch
>
> The original patch has been updated to ignore the test added by 
> AC_CANONICAL_TARGET. Program prefix can only be set from the command 
> line of configure.
>
> ./configure --target=blah
> results in
> program_prefix=
>
> ./configure --target=blah --program-prefix=blah
> results in
> program_prefix=blah
>
> The attached patches reflect the code to do this change.
>
> -rick
>
>
>
> _______________________________________________
> LLVM Developers mailing list
> LLVMdev at cs.uiuc.edu         http://llvm.cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20121219/1ba570db/attachment.html>


More information about the llvm-dev mailing list