Hi, This patch fixes PR d/87866. The libiberty function is more portable than the one provided by the dmd front-end. I checked other places where FileName::canonicalName is used internally to dmd, but found none that would be used by us.
Bootstrapped, ran D2 testsuite on x86_64-linux-gnu. Commited to trunk as r266429. Iain --- gcc/d/ChangeLog: 2018-11-24 Iain Buclaw <ibuc...@gdcproject.org> PR d/87866 * d-incpath.cc (add_globalpaths): Use lrealpath to get canonical name. (add_filepaths): Likewise. ---
diff --git a/gcc/d/d-incpath.cc b/gcc/d/d-incpath.cc index be08ccb5f3b..87db8164134 100644 --- a/gcc/d/d-incpath.cc +++ b/gcc/d/d-incpath.cc @@ -78,7 +78,7 @@ add_globalpaths (Strings *paths) for (size_t i = 0; i < paths->dim; i++) { const char *path = (*paths)[i]; - const char *target = FileName::canonicalName (path); + const char *target = lrealpath (path); if (target == NULL || !FileName::exists (target)) { @@ -105,7 +105,7 @@ add_filepaths (Strings *paths) for (size_t i = 0; i < paths->dim; i++) { const char *path = (*paths)[i]; - const char *target = FileName::canonicalName (path); + const char *target = lrealpath (path); if (!FileName::exists (target)) {