Introduce four new ARCH specific variables that CT_DoArchValues can set if they want:

- CT_ARCH_CC_CORE_EXTRA_CONFIG
  - CT_ARCH_CC_EXTRA_CONFIG
  - CT_ARCH_TARGET_CLFAGS
  - CT_ARCH_TARGET_LDFLAGS
This will hopefully enable architectures to specify specific flags.
PowerPC will need them to introduce SPE (coming RSN).

 /trunk/scripts/crosstool.sh |    2     2     0     0 ++
 /trunk/scripts/functions    |    4     2     2     0 ++--
 /trunk/docs/overview.txt    |   45    22    23     0 ++++++++++++++++++++++-----------------------
 /trunk/config/target.in     |   10    10     0     0 ++++++++++
 4 files changed, 36 insertions(+), 25 deletions(-)
This commit is contained in:
Yann E. MORIN" 2008-08-07 15:18:18 +00:00
parent 140d179eb3
commit ef0f400c26
4 changed files with 36 additions and 25 deletions

View File

@ -228,4 +228,14 @@ config TARGET_CFLAGS
Leave blank if you don't know better.
config TARGET_LDFLAGS
string
prompt "Target LDFLAGS"
default ""
help
Used to add specific options when linking libraries of the toolchain,
that will run on your target.
Leave blank if you don't know better.
endmenu

View File

@ -611,31 +611,16 @@ The "functions" file API:
${CT_ARCH}
+ provides:
- optional
- the environment variables to configure the cross-gcc
- CT_ARCH_WITH_ARCH
- CT_ARCH_WITH_ABI
- CT_ARCH_WITH_CPU
- CT_ARCH_WITH_TUNE
- CT_ARCH_WITH_FPU
- CT_ARCH_WITH_FLOAT
- contain (defaults):
- CT_ARCH_WITH_ARCH : the gcc ./configure switch to select architecture level ( "--with-arch=${CT_ARCH_ARCH}" )
- CT_ARCH_WITH_ABI : the gcc ./configure switch to select ABI level ( "--with-abi=${CT_ARCH_ABI}" )
- CT_ARCH_WITH_CPU : the gcc ./configure switch to select CPU instruction set ( "--with-cpu=${CT_ARCH_CPU}" )
- CT_ARCH_WITH_TUNE : the gcc ./configure switch to select scheduling ( "--with-tune=${CT_ARCH_TUNE}" )
- CT_ARCH_WITH_FPU : the gcc ./configure switch to select FPU type ( "--with-fpu=${CT_ARCH_FPU}" )
- CT_ARCH_WITH_FLOAT : the gcc ./configure switch to select floating point arithmetics ( "--with-float=soft" or /empty/ )
- the environment variables to configure the cross-gcc (defaults)
- CT_ARCH_WITH_ARCH : the gcc ./configure switch to select architecture level ( "--with-arch=${CT_ARCH_ARCH}" )
- CT_ARCH_WITH_ABI : the gcc ./configure switch to select ABI level ( "--with-abi=${CT_ARCH_ABI}" )
- CT_ARCH_WITH_CPU : the gcc ./configure switch to select CPU instruction set ( "--with-cpu=${CT_ARCH_CPU}" )
- CT_ARCH_WITH_TUNE : the gcc ./configure switch to select scheduling ( "--with-tune=${CT_ARCH_TUNE}" )
- CT_ARCH_WITH_FPU : the gcc ./configure switch to select FPU type ( "--with-fpu=${CT_ARCH_FPU}" )
- CT_ARCH_WITH_FLOAT : the gcc ./configure switch to select floating point arithmetics ( "--with-float=soft" or /empty/ )
+ provides:
- optional
- the environment variables to pass to the cross-gcc to build target binaries
- CT_ARCH_ARCH_CFLAG
- CT_ARCH_ABI_CFLAG
- CT_ARCH_CPU_CFLAG
- CT_ARCH_TUNE_CFLAG
- CT_ARCH_FPU_CFLAG
- CT_ARCH_FLOAT_CFLAG
- CT_ARCH_ENDIAN_CFLAG
- contain (defaults):
- the environment variables to pass to the cross-gcc to build target binaries (defaults)
- CT_ARCH_ARCH_CFLAG : the gcc switch to select architecture level ( "-march=${CT_ARCH_ARCH}" )
- CT_ARCH_ABI_CFLAG : the gcc switch to select ABI level ( "-mabi=${CT_ARCH_ABI}" )
- CT_ARCH_CPU_CFLAG : the gcc switch to select CPU instruction set ( "-mcpu=${CT_ARCH_CPU}" )
@ -645,6 +630,20 @@ The "functions" file API:
- CT_ARCH_ENDIAN_CFLAG : the gcc switch to choose big or little endian ( "-mbig-endian" or "-mlittle-endian" )
- default to:
see above.
+ provides:
- optional
- the environement variables to configure the core and final compiler, specific to this architecture:
- CT_ARCH_CC_CORE_EXTRA_CONFIG : additional, architecture specific core gcc ./configure flags
- CT_ARCH_CC_EXTRA_CONFIG : additional, architecture specific final gcc ./configure flags
- default to:
- all empty
+ provides:
- optional
- the architecture-specific CFLAGS and LDFLAGS:
- CT_ARCH_TARGET_CLFAGS
- CT_ARCH_TARGET_LDFLAGS
- default to:
- all empty
Adding a new version of a component |
------------------------------------+

View File

@ -71,6 +71,8 @@ CT_DoBuildTargetTuple
# Put user-supplied flags at the end, so that they take precedence.
CT_TARGET_CFLAGS="${CT_ARCH_TARGET_CFLAGS} ${CT_TARGET_CFLAGS}"
CT_TARGET_LDFLAGS="${CT_ARCH_TARGET_LDFLAGS} ${CT_TARGET_LDFLAGS}"
CT_CC_CORE_EXTRA_CONFIG="${CT_ARCH_CC_CORE_EXTRA_CONFIG} ${CT_CC_CORE_EXTRA_CONFIG}"
CT_CC_EXTRA_CONFIG="${CT_ARCH_CC_EXTRA_CONFIG} ${CT_CC_EXTRA_CONFIG}"
# Now, build up the variables from the user-configured options.
CT_KERNEL_FILE="${CT_KERNEL}-${CT_KERNEL_VERSION}"

View File

@ -703,7 +703,7 @@ CT_DoBuildTargetTuple() {
CT_TARGET=$(CT_DoConfigSub "${CT_TARGET_ARCH}-${CT_TARGET_VENDOR:-unknown}-${CT_TARGET_KERNEL}-${CT_TARGET_SYS}")
# Prepare the target CFLAGS
CT_ARCH_TARGET_CFLAGS="${CT_ARCH_ENDIAN_CFLAG}"
CT_ARCH_TARGET_CFLAGS="${CT_ARCH_TARGET_CFLAGS} ${CT_ARCH_ENDIAN_CFLAG}"
CT_ARCH_TARGET_CFLAGS="${CT_ARCH_TARGET_CFLAGS} ${CT_ARCH_ARCH_CFLAG}"
CT_ARCH_TARGET_CFLAGS="${CT_ARCH_TARGET_CFLAGS} ${CT_ARCH_ABI_CFLAG}"
CT_ARCH_TARGET_CFLAGS="${CT_ARCH_TARGET_CFLAGS} ${CT_ARCH_CPU_CFLAG}"
@ -712,7 +712,7 @@ CT_DoBuildTargetTuple() {
CT_ARCH_TARGET_CFLAGS="${CT_ARCH_TARGET_CFLAGS} ${CT_ARCH_FLOAT_CFLAG}"
# Now on for the target LDFLAGS
CT_ARCH_TARGET_LDFLAGS="${CT_ARCH_ENDIAN_LDFLAG}"
CT_ARCH_TARGET_LDFLAGS="${CT_ARCH_TARGET_LDFLAGS} ${CT_ARCH_ENDIAN_LDFLAG}"
}
# This function does pause the build until the user strikes "Return"