/usr/src/gcc-4.9/debian/patches/gcc-setmultilib-fix.diff is in gcc-4.9-source 4.9.3-13ubuntu2.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 | Index: b/src/gcc/gcc.c
===================================================================
--- a/src/gcc/gcc.c
+++ b/src/gcc/gcc.c
@@ -7797,10 +7797,15 @@ set_multilib_dir (void)
q2++;
if (*q2 == ':')
ml_end = q2;
- new_multilib_os_dir = XNEWVEC (char, ml_end - q);
- memcpy (new_multilib_os_dir, q + 1, ml_end - q - 1);
- new_multilib_os_dir[ml_end - q - 1] = '\0';
- multilib_os_dir = *new_multilib_os_dir ? new_multilib_os_dir : ".";
+ if (ml_end - q == 1)
+ multilib_os_dir = xstrdup (".");
+ else
+ {
+ new_multilib_os_dir = XNEWVEC (char, ml_end - q);
+ memcpy (new_multilib_os_dir, q + 1, ml_end - q - 1);
+ new_multilib_os_dir[ml_end - q - 1] = '\0';
+ multilib_os_dir = new_multilib_os_dir;
+ }
if (q2 < end && *q2 == ':')
{
|