report OE and compiler versions inside the build script now, where methods
to query them are known (missing: bcc/dmc/msc compilers; additional OS info besides “uname -a” and Darwin’s “hwprefs os_type” – please tell me!)
This commit is contained in:
parent
047da7a0eb
commit
2cae6c9ab5
56
Build.sh
56
Build.sh
@ -1,5 +1,5 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
srcversion='$MirOS: src/bin/mksh/Build.sh,v 1.279 2008/03/01 15:07:50 tg Rel $'
|
srcversion='$MirOS: src/bin/mksh/Build.sh,v 1.280 2008/03/03 19:40:08 tg Exp $'
|
||||||
#-
|
#-
|
||||||
# Environment used: CC CFLAGS CPPFLAGS LDFLAGS LIBS NOWARN NROFF TARGET_OS
|
# Environment used: CC CFLAGS CPPFLAGS LDFLAGS LIBS NOWARN NROFF TARGET_OS
|
||||||
# CPPFLAGS recognised: MKSH_SMALL MKSH_ASSUME_UTF8 MKSH_NOPWNAM MKSH_NOVI
|
# CPPFLAGS recognised: MKSH_SMALL MKSH_ASSUME_UTF8 MKSH_NOPWNAM MKSH_NOVI
|
||||||
@ -9,6 +9,13 @@ v() {
|
|||||||
eval "$@"
|
eval "$@"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
vv() {
|
||||||
|
_c=$1
|
||||||
|
shift
|
||||||
|
eval '$e "\$ $*" 2>&'$h
|
||||||
|
eval 'eval "$@" 2>&'$h | sed "s^${_c} "
|
||||||
|
}
|
||||||
|
|
||||||
vq() {
|
vq() {
|
||||||
eval "$@"
|
eval "$@"
|
||||||
}
|
}
|
||||||
@ -114,8 +121,7 @@ ac_testn() {
|
|||||||
fi
|
fi
|
||||||
ac_testinit "$@" || return
|
ac_testinit "$@" || return
|
||||||
cat >scn.c
|
cat >scn.c
|
||||||
eval 'v "$CC $CFLAGS $CPPFLAGS $LDFLAGS $NOWARN scn.c $LIBS" 2>&'$h | \
|
vv ']' "$CC $CFLAGS $CPPFLAGS $LDFLAGS $NOWARN scn.c $LIBS"
|
||||||
sed 's/^/] /'
|
|
||||||
test x"$tcfn" = x"no" && test -f a.out && tcfn=a.out
|
test x"$tcfn" = x"no" && test -f a.out && tcfn=a.out
|
||||||
test x"$tcfn" = x"no" && test -f a.exe && tcfn=a.exe
|
test x"$tcfn" = x"no" && test -f a.exe && tcfn=a.exe
|
||||||
if test -f $tcfn; then
|
if test -f $tcfn; then
|
||||||
@ -343,7 +349,16 @@ fi
|
|||||||
|
|
||||||
# this aids me in tracing FTBFSen without access to the buildd
|
# this aids me in tracing FTBFSen without access to the buildd
|
||||||
dstversion=`sed -n '/define MKSH_VERSION/s/^.*"\(.*\)".*$/\1/p' $srcdir/sh.h`
|
dstversion=`sed -n '/define MKSH_VERSION/s/^.*"\(.*\)".*$/\1/p' $srcdir/sh.h`
|
||||||
$e "Hello from$ao $bi$srcversion$ao"
|
$e "Hi from$ao $bi$srcversion$ao on:"
|
||||||
|
case $TARGET_OS in
|
||||||
|
Darwin)
|
||||||
|
vv '|' "hwprefs os_type >&2"
|
||||||
|
vv '|' "uname -a >&2"
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
vv '|' "uname -a >&2"
|
||||||
|
;;
|
||||||
|
esac
|
||||||
$e "$bi$me: Building the MirBSD Korn Shell$ao $ui$dstversion$ao"
|
$e "$bi$me: Building the MirBSD Korn Shell$ao $ui$dstversion$ao"
|
||||||
|
|
||||||
#
|
#
|
||||||
@ -387,16 +402,39 @@ cat >scn.c <<-'EOF'
|
|||||||
#endif
|
#endif
|
||||||
EOF
|
EOF
|
||||||
ct=unknown
|
ct=unknown
|
||||||
eval 'v "$CPP scn.c | grep ct= | tr -d \\\\015 >x" 2>&'$h | sed 's/^/] /'
|
vv ']' "$CPP scn.c | grep ct= | tr -d \\\\015 >x"
|
||||||
test 1 = $h && sed 's/^/[ /' x
|
test 1 = $h && sed 's/^/[ /' x
|
||||||
eval `cat x`
|
eval `cat x`
|
||||||
rm -f x
|
rm -f x
|
||||||
|
cat >scn.c <<-'EOF'
|
||||||
|
int main(void) { return (0); }
|
||||||
|
EOF
|
||||||
case $ct in
|
case $ct in
|
||||||
bcc|dmc|gcc|hpcc|icc|msc|pcc|sunpro|tcc|tendra|xlc) ;;
|
bcc|dmc)
|
||||||
*) ct=unknown ;;
|
;;
|
||||||
|
gcc)
|
||||||
|
vv '|' "$CC -v"
|
||||||
|
;;
|
||||||
|
hpcc|icc)
|
||||||
|
vv '|' "$CC -V"
|
||||||
|
;;
|
||||||
|
msc)
|
||||||
|
;;
|
||||||
|
pcc|sunpro|tcc)
|
||||||
|
vv '|' "$CC -v"
|
||||||
|
;;
|
||||||
|
tendra)
|
||||||
|
vv '|' "$CC -V 2>&1 | fgrep -i -e version -e release"
|
||||||
|
;;
|
||||||
|
xlc)
|
||||||
|
vv '|' "$CC -qversion=verbose"
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
ct=unknown
|
||||||
|
;;
|
||||||
esac
|
esac
|
||||||
$e "$bi==> which compiler seems to be used...$ao $ui$ct$ao"
|
$e "$bi==> which compiler seems to be used...$ao $ui$ct$ao"
|
||||||
rm -f scn.c scn.o
|
rm -f scn.c scn.o scn a.out a.exe
|
||||||
|
|
||||||
case $TARGET_OS in
|
case $TARGET_OS in
|
||||||
HP-UX)
|
HP-UX)
|
||||||
@ -921,7 +959,7 @@ ac_cppflags
|
|||||||
test 0 = $HAVE_SYS_SIGNAME && if ac_testinit cpp_dd '' \
|
test 0 = $HAVE_SYS_SIGNAME && if ac_testinit cpp_dd '' \
|
||||||
'checking if the C Preprocessor supports -dD'; then
|
'checking if the C Preprocessor supports -dD'; then
|
||||||
echo '#define foo bar' >scn.c
|
echo '#define foo bar' >scn.c
|
||||||
eval 'v "$CPP -dD scn.c >x" 2>&'$h | sed 's/^/] /'
|
vv ']' "$CPP -dD scn.c >x"
|
||||||
grep '#define foo bar' x >/dev/null 2>&1 && fv=1
|
grep '#define foo bar' x >/dev/null 2>&1 && fv=1
|
||||||
rm -f scn.c x
|
rm -f scn.c x
|
||||||
ac_testdone
|
ac_testdone
|
||||||
|
Loading…
x
Reference in New Issue
Block a user