diff options
Diffstat (limited to 'scripts/build')
-rw-r--r-- | scripts/build/companion_libs/cloog.sh | 40 | ||||
-rw-r--r-- | scripts/build/debug/300-gdb.sh | 4 | ||||
-rw-r--r-- | scripts/build/internals.sh | 16 | ||||
-rw-r--r-- | scripts/build/libc/eglibc.sh | 4 | ||||
-rw-r--r-- | scripts/build/libc/glibc.sh | 22 |
5 files changed, 47 insertions, 39 deletions
diff --git a/scripts/build/companion_libs/cloog.sh b/scripts/build/companion_libs/cloog.sh index 0e6d74f..f6eb68a 100644 --- a/scripts/build/companion_libs/cloog.sh +++ b/scripts/build/companion_libs/cloog.sh @@ -18,29 +18,47 @@ do_cloog_get() { # Extract CLooG do_cloog_extract() { + local _t + CT_Extract "cloog-ppl-${CT_CLOOG_VERSION}" - CT_Pushd "${CT_SRC_DIR}/cloog-ppl" + + # Version 0.15.3 has a dirname 'cloog-ppl' (with no version in it!) + # while versions 0.15.4 onward do have the version in the dirname. + case "${CT_CLOOG_VERSION}" in + 0.15.3) _t="";; + *) _t="-${CT_CLOOG_VERSION}";; + esac + CT_Pushd "${CT_SRC_DIR}/cloog-ppl${_t}" CT_Patch "cloog-ppl-${CT_CLOOG_VERSION}" nochdir CT_Popd } do_cloog() { + local _t + + # Version 0.15.3 has a dirname 'cloog-ppl' (with no version in it!) + # while versions 0.15.4 onward do have the version in the dirname. + case "${CT_CLOOG_VERSION}" in + 0.15.3) _t="";; + *) _t="-${CT_CLOOG_VERSION}";; + esac + mkdir -p "${CT_BUILD_DIR}/build-cloog-ppl" cd "${CT_BUILD_DIR}/build-cloog-ppl" CT_DoStep INFO "Installing CLooG/ppl" CT_DoLog EXTRA "Configuring CLooG/ppl" - CFLAGS="${CT_CFLAGS_FOR_HOST}" \ - CT_DoExecLog ALL \ - "${CT_SRC_DIR}/cloog-ppl/configure" \ - --build=${CT_BUILD} \ - --host=${CT_HOST} \ - --prefix="${CT_PREFIX_DIR}" \ - --with-gmp="${CT_PREFIX_DIR}" \ - --with-ppl="${CT_PREFIX_DIR}" \ - --enable-shared \ - --disable-static \ + CFLAGS="${CT_CFLAGS_FOR_HOST}" \ + CT_DoExecLog ALL \ + "${CT_SRC_DIR}/cloog-ppl${_t}/configure" \ + --build=${CT_BUILD} \ + --host=${CT_HOST} \ + --prefix="${CT_PREFIX_DIR}" \ + --with-gmp="${CT_PREFIX_DIR}" \ + --with-ppl="${CT_PREFIX_DIR}" \ + --enable-shared \ + --disable-static \ --with-bits=gmp CT_DoLog EXTRA "Building CLooG/ppl" diff --git a/scripts/build/debug/300-gdb.sh b/scripts/build/debug/300-gdb.sh index 9207ca7..d9f2439 100644 --- a/scripts/build/debug/300-gdb.sh +++ b/scripts/build/debug/300-gdb.sh @@ -265,6 +265,10 @@ do_debug_gdb_build() { unset ac_cv_func_strncmp_works + CT_DoLog EXTRA "Cleaning up ncurses" + cd "${CT_BUILD_DIR}/build-ncurses" + CT_DoExecLog ALL make DESTDIR="${CT_SYSROOT_DIR}" uninstall + CT_EndStep # native gdb build fi diff --git a/scripts/build/internals.sh b/scripts/build/internals.sh index 093636a..144cb87 100644 --- a/scripts/build/internals.sh +++ b/scripts/build/internals.sh @@ -8,9 +8,6 @@ do_finish() { CT_DoStep INFO "Cleaning-up the toolchain's directory" - CT_DoLog EXTRA "Removing access to the build system tools" - CT_DoExecLog DEBUG rm -rf "${CT_PREFIX_DIR}/buildtools" - if [ "${CT_BARE_METAL}" != "y" ]; then CT_DoLog EXTRA "Installing the populate helper" sed -r -e 's|@@CT_TARGET@@|'"${CT_TARGET}"'|g;' \ @@ -58,11 +55,11 @@ do_finish() { if [ "${CT_DEBUG_CT}" = "y" ]; then _t="" # If debugging crosstool-NG, don't strip the wrapper fi - CT_DoExecLog "${HOST_CC}" \ - -Wall -Wextra -Wunreachable-code -Werror \ - -O3 -static ${_t} \ - "${CT_LIB_DIR}/scripts/wrapper.c" \ - -o ".${CT_TARGET}-wrapper" + CT_DoExecLog DEBUG "${CT_HOST}-gcc" \ + -Wall -Wextra -Wunreachable-code -Werror \ + -O3 -static ${_t} \ + "${CT_LIB_DIR}/scripts/wrapper.c" \ + -o ".${CT_TARGET}-wrapper" ;; esac @@ -82,6 +79,9 @@ do_finish() { CT_Popd fi + CT_DoLog EXTRA "Removing access to the build system tools" + CT_DoExecLog DEBUG rm -rf "${CT_PREFIX_DIR}/buildtools" + # Remove the generated documentation files if [ "${CT_REMOVE_DOCS}" = "y" ]; then CT_DoLog EXTRA "Removing installed documentation" diff --git a/scripts/build/libc/eglibc.sh b/scripts/build/libc/eglibc.sh index 245cda8..e2bd37b 100644 --- a/scripts/build/libc/eglibc.sh +++ b/scripts/build/libc/eglibc.sh @@ -54,7 +54,7 @@ do_libc_get() { -a -f "${CT_LOCAL_TARBALLS_DIR}/${eglibc_linuxthreads}" \ -a -f "${CT_LOCAL_TARBALLS_DIR}/${eglibc_localedef}" \ -a -f "${CT_LOCAL_TARBALLS_DIR}/${eglibc_ports}" \ - "${CT_FORCE_DOWNLOAD}" != "y" \ + -a "${CT_FORCE_DOWNLOAD}" != "y" \ ]; then CT_DoLog DEBUG "Got 'eglibc-${CT_LIBC_VERSION}' from local storage" for file in ${eglibc} ${eglibc_linuxthreads} ${eglibc_localedef} ${eglibc_ports}; do @@ -252,7 +252,7 @@ do_libc() { CT_DoLog DEBUG "Extra CC args passed : '${extra_cc_args}'" BUILD_CC="${CT_BUILD}-gcc" \ - CFLAGS="${CT_TARGET_CFLAGS} ${CT_LIBC_GLIBC_EXTRA_CFLAGS} -O" \ + CFLAGS="${CT_TARGET_CFLAGS} ${CT_LIBC_GLIBC_EXTRA_CFLAGS} -O2" \ CC="${CT_TARGET}-gcc ${CT_LIBC_EXTRA_CC_ARGS} ${extra_cc_args}" \ AR=${CT_TARGET}-ar \ RANLIB=${CT_TARGET}-ranlib \ diff --git a/scripts/build/libc/glibc.sh b/scripts/build/libc/glibc.sh index a83fb25..44633b1 100644 --- a/scripts/build/libc/glibc.sh +++ b/scripts/build/libc/glibc.sh @@ -47,8 +47,6 @@ do_libc_get() { "glibc-${version}-branch${date:+:}${date}" \ "glibc-${addon}-cvs-${CT_LIBC_VERSION}" done -# elif [ "${CT_LIBC_GLIBC_SNAPSHOT}" = "y" ]; then -# : # Not yet handled... fi return 0 @@ -180,7 +178,7 @@ do_libc_headers() { libc_cv_ppc_machine=yes \ CT_DoExecLog ALL \ - make CFLAGS="-O -DBOOTSTRAP_GCC" \ + make CFLAGS="-O2 -DBOOTSTRAP_GCC" \ OBJDUMP_FOR_HOST="${CT_TARGET}-objdump" \ PARALLELMFLAGS="${PARALLELMFLAGS}" \ sysdeps/gnu/errlist.c @@ -197,7 +195,7 @@ do_libc_headers() { CT_DoExecLog ALL \ make cross-compiling=yes \ install_root=${CT_SYSROOT_DIR} \ - CFLAGS="-O -DBOOTSTRAP_GCC" \ + CFLAGS="-O2 -DBOOTSTRAP_GCC" \ ${LIBC_SYSROOT_ARG} \ OBJDUMP_FOR_HOST="${CT_TARGET}-objdump" \ PARALLELMFLAGS="${PARALLELMFLAGS}" \ @@ -294,12 +292,6 @@ do_libc_start_files() { # Add some default CC args glibc_version_major=$(echo ${CT_LIBC_VERSION} |sed -r -e 's/^([[:digit:]]+).*/\1/') glibc_version_minor=$(echo ${CT_LIBC_VERSION} |sed -r -e 's/^[[:digit:]]+[\.-_]([[:digit:]]+).*/\1/') - # In case we're using a snapshot, fake a >=2.6 version. - if [ "${CT_LIBC_V_LATEST}" = "y" \ - -o "${CT_LIBC_V_date}" = "y" ]; then - glibc_version_major=3 - glibc_version_minor=0 - fi if [ ${glibc_version_major} -eq 2 -a ${glibc_version_minor} -ge 6 \ -o ${glibc_version_major} -gt 2 ]; then # Don't use -pipe: configure chokes on it for glibc >= 2.6. @@ -325,7 +317,7 @@ do_libc_start_files() { # Please see the comment for the configure step in do_libc(). BUILD_CC="${CT_BUILD}-gcc" \ - CFLAGS="${CT_TARGET_CFLAGS} ${CT_LIBC_GLIBC_EXTRA_CFLAGS} -O " \ + CFLAGS="${CT_TARGET_CFLAGS} ${CT_LIBC_GLIBC_EXTRA_CFLAGS} -O2" \ CC="${cross_cc} ${CT_LIBC_EXTRA_CC_ARGS} ${extra_cc_args}" \ AR=${CT_TARGET}-ar \ RANLIB=${CT_TARGET}-ranlib \ @@ -409,12 +401,6 @@ do_libc() { # Add some default CC args glibc_version_major=$(echo ${CT_LIBC_VERSION} |sed -r -e 's/^([[:digit:]]+).*/\1/') glibc_version_minor=$(echo ${CT_LIBC_VERSION} |sed -r -e 's/^[[:digit:]]+[\.-_]([[:digit:]]+).*/\1/') - # In case we're using a snapshot, fake a >=2.6 version. - if [ "${CT_LIBC_V_LATEST}" = "y" \ - -o "${CT_LIBC_V_date}" = "y" ]; then - glibc_version_major=3 - glibc_version_minor=0 - fi if [ ${glibc_version_major} -eq 2 -a ${glibc_version_minor} -ge 6 \ -o ${glibc_version_major} -gt 2 ]; then # Don't use -pipe: configure chokes on it for glibc >= 2.6. @@ -457,7 +443,7 @@ do_libc() { # silly messages. GNU folks again, he? BUILD_CC="${CT_BUILD}-gcc" \ - CFLAGS="${CT_TARGET_CFLAGS} ${CT_LIBC_GLIBC_EXTRA_CFLAGS} -O" \ + CFLAGS="${CT_TARGET_CFLAGS} ${CT_LIBC_GLIBC_EXTRA_CFLAGS} -O2" \ CC="${CT_TARGET}-gcc ${CT_LIBC_EXTRA_CC_ARGS} ${extra_cc_args}" \ AR=${CT_TARGET}-ar \ RANLIB=${CT_TARGET}-ranlib \ |