libr.a is a static library that combines every library r2 builds
and/or depends on, which means that they should be repackaged.
Before this commit, the situation was quite sorry:
* Makefile-ar.mk was parameterized by ARTYPE;
* there were three ARTYPEs, default, gnu and ios;
* the ios ARTYPE was not used and instead its logic was folded
into default;
* the gnu ARTYPE was obviously broken (typo in "rm -f libr.",
typo in "$(C_AR)") preventing it from ever running correctly;
* the default ARTYPE created libraries that did not link
on e.g. a Linux desktop, since the libr.a it created consisted
only of another .a files, and this just results in an error
trying to link:
libr.a: error adding symbols: Archive has no index; run ranlib to add one
* the default ARTYPE, when targeting iOS, performed a bunch of
useless work combining the archives as above, and then just
delegated to libtool, which overwrites the result.
After this commit:
* there is no ARTYPE (nothing in the r2 tree sets it anyway);
* there are no platform-specific assumptions about ar, such
as support for the -M option;
* there is only one code path;
* every archive is partially linked into a single object file
and then added to libr.a.
* Add SIDT operator for x86 assembler (Store Interrupt Descriptor Table Register)
* Add SLDT operator for x86 assembler (Store Local Descriptor Table Register)
* Add SMSW operator for x86 assembler (Store Machine Status Word)
* Add SGDT operator for x86 assembler (Store Global Descriptor Table Register)
* Add STMXCSR operator for x86 assembler (Store MXCSR Register State)
* Add STR operator for x86 assembler (Store Task Register)
* Add LLDT operator for x86 assembler (Load Local Descriptor Table Register)
* Add LMSW operator for x86 assembler (Load Machine Status Word)
* Add LGDT/LIDT operator for x86 assembler (Load Global/Interrupt Descriptor Table Register)
* Add FSTCW/FNSTCW operator for x86 assembler (Store x87 FPU Control Word)
* Add FSTSW/FNSTSW operator for x86 assembler (Store x87 FPU Status Word)
* Fix some issues of float instructions for x86 assembler.
* Add FSAVE/FNSAVE operator for x86 assembler (Store x87 FPU State)