Re: [PATCH] ld: Unify the directory separator on Windows.

Jan Dubiec <[email protected]>
Newsgroups gmane.comp.gnu.binutils
Message-ID <[email protected]>
On 26.07.2026 06:23, Maciej W. Rozycki wrote:
> On Wed, 22 Jul 2026, Jan Dubiec wrote:
> 
>> diff --git a/ld/ldfile.c b/ld/ldfile.c
>> index f47e860d437..00fe1d90d44 100644
>> --- a/ld/ldfile.c
>> +++ b/ld/ldfile.c
>> @@ -47,12 +47,8 @@ search_dirs_type *search_head;
>>   #ifdef VMS
>>   static char *slash = "";
>>   #else
>> -#if defined (_WIN32) && !defined (__CYGWIN32__)
>> -static char *slash = "\\";
>> -#else
>>   static char *slash = "/";
>>   #endif
>> -#endif
> 
>   I think this needs to be complemented with a corresponding update to the
> testsuite, now that a backslash is no longer expected to be there.  Here
> is a list of files affected AFAICT:
> 
> ld/testsuite/ld-elf/retain5.map
> ld/testsuite/ld-plugin/plugin-10.d
> ld/testsuite/ld-plugin/plugin-11.d
> ld/testsuite/ld-plugin/plugin-18.d
> ld/testsuite/ld-plugin/plugin-19.d
> ld/testsuite/ld-plugin/plugin-20.d
> ld/testsuite/ld-plugin/plugin-22.d
> 
> Would you please try and fix them since you've got the right environment
> to verify such a change?
> 
>    Maciej

It took some time because I had to experiment a bit with 
--enable-plugins and its interactions with other options. At the same 
time, I had to adjust ld/testsuite/config/default.exp to make it 
compatible with Windows.

Anyway, I have modified and tested all of the patches mentioned above, 
and there have been no regressions. I will post the updated patch in a 
new thread shortly.

In another thread, I will also post a preliminary patch for 
ld/testsuite/config/default.exp, as I may have a few questions about it.

/J.D.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.