d'oh; when specifying CPPFLAGS, gcc should use them.
while here, restructure the file. With these changes, mirbsdksh-1.2 passes all expectations and tests on Walgrind GNU/Linux (-current version); thanks to cnuke@ (Josef "Jupp" Söntgen) to having me a test account to validate this.
This commit is contained in:
17
BuildGNU.sh
17
BuildGNU.sh
@@ -1,5 +1,5 @@
|
||||
#!/bin/sh
|
||||
# $MirBSD: BuildGNU.sh,v 1.2 2004/03/21 01:51:25 tg Exp $
|
||||
# $MirBSD: BuildGNU.sh,v 1.3 2004/03/21 02:47:58 tg Exp $
|
||||
#-
|
||||
# Copyright (c) 2004
|
||||
# Thorsten "mirabile" Glaser <x86@ePost.de>
|
||||
@@ -20,14 +20,23 @@
|
||||
#-
|
||||
# Build the mirbsdksh on GNU operating systems
|
||||
|
||||
CC="${CC:-gcc}"
|
||||
CPPFLAGS="$CPPFLAGS -DKSH -DHAVE_CONFIG_H -I."
|
||||
CFLAGS="-O2 -fomit-frame-pointer -fno-strict-aliasing -static $CFLAGS"
|
||||
|
||||
if [ -e strlcpy.c -a -e strlcat.c ]; then
|
||||
echo "Configuring..."
|
||||
/bin/sh ./configure
|
||||
/bin/sh ./siglist.sh "gcc -E -DKSH -DHAVE_CONFIG_H -I." \
|
||||
<siglist.in >siglist.out
|
||||
echo "Generating prerequisites..."
|
||||
/bin/sh ./siglist.sh "gcc -E $CPPFLAGS" <siglist.in >siglist.out
|
||||
/bin/sh ./emacs-gen.sh emacs.c >emacs.out
|
||||
${CC:-gcc} -O2 -fomit-frame-pointer -static $CFLAGS -o ksh *.c
|
||||
echo "Building..."
|
||||
$CC $CFLAGS $CPPFLAGS -o ksh *.c
|
||||
echo "Finalizing..."
|
||||
tbl <ksh.1tbl | nroff -mandoc -Tascii >ksh.cat1
|
||||
strip --strip-unneeded --strip-all -R .note -R .comment ksh
|
||||
size ksh
|
||||
echo "done."
|
||||
else
|
||||
echo "Copy strlcpy.c and strlcat.c here first, and"
|
||||
echo "optionally kill Ulrich Drepper & co. for not"
|
||||
|
Reference in New Issue
Block a user