mirror of
https://github.com/RIOT-OS/RIOT.git
synced 2025-12-16 01:53:51 +01:00
llvm-ar behaves weidly when creating thin archive. This only manifests itself when using arduino sketches as these are built from the "bin" directory. Specifically, given a directory "m" and an object in "m/obj.o " an invocation with CWD==m: ``` llvm-ar rcTs ../m.a obj.o ``` Will create a maformed archive. Binutils does not have any issue with this. The following command, executed with CWD==m/.. works: ``` llvm-ar rcTs m.a m/obj.o ``` The trick used in this commit is to put the source files in a different directory than the object files and compile from there.