Added -ansi flag for ANSI C compiler

This commit is contained in:
ceriel 1990-11-21 16:51:49 +00:00
parent d4c2c7ca2c
commit d99b166621
3 changed files with 38 additions and 17 deletions

View file

@ -4,22 +4,27 @@
# Don't generate line updating code by default (i.e.: -L flag provided to cem).
# To put it on again: use -NL
var LFLAG=-L
var C_INCLUDES=-I{EM}/include/_tail_cc
var ANSI_C_INCLUDES=-I{EM}/include/tail_ac
callname ack
name cpp
# no from, this is a preprocessor
to .i
program {EM}/lib/cpp
program {EM}/lib/cpp{ANSI_C?}
mapflag -I* CPP_F={CPP_F?} -I*
mapflag -U* CPP_F={CPP_F?} -U*
mapflag -D* CPP_F={CPP_F?} -D*
mapflag -P CPP_F={CPP_F?} -P
mapflag -C CPP_F={CPP_F?} -C
mapflag -wo CPP_F={CPP_F?} -o
mapflag -ansi ANSI_C=.ansi
args {CPP_F?} ({SUFFIX?}:.ocm=-I{EM}/include/occam) \
({SUFFIX}:.c={INCLUDES?}) \
({ANSI_C?}:.ansi={ANSI_C_INCLUDES} {INCLUDES?}) \
({ANSI_C?.c}:{SUFFIX}={C_INCLUDES} {INCLUDES?}) \
-D{NAME} \
-DEM_WSIZE={w} -DEM_PSIZE={p} \
-DEM_SSIZE={s} -DEM_LSIZE={l} -DEM_FSIZE={f} -DEM_DSIZE={d} \
({ANSI_C?.xx}:.xx=-DEM_WSIZE={w} -DEM_PSIZE={p} \
-DEM_SSIZE={s} -DEM_LSIZE={l} -DEM_FSIZE={f} -DEM_DSIZE={d}) \
-D_EM_WSIZE={w} -D_EM_PSIZE={p} \
-D_EM_SSIZE={s} -D_EM_LSIZE={l} -D_EM_FSIZE={f} -D_EM_DSIZE={d} \
<
@ -29,30 +34,36 @@ end
name cem
from .c
to .k
program {EM}/lib/em_cemcom
program {EM}/lib/em_cemcom{ANSI_C?}
mapflag -ansi ANSI=ansi
# mapflag -I* CPP_F={CPP_F?} -I*
# mapflag -U* CPP_F={CPP_F?} -U*
# mapflag -D* CPP_F={CPP_F?} -D*
mapflag -M* CEM_F={CEM_F?} -M*
mapflag -L CEM_F={CEM_F?} -L
mapflag -A CEM_F={CEM_F?} -A
mapflag -NL LFLAG=
mapflag -KR CEM_F={CEM_F?} -R
mapflag -w CEM_F={CEM_F?} -w
mapflag -wa CEM_F={CEM_F?} -a
mapflag -wo CEM_F={CEM_F?} -o
mapflag -ws CEM_F={CEM_F?} -s
mapflag -g CEM_F={CEM_F?} -g
mapflag -p CEM_F={CEM_F?} -p
mapflag -V* CEM_F={CEM_F?} -V*
rts .c
need .c
args \
{CPP_F?} {INCLUDES?} \
{CPP_F?} \
({ANSI_C?}:.ansi={ANSI_C_INCLUDES}) \
({ANSI_C?.c}:.c={C_INCLUDES}) \
{INCLUDES?} \
-D{NAME} \
-DEM_WSIZE={w} -DEM_PSIZE={p} \
-DEM_SSIZE={s} -DEM_LSIZE={l} -DEM_FSIZE={f} -DEM_DSIZE={d} \
-D_EM_WSIZE={w} -D_EM_PSIZE={p} \
-D_EM_SSIZE={s} -D_EM_LSIZE={l} -D_EM_FSIZE={f} -D_EM_DSIZE={d} \
-Vw{w}.{w}i{w}.{w}p{p}.{w}f{f}.{w}s{s}.{s}l{l}.{w}d{d}.{w} \
{CC_ALIGN?} \
{CEM_F?} {LFLAG?} < >
rts .c
need .c
callname acc
callname cc
end
@ -186,7 +197,7 @@ name ego
mapflag -T* EGO_F={EGO_F?} -T*
mapflag -S* EGO_F={EGO_F?} -S*
mapflag -s* EGO_F={EGO_F?} -s*
mapflag -a* EGO_F={EGO_F?} -a*
mapflag -a EGO_F={EGO_F?} -a
mapflag -O* EGO_F={EGO_F?} -O*
args \
{EGO} {EM} {EGO_F?} -P {EM}/lib/ego \

View file

@ -13,10 +13,11 @@ var RT=lib/{P}/head_
var PLIB=lib/{M}/tail_
var PRT=lib/{M}/head_
var CPP_F=-Dunix -Dm68k -Dmc68000 -DM68020 -Dmc68020 -D__BSD4_2
var INCLUDES=-I{EM}/include/_tail_cc
var CC_ALIGN=-Vw4.1
# 413 align is the default, rom in text
var ALIGN=-a0:4 -a1:4 -a2:0x20000 -a3:4 -b0:0x2020
var C_LIB={EM}/{LIB}cc.1s {EM}/{LIB}cc.2g
var OLD_C_LIB={C_LIB}
name be
from .m.g
to .s
@ -51,8 +52,11 @@ name led
mapflag -N ALIGN=-a0:4 -a1:4 -a2:4 -a3:4 -b0:0x2000
mapflag -r ALIGN=-a0:4 -a1:0x20000 -a2:4 -a3:4 -b0:0x2020
mapflag -fp LIBFP={EM}/{PLIB}fp
mapflag -ansi C_LIB={EM}/{LIB}ac
args {ALIGN} (.e:{HEAD}= {EM}/{RT}em) \
({RTS}:.ocm.b.c={EM}/{RT}cc) \
({RTS}:.ocm.b={EM}/{RT}cc) \
({RTS}{ANSI?}:.c={EM}/{RT}cc) \
({RTS}{ANSI?}:.cansi={EM}/{RT}ac) \
({RTS}:.mod={EM}/{RT}m2) \
({RTS}:.p.8={EM}/{PRT}pc) \
-o > < \
@ -61,7 +65,8 @@ name led
(.b:{TAIL}={EM}/{PLIB}bc) \
(.ocm:{TAIL}={EM}/{LIB}ocm) \
(.mod:{TAIL}={EM}/{LIB}m2) \
(.ocm.b.c:{TAIL}={EM}/{LIB}cc.1s {EM}/{LIB}cc.2g) \
(.ocm.b:{TAIL}={OLD_C_LIB}) \
(.c:{TAIL}={C_LIB}) \
{LIBFP?} \
(.e:{TAIL}={EM}/{PLIB}em {EM}/{LIB}mon {EM}/lib/{M}/end_em)
linker

View file

@ -10,10 +10,11 @@ var M=vax4
var LIB=lib/{M}/tail_
var RT=lib/{M}/head_
var CPP_F=-Dunix -Dvax
var INCLUDES=-I{EM}/include/_tail_cc
var CC_ALIGN=-Vw4.1
# 413 align is the default, rom in text
var ALIGN=-a0:4 -a1:4 -a2:0x400 -a3:4
var C_LIB={EM}/{LIB}cc.1s {EM}/{LIB}cc.2g
var OLD_C_LIB={C_LIB}
name be
from .m.g
to .s
@ -45,8 +46,11 @@ name led
mapflag -l* LNAME={EM}/{LIB}*
mapflag -N ALIGN=-a0:4 -a1:4 -a2:4 -a3:4
mapflag -r ALIGN=-a0:4 -a1:0x400 -a2:4 -a3:4
mapflag -ansi C_LIB={EM}/{LIB}ac
args {ALIGN} (.e:{HEAD}= {EM}/{RT}em) \
({RTS}:.ocm.b.c={EM}/{RT}cc) \
({RTS}:.ocm.b={EM}/{RT}cc) \
({RTS}{ANSI?}:.c={EM}/{RT}cc) \
({RTS}{ANSI?}:.cansi={EM}/{RT}ac) \
({RTS}:.mod={EM}/{RT}m2) \
({RTS}:.p.8={EM}/{RT}pc) \
-o > < \
@ -55,7 +59,8 @@ name led
(.b:{TAIL}={EM}/{LIB}bc) \
(.ocm:{TAIL}={EM}/{LIB}ocm) \
(.mod:{TAIL}={EM}/{LIB}m2) \
(.ocm.b.c:{TAIL}={EM}/{LIB}cc.1s {EM}/{LIB}cc.2g) \
(.ocm.b:{TAIL}={OLD_C_LIB}) \
(.c:{TAIL}={C_LIB}) \
(.e:{TAIL}={EM}/{LIB}em {EM}/{LIB}mon {EM}/lib/{M}/end_em)
linker
end