1    /* 
     2     *  Copyright (c) 2008 Texas Instruments and others.
     3     *  All rights reserved. This program and the accompanying materials
     4     *  are made available under the terms of the Eclipse Public License v1.0
     5     *  which accompanies this distribution, and is available at
     6     *  http://www.eclipse.org/legal/epl-v10.html
     7     * 
     8     *  Contributors:
     9     *      Texas Instruments - initial implementation
    10     * 
    11     * */
    12    /*!
    13     *  ======== Linux86.xdc ========
    14     *  Native x86 Linux target
    15     *
    16     *  This module defines the native target for Linux on PC.
    17     */
    18    metaonly module Linux86 inherits gnu.targets.ITarget {
    19        override readonly config string name                = "Linux86";    
    20        override readonly config string os                  = "Linux";      
    21        override readonly config string suffix              = "86U";
    22        override readonly config string isa                 = "i686";       
    23        override readonly config xdc.bld.ITarget.Model model= {
    24            endian: "little"
    25        };
    26        override readonly config string rts                 = "gnu.targets.rts86U";
    27        override config string platform                     = "host.platforms.PC";
    28        
    29        /*
    30         *  ======== ar ========
    31         */
    32        override readonly config xdc.bld.ITarget2.Command ar = {
    33            cmd: "$(rootDir)/bin/ar",
    34            opts: "cr"
    35        };
    36    
    37        /*
    38         *  ======== ccOpts ========
    39         */
    40        override config xdc.bld.ITarget2.Options ccOpts = {
    41            prefix: "-fPIC -Wunused",
    42            suffix: "-Dfar="
    43        };
    44    
    45        /*
    46         *  ======== lnkOpts ========
    47         */
    48        override config xdc.bld.ITarget2.Options lnkOpts = {
    49            prefix: "",
    50            suffix: "-lstdc++ -L$(rootDir)/lib"
    51        };
    52            
    53        /*
    54         *  ======== includeOpts ========
    55         *  $(rootDir)/include        - contains compiler specific headers
    56         *
    57         *  GCC compilers for Linux automatically add this directory, but at least
    58         *  in some cases, the directory is added searched after standard system
    59         *  directories. This way, we ensure $(rootDir)/include is searched
    60         *  before standard system directories.
    61         */
    62        override config string includeOpts = "-isystem $(rootDir)/include";
    63    
    64        /*
    65         *  ======== stdTypes ========
    66         */
    67        override readonly config xdc.bld.ITarget.StdTypes stdTypes = {
    68            t_IArg          : { size: 4, align: 4 },
    69            t_Char          : { size: 1, align: 1 },
    70            t_Double        : { size: 8, align: 4 },
    71            t_Float         : { size: 4, align: 4 },
    72            t_Fxn           : { size: 4, align: 4 },
    73            t_Int           : { size: 4, align: 4 },
    74            t_Int8          : { size: 1, align: 1 },
    75            t_Int16         : { size: 2, align: 2 },
    76            t_Int32         : { size: 4, align: 4 },
    77            t_Int64         : { size: 8, align: 4 },
    78            t_Long          : { size: 4, align: 4 },
    79            t_LDouble       : { size: 12, align: 4 },
    80            t_LLong         : { size: 8, align: 4 },
    81            t_Ptr           : { size: 4, align: 4 },
    82            t_Short         : { size: 2, align: 2 },
    83        };
    84    }
    85    /*
    86     *  @(#) gnu.targets; 1, 0, 1,401; 8-4-2010 16:21:10; /db/ztree/library/trees/xdctargets/xdctargets-c27x/src/
    87     */
    88