xref: /openbsd/gnu/usr.bin/perl/README.micro (revision 898184e3)
143890927Smillertmicroperl is supposed to be a really minimal perl, even more
255745691Smillertminimal than miniperl.  No Configure is needed to build microperl,
355745691Smillerton the other hand this means that interfaces between Perl and your
455745691Smillertoperating system are left very -- minimal.
555745691Smillert
655745691SmillertAll this is experimental.  If you don't know what to do with microperl
7*898184e3Ssthenyou probably shouldn't.  Please don't report bugs in microperl; fix the
8*898184e3Ssthenbugs.  (Bugs reports about microperl without fixes/patches are equivalent
9*898184e3Ssthento wishlist requests - they won't be discarded, but they likely won't get
10*898184e3Ssthenworked on either, unless they chance to coincide with someone's personal itch)
1155745691Smillert
1285009909SmillertWe assume ANSI C89 plus the following:
13*898184e3Ssthen- <stddef.h>, <stdlib.h>
1485009909Smillert- rename()
1585009909Smillert- opendir(), readdir(), closedir() (via dirent.h)
16*898184e3Ssthen- memchr(), memcmp(), memcpy(), memset() (via string.h)
1785009909Smillert- (a safe) putenv() (via stdlib.h)
1885009909Smillert- strtoul() (via stdlib.h)
1985009909Smillert(grep for 'define' in uconfig.sh.)
2085009909SmillertAlso, Perl times() is defined to always return zeroes.
2185009909Smillert
2255745691SmillertIf you are still reading this and you are itching to try out microperl:
2355745691Smillert
2455745691Smillert	make -f Makefile.micro
2555745691Smillert
26*898184e3SsthenThe defaults assume a little endian LP32 platform - ie long and pointers are
27*898184e3Ssthen32 bits, so sizeof(long) and sizeof(void *) are 4
28*898184e3SsthenIf your platform is little endian LP64 - ie long and pointers are 64 bits,
29*898184e3Ssthensizeof(long) and sizeof(void *) are 8, then you first need to run
30*898184e3Ssthen
31*898184e3Ssthen	make -f Makefile.micro regen_uconfig64
32*898184e3Ssthen
33*898184e3Ssthento generate a suitable uconfig.h
34*898184e3Ssthen
3543890927SmillertIf you make changes to uconfig.sh, run
3655745691Smillert
3743890927Smillert	make -f Makefile.micro regen_uconfig
3855745691Smillert
39*898184e3Ssthento regenerate uconfig.h.  (or regen_uconfig64 if you're editing uconfig64.sh)
40*898184e3Ssthen
41*898184e3Ssthen
42*898184e3SsthenIf neither of the above default configs work on your platform, you might want
43*898184e3Ssthento try
44850e2753Smillert
45850e2753Smillert	make -f Makefile.micro patch_uconfig
46850e2753Smillert
47850e2753Smillert*before* the "make -f Makefile.micro".  This tries to minimally patch
48850e2753Smillertthe uconfig.sh using your *current* Perl so that your microperl has
49850e2753Smillertthe correct basic types and sizes and byteorder.
50