gcc.c (do_spec_1): Add %M spec token to output multilib_os_dir.
authorSteven Drake <sbd@NetBSD.org>
Tue, 22 May 2012 15:17:55 +0000 (15:17 +0000)
committerJoseph Myers <jsm28@gcc.gnu.org>
Tue, 22 May 2012 15:17:55 +0000 (16:17 +0100)
2012-05-22  Steven Drake <sbd@NetBSD.org>

* gcc.c (do_spec_1): Add %M spec token to output multilib_os_dir.

From-SVN: r187775

gcc/ChangeLog
gcc/gcc.c

index 52b2a8921c0886ac314ab52bbeb2f4eff1adde66..8b601c9bf73cf6a42676aa66ea61206b9ee654ea 100644 (file)
@@ -1,3 +1,7 @@
+2012-05-22  Steven Drake <sbd@NetBSD.org>
+
+       * gcc.c (do_spec_1): Add %M spec token to output multilib_os_dir.
+
 2012-05-22  David Edelsohn  <dje.gcc@gmail.com>
 
        * config/rs6000/rs6000.c (rs6000_aix_asm_output_dwarf_table_ref):
index e152b70539380bd75cbc1837cfba5a098d6793a1..d1ef922e051863f2ef8f2b5e6691f7b552e9219d 100644 (file)
--- a/gcc/gcc.c
+++ b/gcc/gcc.c
@@ -377,6 +377,7 @@ or with constant text in a single argument.
        If multilib_dir is set, extra entries are generated with it affixed.
  %l     process LINK_SPEC as a spec.
  %L     process LIB_SPEC as a spec.
+ %M     Output multilib_os_dir.
  %G     process LIBGCC_SPEC as a spec.
  %R     Output the concatenation of target_system_root and
         target_sysroot_suffix.
@@ -5115,6 +5116,14 @@ do_spec_1 (const char *spec, int inswitch, const char *soft_matched_part)
              return value;
            break;
 
+         case 'M':
+           if (multilib_os_dir == NULL)
+             obstack_1grow (&obstack, '.');
+           else
+             obstack_grow (&obstack, multilib_os_dir,
+                           strlen (multilib_os_dir));
+           break;
+
          case 'G':
            value = do_spec_1 (libgcc_spec, 0, NULL);
            if (value != 0)