Fix more GDB build breakage on mingw32
[deliverable/binutils-gdb.git] / ld / ldfile.c
index e3977377b8d574030c577586a6be1c04b6d35c29..3b37a0a3e2636b2ac3b04e0ec074d14fbfa5315b 100644 (file)
@@ -1,5 +1,5 @@
 /* Linker file opening and searching.
-   Copyright (C) 1991-2016 Free Software Foundation, Inc.
+   Copyright (C) 1991-2017 Free Software Foundation, Inc.
 
    This file is part of the GNU Binutils.
 
@@ -112,6 +112,8 @@ ldfile_add_library_path (const char *name, bfd_boolean cmdline)
      now.  */
   if (name[0] == '=')
     new_dirs->name = concat (ld_sysroot, name + 1, (const char *) NULL);
+  else if (CONST_STRNEQ (name, "$SYSROOT"))
+    new_dirs->name = concat (ld_sysroot, name + strlen ("$SYSROOT"), (const char *) NULL);
   else
     new_dirs->name = xstrdup (name);
 }
This page took 0.024702 seconds and 4 git commands to generate.