Added -ansi flag for ANSI C compiler
This commit is contained in:
parent
d4c2c7ca2c
commit
d99b166621
3 changed files with 38 additions and 17 deletions
|
@ -4,22 +4,27 @@
|
||||||
# Don't generate line updating code by default (i.e.: -L flag provided to cem).
|
# Don't generate line updating code by default (i.e.: -L flag provided to cem).
|
||||||
# To put it on again: use -NL
|
# To put it on again: use -NL
|
||||||
var LFLAG=-L
|
var LFLAG=-L
|
||||||
|
var C_INCLUDES=-I{EM}/include/_tail_cc
|
||||||
|
var ANSI_C_INCLUDES=-I{EM}/include/tail_ac
|
||||||
|
|
||||||
callname ack
|
callname ack
|
||||||
name cpp
|
name cpp
|
||||||
# no from, this is a preprocessor
|
# no from, this is a preprocessor
|
||||||
to .i
|
to .i
|
||||||
program {EM}/lib/cpp
|
program {EM}/lib/cpp{ANSI_C?}
|
||||||
mapflag -I* CPP_F={CPP_F?} -I*
|
mapflag -I* CPP_F={CPP_F?} -I*
|
||||||
mapflag -U* CPP_F={CPP_F?} -U*
|
mapflag -U* CPP_F={CPP_F?} -U*
|
||||||
mapflag -D* CPP_F={CPP_F?} -D*
|
mapflag -D* CPP_F={CPP_F?} -D*
|
||||||
mapflag -P CPP_F={CPP_F?} -P
|
mapflag -P CPP_F={CPP_F?} -P
|
||||||
mapflag -C CPP_F={CPP_F?} -C
|
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) \
|
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} \
|
-D{NAME} \
|
||||||
-DEM_WSIZE={w} -DEM_PSIZE={p} \
|
({ANSI_C?.xx}:.xx=-DEM_WSIZE={w} -DEM_PSIZE={p} \
|
||||||
-DEM_SSIZE={s} -DEM_LSIZE={l} -DEM_FSIZE={f} -DEM_DSIZE={d} \
|
-DEM_SSIZE={s} -DEM_LSIZE={l} -DEM_FSIZE={f} -DEM_DSIZE={d}) \
|
||||||
-D_EM_WSIZE={w} -D_EM_PSIZE={p} \
|
-D_EM_WSIZE={w} -D_EM_PSIZE={p} \
|
||||||
-D_EM_SSIZE={s} -D_EM_LSIZE={l} -D_EM_FSIZE={f} -D_EM_DSIZE={d} \
|
-D_EM_SSIZE={s} -D_EM_LSIZE={l} -D_EM_FSIZE={f} -D_EM_DSIZE={d} \
|
||||||
<
|
<
|
||||||
|
@ -29,30 +34,36 @@ end
|
||||||
name cem
|
name cem
|
||||||
from .c
|
from .c
|
||||||
to .k
|
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 -I* CPP_F={CPP_F?} -I*
|
||||||
# mapflag -U* CPP_F={CPP_F?} -U*
|
# mapflag -U* CPP_F={CPP_F?} -U*
|
||||||
# mapflag -D* CPP_F={CPP_F?} -D*
|
# mapflag -D* CPP_F={CPP_F?} -D*
|
||||||
mapflag -M* CEM_F={CEM_F?} -M*
|
mapflag -M* CEM_F={CEM_F?} -M*
|
||||||
mapflag -L CEM_F={CEM_F?} -L
|
mapflag -L CEM_F={CEM_F?} -L
|
||||||
|
mapflag -A CEM_F={CEM_F?} -A
|
||||||
mapflag -NL LFLAG=
|
mapflag -NL LFLAG=
|
||||||
mapflag -KR CEM_F={CEM_F?} -R
|
mapflag -KR CEM_F={CEM_F?} -R
|
||||||
mapflag -w CEM_F={CEM_F?} -w
|
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 -g CEM_F={CEM_F?} -g
|
||||||
mapflag -p CEM_F={CEM_F?} -p
|
mapflag -p CEM_F={CEM_F?} -p
|
||||||
mapflag -V* CEM_F={CEM_F?} -V*
|
mapflag -V* CEM_F={CEM_F?} -V*
|
||||||
|
rts .c
|
||||||
|
need .c
|
||||||
args \
|
args \
|
||||||
{CPP_F?} {INCLUDES?} \
|
{CPP_F?} \
|
||||||
|
({ANSI_C?}:.ansi={ANSI_C_INCLUDES}) \
|
||||||
|
({ANSI_C?.c}:.c={C_INCLUDES}) \
|
||||||
|
{INCLUDES?} \
|
||||||
-D{NAME} \
|
-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_WSIZE={w} -D_EM_PSIZE={p} \
|
||||||
-D_EM_SSIZE={s} -D_EM_LSIZE={l} -D_EM_FSIZE={f} -D_EM_DSIZE={d} \
|
-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} \
|
-Vw{w}.{w}i{w}.{w}p{p}.{w}f{f}.{w}s{s}.{s}l{l}.{w}d{d}.{w} \
|
||||||
{CC_ALIGN?} \
|
{CC_ALIGN?} \
|
||||||
{CEM_F?} {LFLAG?} < >
|
{CEM_F?} {LFLAG?} < >
|
||||||
rts .c
|
|
||||||
need .c
|
|
||||||
callname acc
|
callname acc
|
||||||
callname cc
|
callname cc
|
||||||
end
|
end
|
||||||
|
@ -186,7 +197,7 @@ name ego
|
||||||
mapflag -T* EGO_F={EGO_F?} -T*
|
mapflag -T* EGO_F={EGO_F?} -T*
|
||||||
mapflag -S* EGO_F={EGO_F?} -S*
|
mapflag -S* EGO_F={EGO_F?} -S*
|
||||||
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*
|
mapflag -O* EGO_F={EGO_F?} -O*
|
||||||
args \
|
args \
|
||||||
{EGO} {EM} {EGO_F?} -P {EM}/lib/ego \
|
{EGO} {EM} {EGO_F?} -P {EM}/lib/ego \
|
||||||
|
|
|
@ -13,10 +13,11 @@ var RT=lib/{P}/head_
|
||||||
var PLIB=lib/{M}/tail_
|
var PLIB=lib/{M}/tail_
|
||||||
var PRT=lib/{M}/head_
|
var PRT=lib/{M}/head_
|
||||||
var CPP_F=-Dunix -Dm68k -Dmc68000 -DM68020 -Dmc68020 -D__BSD4_2
|
var CPP_F=-Dunix -Dm68k -Dmc68000 -DM68020 -Dmc68020 -D__BSD4_2
|
||||||
var INCLUDES=-I{EM}/include/_tail_cc
|
|
||||||
var CC_ALIGN=-Vw4.1
|
var CC_ALIGN=-Vw4.1
|
||||||
# 413 align is the default, rom in text
|
# 413 align is the default, rom in text
|
||||||
var ALIGN=-a0:4 -a1:4 -a2:0x20000 -a3:4 -b0:0x2020
|
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
|
name be
|
||||||
from .m.g
|
from .m.g
|
||||||
to .s
|
to .s
|
||||||
|
@ -51,8 +52,11 @@ name led
|
||||||
mapflag -N ALIGN=-a0:4 -a1:4 -a2:4 -a3:4 -b0:0x2000
|
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 -r ALIGN=-a0:4 -a1:0x20000 -a2:4 -a3:4 -b0:0x2020
|
||||||
mapflag -fp LIBFP={EM}/{PLIB}fp
|
mapflag -fp LIBFP={EM}/{PLIB}fp
|
||||||
|
mapflag -ansi C_LIB={EM}/{LIB}ac
|
||||||
args {ALIGN} (.e:{HEAD}= {EM}/{RT}em) \
|
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}:.mod={EM}/{RT}m2) \
|
||||||
({RTS}:.p.8={EM}/{PRT}pc) \
|
({RTS}:.p.8={EM}/{PRT}pc) \
|
||||||
-o > < \
|
-o > < \
|
||||||
|
@ -61,7 +65,8 @@ name led
|
||||||
(.b:{TAIL}={EM}/{PLIB}bc) \
|
(.b:{TAIL}={EM}/{PLIB}bc) \
|
||||||
(.ocm:{TAIL}={EM}/{LIB}ocm) \
|
(.ocm:{TAIL}={EM}/{LIB}ocm) \
|
||||||
(.mod:{TAIL}={EM}/{LIB}m2) \
|
(.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?} \
|
{LIBFP?} \
|
||||||
(.e:{TAIL}={EM}/{PLIB}em {EM}/{LIB}mon {EM}/lib/{M}/end_em)
|
(.e:{TAIL}={EM}/{PLIB}em {EM}/{LIB}mon {EM}/lib/{M}/end_em)
|
||||||
linker
|
linker
|
||||||
|
|
|
@ -10,10 +10,11 @@ var M=vax4
|
||||||
var LIB=lib/{M}/tail_
|
var LIB=lib/{M}/tail_
|
||||||
var RT=lib/{M}/head_
|
var RT=lib/{M}/head_
|
||||||
var CPP_F=-Dunix -Dvax
|
var CPP_F=-Dunix -Dvax
|
||||||
var INCLUDES=-I{EM}/include/_tail_cc
|
|
||||||
var CC_ALIGN=-Vw4.1
|
var CC_ALIGN=-Vw4.1
|
||||||
# 413 align is the default, rom in text
|
# 413 align is the default, rom in text
|
||||||
var ALIGN=-a0:4 -a1:4 -a2:0x400 -a3:4
|
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
|
name be
|
||||||
from .m.g
|
from .m.g
|
||||||
to .s
|
to .s
|
||||||
|
@ -45,8 +46,11 @@ name led
|
||||||
mapflag -l* LNAME={EM}/{LIB}*
|
mapflag -l* LNAME={EM}/{LIB}*
|
||||||
mapflag -N ALIGN=-a0:4 -a1:4 -a2:4 -a3:4
|
mapflag -N ALIGN=-a0:4 -a1:4 -a2:4 -a3:4
|
||||||
mapflag -r ALIGN=-a0:4 -a1:0x400 -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) \
|
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}:.mod={EM}/{RT}m2) \
|
||||||
({RTS}:.p.8={EM}/{RT}pc) \
|
({RTS}:.p.8={EM}/{RT}pc) \
|
||||||
-o > < \
|
-o > < \
|
||||||
|
@ -55,7 +59,8 @@ name led
|
||||||
(.b:{TAIL}={EM}/{LIB}bc) \
|
(.b:{TAIL}={EM}/{LIB}bc) \
|
||||||
(.ocm:{TAIL}={EM}/{LIB}ocm) \
|
(.ocm:{TAIL}={EM}/{LIB}ocm) \
|
||||||
(.mod:{TAIL}={EM}/{LIB}m2) \
|
(.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)
|
(.e:{TAIL}={EM}/{LIB}em {EM}/{LIB}mon {EM}/lib/{M}/end_em)
|
||||||
linker
|
linker
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in a new issue