diff options
Diffstat (limited to 'scripts/build')
-rw-r--r-- | scripts/build/cc/100-gcc.sh | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/scripts/build/cc/100-gcc.sh b/scripts/build/cc/100-gcc.sh index dfdb7f9b..b0b713db 100644 --- a/scripts/build/cc/100-gcc.sh +++ b/scripts/build/cc/100-gcc.sh @@ -260,8 +260,8 @@ do_gcc_core_pass_1() { core_opts+=( "host=${CT_BUILD}" ) core_opts+=( "complibs=${CT_BUILDTOOLS_PREFIX_DIR}" ) core_opts+=( "prefix=${CT_BUILDTOOLS_PREFIX_DIR}" ) - core_opts+=( "cflags=${CT_CFLAGS_FOR_HOST}" ) - core_opts+=( "ldflags=${CT_LDFLAGS_FOR_HOST}" ) + core_opts+=( "cflags=${CT_CFLAGS_FOR_BUILD}" ) + core_opts+=( "ldflags=${CT_LDFLAGS_FOR_BUILD}" ) core_opts+=( "lang_list=c" ) core_opts+=( "build_step=core1" ) @@ -286,8 +286,8 @@ do_gcc_core_pass_2() { core_opts+=( "host=${CT_BUILD}" ) core_opts+=( "prefix=${CT_BUILDTOOLS_PREFIX_DIR}" ) core_opts+=( "complibs=${CT_BUILDTOOLS_PREFIX_DIR}" ) - core_opts+=( "cflags=${CT_CFLAGS_FOR_HOST}" ) - core_opts+=( "ldflags=${CT_LDFLAGS_FOR_HOST}" ) + core_opts+=( "cflags=${CT_CFLAGS_FOR_BUILD}" ) + core_opts+=( "ldflags=${CT_LDFLAGS_FOR_BUILD}" ) core_opts+=( "lang_list=c" ) core_opts+=( "build_step=core2" ) @@ -742,9 +742,8 @@ do_gcc_for_build() { local -a build_final_opts local build_final_backend - # In case we're canadian or cross-native, it seems that a - # real, complete compiler is needed?!? WTF? Sigh... - # Otherwise, there is nothing to do. + # If native or simple cross toolchain is being built, then build==host; + # nothing to do. case "${CT_TOOLCHAIN_TYPE}" in native|cross) return 0;; esac @@ -752,6 +751,8 @@ do_gcc_for_build() { build_final_opts+=( "host=${CT_BUILD}" ) build_final_opts+=( "prefix=${CT_BUILDTOOLS_PREFIX_DIR}" ) build_final_opts+=( "complibs=${CT_BUILDTOOLS_PREFIX_DIR}" ) + build_final_opts+=( "cflags=${CT_CFLAGS_FOR_BUILD}" ) + build_final_opts+=( "ldflags=${CT_LDFLAGS_FOR_BUILD}" ) build_final_opts+=( "lang_list=$( cc_gcc_lang_list )" ) build_final_opts+=( "build_step=gcc_build" ) if [ "${CT_BARE_METAL}" = "y" ]; then |