diff options
author | Phil Edwards <phil@codesourcery.com> | 2003-10-23 05:16:56 +0000 |
---|---|---|
committer | Phil Edwards <pme@gcc.gnu.org> | 2003-10-23 05:16:56 +0000 |
commit | 55047c9d1a0c3278720f91d54f8b70e9e04e0a25 (patch) | |
tree | 1303905d2700833bdec53aa9ae9e3e0b29f9438d /gcc/genmultilib | |
parent | 8f9ba40588fc9023a09889da8a7b69a85aea486d (diff) | |
download | gcc-55047c9d1a0c3278720f91d54f8b70e9e04e0a25.tar.gz |
config.gcc: Update *-*-vxworks* generic hook and comments.
2003-10-22 Phil Edwards <phil@codesourcery.com>
* config.gcc: Update *-*-vxworks* generic hook and comments.
(arm-wrs-vxworks, i[4567]86-wrs-vxworks, mips-wrs-vxworks,
mips-wrs-windiss, sh-wrs-vxworks): New stanzas.
* genmultilib: Allow the MULTILIB_OSDIRNAMES to be mapped directly.
* config/svr4.h (SWITCH_TAKES_ARG): Undefine it before redefining it.
* config/windiss.h: New file.
* config/arm/t-vxworks: New file.
* config/arm/vxworks.h: New file.
* config/i386/t-vxworks: New file.
* config/i386/vxworks.h: New file.
* config/mips/t-vxworks: New file.
* config/mips/vxworks.h: New file.
* config/mips/windiss.h: New file.
* config/sh/t-vxworks: New file.
* config/sh/vxworks.h: New file.
From-SVN: r72834
Diffstat (limited to 'gcc/genmultilib')
-rw-r--r-- | gcc/genmultilib | 68 |
1 files changed, 50 insertions, 18 deletions
diff --git a/gcc/genmultilib b/gcc/genmultilib index 097ecf95dee..b5ffa9d4d52 100644 --- a/gcc/genmultilib +++ b/gcc/genmultilib @@ -63,10 +63,15 @@ # for the rule to exclude a set. Options can be preceded with a '!' to # match a logical NOT. -# The optional sevenths argument is a list of OS subdirectory names. -# The format is the same as of the second argument. -# The difference is that second argument describes multilib directories -# in GCC conventions, while this one the OS multilib convention. +# The optional seventh argument is a list of OS subdirectory names. +# The format is either the same as of the second argument, or a set of +# mappings. When it is the same as the second argument, it describes +# the multilib directories using OS conventions, rather than GCC +# conventions. When it is a set of mappings of the form gccdir=osdir, +# the left side gives the GCC convention and the right gives the +# equivalent OS defined location. If the osdir part begins with a !, +# the os directory names are used exclusively. Use the mapping when +# there is no one-to-one equivalence between GCC levels and the OS. # The last option should be "yes" if multilibs are enabled. If it is not # "yes", all GCC multilib dir names will be ".". @@ -216,24 +221,44 @@ fi # Construct a sed pattern which will convert option names to OS directory # names. toosdirnames= +defaultosdirname= if [ -n "${osdirnames}" ]; then set x ${osdirnames} shift - for set in ${options}; do - for opts in `echo ${set} | sed -e 's|/| |'g`; do - patt="/" - for opt in `echo ${opts} | sed -e 's_|_ _'g`; do - if [ "$1" != "${opt}" ]; then - toosdirnames="${toosdirnames} -e s|/${opt}/|/${1}/|g" - patt="${patt}${1}/" - if [ "${patt}" != "/${1}/" ]; then - toosdirnames="${toosdirnames} -e s|${patt}|/${1}/|g" + while [ $# != 0 ] ; do + case "$1" in + .=*) + defaultosdirname=`echo $1 | sed 's|^.=|:|'` + shift + ;; + *=*) + patt=`echo $1 | sed -e 's|=|/$=/|'` + toosdirnames="${toosdirnames} -e s=^/${patt}/=" + shift + ;; + *) + break + ;; + esac + done + + if [ $# != 0 ]; then + for set in ${options}; do + for opts in `echo ${set} | sed -e 's|/| |'g`; do + patt="/" + for opt in `echo ${opts} | sed -e 's_|_ _'g`; do + if [ "$1" != "${opt}" ]; then + toosdirnames="${toosdirnames} -e s|/${opt}/|/${1}/|g" + patt="${patt}${1}/" + if [ "${patt}" != "/${1}/" ]; then + toosdirnames="${toosdirnames} -e s|${patt}|/${1}/|g" + fi fi - fi + done + shift done - shift done - done + fi fi # We need another recursive shell script to correctly handle positive @@ -275,7 +300,7 @@ for set in ${options}; do done done optout=`echo ${optout} | sed -e 's/^ //'` -echo "\". ${optout};\"," +echo "\".${defaultosdirname} ${optout};\"," # Work over the list of combinations. We have to translate each one # to use the directory names rather than the option names, we have to @@ -299,7 +324,14 @@ for combo in ${combinations}; do if [ "x${enable_multilib}" != xyes ]; then dirout=".:${osdirout}" else - dirout="${dirout}:${osdirout}" + case "${osdirout}" in + !*) + dirout=`echo ${osdirout} | sed 's/^!//'` + ;; + *) + dirout="${dirout}:${osdirout}" + ;; + esac fi else if [ "x${enable_multilib}" != xyes ]; then |