Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
For some toolchains used in Buildroot (x86_64 and mips64) partial linking using 'ld' directly doesn't work well, as th 'ld' default emulation may not necessarily be the correct one. Note, that the default emulation depends upon how the linker was configured at build time. The leads to different kind of build errors, like: * /usr/bin/i686-pc-linux-gnu-ld: Relocatable linking with relocations from format elf64-x86-64 (core/swupdate.o) to format elf32-i386 (core/built-in.o) is not supported. * /usr/bin/mips-linux-gnu-ld: handlers/raw_handler.o: endianness incompatible with that of the selected emulation * /usr/bin/mips64el-linux-ld: core/swupdate.o: ABI is incompatible with that of the selected Linking with GCC will pass all the appropriate linker flags to the linker. '-nostdlib' has to be added to ldflags-y to link properly without pulling in GCC libs during partial linking. Note that this patch address the same issue from a previous patch "Kbuild: fix build issue with some toolchains" [1]. However, this patch did not work properly and was reverted finally. [1] https://groups.google.com/forum/#!topic/swupdate/oVIhJmYPT8A Signed-off-by: Jörg Krause <joerg.krause@embedded.rocks>
- Loading branch information