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 32-bit x86 Linux target (ILP32)
    15     *
    16     *  This module defines the native target for 32-bit (ILP32) Linux
    17     *  on an x86 platform.
    18     */
    19    metaonly module Linux86 inherits gnu.targets.ITarget {
    20        override readonly config string name                = "Linux86";    
    21        override readonly config string os                  = "Linux";      
    22        override readonly config string suffix              = "86U";
    23        override readonly config string isa                 = "i686";       
    24        override readonly config xdc.bld.ITarget.Model model= {
    25            endian: "little"
    26        };
    27        override readonly config string rts                 = "gnu.targets.rts86U";
    28        override config string platform                     = "host.platforms.PC";
    29        
    30        /*
    31         *  ======== ar ========
    32         */
    33        override readonly config xdc.bld.ITarget2.Command ar = {
    34            cmd: "$(rootDir)/bin/ar",
    35            opts: "cr"
    36        };
    37    
    38        /*!
    39         *  ======== cc ========
    40         *  The command used to compile C/C++ source files into object files
    41         *
    42         *  The `-m32` flag is required to ensure that this target supports
    43         *  32-bit Linux systems.
    44         */
    45        override readonly config xdc.bld.ITarget2.Command cc = {
    46            cmd: "$(rootDir)/$(LONGNAME) -c -MD -MF $@.dep",
    47            opts: "-m32"
    48        };
    49    
    50        /*!
    51         *  ======== lnk ========
    52         *  The command used to link executables.
    53         *
    54         *  The `-m32` flag is required to ensure that this target supports
    55         *  32-bit Linux systems.
    56         */
    57        override readonly config xdc.bld.ITarget2.Command lnk = {
    58            cmd: "$(rootDir)/$(LONGNAME)",
    59            opts: "-m32"
    60        };
    61    
    62        /*
    63         *  ======== ccOpts ========
    64         */
    65        override config xdc.bld.ITarget2.Options ccOpts = {
    66            prefix: "-fPIC -Wunused",
    67            suffix: "-Dfar="
    68        };
    69    
    70        /*
    71         *  ======== lnkOpts ========
    72         */
    73        override config xdc.bld.ITarget2.Options lnkOpts = {
    74            prefix: "",
    75            suffix: "-Wl,-Map=$(XDCCFGDIR)/$@.map -lstdc++ -L$(rootDir)/lib"
    76        };
    77            
    78        /*
    79         *  ======== includeOpts ========
    80         *  $(rootDir)/include        - contains compiler specific headers
    81         *
    82         *  GCC compilers for Linux automatically add this directory, but at least
    83         *  in some cases, the directory is added searched after standard system
    84         *  directories. This way, we ensure $(rootDir)/include is searched
    85         *  before standard system directories.
    86         */
    87        override config string includeOpts = "-isystem $(rootDir)/include";
    88    
    89        /*
    90         *  ======== stdTypes ========
    91         */
    92        override readonly config xdc.bld.ITarget.StdTypes stdTypes = {
    93            t_IArg          : { size: 4, align: 4 },
    94            t_Char          : { size: 1, align: 1 },
    95            t_Double        : { size: 8, align: 4 },
    96            t_Float         : { size: 4, align: 4 },
    97            t_Fxn           : { size: 4, align: 4 },
    98            t_Int           : { size: 4, align: 4 },
    99            t_Int8          : { size: 1, align: 1 },
   100            t_Int16         : { size: 2, align: 2 },
   101            t_Int32         : { size: 4, align: 4 },
   102            t_Int64         : { size: 8, align: 4 },
   103            t_Long          : { size: 4, align: 4 },
   104            t_LDouble       : { size: 12, align: 4 },
   105            t_LLong         : { size: 8, align: 4 },
   106            t_Ptr           : { size: 4, align: 4 },
   107            t_Short         : { size: 2, align: 2 },
   108            t_Size          : { size: 4, align: 4 },
   109        };
   110    }
   111    /*
   112     *  @(#) gnu.targets; 1, 0, 1,701; 5-30-2014 19:43:51; /db/ztree/library/trees/xdctargets/xdctargets-h26x/src/ xlibrary
   113    
   114     */
   115