polish, mop up whitespace, etc.

passes regressions on MirOS
This commit is contained in:
tg
2004-05-24 19:56:25 +00:00
parent bb629ad8eb
commit 6c8eabf72e
72 changed files with 364 additions and 350 deletions

View File

@@ -1,24 +1,25 @@
#!/bin/sh
# $MirBSD: Build.sh,v 1.2 2004/05/24 16:24:40 tg Exp $
# $MirBSD: Build.sh,v 1.3 2004/05/24 19:55:51 tg Exp $
#-
# Copyright (c) 2004
# Thorsten "mirabile" Glaser <x86@ePost.de>
# Thorsten Glaser <x86@ePost.de>
#
# Subject to these terms, everybody who obtained a copy of this work
# is hereby permitted to deal in the work without restriction inclu-
# ding without limitation the rights to use, distribute, sell, modi-
# fy, publically perform, give away, merge or sublicence it provided
# this notice is kept and the authors and contributors are given due
# credit in derivates or accompanying documents.
# Licensee is hereby permitted to deal in this work without restric-
# tion, including unlimited rights to use, publically perform, modi-
# fy, merge, distribute, sell, give away or sublicence, provided the
# above copyright notices, these terms and the disclaimer are retai-
# ned in all redistributions, or reproduced in accompanying documen-
# tation or other materials provided with binary redistributions.
#
# This work is provided by its developers (authors and contributors)
# "as is" and without any warranties whatsoever, express or implied,
# to the maximum extent permitted by applicable law; in no event may
# developers be held liable for damage caused, directly or indirect-
# ly, but not by a developer's malice intent, even if advised of the
# possibility of such damage.
# Licensor hereby provides this work "AS IS" and WITHOUT WARRANTY of
# any kind, expressed or implied, to the maximum extent permitted by
# applicable law, but with the warranty of being written without ma-
# licious intent or gross negligence; in no event shall an author or
# contributor be held liable for any direct, indirect or other dama-
# ge, however caused, arising in any way out of the usage of covered
# work, even if advised of the possibility of such damage.
#-
# Build the mirbsdksh on GNU and other operating systems.
# Build the more||less portable mirbsdksh on most operating systems.
# Notes for building on various operating systems:
# - on most OSes, you will need a pre-installed bash or ksh to build
# because the Bourne shell chokes on some statements below.
@@ -30,25 +31,23 @@ SHELL="${SHELL:-/bin/sh}"; export SHELL
CONFIG_SHELL="${SHELL}"; export CONFIG_SHELL
CC="${CC:-gcc}"
CPPFLAGS="$CPPFLAGS -DHAVE_CONFIG_H -I. -DKSH"
CFLAGS="-O2 -fomit-frame-pointer -fno-strict-aliasing $CFLAGS"
COPTS="-O2 -fomit-frame-pointer -fno-strict-aliasing -fno-strength-reduce"
[ -z "$WEIRD_OS" ] && LDFLAGS="${LDFLAGS:--static}"
if [ -e strlfun.c ]; then
if test -e strlfun.c; then
echo "Configuring..."
$SHELL ./configure
echo "Generating prerequisites..."
$SHELL ./siglist.sh "gcc -E $CPPFLAGS" <siglist.in >siglist.out
$SHELL ./emacs-gen.sh emacs.c >emacs.out
echo "Building..."
$CC $CFLAGS $CPPFLAGS $LDFLAGS -o ksh *.c
$CC $COPTS $CFLAGS $CPPFLAGS $LDFLAGS -o ksh.unstripped *.c
echo "Finalizing..."
tbl <ksh.1tbl | nroff -mandoc -Tascii >ksh.cat1
tbl <ksh.1tbl >ksh.1
nroff -mandoc -Tascii <ksh.1 >ksh.cat1
if [ -z "$WEIRD_OS" ]; then
cp ksh ksh.unstripped
strip -R .note -R .comment -R .rel.dyn -R .sbss \
--strip-unneeded --strip-all ksh \
|| strip ksh || mv ksh.unstripped ksh
rm -f ksh.unstripped
--strip-unneeded --strip-all ksh || strip ksh
else
echo "Remember to strip the ksh binary!"
fi
@@ -63,5 +62,5 @@ else
echo "it and try again! Due to the folks of Ulrich"
echo "Drepper & co. not including strlcpy/strlcat,"
echo "this is a necessity to circumvent the broken"
echo "libc imitation of GNU."
echo "libc imitation of GNU's."
fi