https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87866
--- Comment #6 from ro at CeBiTec dot Uni-Bielefeld.DE <ro at CeBiTec dot Uni-Bielefeld.DE> --- > --- Comment #5 from Iain Buclaw <ibuclaw at gdcproject dot org> --- > Based on what you described is the problem, I think this is done. I'm pretty certain it is. I've successfully been using the following similar patch for some time: diff --git a/gcc/d/d-system.h b/gcc/d/d-system.h --- a/gcc/d/d-system.h +++ b/gcc/d/d-system.h @@ -50,4 +50,8 @@ #undef tolower #define tolower(c) TOLOWER(c) +/* Use libiberty's lrealpath to avoid portability problems. */ +#undef realpath +#define realpath(a, b) lrealpath((a)) + #endif /* GCC_D_SYSTEM_H */ Thanks. Rainer