+2017-06-16 Richard Earnshaw <rearnsha@arm.com>
+
+ * genmultilib (multilib_reuse): Allow an explicit period to be escaped
+ with a backslash. Remove the backslash after substituting unescaped
+ periods.
+ * doc/fragments.texi (MULTILIB_REUSE): Document it.
+
2017-06-16 Richard Earnshaw <rearnsha@arm.com>
* config.gcc: (arm*-*-*): When building a-profile libraries, force
part is the option set used to build multilib and the right part is the option
set that will reuse this multilib. Both parts should only use options
specified in @code{MULTILIB_OPTIONS} and the equality signs found in options
-name should be replaced with periods. The order of options in the left part
-matters and should be same with those specified in @code{MULTILIB_REQUIRED} or
-aligned with the order in @code{MULTILIB_OPTIONS}. There is no such limitation
-for options in the right part as we don't build multilib from them.
+name should be replaced with periods. An explicit period in the rule can be
+escaped by preceding it with a backslash. The order of options in the left
+part matters and should be same with those specified in
+@code{MULTILIB_REQUIRED} or aligned with the order in @code{MULTILIB_OPTIONS}.
+There is no such limitation for options in the right part as we don't build
+multilib from them.
@code{MULTILIB_REUSE} is different from @code{MULTILIB_MATCHES} in that it
sets up relations between two option sets rather than two options. Here is an
for rrule in ${multilib_reuse}; do
# The left part of the rule are the options we used to build multilib.
# The right part of the rule are the options that can reuse this multilib.
- combo=`echo ${rrule} | sed -e 's/=.*$//' -e 's/\./=/g'`
- copts=`echo ${rrule} | sed -e 's/^.*=//' -e 's/\./=/g'`
+ combo=`echo ${rrule} | sed -e 's/=.*$//' -e 's/\([^\\]\)\./\1=/g' -e 's/\\\././g'`
+ copts=`echo ${rrule} | sed -e 's/^.*=//' -e 's/\([^\\]\)\./\1=/g' -e 's/\\\././g'`
# The variable ${combinations} are the option combinations we will build
# multilib from. If the combination in the left part of reuse rule isn't
# in this variable, it means no multilib will be built for current reuse