GCC命令-详细请参考GCC手册

 

GNU ToolKit User's Guide
D:\Tornado2.2\docs\gnu2.96+ppc\gcc.html

-Dmacro
Define macro macro with the string `1' as its definition.

-Dmacro=defn
Define macro macro as defn. All instances of `-D' on the command line are processed before any `-U' options.

-fsigned-char
Let the type char be signed, like signed char.

-ansi
Support all ANSI standard C programs.
This turns off certain features of GNU C that are incompatible with ANSI C, such as the asm, inline and typeof keywords, and predefined macros such as unix and vax that identify the type of system you are using. It also enables the undesirable and rarely used ANSI trigraph feature, and it disables recognition of C++ style `//' comments.

-Idir
Add the directory dir to the head of the list of directories to be searched for header files. This can be used to override a system header file, substituting your own version, since these directories are searched before the system header file directories. If you use more than one `-I' option, the directories are scanned in left-to-right order; the standard system directories come after.

The following is an example command to compile an application module for a VxWorks PowerPC 604 system:

c:\> ccppc -mcpu=604 -mstrict-align -I %WIND_BASE%\target\h \
-DCPU=PPC603 -DTOOL_FAMILY=gnu -DTOOL=gnu -c applic.c
This compiles the module applic.c into an object file applic.o.

Below we give summary descriptions of the target-independent flags used in the example. Flags that are specific to a particular target architecture are described in the relevant architecture supplement. For more information on any of these flags, see the GNU ToolKit User's Guide.

-g
Generate debugging information.


-c
Compile only to produce a relocatable object file. The result is an object module with the suffix .o, in this case, applic.o.


-DCPU=CPU
Required; defines the CPU type.


-DTOOL_FAMILY=gnu
Optional; defines the compilation toolkit used to compile VxWorks. If not entered, it is derived from -DTOOL=.


-DTOOL=gnu
Required; specifies the compilation toolkit and the tool environment. For more information, see the GNU ToolKit User's Guide.


-I$(WIND_BASE)/target/h
Include VxWorks header files. (See 5.2.1 Using VxWorks Header Files.)


-fno-builtin
Use library calls even for common library subroutines such as memcpy. Used by VxWorks for historical reasons. There is no need for application code to use this flag.


-Wall
Turn on all warnings. This flag is optional.


-ansi
Reject non-ANSI-compliant code. This flag is optional.


-O
Perform basic optimizations.


-O2
Perform most supported optimizations (except those involving a space-speed trade-off)

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值