diff options
author | Yann E. MORIN" <yann.morin.1998@anciens.enib.fr> | 2012-01-03 22:57:25 +0100 |
---|---|---|
committer | Yann E. MORIN" <yann.morin.1998@anciens.enib.fr> | 2012-01-03 22:57:25 +0100 |
commit | d7761401893497081a3d3542155d0a512a31ef86 (patch) | |
tree | 321e01e18920e4ec945ec877a38638cd3f19d5ba /scripts | |
parent | b485733f263b6dafdb691fe877bce5c1135ea7c0 (diff) | |
download | crosstool-ng-d7761401893497081a3d3542155d0a512a31ef86.tar.gz crosstool-ng-d7761401893497081a3d3542155d0a512a31ef86.tar.bz2 crosstool-ng-d7761401893497081a3d3542155d0a512a31ef86.zip |
cc/gcc: build core compilers for canadian
Currently, we rely on an existing external cross-compiler targetting
the target, to build the C library.
This can pause quite a few problems if that compiler is different from
the one we are building, because it could introduce some ABI issues.
This patch removes this dependency, by building the core compilers
as we do for standard cross, and also by building the binutils and
gcc, for running on the build machine.
This means we no longer need to offer the cross-sompiler selection in
the menuconfig.
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
Diffstat (limited to 'scripts')
-rw-r--r-- | scripts/build/cc/gcc.sh | 16 | ||||
-rw-r--r-- | scripts/crosstool-NG.sh.in | 2 |
2 files changed, 6 insertions, 12 deletions
diff --git a/scripts/build/cc/gcc.sh b/scripts/build/cc/gcc.sh index f177474f..8dea3dc1 100644 --- a/scripts/build/cc/gcc.sh +++ b/scripts/build/cc/gcc.sh @@ -76,13 +76,10 @@ do_cc_core_pass_1() { local -a core_opts local do_core - # Do nothing for canadian-crosses, we already have a target compiler. # We only need a pass-1 core gcc if the threading model is NPTL. # For all other cases, it is not used. - case "${CT_CANADIAN},${CT_THREADS}" in - y,*) - ;; - ,nptl) + case "${CT_THREADS}" in + nptl) do_core=y core_opts+=( "mode=static" ) core_opts+=( "host=${CT_BUILD}" ) @@ -116,21 +113,18 @@ do_cc_core_pass_2() { core_opts+=( "cflags=${CT_CFLAGS_FOR_HOST}" ) core_opts+=( "lang_list=c" ) - # Do nothing for canadian-crosses, we already have a target compiler. # Different conditions are at stake here: # - In case the threading model is NPTL, we need a shared-capable core # gcc; in all other cases, we need a static-only core gcc. # - In case the threading model is NPTL or win32, or gcc is 4.3 or # later, we need to build libgcc - case "${CT_CANADIAN},${CT_THREADS}" in - y,*) - ;; - ,nptl) + case "${CT_THREADS}" in + nptl) do_core=y core_opts+=( "mode=shared" ) core_opts+=( "build_libgcc=yes" ) ;; - ,win32) + win32) do_core=y core_opts+=( "mode=static" ) core_opts+=( "build_libgcc=yes" ) diff --git a/scripts/crosstool-NG.sh.in b/scripts/crosstool-NG.sh.in index c6834171..d7947432 100644 --- a/scripts/crosstool-NG.sh.in +++ b/scripts/crosstool-NG.sh.in @@ -354,7 +354,7 @@ if [ -z "${CT_RESTART}" ]; then build_mangle="build_" host_mangle="host_" target_mangle="" - install_build_tools_for="BUILD HOST TARGET" + install_build_tools_for="BUILD HOST" ;; *) CT_Abort "No code for '${CT_TOOLCHAIN_TYPE}' toolchain type!" ;; |