diff options
Diffstat (limited to 'ld/ldmain.c')
-rw-r--r-- | ld/ldmain.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/ld/ldmain.c b/ld/ldmain.c index 214847d..284b975 100644 --- a/ld/ldmain.c +++ b/ld/ldmain.c @@ -72,6 +72,10 @@ char *program_name; /* The prefix for system library directories. */ char *ld_sysroot; +/* The canonical representation of ld_sysroot. */ +char * ld_canon_sysroot; +int ld_canon_sysroot_len; + /* The file that we're creating. */ bfd *output_bfd = 0; @@ -234,6 +238,14 @@ main (argc, argv) #endif ld_sysroot = TARGET_SYSTEM_ROOT; + if (ld_sysroot && *ld_sysroot) + ld_canon_sysroot = lrealpath (ld_sysroot); + + if (ld_canon_sysroot) + ld_canon_sysroot_len = strlen (ld_canon_sysroot); + else + ld_canon_sysroot_len = -1; + /* Set the default BFD target based on the configured target. Doing this permits the linker to be configured for a particular target, and linked against a shared BFD library which was configured for |