Rick Foos
2012-Sep-26 21:14 UTC
[LLVMdev] Add --program-prefix support with AC_CANONICAL_TARGET override.
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
--
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-TEST-SUITE-Add-program-prefix-AC_CANONICAL_TARGET-override.patch
Type: text/x-patch
Size: 13580 bytes
Desc: not available
URL:
<http://lists.llvm.org/pipermail/llvm-dev/attachments/20120926/a096b876/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-LLVM-Add-program-prefix-AC_CANONICAL_TARGET-override.patch
Type: text/x-patch
Size: 10392 bytes
Desc: not available
URL:
<http://lists.llvm.org/pipermail/llvm-dev/attachments/20120926/a096b876/attachment-0001.bin>
Dmitry Mikushin
2012-Dec-19 01:02 UTC
[LLVMdev] Add --program-prefix support with AC_CANONICAL_TARGET override.
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>