]> gcc.gnu.org Git - gcc.git/blobdiff - gcc/genmultilib
invoke.texi: Document -print-multiarch.
[gcc.git] / gcc / genmultilib
index dc4751b0439b29c557a5549a6c2f4de4ffe50242..09b63465b26a6e35d7e91f256137085958ed62c5 100644 (file)
@@ -84,6 +84,8 @@
 # This argument can be used together with MULTILIB_EXCEPTIONS and will take
 # effect after the MULTILIB_EXCEPTIONS.
 
+# The optional ninth argument is the multiarch name.
+
 # The last option should be "yes" if multilibs are enabled.  If it is not
 # "yes", all GCC multilib dir names will be ".".
 
@@ -133,7 +135,8 @@ extra=$5
 exclusions=$6
 osdirnames=$7
 multilib_required=$8
-enable_multilib=$9
+multiarch=$9
+enable_multilib=${10}
 
 echo "static const char *const multilib_raw[] = {"
 
@@ -261,6 +264,9 @@ fi
 # names.
 toosdirnames=
 defaultosdirname=
+if [ -n "${multiarch}" ]; then
+  defaultosdirname=::${multiarch}
+fi
 if [ -n "${osdirnames}" ]; then
   set x ${osdirnames}
   shift
@@ -268,6 +274,9 @@ if [ -n "${osdirnames}" ]; then
     case "$1" in
       .=*)
         defaultosdirname=`echo $1 | sed 's|^.=|:|'`
+       if [ -n "${multiarch}" ]; then
+         defaultosdirname=${defaultosdirname}:${multiarch}
+       fi
        shift
        ;;
       *=*)
@@ -353,13 +362,13 @@ for combo in ${combinations}; do
     dirout=`echo ${combo} | sed -e 's/=/-/g'`
   fi
   # Remove the leading and trailing slashes.
-  dirout=`echo ${dirout} | sed -e 's|^/||' -e 's|/$||g'`
+  dirout=`echo ${dirout} | sed -e 's|^/||' -e 's|/*:/*|:|' -e 's|/$||g'`
 
   # Use the OS directory names rather than the option names.
   if [ -n "${toosdirnames}" ]; then
     osdirout=`echo ${combo} | sed ${toosdirnames}`
     # Remove the leading and trailing slashes.
-    osdirout=`echo ${osdirout} | sed -e 's|^/||' -e 's|/$||g'`
+    osdirout=`echo ${osdirout} | sed -e 's|^/||' -e 's|/*:/*|:|' -e 's|/$||g'`
     if [ "x${enable_multilib}" != xyes ]; then
       dirout=".:${osdirout}"
       disable_multilib=yes
This page took 0.031528 seconds and 5 git commands to generate.