diff options
-rw-r--r-- | config/cc/gcc.in.2 | 11 | ||||
-rw-r--r-- | config/debug/gdb.in | 9 | ||||
-rw-r--r-- | config/kernel/linux.in | 36 | ||||
-rw-r--r-- | config/libc/musl.in | 4 | ||||
-rw-r--r-- | docs/3 - Configuring a toolchain.txt | 2 | ||||
-rw-r--r-- | patches/glibc/2.22/100-sparc32-sem_open-missing-include.patch | 21 | ||||
-rw-r--r-- | patches/uClibc/0.9.33.2/400-arm-unwind.patch | 23 | ||||
-rw-r--r-- | samples/arm-cortexa5-linux-uclibcgnueabihf/reported.by | 2 | ||||
-rw-r--r-- | samples/avr32-unknown-none/crosstool.config | 2 | ||||
-rw-r--r-- | samples/powerpc-e500v2-linux-gnuspe/crosstool.config | 11 | ||||
-rw-r--r-- | samples/sh4-unknown-linux-gnu/crosstool.config | 2 | ||||
-rw-r--r-- | scripts/build/cc/100-gcc.sh | 56 |
12 files changed, 135 insertions, 44 deletions
diff --git a/config/cc/gcc.in.2 b/config/cc/gcc.in.2 index 73b6a2f..577bf42 100644 --- a/config/cc/gcc.in.2 +++ b/config/cc/gcc.in.2 @@ -47,6 +47,17 @@ config CC_GCC_EXTRA_ENV_ARRAY Leave blank if you don't know better. +config CC_GCC_TARGET_FINAL + bool + prompt "Use the default targets all and install for the final compiler" + default n + depends on BARE_METAL + help + The final GCC for a bare metal system is built by the core gcc script. + This script does a lot of tricks to build the core gcc, which are not + required for the final gcc build. If you set this flag to true, all the + tricks are not done and the compiler is build with all/install. + config STATIC_TOOLCHAIN select CC_GCC_STATIC_LIBSTDCXX if CC_GCC_4_4_or_later diff --git a/config/debug/gdb.in b/config/debug/gdb.in index 7010259..d0d1aae 100644 --- a/config/debug/gdb.in +++ b/config/debug/gdb.in @@ -164,13 +164,15 @@ config GDB_V_6_8a bool prompt "6.8a" +endchoice + config GDB_CUSTOM bool prompt "Custom gdb" depends on EXPERIMENTAL - select GDB_7_2_or_later - -endchoice + help + The choosen gdb version shall be not downloaded. Instead use + a custom location to get the source. config GDB_7_2_or_later bool @@ -220,7 +222,6 @@ config GDB_VERSION default "7.0.1a" if GDB_V_7_0_1a default "7.0a" if GDB_V_7_0a default "6.8a" if GDB_V_6_8a - default "custom" if GDB_CUSTOM if GDB_CUSTOM diff --git a/config/kernel/linux.in b/config/kernel/linux.in index c896409..40c1cb6 100644 --- a/config/kernel/linux.in +++ b/config/kernel/linux.in @@ -29,39 +29,39 @@ choice config KERNEL_V_4_2 bool - prompt "4.2 (mainline)" + prompt "4.2.3 (stable)" config KERNEL_V_4_1 bool - prompt "4.1.6 (stable)" + prompt "4.1.10" config KERNEL_V_3_18 bool - prompt "3.18.20" + prompt "3.18.22" config KERNEL_V_3_14 bool - prompt "3.14.51" + prompt "3.14.54" config KERNEL_V_3_12 bool - prompt "3.12.47" + prompt "3.12.49" config KERNEL_V_3_10 bool - prompt "3.10.87" + prompt "3.10.90" config KERNEL_V_3_4 bool - prompt "3.4.108" + prompt "3.4.109" config KERNEL_V_3_2 bool - prompt "3.2.71" + prompt "3.2.72" config KERNEL_V_2_6_32 bool - prompt "2.6.32.67" + prompt "2.6.32.68" help config KERNEL_LINUX_CUSTOM @@ -84,15 +84,15 @@ config KERNEL_VERSION string # Don't remove next line # CT_INSERT_VERSION_STRING_BELOW - default "4.2" if KERNEL_V_4_2 - default "4.1.6" if KERNEL_V_4_1 - default "3.18.20" if KERNEL_V_3_18 - default "3.14.51" if KERNEL_V_3_14 - default "3.12.47" if KERNEL_V_3_12 - default "3.10.87" if KERNEL_V_3_10 - default "3.4.108" if KERNEL_V_3_4 - default "3.2.71" if KERNEL_V_3_2 - default "2.6.32.67" if KERNEL_V_2_6_32 + default "4.2.3" if KERNEL_V_4_2 + default "4.1.10" if KERNEL_V_4_1 + default "3.18.22" if KERNEL_V_3_18 + default "3.14.54" if KERNEL_V_3_14 + default "3.12.49" if KERNEL_V_3_12 + default "3.10.90" if KERNEL_V_3_10 + default "3.4.109" if KERNEL_V_3_4 + default "3.2.72" if KERNEL_V_3_2 + default "2.6.32.68" if KERNEL_V_2_6_32 default "custom" if KERNEL_LINUX_CUSTOM endif # ! KERNEL_LINUX_USE_CUSTOM_HEADERS diff --git a/config/libc/musl.in b/config/libc/musl.in index f5b4fc0..8df09df 100644 --- a/config/libc/musl.in +++ b/config/libc/musl.in @@ -20,7 +20,7 @@ choice config LIBC_MUSL_V_1_1 bool - prompt "1.1.11 (Mainline)" + prompt "1.1.12 (Mainline)" depends on EXPERIMENTAL config LIBC_MUSL_V_1_0 @@ -38,6 +38,6 @@ config LIBC_VERSION string # Don't remove next line # CT_INSERT_VERSION_STRING_BELOW - default "1.1.11" if LIBC_MUSL_V_1_1 + default "1.1.12" if LIBC_MUSL_V_1_1 default "1.0.5" if LIBC_MUSL_V_1_0 default "custom" if LIBC_MUSL_V_CUSTOM diff --git a/docs/3 - Configuring a toolchain.txt b/docs/3 - Configuring a toolchain.txt index 2a9c156..b9cbace 100644 --- a/docs/3 - Configuring a toolchain.txt +++ b/docs/3 - Configuring a toolchain.txt @@ -15,7 +15,7 @@ will support, the version of the components you want to use, etc... The value for those options are then stored in a configuration file. The configurator works the same way you configure your Linux kernel. It is -assumed you now how to handle this. +assumed you know how to handle this. To enter the menu, type: ct-ng menuconfig diff --git a/patches/glibc/2.22/100-sparc32-sem_open-missing-include.patch b/patches/glibc/2.22/100-sparc32-sem_open-missing-include.patch new file mode 100644 index 0000000..b481046 --- /dev/null +++ b/patches/glibc/2.22/100-sparc32-sem_open-missing-include.patch @@ -0,0 +1,21 @@ +commit 3f512ca79fda7854da188df0585e71467119206e +Author: Brett Neumeier <brett@neumeier.us> +Date: Mon Aug 31 15:27:21 2015 -0700 + + Fix non-v9 32-bit sparc build. + + [BZ #18870] + * sysdeps/sparc/sparc32/sem_open.c: Add missing #include + +diff --git a/sysdeps/sparc/sparc32/sem_open.c b/sysdeps/sparc/sparc32/sem_open.c +index 16cb9ad..59df2d7 100644 +--- a/sysdeps/sparc/sparc32/sem_open.c ++++ b/sysdeps/sparc/sparc32/sem_open.c +@@ -29,6 +29,7 @@ + #include <sys/mman.h> + #include <sys/stat.h> + #include "semaphoreP.h" ++#include <futex-internal.h> + #include <shm-directory.h> + + diff --git a/patches/uClibc/0.9.33.2/400-arm-unwind.patch b/patches/uClibc/0.9.33.2/400-arm-unwind.patch new file mode 100644 index 0000000..d31844c --- /dev/null +++ b/patches/uClibc/0.9.33.2/400-arm-unwind.patch @@ -0,0 +1,23 @@ +commit 16884562bf54a93e76c6d2ba03edb1fb00e8b3e0 +Author: Alexey Neyman <stilor@att.net> +Date: Thu Oct 1 13:22:37 2015 -0700 + + Mark libgcc_c_resume as used. + + Recent GCC releases eliminate the data that is only set and never read, + along with the code storing to that data. For assembly blocks like in + ARM unwind code, the data structures need to be declared used. + +diff --git a/libpthread/nptl/sysdeps/unix/sysv/linux/arm/unwind-resume.c b/libpthread/nptl/sysdeps/unix/sysv/linux/arm/unwind-resume.c +index f9a4ffb..f0c3047 100644 +--- a/libpthread/nptl/sysdeps/unix/sysv/linux/arm/unwind-resume.c ++++ b/libpthread/nptl/sysdeps/unix/sysv/linux/arm/unwind-resume.c +@@ -25,7 +25,7 @@ + #define __libc_dlclose dlclose + #define __libc_fatal(x) {/*write(STDERR_FILENO, x, strlen(x));*/ abort();} + +-static void (*libgcc_s_resume) (struct _Unwind_Exception *exc); ++static void (*libgcc_s_resume) (struct _Unwind_Exception *exc) __attribute_used__; + static _Unwind_Reason_Code (*libgcc_s_personality) + (_Unwind_State, struct _Unwind_Exception *, struct _Unwind_Context *); + diff --git a/samples/arm-cortexa5-linux-uclibcgnueabihf/reported.by b/samples/arm-cortexa5-linux-uclibcgnueabihf/reported.by index 1eb16d1..57a07cb 100644 --- a/samples/arm-cortexa5-linux-uclibcgnueabihf/reported.by +++ b/samples/arm-cortexa5-linux-uclibcgnueabihf/reported.by @@ -1,3 +1,3 @@ reporter_name="Alexandre Belloni" reporter_url="https://plus.google.com/+AlexandreBelloni" -reporter_comment="Cortex-A5 using the hard-float GNU EABI (VFPV4-D16 whithout NEON)." +reporter_comment="Cortex-A5 using the hard-float GNU EABI (VFPV4-D16 without NEON)." diff --git a/samples/avr32-unknown-none/crosstool.config b/samples/avr32-unknown-none/crosstool.config index aed5349..880a18f 100644 --- a/samples/avr32-unknown-none/crosstool.config +++ b/samples/avr32-unknown-none/crosstool.config @@ -4,7 +4,7 @@ CT_CONFIG_SHELL_SH=y CT_LOG_EXTRA=y CT_ARCH_avr32=y CT_BINUTILS_V_2_18a=y -CT_CC_V_4_2_2=y +CT_CC_GCC_V_4_2_2=y CT_LIBC_NEWLIB_V_1_17_0=y CT_LIBC_NEWLIB_IO_LL=y CT_LIBC_NEWLIB_IO_FLOAT=y diff --git a/samples/powerpc-e500v2-linux-gnuspe/crosstool.config b/samples/powerpc-e500v2-linux-gnuspe/crosstool.config index b611548..a57dae9 100644 --- a/samples/powerpc-e500v2-linux-gnuspe/crosstool.config +++ b/samples/powerpc-e500v2-linux-gnuspe/crosstool.config @@ -2,7 +2,6 @@ CT_LOCAL_TARBALLS_DIR="${HOME}/src" CT_SAVE_TARBALLS=y CT_LOG_EXTRA=y CT_ARCH_CPU="8548" -CT_ARCH_TUNE="8548" CT_ARCH_FLOAT_SW=y CT_TARGET_CFLAGS="-mfloat-gprs=double -Wa,-me500x2" CT_ARCH_powerpc=y @@ -10,13 +9,11 @@ CT_ARCH_powerpc_ABI_SPE=y CT_TARGET_VENDOR="e500v2" CT_KERNEL_linux=y CT_BINUTILS_EXTRA_CONFIG_ARRAY="--enable-spe=yes --enable-e500x2 --with-e500x2" -CT_LIBC_glibc=y -# CT_LIBC_GLIBC_FORCE_UNWIND is not set CT_CC_GCC_SHOW_LINARO=y -CT_CC_V_4_6_4=y -CT_CC_LANG_CXX=y -CT_CC_CORE_EXTRA_CONFIG_ARRAY="--with-long-double-128 --enable-e500_double" -CT_CC_EXTRA_CONFIG_ARRAY="--with-long-double-128 --enable-e500_double" +CT_CC_GCC_CORE_EXTRA_CONFIG_ARRAY="--enable-e500_double" +CT_CC_GCC_EXTRA_CONFIG_ARRAY="--enable-e500_double" # CT_CC_GCC_ENABLE_TARGET_OPTSPACE is not set +CT_CC_GCC_LDBL_128=y +CT_CC_LANG_CXX=y CT_DEBUG_gdb=y # CT_GDB_CROSS_PYTHON is not set diff --git a/samples/sh4-unknown-linux-gnu/crosstool.config b/samples/sh4-unknown-linux-gnu/crosstool.config index 3d588c6..ab0cc7a 100644 --- a/samples/sh4-unknown-linux-gnu/crosstool.config +++ b/samples/sh4-unknown-linux-gnu/crosstool.config @@ -5,7 +5,7 @@ CT_ARCH_sh=y CT_ARCH_SH_SH4=y CT_KERNEL_linux=y CT_BINUTILS_PLUGINS=y -CT_LIBC_glibc=y +CT_CC_GCC_V_4_9_3=y CT_CC_LANG_CXX=y CT_DEBUG_gdb=y # CT_GDB_CROSS_PYTHON is not set diff --git a/scripts/build/cc/100-gcc.sh b/scripts/build/cc/100-gcc.sh index 2001ff9..1056221 100644 --- a/scripts/build/cc/100-gcc.sh +++ b/scripts/build/cc/100-gcc.sh @@ -100,6 +100,7 @@ do_gcc_core_pass_1() { core_opts+=( "cflags=${CT_CFLAGS_FOR_HOST}" ) core_opts+=( "ldflags=${CT_LDFLAGS_FOR_HOST}" ) core_opts+=( "lang_list=c" ) + core_opts+=( "build_step=core1" ) CT_DoStep INFO "Installing pass-1 core C gcc compiler" CT_mkdir_pushd "${CT_BUILD_DIR}/build-cc-gcc-core-pass-1" @@ -125,6 +126,7 @@ do_gcc_core_pass_2() { core_opts+=( "cflags=${CT_CFLAGS_FOR_HOST}" ) core_opts+=( "ldflags=${CT_LDFLAGS_FOR_HOST}" ) core_opts+=( "lang_list=c" ) + core_opts+=( "build_step=core2" ) # Different conditions are at stake here: # - In case the threading model is NPTL, we need a shared-capable core @@ -165,7 +167,7 @@ do_gcc_core_pass_2() { # mode : build a 'static', 'shared' or 'baremetal' : string : (none) # host : the machine the core will run on : tuple : (none) # prefix : dir prefix to install into : dir : (none) -# complibs : dir where complibs are isntalled : dir : (none) +# complibs : dir where complibs are installed : dir : (none) # lang_list : the list of languages to build : string : (empty) # build_libgcc : build libgcc or not : bool : no # build_libstdcxx : build libstdc++ or not : bool : no @@ -174,6 +176,8 @@ do_gcc_core_pass_2() { # build_manuals : whether to build manuals or not : bool : no # cflags : cflags to use : string : (empty) # ldflags : ldflags to use : string : (empty) +# build_step : build step 'core1', 'core2', 'gcc_build' +# or 'gcc_host' : string : (none) # Usage: do_gcc_core_backend mode=[static|shared|baremetal] build_libgcc=[yes|no] build_staticlinked=[yes|no] do_gcc_core_backend() { local mode @@ -188,11 +192,15 @@ do_gcc_core_backend() { local lang_list local cflags local ldflags + local build_step + local log_txt local tmp local -a host_libstdcxx_flags local -a extra_config local -a core_LDFLAGS local -a core_targets + local -a core_targets_all + local -a core_targets_install local -a extra_user_config local -a extra_user_env local arg @@ -201,24 +209,40 @@ do_gcc_core_backend() { eval "${arg// /\\ }" done - CT_DoLog EXTRA "Configuring core C gcc compiler" + # This function gets called in case of a bare metal compiler for the final gcc, too. + case "${build_step}" in + core1|core2) + CT_DoLog EXTRA "Configuring core C gcc compiler" + log_txt="gcc" + extra_user_config=( "${CT_CC_GCC_CORE_EXTRA_CONFIG_ARRAY[@]}" ) + ;; + gcc_build|gcc_host) + CT_DoLog EXTRA "Configuring final gcc compiler" + extra_user_config=( "${CT_CC_GCC_EXTRA_CONFIG_ARRAY[@]}" ) + log_txt="final gcc compiler" + if [ "${CT_CC_GCC_TARGET_FINAL}" = "y" ]; then + # to inhibit the libiberty and libgcc tricks later on + build_libgcc=no + fi + ;; + *) + CT_Abort "Internal Error: 'build_step' must be one of: 'core1', 'core2', 'gcc_build' or 'gcc_host', not '${build_step:-(empty)}'" + ;; + esac case "${mode}" in static) extra_config+=("--with-newlib") extra_config+=("--enable-threads=no") extra_config+=("--disable-shared") - extra_user_config=( "${CT_CC_GCC_CORE_EXTRA_CONFIG_ARRAY[@]}" ) ;; shared) extra_config+=("--enable-shared") - extra_user_config=( "${CT_CC_GCC_CORE_EXTRA_CONFIG_ARRAY[@]}" ) ;; baremetal) extra_config+=("--with-newlib") extra_config+=("--enable-threads=no") extra_config+=("--disable-shared") - extra_user_config=( "${CT_CC_GCC_CORE_EXTRA_CONFIG_ARRAY[@]}" ) ;; *) CT_Abort "Internal Error: 'mode' must be one of: 'static', 'shared' or 'baremetal', not '${mode:-(empty)}'" @@ -493,11 +517,23 @@ do_gcc_core_backend() { core_targets+=( target-libgfortran ) fi - CT_DoLog EXTRA "Building gcc" - CT_DoExecLog ALL make ${JOBSFLAGS} ${extra_user_env} "${core_targets[@]/#/all-}" + core_targets_all="${core_targets[@]/#/all-}" + core_targets_install="${core_targets[@]/#/install-}" + + case "${build_step}" in + gcc_build|gcc_host) + if [ "${CT_CC_GCC_TARGET_FINAL}" = "y" ]; then + core_targets_all=all + core_targets_install=install + fi + ;; + esac + + CT_DoLog EXTRA "Building ${log_txt}" + CT_DoExecLog ALL make ${JOBSFLAGS} ${extra_user_env} ${core_targets_all} - CT_DoLog EXTRA "Installing gcc" - CT_DoExecLog ALL make ${JOBSFLAGS} "${core_targets[@]/#/install-}" + CT_DoLog EXTRA "Installing ${log_txt}" + CT_DoExecLog ALL make ${JOBSFLAGS} ${extra_user_env} ${core_targets_install} if [ "${build_manuals}" = "yes" ]; then CT_DoLog EXTRA "Building the GCC manuals" @@ -553,6 +589,7 @@ do_gcc_for_build() { build_final_opts+=( "prefix=${CT_BUILDTOOLS_PREFIX_DIR}" ) build_final_opts+=( "complibs=${CT_BUILDTOOLS_PREFIX_DIR}" ) build_final_opts+=( "lang_list=$( cc_gcc_lang_list )" ) + build_final_opts+=( "build_step=gcc_build" ) if [ "${CT_BARE_METAL}" = "y" ]; then # In the tests I've done, bare-metal was not impacted by the # lack of such a compiler, but better safe than sorry... @@ -589,6 +626,7 @@ do_gcc_for_host() { final_opts+=( "cflags=${CT_CFLAGS_FOR_HOST}" ) final_opts+=( "ldflags=${CT_LDFLAGS_FOR_HOST}" ) final_opts+=( "lang_list=$( cc_gcc_lang_list )" ) + final_opts+=( "build_step=gcc_host" ) if [ "${CT_BUILD_MANUALS}" = "y" ]; then final_opts+=( "build_manuals=yes" ) fi |