[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [MiNT] Project announcement: libcmini



Cool stuff. One question though: why not github? It would make it easier for me to contribute if I could just send a pull request to upstream. I admit I don't know what features atariforge has, so feel free to ignore me.

On 26/06/2013 07:09, Markus Fröschle wrote:
Hi all,

just wanted to let you know that I created a new project on AtariForge. Although not directly related to EmuTOS or ColdFire, this is a cross post to those lists also since I think its interesting for all of you. My apologies if this is not desired.


announcement: libcmini, a tiny and simple libc for TOS/MiNT and gcc.

Mintlib, the standard C library for TOS/MiNT is feature-rich, (nearly) standards-conformant and ideal for porting Unix/Linux software to the Atari platform.

It however has a serious drawback for small GEM-based utilities (that just need an occasional fread() and sprintf() now and then): being standards-conformant, it creates huge (not to say bloated) programs and has created the popular belief that the GNU cross compiler toolchain would be unusable for creating low-footprint binaries.

In fact, it's not the toolchain's fault (gcc is perfectly suited to create compact code) - it's the mintlib that causes binaries getting so huge.

libcmini is meant to fill this gap: provide a libc that's well suited to create low-footprint binaries with a feature set comparable to what Pure-C had.

The library is currently far from finished (e.g. stdio unbuffered, directly calling GEMDOS functions, command line handling and lots of functions missing, many functions still stupidly implemented), but it's already quite usable and shows that the approach is sound:

a simple "Hello World":

#include <stdio.h>

int main(int argc, char *argv[])
{
     printf("hello world\n");
}

compiled to HELLO.APP (m68000, -Os, stripped):

mintlib: 118225 bytes
libcmini: 2281 bytes

Libcmini already fully supports gcc's multilib feature (Makefile provided that generates the library for all supported flavours of m68k targets) and comes with a "near real world" GEM-based example program skeleton including a Makefile that shows how to make use of it (plain m68000, m68020-60 and m5475 as well as their -mshort equivalent targets available), ready to use. One strong hope is that this will contribute to the availability of more native Coldfire applications.

Program size saving is still significant with more complex programs (medium complex GEM app fits in less than 15k, mintlib equivalent about 10 times larger).

Libcmini is available at http://www.atariforge.org/gf/project/libcmini.

Interested parties are kindly invited to participate in the project, the library is free to use for anybody who can make use of it (LGPL license although the required "legalese" is still missing from the sources).

Constructive feedback is desired and since there is still a whole lot to do, individual participation is more than welcome.

Regards,
Markus










--
Cheers,
Mariusz Buras.
---
http://sqward.net
http://www.linkedin.com/in/mariuszburas