[LLVMdev] Add --program-prefix support with AC_CANONICAL_TARGET override.
Rick Foos
rfoos at codeaurora.org
Wed Sep 26 14:14:10 PDT 2012
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>
More information about the llvm-dev
mailing list