此文件是根据smdkv210single_config配置进行过删减,可生成smdkv210single_config配置的uboot镜像,其它配置被删除,仅供参考。
# # (C) Copyright 2002 # Gary Jennejohn, DENX Software Engineering, <[email protected]> # # See file CREDITS for list of people who contributed to this # project. # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License as # published by the Free Software Foundation; either version 2 of # the License, or (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place, Suite 330, Boston, # MA 02111-1307 USA # # -fno-strict-aliasing 没有严格的别名 # -fno-common 不初始化全局变量 # -ffixed-r8 将r8作为固定寄存器看待;生成的目标码不应该引用它(除了……见下面的参考) # -msoft-float 软件模拟float PLATFORM_RELFLAGS += -fno-strict-aliasing -fno-common -ffixed-r8 \ -msoft-float # Make ARMv5 to allow more compilers to work, even though its v6. # -march=armv5te 指定目标ARM架构为armv5te PLATFORM_CPPFLAGS += -march=armv5te # ========================================================================= # # Supply options according to compiler version # # ========================================================================= # 检查是否支持-mapcs-32,如果支持,则为cc-option,否则为-mabi=apcs-gnu,下同 # -mapcs-32 # -mabi=apcs-gnu 生成一个栈框架,作为所有ARM过程调用函数中的标准,即使对于正常执行代码这不是绝对必要的 PLATFORM_CPPFLAGS +=$(call cc-option,-mapcs-32,-mabi=apcs-gnu) # -mno-thumb-interwork 设置生成的代码不支持ARM和Thumb指令之间的调用 PLATFORM_CPPFLAGS +=$(call cc-option,-mno-thumb-interwork,) # -mshort-load-bytes # -malignment-traps PLATFORM_RELFLAGS +=$(call cc-option,-mshort-load-bytes,$(call cc-option,-malignment-traps,)) # -mapcs-32 -mshort-load-bytes -malignment-traps我使用的编译器不支持,没查到具体功能
-fstrict-aliasing Allow the compiler to assume the strictest aliasing rules applicable to the lan- guage being compiled. For C (and C++), this activates optimizations based on the type of expressions. In particular, an object of one type is assumed never to reside at the same address as an object of a different type, unless the types are almost the same. For example, an unsigned int can alias an int, but not a void* or a double. A character type may alias any other type. Pay special attention to code like this: union a_union { int i; double d; }; int f() { union a_union t; t.d = 3.0; return t.i; } The practice of reading from a different union member than the one most recently written to (called “type-punning”) is common. Even with ‘-fstrict-aliasing’, type-punning is allowed, provided the memory is accessed through the union type. So, the code above will work as expected. See Section 4.9 [Structures unions enumerations and bit-fields implementation], page 287. However, this code might not: int f() { union a_union t; int* ip; t.d = 3.0; ip = &t.i; return *ip; } Similarly, access by taking the address, casting the resulting pointer and deref- erencing the result has undefined behavior, even if the cast uses a union type, e.g.: int f() { double d = 3.0; return ((union a_union *) &d)->i; } The ‘-fstrict-aliasing’ option is enabled at levels ‘-O2’, ‘-O3’, ‘-Os’.
-fno-common In C code, controls the placement of uninitialized global variables. Unix C compilers have traditionally permitted multiple definitions of such variables in different compilation units by placing the variables in a common block. This is the behavior specified by ‘-fcommon’, and is the default for GCC on most targets. On the other hand, this behavior is not required by ISO C, and on some targets may carry a speed or code size penalty on variable references. The ‘-fno-common’ option specifies that the compiler should place uninitialized global variables in the data section of the object file, rather than generating them as common blocks. This has the effect that if the same variable is declared (without extern) in two different compilations, you will get a multiple-definition error when you link them. In this case, you must compile with ‘-fcommon’ instead. Compiling with ‘-fno-common’ is useful on targets for which it provides better performance, or if you wish to verify that the program will work on other systems which always treat uninitialized variable declarations this way.
-ffixed-reg Treat the register named reg as a fixed register; generated code should never refer to it (except perhaps as a stack pointer, frame pointer or in some other fixed role). reg must be the name of a register. The register names accepted are machine- specific and are defined in the REGISTER_NAMES macro in the machine descrip- tion macro file. This flag does not have a negative form, because it specifies a three-way choice.
-msoft-float Equivalent to ‘-mfloat-abi=soft’.
-mfloat-abi=name Specifies which floating-point ABI to use. Permissible values are: ‘soft’, ‘softfp’ and ‘hard’. Specifying ‘soft’ causes GCC to generate output containing library calls for floating-point operations. ‘softfp’ allows the generation of code using hard- ware floating-point instructions, but still uses the soft-float calling conventions. ‘hard’ allows generation of floating-point instructions and uses FPU-specific calling conventions. The default depends on the specific target configuration. Note that the hard- float and soft-float ABIs are not link-compatible; you must compile your entire program with the same ABI, and link with a compatible set of libraries.
-march=name This specifies the name of the target ARM architecture. GCC uses this name to determine what kind of instructions it can emit when generating assembly code. This option can be used in conjunction with or instead of the ‘-mcpu=’ option. Permissible names are: ‘armv2’, ‘armv2a’, ‘armv3’, ‘armv3m’, ‘armv4’, ‘armv4t’, ‘armv5’, ‘armv5t’, ‘armv5e’, ‘armv5te’, ‘armv6’, ‘armv6j’, ‘armv6t2’, ‘armv6z’, ‘armv6zk’, ‘armv6-m’, ‘armv7’, ‘armv7-a’, ‘armv7-r’, ‘armv7-m’, ‘iwmmxt’, ‘iwmmxt2’, ‘ep9312’.
-mapcs-32
-mabi=name Generate code for the specified ABI. Permissible values are: ‘apcs-gnu’, ‘atpcs’, ‘aapcs’, ‘aapcs-linux’ and ‘iwmmxt’.
-mthumb-interwork Generate code which supports calling between the ARM and Thumb instruction sets. Without this option the two instruction sets cannot be reliably used inside one program. The default is ‘-mno-thumb-interwork’, since slightly larger code is generated when ‘-mthumb-interwork’ is specified.