-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA384 Build instructions:
• my stdio-c99, arc4random¹ and mkstemp patches still aren’t merged, which means we must disable C99 mode in gcc (see below) and add an either tempnam or, preferred, mkstemp function ① while mksh doesn’t use arc4random(3) any longer, mkstemp() does • the initial CVS checkout is passwordless, using ssh % mkdir mkshklibctest mkshklibctest/builddir % cd mkshklibctest % env CVS_RSH=ssh cvs -d :ext:_anon...@anoncvs.mirbsd.org:/cvs \ co -PD"2010/08/29" mksh contrib/hosted/tg/deb/klibc % cd builddir % klcc -c -o arc4random.o ../contrib/hosted/tg/deb/klibc/arc4random.c % klcc -c -o mkstemp.o ../contrib/hosted/tg/deb/klibc/mkstemp.c % ar rcs libMKSTEMP.a arc4random.o mkstemp.o % env HAVE_CAN_FSTACKPROTECTORALL=0 CFLAGS=-Wextra CC=klcc \ CPPFLAGS='-DMKSH_ASSUME_UTF8 -DMKSH_BINSHREDUCED -DMKSH_NO_LIMITS' \ HAVE_CAN_STDG99=0 HAVE_CAN_STDC99=0 LDFLAGS=-L. LIBS=-lMKSTEMP \ bash ../mksh/Build.sh -r Explanation of the last line: • HAVE_CAN_FSTACKPROTECTORALL=0 forces Build.sh to not check for (and use, if found) -fstack-protector-all since that will pull in libssp (with gcc4) • CFLAGS=-Wextra (as long as it’s set to anything involving a hyphen-minus) tells Build.sh to not use the default CFLAGS, which include -O2 (or -O, or -xO2 with SUNWcc, etc.) • CC=klcc should be obvious • CPPFLAGS: – -DMKSH_ASSUME_UTF8 enables UTF-8 mode by default; I checked that the initramfs console is UTF-8 using Grml – -DMKSH_BINSHREDUCED is needed by Debian and switches mksh into the “sh” mode (set -o sh) if called as “sh” or “-sh” which disables some Korn shell features – -DMKSH_NO_LIMITS is needed for klibc and disables use of getrlimit() and setrlimit() from the ulimit builtin • HAVE_CAN_STDG99=0 HAVE_CAN_STDC99=0 disable -std={gnu,c}99 which are otherwise probed and used automatically, but the klibc <stdio.h> still uses “extern inline” (gnu89 mode)… • LDFLAGS=-L. LIBS=-lMKSTEMP pull in mkstemp() from earlier • bash ../mksh/Build.sh ⇒ using GNU bash here for easiest reproduction, building with srcdir ≠ objdir works • -r disables automatic compilation of the manual page (speed) Now the screen should look something like this: │size mksh │ text data bss dec hex filename │ 155342 452 19352 175146 2ac2a mksh […] │Run the regression test suite: ./test.sh │Please also read the sample file dot.mkshrc and the fine manual. Let’s see… ��...@frozenfish:~/mkshklibctest/builddir $ ./mksh -c true; echo $? │0 ��...@frozenfish:~/mkshklibctest/builddir $ ./mksh -c 'print $KSH_VERSION'; echo $? │@(#)MIRBSD KSH R39 2010/08/28 │0 ��...@frozenfish:~/mkshklibctest/builddir $ ./mksh -c 'echo one; ls -l mksh; echo two'; echo $? │one │-rwxr-xr-x 1 tg tg 544120 Aug 29 14:46 mksh Here it hangs – after running an external programme it doesn’t come back. ^C kills it, usually. ��...@frozenfish:~/mkshklibctest/builddir $ ./test.sh -v also won’t get far. ^C helps here as well to regain the tty. Plan 9 and Syllable Desktop exhibited the same symptoms last time I checked. Now, the interesting part, Haiku no longer does: http://dev.haiku-os.org/ticket/5567 See also: http://dev.haiku-os.org/changeset/35836 Back when I applied the patches on top of 1.5.15-1 I could get a working shell, interestingly enough. Now, 20-fix-getrusage is applied and the kernel header situation changed, but this bug seems to have crept in along the way. This is a Debian sid (i386) chroot, a-g d-u’d today, on an etch system: Linux […] 2.6.18-6-686 #1 SMP Fri Feb 19 23:40:03 UTC 2010 i686 GNU/Linux Congratulations on klibc upstream maintainership, by the way, and thanks for tracking this (I would like to ditch dietlibc on quite some architectures or – better – replace the dash that comes with klibc in its entirety; did so in Android…). bye, //mirabilos - -- FWIW, I'm quite impressed with mksh interactively. I thought it was much *much* more bare bones. But it turns out it beats the living hell out of ksh93 in that respect. I'd even consider it for my daily use if I hadn't wasted half my life on my zsh setup. :-) -- Frank Terbeck in #!/bin/mksh -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.7 (MirBSD) iQIVAwUBTHp1qXa1NLLpkAfgAQlSURAAjybsyw0CYBXC9F0G+5T2MNdpKPf3SWyG pdpXYxBFzhVphEdQH/XrLSDlL3rMJvnm/8xjcsIRpiH9L7XlWq1kMRsHLkgc+oos tzFuF6Gf2QjgMkcCfkGp/dGFQLGQFVuTt5SD832kaz+LxC5fw3c8hsNQ8JXkPPgF 78eLyQkk5DwSUa8AqlIsZ6yMGuLK0aPyLyCjrxIFDt4flS7gvcEb6Qp1W0GV91DE eOkIAnQAPzJmYqzZar6PuwhAhZOUIlu+LTebl0iBeIUB/TShCn0ILQZzBtNzF9dO s7VWhFBKNprMZXTx6Ud49/3iU7NoZubj5uItqIca4KuzrPSOwMU7UqsfWGnOlh0z /HjrdrdphTdn7Bf+MfGWUVAa0uBwNsB+kd8Ovq3+F+dy6aa45C5gJN9911Xefc4H wlzFvaAW1bmcJz8oIrRwytibVkefhZEvV6X+NbeCg+92SY2uh9f9ihA34D/TC8Zl Q610TbUELBgp0UA1Y1Opnkuthkhw8Leb/hSHeug4aUXeQPcSULBWEqj0lKaUdZeH 10IYq6STVNrAvjygMkzVD/VpCfLXPI/4+UYorLXUkYyTW59jyHy8ojNfF2NxBiUD 0VWz7Nl5qpL/qQmvoeTKxma3qsWWlhpdSQI32cM16yJBrh0GJ7z1X+rCXhnV7sjA GUwfZVSN//M= =DoQ/ -----END PGP SIGNATURE----- -- To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org