[devkitARM] Windows shenanigans when passing -L to ld
Homebrew toolchains for wii, gamecube, 3ds, ds, gba, gp32 and psp
Brought to you by:
wntrmute
Invocation:
${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
Example line from ld_script.ld:
path/to/library/libc.a:memcpy.o(.text);
Result on OSX and Linux: ELF builds without error
Result on Windows (cygwin):
`memcpy' referenced in section `.text' of src/foo.o: defined in discarded section `.text' of path/to/library\libc.a(memcpy.o)
For whatever reason, ld
appends an NT-style forward slash to the -L
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.