diff options
-rw-r--r-- | .travis.sh | 45 | ||||
-rw-r--r-- | .travis.yml | 8 | ||||
-rw-r--r-- | config/cc/gcc.in.2 | 10 | ||||
-rw-r--r-- | samples/arm-cortex_a8-linux-gnueabi/crosstool.config | 1 | ||||
-rw-r--r-- | samples/arm-cortexa5-linux-uclibcgnueabihf/crosstool.config | 1 | ||||
-rw-r--r-- | samples/arm-unknown-linux-gnueabi/crosstool.config | 1 | ||||
-rw-r--r-- | samples/arm-unknown-linux-uclibcgnueabi/crosstool.config | 1 | ||||
-rw-r--r-- | samples/arm-unknown-linux-uclibcgnueabihf/crosstool.config | 1 | ||||
-rw-r--r-- | samples/armeb-unknown-linux-gnueabi/crosstool.config | 1 | ||||
-rw-r--r-- | samples/i686-nptl-linux-gnu/crosstool.config | 1 | ||||
-rw-r--r-- | scripts/build/cc/100-gcc.sh | 24 |
11 files changed, 81 insertions, 13 deletions
diff --git a/.travis.sh b/.travis.sh new file mode 100644 index 00000000..90a439b3 --- /dev/null +++ b/.travis.sh @@ -0,0 +1,45 @@ +# Add current directory to PATH +export PATH="$(pwd):$PATH" + +# Manage the travis build +ct-ng_travis_build() +{ + # Override the log behaviour + sed -i -e 's/^.*\(CT_LOG_ERROR\).*$/# \1 is not set/' \ + -e 's/^.*\(CT_LOG_WARN\).*$/# \1 is not set/' \ + -e 's/^.*\(CT_LOG_INFO\).*$/# \1 is not set/' \ + -e 's/^.*\(CT_LOG_EXTRA\).*$/\1=y/' \ + -e 's/^.*\(CT_LOG_ALL\).*$/# \1 is not set/' \ + -e 's/^.*\(CT_LOG_DEBUG\).*$/# \1 is not set/' \ + -e 's/^.*\(CT_LOG_LEVEL_MAX\).*$/\1="EXTRA"/' \ + -e 's/^.*\(CT_LOG_PROGRESS_BAR\).*$/# \1 is not set/' \ + -e 's/^.*\(CT_LOCAL_TARBALLS_DIR\).*$/\1="${HOME}\/src"/' \ + -e 's/^.*\(CT_SAVE_TARBALLS\).*$/\1=y/' \ + .config + + # Build the sample + ct-ng build.2 & + local build_pid=$! + + # Start a runner task to print a "still running" line every 5 minutes + # to avoid travis to think that the build is stuck + { + while true + do + sleep 300 + printf "Crosstool-NG is still running ...\r" + done + } & + local runner_pid=$! + + # Wait for the build to finish and get the result + wait $build_pid 2>/dev/null + local result=$? + + # Stop the runner task + kill $runner_pid + wait $runner_pid 2>/dev/null + + # Return the result + return $result +} diff --git a/.travis.yml b/.travis.yml index 93765c71..e1750248 100644 --- a/.travis.yml +++ b/.travis.yml @@ -42,10 +42,10 @@ env: # Building the standard samples script: - - ./ct-ng $CT_SAMPLE - - CT_LOG_DEBUG=y CT_LOG_LEVEL_MAX="DEBUG" ./ct-ng build.2 + - . ./.travis.sh # Load the travis environment + - ct-ng $CT_SAMPLE # Configure the build + - ct-ng_travis_build # Build the sample # On failure displaying the last lines of the log file after_failure: - - tail -n 200 build.log - + - tail -n 1000 build.log diff --git a/config/cc/gcc.in.2 b/config/cc/gcc.in.2 index cbad6386..73b6a2f3 100644 --- a/config/cc/gcc.in.2 +++ b/config/cc/gcc.in.2 @@ -37,6 +37,16 @@ config CC_GCC_EXTRA_CONFIG_ARRAY if they are properly quoted (or escaped, but prefer quotes). Eg.: --with-foo="1st arg with 4 spaces" --with-bar=2nd-arg-without-space +config CC_GCC_EXTRA_ENV_ARRAY + string + prompt "Extra env variables to set for make" + default "" + help + Used to add specific env variables on the make command line for the + gcc build (eg. INHIBIT_LIBC_CFLAGS='-DUSE_TM_CLONE_REGISTRY=0') + + Leave blank if you don't know better. + config STATIC_TOOLCHAIN select CC_GCC_STATIC_LIBSTDCXX if CC_GCC_4_4_or_later diff --git a/samples/arm-cortex_a8-linux-gnueabi/crosstool.config b/samples/arm-cortex_a8-linux-gnueabi/crosstool.config index 3680597b..b9c424c8 100644 --- a/samples/arm-cortex_a8-linux-gnueabi/crosstool.config +++ b/samples/arm-cortex_a8-linux-gnueabi/crosstool.config @@ -20,5 +20,4 @@ CT_DEBUG_gdb=y # CT_GDB_CROSS_PYTHON is not set CT_GDB_NATIVE=y CT_GDB_NATIVE_STATIC=y -CT_DEBUG_ltrace=y CT_DEBUG_strace=y diff --git a/samples/arm-cortexa5-linux-uclibcgnueabihf/crosstool.config b/samples/arm-cortexa5-linux-uclibcgnueabihf/crosstool.config index a64912c8..54c6d8fb 100644 --- a/samples/arm-cortexa5-linux-uclibcgnueabihf/crosstool.config +++ b/samples/arm-cortexa5-linux-uclibcgnueabihf/crosstool.config @@ -25,5 +25,4 @@ CT_DEBUG_duma=y CT_DEBUG_gdb=y CT_GDB_CROSS_STATIC=y CT_GDB_NATIVE=y -CT_DEBUG_ltrace=y CT_DEBUG_strace=y diff --git a/samples/arm-unknown-linux-gnueabi/crosstool.config b/samples/arm-unknown-linux-gnueabi/crosstool.config index 9105b6f4..9f98caf9 100644 --- a/samples/arm-unknown-linux-gnueabi/crosstool.config +++ b/samples/arm-unknown-linux-gnueabi/crosstool.config @@ -17,5 +17,4 @@ CT_DEBUG_duma=y CT_DEBUG_gdb=y # CT_GDB_CROSS_PYTHON is not set CT_GDB_NATIVE=y -CT_DEBUG_ltrace=y CT_DEBUG_strace=y diff --git a/samples/arm-unknown-linux-uclibcgnueabi/crosstool.config b/samples/arm-unknown-linux-uclibcgnueabi/crosstool.config index 06b279f2..486c0918 100644 --- a/samples/arm-unknown-linux-uclibcgnueabi/crosstool.config +++ b/samples/arm-unknown-linux-uclibcgnueabi/crosstool.config @@ -20,5 +20,4 @@ CT_DEBUG_gdb=y CT_GDB_CROSS_STATIC=y CT_GDB_NATIVE=y CT_GDB_NATIVE_STATIC=y -CT_DEBUG_ltrace=y CT_DEBUG_strace=y diff --git a/samples/arm-unknown-linux-uclibcgnueabihf/crosstool.config b/samples/arm-unknown-linux-uclibcgnueabihf/crosstool.config index f3162f8d..bbb503b2 100644 --- a/samples/arm-unknown-linux-uclibcgnueabihf/crosstool.config +++ b/samples/arm-unknown-linux-uclibcgnueabihf/crosstool.config @@ -23,5 +23,4 @@ CT_DEBUG_gdb=y CT_GDB_CROSS_STATIC=y CT_GDB_NATIVE=y CT_GDB_NATIVE_STATIC=y -CT_DEBUG_ltrace=y CT_DEBUG_strace=y diff --git a/samples/armeb-unknown-linux-gnueabi/crosstool.config b/samples/armeb-unknown-linux-gnueabi/crosstool.config index a16a867a..6c10fd7b 100644 --- a/samples/armeb-unknown-linux-gnueabi/crosstool.config +++ b/samples/armeb-unknown-linux-gnueabi/crosstool.config @@ -18,5 +18,4 @@ CT_DEBUG_duma=y CT_DEBUG_gdb=y # CT_GDB_CROSS_PYTHON is not set CT_GDB_NATIVE=y -CT_DEBUG_ltrace=y CT_DEBUG_strace=y diff --git a/samples/i686-nptl-linux-gnu/crosstool.config b/samples/i686-nptl-linux-gnu/crosstool.config index 78ab5007..668881ac 100644 --- a/samples/i686-nptl-linux-gnu/crosstool.config +++ b/samples/i686-nptl-linux-gnu/crosstool.config @@ -16,5 +16,4 @@ CT_DEBUG_duma=y CT_DEBUG_gdb=y # CT_GDB_CROSS_PYTHON is not set CT_GDB_NATIVE=y -CT_DEBUG_ltrace=y CT_DEBUG_strace=y diff --git a/scripts/build/cc/100-gcc.sh b/scripts/build/cc/100-gcc.sh index f7eed949..2001ff92 100644 --- a/scripts/build/cc/100-gcc.sh +++ b/scripts/build/cc/100-gcc.sh @@ -194,6 +194,7 @@ do_gcc_core_backend() { local -a core_LDFLAGS local -a core_targets local -a extra_user_config + local -a extra_user_env local arg for arg in "$@"; do @@ -362,6 +363,21 @@ do_gcc_core_backend() { extra_config+=(--disable-libgomp) extra_config+=(--disable-libmudflap) + if [ "${CT_CC_GCC_LIBSSP}" = "y" ]; then + extra_config+=(--enable-libssp) + else + extra_config+=(--disable-libssp) + fi + if [ "${CT_CC_GCC_HAS_LIBQUADMATH}" = "y" ]; then + if [ "${CT_CC_GCC_LIBQUADMATH}" = "y" ]; then + extra_config+=(--enable-libquadmath) + extra_config+=(--enable-libquadmath-support) + else + extra_config+=(--disable-libquadmath) + extra_config+=(--disable-libquadmath-support) + fi + fi + [ "${CT_TOOLCHAIN_ENABLE_NLS}" != "y" ] && extra_config+=("--disable-nls") [ "${CT_CC_GCC_DISABLE_PCH}" = "y" ] && extra_config+=("--disable-libstdcxx-pch") @@ -376,6 +392,10 @@ do_gcc_core_backend() { extra_config+=("--disable-multilib") fi + if [ "x${CT_CC_GCC_EXTRA_ENV_ARRAY}" != "x" ]; then + extra_user_env=( "${CT_CC_GCC_EXTRA_ENV_ARRAY[@]}" ) + fi + CT_DoLog DEBUG "Extra config passed: '${extra_config[*]}'" # Use --with-local-prefix so older gccs don't look in /usr/local (http://gcc.gnu.org/PR10532) @@ -455,7 +475,7 @@ do_gcc_core_backend() { repair_cc="" fi - CT_DoExecLog ALL make ${JOBSFLAGS} -C gcc ${libgcc_rule} \ + CT_DoExecLog ALL make ${JOBSFLAGS} ${extra_user_env} -C gcc ${libgcc_rule} \ ${repair_cc} sed -r -i -e 's@-lc@@g' gcc/${libgcc_rule} else # build_libgcc @@ -474,7 +494,7 @@ do_gcc_core_backend() { fi CT_DoLog EXTRA "Building gcc" - CT_DoExecLog ALL make ${JOBSFLAGS} "${core_targets[@]/#/all-}" + CT_DoExecLog ALL make ${JOBSFLAGS} ${extra_user_env} "${core_targets[@]/#/all-}" CT_DoLog EXTRA "Installing gcc" CT_DoExecLog ALL make ${JOBSFLAGS} "${core_targets[@]/#/install-}" |