sbsv1/abld/doc/cedar-mostly-thumb.txt
changeset 40 68f68128601f
equal deleted inserted replaced
39:fa9d7d89d3d6 40:68f68128601f
       
     1 Intro.
       
     2 
       
     3 A new GCC98r2 platform/build target has been added to Cedar. This
       
     4 platform is called ARM4T and implements the 'mostly thumb' build
       
     5 policy. Under this policy user-side code is built in THUMB (ARMv4)
       
     6 mode by default and kernel side code is built in ARM (ARMv4) mode with
       
     7 no interworking support. These defaults can be overridden by various
       
     8 means (see below). When the default is overridden both user and
       
     9 kernel-side code is built in ARM (ARMv4) mode with interworking
       
    10 support.
       
    11 
       
    12 Overriding the default.
       
    13 
       
    14 The default can be overridden at project (MMP)and compontent (BLD.INF)
       
    15 level and also interactively via a commandline argument to MAKMAKE.
       
    16 
       
    17 i) MMP 
       
    18 
       
    19 A new keyword ALWAYS_BUILD_AS_ARM is introduced to the supported MMP
       
    20 file syntax. This keyword takes no arguments. It applies only to
       
    21 platforms that implement the 'mostly thumb' policy. In other words it
       
    22 is ignored by other platforms (e.g. ARM4). 
       
    23 
       
    24 ii. BLD.INF
       
    25 
       
    26 A new qualifier, BUILD_AS_ARM, is introduced for MMP file statements
       
    27 in the BLD.INF syntax. The syntax for such statements thus becomes:
       
    28 
       
    29 PRJ_MMPFILES
       
    30 [<mmp path>\<mmp file>] {<qualifiers>}
       
    31 {MAKEFILE|NMAKEFILE} [<path>\<makefile>] {build_as_arm}
       
    32 // <qualifiers> are tidy, ignore, build_as_arm
       
    33 
       
    34 iii. MAKMAKE
       
    35 
       
    36 MAKMAKE has been extended to accept the option -ARM. Supplying this
       
    37 option has the same effect as if ALWAYS_BUILD_AS_ARM is supplied in
       
    38 the MMP file.
       
    39 
       
    40 Build/Release Directory Structure.
       
    41 
       
    42 Build artefacts are placed in either UREL or UDEB beneath ARM4T in
       
    43 both build and release trees whatever ISA is targeted. The exception
       
    44 is import libraries. Because ARM4T only supports version 4 of the ARM
       
    45 architecture different import stubs implementations are required for
       
    46 each of the possible modes that clients can be compiled in (e.g. ARM
       
    47 without-interworking vs ARM with-interworking vs THUMB). Therefore
       
    48 import libraries are placed in the UREL sub-directory of ARM4, ARMI or
       
    49 THUMB respectively within the release tree.
       
    50 
       
    51 Static Libraries.  
       
    52 
       
    53 Static libraries are always built in ARM mode with interworking. A
       
    54 consequence of this is that the linker (LD) will introduce veneers
       
    55 into executables built in THUMB mode. The veneers are responsible for
       
    56 switching mode (as appropriate). However the introduction of a veneer
       
    57 has a small impact on code size. These two factors (i.e. static libs
       
    58 being ARM and veneers) mean that an ARM4T THUMB executable will always
       
    59 be slightly larger than if it had been built using the old THUMB build
       
    60 target.
       
    61