mirbsdksh-1.3

tested on
* Linux shell.thinknerd.de 2.4.25-grsec #1 Mon Mar 29 08:50:10 CEST 2004 i686 GNU/Linux
* SunOS stinky 5.8 Generic_108528-21 sun4u sparc
  -> SHELL=ksh LDFLAGS=-ldl ksh ./BuildGNU.sh
  (using GNU bash for preparing should work, too)
* MirBSD odem.66h.42h.de 7 Kv#7uA9-20040323 GENERIC#358 i386
This commit is contained in:
tg 2004-04-07 18:43:42 +00:00
parent 95ae34eb0c
commit a10bbd0c7f
2 changed files with 20 additions and 9 deletions

View File

@ -1,5 +1,5 @@
#!/bin/sh #!/bin/sh
# $MirBSD: BuildGNU.sh,v 1.6 2004/04/07 17:14:11 tg Exp $ # $MirBSD: BuildGNU.sh,v 1.7 2004/04/07 18:43:41 tg Exp $
#- #-
# Copyright (c) 2004 # Copyright (c) 2004
# Thorsten "mirabile" Glaser <x86@ePost.de> # Thorsten "mirabile" Glaser <x86@ePost.de>
@ -19,19 +19,27 @@
# possibility of such damage. # possibility of such damage.
#- #-
# Build the mirbsdksh on GNU operating systems (and more?) # Build the mirbsdksh on GNU operating systems (and more?)
# Note: on some systems, you must run it with a pre-existing bash or
# korn shell, because the Bourne seems to choke on the if sta-
# tement below for some unknown reason.
# Note: Solaris might want LDFLAGS=-ldl, some GNU/Linux systems usu-
# ally have problems with their perl path (use -I for the .ph)
SHELL="${SHELL:-/bin/sh}"; export SHELL
CONFIG_SHELL="${SHELL}"; export CONFIG_SHELL
CC="${CC:-gcc}" CC="${CC:-gcc}"
CPPFLAGS="$CPPFLAGS -DHAVE_CONFIG_H -I. -DKSH" CPPFLAGS="$CPPFLAGS -DHAVE_CONFIG_H -I. -DKSH"
CFLAGS="-O2 -fomit-frame-pointer -fno-strict-aliasing -static $CFLAGS" CFLAGS="-O2 -fomit-frame-pointer -fno-strict-aliasing $CFLAGS"
LDFLAGS="${LDFLAGS:--static}"
if [ -e strlcpy.c -a -e strlcat.c ]; then if [ -e strlcpy.c -a -e strlcat.c ]; then
echo "Configuring..." echo "Configuring..."
/bin/sh ./configure $SHELL ./configure
echo "Generating prerequisites..." echo "Generating prerequisites..."
/bin/sh ./siglist.sh "gcc -E $CPPFLAGS" <siglist.in >siglist.out $SHELL ./siglist.sh "gcc -E $CPPFLAGS" <siglist.in >siglist.out
/bin/sh ./emacs-gen.sh emacs.c >emacs.out $SHELL ./emacs-gen.sh emacs.c >emacs.out
echo "Building..." echo "Building..."
$CC $CFLAGS $CPPFLAGS -o ksh *.c $CC $CFLAGS $CPPFLAGS $LDFLAGS -o ksh *.c
echo "Finalizing..." echo "Finalizing..."
tbl <ksh.1tbl | nroff -mandoc -Tascii >ksh.cat1 tbl <ksh.1tbl | nroff -mandoc -Tascii >ksh.cat1
strip -R .note -R .comment -R .rel.dyn -R .sbss \ strip -R .note -R .comment -R .rel.dyn -R .sbss \
@ -43,3 +51,6 @@ else
echo "optionally kill Ulrich Drepper & co. for not" echo "optionally kill Ulrich Drepper & co. for not"
echo "including it into your broken libc imitation" echo "including it into your broken libc imitation"
fi fi
# If you want to test mirbsdksh:
# $ perl ./tests/th -s ./tests -p ./ksh -C pdksh,sh,ksh,posix,posix-upu

View File

@ -1,4 +1,4 @@
/* $MirBSD: version.c,v 1.2 2004/03/21 01:51:26 tg Exp $ */ /* $MirBSD: version.c,v 1.3 2004/04/07 18:43:42 tg Exp $ */
/* $OpenBSD: version.c,v 1.12 1999/07/14 13:37:24 millert Exp $ */ /* $OpenBSD: version.c,v 1.12 1999/07/14 13:37:24 millert Exp $ */
/* /*
@ -7,5 +7,5 @@
#include "sh.h" #include "sh.h"
const char ksh_version [] = const char ksh_version[] =
"@(#)PD KSH v5.2.14 99/07/13.2 MirOS $Revision: 1.2 $"; "@(#)PD KSH v5.2.14 99/07/13.2 MirOS $Revision: 1.3 $";