diff options
author | Richard Earnshaw <rearnsha@arm.com> | 2017-06-16 21:05:08 +0000 |
---|---|---|
committer | Richard Earnshaw <rearnsha@gcc.gnu.org> | 2017-06-16 21:05:08 +0000 |
commit | fa0b638fed271cbd26dcfba623e3fd51995470c8 (patch) | |
tree | 822455acd69da19fe65310e15eb9056099d9f16e /gcc/genmultilib | |
parent | f0cd49c501a98050f8b2c71b6866f57e94a4c1c6 (diff) | |
download | gcc-fa0b638fed271cbd26dcfba623e3fd51995470c8.zip gcc-fa0b638fed271cbd26dcfba623e3fd51995470c8.tar.gz gcc-fa0b638fed271cbd26dcfba623e3fd51995470c8.tar.bz2 |
[arm] Allow explicit periods to be escaped in
The MULTILIB_REUSE mapping rules are built up using periods to
represent the placement of '=' signs in the command line syntax. This
presents a problem if the option contains an explicit period because
that is translated unconditionally. The result is that it is not
currently possible to write a reuse rule that would match the
ARMv8-M mainline architecture:
-march=armv8-m.main
To fix this, this patch allows an explicit period to be escaped by writing
\. and by then preserving the period into the generated multilib header.
* 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.
From-SVN: r249298
Diffstat (limited to 'gcc/genmultilib')
-rw-r--r-- | gcc/genmultilib | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/gcc/genmultilib b/gcc/genmultilib index 2501f54..c8bcdf3 100644 --- a/gcc/genmultilib +++ b/gcc/genmultilib @@ -466,8 +466,8 @@ echo "static const char *const multilib_reuse_raw[] = {" 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 |