File: envtarget.html

package info (click to toggle)
nescc 1.3.5-1.1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, bullseye, buster
  • size: 11,604 kB
  • sloc: ansic: 72,471; sh: 4,474; yacc: 2,171; perl: 2,109; java: 1,699; makefile: 1,535; lisp: 693; xml: 182; lex: 95; cpp: 28
file content (58 lines) | stat: -rw-r--r-- 2,513 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
<html>
<head>
<title>env target and nesc1</title>
</head>
<body>

The <tt>env</tt> 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. 

<blockquote>If <tt>-fnesc-target=env</tt> option is passed to <tt>nescc</tt>, 
the compilation uses
a machine specification described in the environment variable
<tt>NESC_MACHINE</tt>, such as <blockquote><tt>export
NESC_MACHINE="long_double=8,4"</tt></blockquote> A
particular order to the keynames in <tt>NESC_MACHINE</tt> is not necessary.
The table below is a complete list of possible key names for
<tt>NESC_MACHINE</tt>, a short description of their values, and their
default if unspecified: <blockquote>

<table border=1 cellpadding=2 cellspacing=0>
<tr><th>Keyname                   <th>Value      <th>Default
<tr><td>pcc_bitfield_type_matters <td>bool       <td>false
<tr><td>empty_field_boundary	  <td>bit align  <td>8
<tr><td>structure_size_boundary	  <td>bit align  <td>8
<tr><td>word_size		  <td>size       <td>1
<tr><td>pointer                   <td>size,align <td>2,1
<tr><td>float                     <td>size,align <td>4,1
<tr><td>double                    <td>size,align <td>4,1
<tr><td>long_double               <td>size,align <td>4,1
<tr><td>short                     <td>size,align <td>2,1
<tr><td>int                       <td>size,align <td>2,1
<tr><td>long                      <td>size,align <td>4,1
<tr><td>long_long                 <td>size,align <td>8,1
<tr><td>int1248_align             <td>align,align,align,align <td>1,1,1,1
<tr><td>wchar_size_size           <td>size,size  <td>2,2
<tr><td>char_wchar_signed         <td>bool,bool  <td>true,true
<tr><td>async_functions           <td>string     <td>empty
</table>

</blockquote>

For reference and easy cut+paste, here is the full default specification for
<tt>NESC_MACHINE</tt>: <blockquote><tt>export
NESC_MACHINE="pcc_bitfield_type_matters=false word_size=1 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
empty_field_boundary=8 structure_size_boundary=8"
</tt></blockquote>

The curiously named wchar_size_size is the sizes of <code>wchar_t</code>
and <code>size_t</code> respectively. See the gcc internal documentation
(`<code>info gccint</code>') for more information on
pcc_bitfield_type_matters, empty_field_boundary and
structure_size_boundary.

</body>
</html>