diff options
-rw-r--r-- | config/target.in | 13 | ||||
-rw-r--r-- | scripts/build/cc_core_gcc.sh | 1 | ||||
-rw-r--r-- | scripts/build/cc_gcc.sh | 1 | ||||
-rwxr-xr-x | tools/extractConfig.sh | 23 |
4 files changed, 38 insertions, 0 deletions
diff --git a/config/target.in b/config/target.in index 27ddc83..168da43 100644 --- a/config/target.in +++ b/config/target.in @@ -59,6 +59,19 @@ endchoice comment "Target optimisations" +config ARCH_ABI + string + prompt "Generate code for the specific ABI" + default "" + help + Generate code for the given ABI. + + Pick a value from the gcc manual for your choosen gcc version and your + target CPU. + + Leave blank if you don't know, or if your target architecutre does not + offer this option. + config ARCH_CPU string prompt "Emit assembly for CPU" diff --git a/scripts/build/cc_core_gcc.sh b/scripts/build/cc_core_gcc.sh index b5fa46e..bcfd2dc 100644 --- a/scripts/build/cc_core_gcc.sh +++ b/scripts/build/cc_core_gcc.sh @@ -16,6 +16,7 @@ do_cc_core() { extra_config="" [ "${CT_ARCH_FLOAT_SW}" = "y" ] && extra_config="${extra_config} --with-float=soft" + [ -n "${CT_ARCH_ABI}" ] && extra_config="${extra_config} --with-abi=${CT_ARCH_ABI}" [ -n "${CT_ARCH_CPU}" ] && extra_config="${extra_config} --with-cpu=${CT_ARCH_CPU}" [ -n "${CT_ARCH_TUNE}" ] && extra_config="${extra_config} --with-tune=${CT_ARCH_TUNE}" [ -n "${CT_ARCH_ARCH}" ] && extra_config="${extra_config} --with-arch=${CT_ARCH_ARCH}" diff --git a/scripts/build/cc_gcc.sh b/scripts/build/cc_gcc.sh index 1ada512..31cbf6d 100644 --- a/scripts/build/cc_gcc.sh +++ b/scripts/build/cc_gcc.sh @@ -29,6 +29,7 @@ do_cc() { extra_config="--enable-languages=${lang_opt}" [ "${CT_ARCH_FLOAT_SW}" = "y" ] && extra_config="${extra_config} --with-float=soft" [ "${CT_SHARED_LIBS}" = "y" ] || extra_config="${extra_config} --disable-shared" + [ -n "${CT_ARCH_ABI}" ] && extra_config="${extra_config} --with-abi=${CT_ARCH_ABI}" [ -n "${CT_ARCH_CPU}" ] && extra_config="${extra_config} --with-cpu=${CT_ARCH_CPU}" [ -n "${CT_ARCH_TUNE}" ] && extra_config="${extra_config} --with-tune=${CT_ARCH_TUNE}" [ -n "${CT_ARCH_ARCH}" ] && extra_config="${extra_config} --with-arch=${CT_ARCH_ARCH}" diff --git a/tools/extractConfig.sh b/tools/extractConfig.sh new file mode 100755 index 0000000..408f69e --- /dev/null +++ b/tools/extractConfig.sh @@ -0,0 +1,23 @@ +#!/bin/sh + +# This scripts extracts a crosstool-ng configuration from the log file +# of a toolchain build with crosstool-ng. + +# Usage: $0 <logfile> + +cat "$1" |awk ' +BEGIN { + dump = 0; +} + +$0~/Dumping crosstool-NG configuration: done in.+s$/ { + dump = 0; +} + +dump == 1 { $1 = "" } +dump == 1 + +$0~/Dumping crosstool-NG configuration$/ { + dump = 1; +} +' |cut -d ' ' -f 2- |