<?xml version="1.0" encoding="utf-8"?>
<feed xml:lang="en" xmlns="http://www.w3.org/2005/Atom"><title>Recent changes to 134: [devkitARM] Windows shenanigans when passing -L to ld</title><link href="https://sourceforge.net/p/devkitpro/bugs/134/" rel="alternate"/><link href="https://sourceforge.net/p/devkitpro/bugs/134/feed.atom" rel="self"/><id>https://sourceforge.net/p/devkitpro/bugs/134/</id><updated>2018-01-21T23:58:59.229000Z</updated><subtitle>Recent changes to 134: [devkitARM] Windows shenanigans when passing -L to ld</subtitle><entry><title>[devkitARM] Windows shenanigans when passing -L to ld</title><link href="https://sourceforge.net/p/devkitpro/bugs/134/" rel="alternate"/><published>2018-01-21T23:58:59.229000Z</published><updated>2018-01-21T23:58:59.229000Z</updated><author><name>Scott Norton</name><uri>https://sourceforge.net/u/scnorton/</uri></author><id>https://sourceforge.net7056035c7e76dc3959baa56e383f0d98292f7923</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;Invocation:&lt;br/&gt;
&lt;code&gt;${DEVKITARM}/bin/arm-none-eabi-ld -L path/to/library -T ld_script.ld -o foo.elf src/foo.o asm/crt0.s -lgcc -lc&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;Example line from ld_script.ld:&lt;br/&gt;
&lt;code&gt;path/to/library/libc.a:memcpy.o(.text);&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;Result on OSX and Linux:  ELF builds without error&lt;/p&gt;
&lt;p&gt;Result on Windows (cygwin):&lt;/p&gt;
&lt;div class="codehilite"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;`memcpy' referenced in section `.text' of src/foo.o: defined in discarded section `.text' of path/to/library\libc.a(memcpy.o)
&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;For whatever reason, &lt;code&gt;ld&lt;/code&gt; appends an NT-style forward slash to the &lt;code&gt;-L&lt;/code&gt; path even when the rest of the path exclusively uses backslashes.  It is then unable to equate the resulting mixed path syntax with any equivalent path in the linker script.&lt;/p&gt;&lt;/div&gt;</summary></entry></feed>