The env target allows the nesC compiler to be configured for a new platform without requiring source code changes. It allows specification of a target's data layout rules and the name of it's gcc compiler. It cannot be passed directly to ncc.
If env is specified as the target to nesc1, the compilation uses a machine specification described in the environment variable NESC_MACHINE, such as
export NESC_MACHINE="long_double=8,4 gcc=some-other-gcc"
A particular order to the keynames in NESC_MACHINE is not necessary. The table below is a complete list of possible key names for NESC_MACHINE, a short description of their values, and their default if unspecified:
Keyname Value Default
pcc_bitfield_type_matters bool false
pointer size,align 2,1
float size,align 4,1
double size,align 4,1
long_double size,align 4,1
short size,align 2,1
int size,align 2,1
long size,align 4,1
long_long size,align 8,1
int1248_align align,align,align,align 1,1,1,1
wchar_size_size size,size 2,2
char_wchar_signed bool,bool true,true
gcc string (no spaces) gcc
For reference and easy cut+paste, here is the full default specification for NESC_MACHINE:
export NESC_MACHINE="pcc_bitfield_type_matters=false pointer=2,1 float=4,1 double=4,1 long_double=4,1 short=2,1 int=2,1 long=4,1 long_long=8,1 int1248_align=1,1,1,1 wchar_size_size=2,2 char_wchar_signed=true,true gcc=gcc"