1    /* 
     2     *  Copyright (c) 2014 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     *  ======== gnu.targets.arm.ITarget ========
    14     *  Interface to GCC compatible Arm compilers
    15     */
    16    metaonly interface ITarget inherits gnu.targets.ITarget {
    17        /*!
    18         *  ======== ar ========
    19         *  The command used to create an archive
    20         */
    21        override readonly config xdc.bld.ITarget2.Command ar = {
    22            cmd: "$(rootDir)/bin/$(GCCTARG)-ar",
    23            opts: "cr"
    24        };
    25    
    26        /*!
    27         *  ======== lnk ========
    28         *  The command used to link executables.
    29         */
    30        override readonly config xdc.bld.ITarget2.Command lnk = {
    31            cmd: "$(rootDir)/bin/$(GCCTARG)-gcc",
    32            opts: ""
    33        };
    34    
    35        /*!
    36         *  ======== cc ========
    37         *  The command used to compile C/C++ source files into object files
    38         */
    39        override readonly config xdc.bld.ITarget2.Command cc = {
    40            cmd: "$(rootDir)/bin/$(GCCTARG)-gcc -c -MD -MF $@.dep",
    41            opts: ""
    42        };
    43    
    44        /*!
    45         *  ======== asm ========
    46         *  The command used to assembles assembly source files into object files
    47         */
    48        override readonly config xdc.bld.ITarget2.Command asm = {
    49            cmd: "$(rootDir)/bin/$(GCCTARG)-gcc -c -x assembler",
    50            opts: ""
    51        };
    52    
    53        /*
    54         *  ======== profiles ========
    55         *
    56         *  -fdata-sections is removed from "release" because of
    57         *  https://bugs.launchpad.net/gcc-linaro/+bug/1329080. It applies only to
    58         *  Linux-on-Arm targets. The bare metal targets specify -fdata-sections
    59         *  in their ccOpts, so this change doesn't affect them.
    60         */
    61        override config xdc.bld.ITarget.OptionSet profiles[string] = [
    62            ["debug", {
    63                compileOpts: {
    64                    copts: "-g",
    65                    defs:  "-D_DEBUG_=1",
    66                },
    67                linkOpts: "-g",
    68            }],
    69    
    70            ["release", {
    71                compileOpts: {
    72                    copts: "-O2 -ffunction-sections",
    73                },
    74                linkOpts: "-Wl,--gc-sections",
    75            }],
    76    
    77            ["profile", {
    78                compileOpts: {
    79                    copts: "-g -pg",
    80                },
    81                linkOpts: "-pg"     /* can't use -static here */
    82            }],
    83    
    84            ["coverage", {
    85                compileOpts: {
    86                    copts: "-fprofile-arcs -ftest-coverage",
    87                },
    88                linkOpts: "-fprofile-arcs -ftest-coverage",
    89            }],
    90        ];
    91    
    92    
    93    
    94    }
    95    /*
    96     *  @(#) gnu.targets.arm; 1, 0, 0,0; 2-10-2017 09:06:33; /db/ztree/library/trees/xdctargets/xdctargets-m11/src/ xlibrary
    97    
    98     */
    99