From 07ec87f14f2bb078235a7db25d4a923e9319f53c Mon Sep 17 00:00:00 2001 From: Alexey Neyman Date: Fri, 25 May 2018 23:57:29 -0700 Subject: Avoid adding arch/cpu/tune flags for target to GCC build ... as it may need to override them for building runtime-selectable code. Signed-off-by: Alexey Neyman diff --git a/scripts/build/cc/gcc.sh b/scripts/build/cc/gcc.sh index a6bf1ac..f38fd7f 100644 --- a/scripts/build/cc/gcc.sh +++ b/scripts/build/cc/gcc.sh @@ -171,13 +171,13 @@ cc_gcc_multilib_housekeeping() { fi done CT_DoLog DEBUG "Filtered target CFLAGS: '${new_cflags}'" - CT_EnvModify CT_TARGET_CFLAGS "${new_cflags} ${CT_TARGET_CFLAGS}" + CT_EnvModify CT_ALL_TARGET_CFLAGS "${new_cflags} ${CT_TARGET_CFLAGS}" CT_EnvModify CT_ARCH_TARGET_CFLAGS_MULTILIB "" # Currently, the only LDFLAGS are endianness-related CT_DoLog DEBUG "Configured target LDFLAGS: '${CT_ARCH_TARGET_LDFLAGS_MULTILIB}'" if [ "${ml_endian}" != "seen" ]; then - CT_EnvModify CT_TARGET_LDFLAGS "${CT_ARCH_TARGET_LDFLAGS_MULTILIB} ${CT_TARGET_LDFLAGS}" + CT_EnvModify CT_ALL_TARGET_LDFLAGS "${CT_ARCH_TARGET_LDFLAGS_MULTILIB} ${CT_TARGET_LDFLAGS}" CT_EnvModify CT_ARCH_TARGET_LDFLAGS_MULTILIB "" fi CT_DoLog DEBUG "Filtered target LDFLAGS: '${CT_ARCH_TARGET_LDFLAGS_MULTILIB}'" @@ -561,7 +561,11 @@ do_gcc_core_backend() { fi fi - # Use --with-local-prefix so older gccs don't look in /usr/local (http://gcc.gnu.org/PR10532) + # Use --with-local-prefix so older gccs don't look in /usr/local (http://gcc.gnu.org/PR10532). + # Pass only user-specified CFLAGS/LDFLAGS in CFLAGS_FOR_TARGET/LDFLAGS_FOR_TARGET: during + # the build of, for example, libatomic, GCC tried to compile multiple variants for runtime + # selection and passing architecture/CPU selectors, as detemined by crosstool-NG, may + # miscompile or outright fail. CT_DoExecLog CFG \ CC_FOR_BUILD="${CT_BUILD}-gcc" \ CFLAGS="${cflags}" \ @@ -1110,6 +1114,8 @@ do_gcc_backend() { fi fi + # NB: not using CT_ALL_TARGET_CFLAGS/CT_ALL_TARGET_LDFLAGS here! + # See do_gcc_core_backend for explanation. CT_DoExecLog CFG \ CC_FOR_BUILD="${CT_BUILD}-gcc" \ CFLAGS="${cflags}" \ diff --git a/scripts/build/companion_libs/200-libelf.sh b/scripts/build/companion_libs/200-libelf.sh index 5f1a8d7..f0d8be4 100644 --- a/scripts/build/companion_libs/200-libelf.sh +++ b/scripts/build/companion_libs/200-libelf.sh @@ -81,7 +81,7 @@ do_libelf_for_target() { libelf_opts+=( "destdir=${CT_SYSROOT_DIR}" ) libelf_opts+=( "host=${CT_TARGET}" ) - libelf_opts+=( "cflags=${CT_TARGET_CFLAGS}" ) + libelf_opts+=( "cflags=${CT_ALL_TARGET_CFLAGS}" ) libelf_opts+=( "prefix=${prefix}" ) libelf_opts+=( "shared=${CT_SHARED_LIBS}" ) do_libelf_backend "${libelf_opts[@]}" diff --git a/scripts/build/companion_libs/210-expat.sh b/scripts/build/companion_libs/210-expat.sh index f848541..75a78bf 100644 --- a/scripts/build/companion_libs/210-expat.sh +++ b/scripts/build/companion_libs/210-expat.sh @@ -54,7 +54,7 @@ do_expat_for_target() { prefix="/usr" ;; esac - expat_opts+=( "cflags=${CT_TARGET_CFLAGS}" ) + expat_opts+=( "cflags=${CT_ALL_TARGET_CFLAGS}" ) expat_opts+=( "prefix=${prefix}" ) expat_opts+=( "destdir=${CT_SYSROOT_DIR}" ) expat_opts+=( "shared=${CT_SHARED_LIBS}" ) diff --git a/scripts/build/companion_libs/220-ncurses.sh b/scripts/build/companion_libs/220-ncurses.sh index 97fb834..b5dee13 100644 --- a/scripts/build/companion_libs/220-ncurses.sh +++ b/scripts/build/companion_libs/220-ncurses.sh @@ -97,7 +97,7 @@ do_ncurses_for_target() { prefix="${prefix}" \ destdir="${CT_SYSROOT_DIR}" \ shared="${CT_SHARED_LIBS}" \ - cflags="${CT_TARGET_CFLAGS}" \ + cflags="${CT_ALL_TARGET_CFLAGS}" \ "${opts[@]}" CT_Popd CT_EndStep diff --git a/scripts/build/debug/200-duma.sh b/scripts/build/debug/200-duma.sh index 0d98c38..9e2379e 100644 --- a/scripts/build/debug/200-duma.sh +++ b/scripts/build/debug/200-duma.sh @@ -19,8 +19,8 @@ do_debug_duma_build() { make_args=( prefix="${CT_DEBUGROOT_DIR}/usr" HOSTCC="${CT_BUILD}-gcc" - CC="${CT_TARGET}-${CT_CC} ${CT_TARGET_CFLAGS}" - CXX="${CT_TARGET}-g++ ${CT_TARGET_CFLAGS}" + CC="${CT_TARGET}-${CT_CC} ${CT_ALL_TARGET_CFLAGS}" + CXX="${CT_TARGET}-g++ ${CT_ALL_TARGET_CFLAGS}" RANLIB="${CT_TARGET}-ranlib" OS="${CT_KERNEL}" ) diff --git a/scripts/build/debug/300-gdb.sh b/scripts/build/debug/300-gdb.sh index 0d0701a..fe6ce79 100644 --- a/scripts/build/debug/300-gdb.sh +++ b/scripts/build/debug/300-gdb.sh @@ -22,7 +22,7 @@ do_debug_gdb_build() { local CT_HOST_LD="${CT_HOST}-ld" local CT_CXXFLAGS_FOR_HOST=${CT_CFLAGS_FOR_HOST} - local CT_TARGET_CXXFLAGS=${CT_TARGET_CFLAGS} + local CT_TARGET_CXXFLAGS=${CT_ALL_TARGET_CFLAGS} gdb_src_dir="${CT_SRC_DIR}/gdb" @@ -34,7 +34,7 @@ do_debug_gdb_build() { if [ "${CT_GDB_CROSS}" = "y" ]; then local -a cross_extra_config local gcc_version p _p - local cross_CPPFLAGS cross_CFLAGS cross_CXXFLAGS cross_LDFLAGS + local cross_CFLAGS cross_CXXFLAGS cross_LDFLAGS CT_DoStep INFO "Installing cross-gdb" CT_DoLog EXTRA "Configuring cross-gdb" @@ -94,7 +94,6 @@ do_debug_gdb_build() { cross_extra_config+=("--disable-nls") fi - cross_CPPFLAGS="${CT_CPPFLAGS_FOR_HOST}" cross_CFLAGS="${CT_CFLAGS_FOR_HOST}" cross_CXXFLAGS="${CT_CXXFLAGS_FOR_HOST}" cross_LDFLAGS="${CT_LDFLAGS_FOR_HOST}" @@ -122,7 +121,6 @@ do_debug_gdb_build() { # are multiple consecutive spaces: sub-configure scripts replace them with a # single space and then complain that $CC value changed from that in # the master directory. - cross_CPPFLAGS=`echo ${cross_CPPFLAGS}` cross_CFLAGS=`echo ${cross_CFLAGS}` cross_CXXFLAGS=`echo ${cross_CXXFLAGS}` cross_LDFLAGS=`echo ${cross_LDFLAGS}` @@ -139,7 +137,6 @@ do_debug_gdb_build() { CC="${CT_HOST_CC}" \ CXX="${CT_HOST_CXX}" \ LD="${CT_HOST_LD}" \ - CPPFLAGS="${cross_CPPFLAGS}" \ CFLAGS="${cross_CFLAGS}" \ CXXFLAGS="${cross_CXXFLAGS}" \ LDFLAGS="${cross_LDFLAGS}" \ @@ -191,7 +188,7 @@ do_debug_gdb_build() { # TBD combine GDB native and gdbserver backends, build either or both in a single pass. if [ "${CT_GDB_NATIVE}" = "y" ]; then local -a native_extra_config - local native_CPPFLAGS native_CFLAGS native_CXXFLAGS native_LDFLAGS + local native_CFLAGS native_CXXFLAGS native_LDFLAGS CT_DoStep INFO "Installing native gdb" CT_DoLog EXTRA "Configuring native gdb" @@ -243,10 +240,9 @@ do_debug_gdb_build() { native_extra_config+=("--disable-nls") fi - native_CPPFLAGS="${CT_TARGET_CPPFLAGS}" - native_CFLAGS="${CT_TARGET_CFLAGS}" - native_CXXFLAGS="${CT_TARGET_CXXFLAGS}" - native_LDFLAGS="${CT_TARGET_LDFLAGS}" + native_CFLAGS="${CT_ALL_TARGET_CFLAGS}" + native_CXXFLAGS="${CT_ALL_TARGET_CFLAGS}" + native_LDFLAGS="${CT_ALL_TARGET_LDFLAGS}" if [ "${CT_GDB_NATIVE_STATIC}" = "y" ]; then native_CFLAGS+=" -static" @@ -261,7 +257,6 @@ do_debug_gdb_build() { native_extra_config+=("--disable-ld") native_extra_config+=("--disable-gas") - native_CPPFLAGS=`echo ${native_CPPFLAGS}` native_CFLAGS=`echo ${native_CFLAGS}` native_CXXFLAGS=`echo ${native_CXXFLAGS}` native_LDFLAGS=`echo ${native_LDFLAGS}` @@ -273,7 +268,6 @@ do_debug_gdb_build() { CC="${CT_TARGET_CC}" \ CXX="${CT_TARGET_CXX}" \ LD="${CT_TARGET_LD}" \ - CPPFLAGS="${native_CPPFLAGS}" \ CFLAGS="${native_CFLAGS}" \ CXXFLAGS="${native_CXXFLAGS}" \ LDFLAGS="${native_LDFLAGS}" \ @@ -310,7 +304,7 @@ do_debug_gdb_build() { if [ "${CT_GDB_GDBSERVER}" = "y" ]; then local -a gdbserver_extra_config - local gdbserver_CPPFLAGS gdbserver_CFLAGS gdbserver_CXXFLAGS gdbserver_LDFLAGS + local gdbserver_CFLAGS gdbserver_CXXFLAGS gdbserver_LDFLAGS CT_DoStep INFO "Installing gdbserver" CT_DoLog EXTRA "Configuring gdbserver" @@ -343,10 +337,9 @@ do_debug_gdb_build() { gdbserver_extra_config+=("--disable-ld") gdbserver_extra_config+=("--disable-gas") - gdbserver_CPPFLAGS="${CT_TARGET_CPPFLAGS}" - gdbserver_CFLAGS="${CT_TARGET_CFLAGS}" - gdbserver_CXXFLAGS="${CT_TARGET_CXXFLAGS}" - gdbserver_LDFLAGS="${CT_TARGET_LDFLAGS}" + gdbserver_CFLAGS="${CT_ALL_TARGET_CFLAGS}" + gdbserver_CXXFLAGS="${CT_ALL_TARGET_CFLAGS}" + gdbserver_LDFLAGS="${CT_ALL_TARGET_LDFLAGS}" if [ "${CT_GDB_GDBSERVER_STATIC}" = "y" ]; then gdbserver_CFLAGS+=" -static" @@ -358,7 +351,6 @@ do_debug_gdb_build() { gdbserver_LDFLAGS+=" -static-libstdc++" fi - gdbserver_CPPFLAGS=`echo ${gdbserver_CPPFLAGS}` gdbserver_CFLAGS=`echo ${gdbserver_CFLAGS}` gdbserver_CXXFLAGS=`echo ${gdbserver_CXXFLAGS}` gdbserver_LDFLAGS=`echo ${gdbserver_LDFLAGS}` @@ -370,7 +362,6 @@ do_debug_gdb_build() { CC="${CT_TARGET_CC}" \ CXX="${CT_TARGET_CXX}" \ LD="${CT_TARGET_LD}" \ - CPPFLAGS="${gdbserver_CPPFLAGS}" \ CFLAGS="${gdbserver_CFLAGS}" \ CXXFLAGS="${gdbserver_CXXFLAGS}" \ LDFLAGS="${gdbserver_LDFLAGS}" \ diff --git a/scripts/build/debug/400-ltrace.sh b/scripts/build/debug/400-ltrace.sh index ce299c2..3f08226 100644 --- a/scripts/build/debug/400-ltrace.sh +++ b/scripts/build/debug/400-ltrace.sh @@ -34,7 +34,7 @@ do_debug_ltrace_build() { AR="${CT_TARGET}-ar" \ HOST="${ltrace_host}" \ HOST_OS="${CT_TARGET_KERNEL}" \ - CFLAGS="${CT_TARGET_CFLAGS}" \ + CFLAGS="${CT_ALL_TARGET_CFLAGS}"\ ${CONFIG_SHELL} \ ./configure --prefix=/usr else diff --git a/scripts/build/debug/500-strace.sh b/scripts/build/debug/500-strace.sh index 480daaa..4f6d6aa 100644 --- a/scripts/build/debug/500-strace.sh +++ b/scripts/build/debug/500-strace.sh @@ -12,7 +12,7 @@ do_debug_strace_extract() do_debug_strace_build() { - local cflags="${CT_TARGET_CFLAGS}" + local cflags="${CT_ALL_TARGET_CFLAGS}" CT_DoStep INFO "Installing strace" @@ -30,7 +30,7 @@ do_debug_strace_build() CT_DoExecLog CFG \ CC="${CT_TARGET}-${CT_CC}" \ CFLAGS="${cflags}" \ - LDFLAGS="${CT_TARGET_LDFLAGS}" \ + LDFLAGS="${CT_ALL_TARGET_LDFLAGS}" \ CPP="${CT_TARGET}-cpp" \ LD="${CT_TARGET}-ld" \ ${CONFIG_SHELL} \ diff --git a/scripts/build/libc/bionic.sh b/scripts/build/libc/bionic.sh index 027493d..573b8d4 100644 --- a/scripts/build/libc/bionic.sh +++ b/scripts/build/libc/bionic.sh @@ -26,7 +26,7 @@ do_libc() { fi CT_DoStep INFO "Installing C library binaries" CT_DoExecLog ALL cp -r "${CT_SRC_DIR}/android-ndk/platforms/android-${CT_ANDROID_API}/arch-${arch}/usr" "${CT_SYSROOT_DIR}" - CT_EnvModify CT_TARGET_CFLAGS "${CT_TARGET_CFLAGS} -D__ANDROID_API__=${CT_ANDROID_API}" + CT_EnvModify CT_ALL_TARGET_CFLAGS "${CT_ALL_TARGET_CFLAGS} -D__ANDROID_API__=${CT_ANDROID_API}" } do_libc_post_cc() { diff --git a/scripts/build/libc/glibc.sh b/scripts/build/libc/glibc.sh index 2f257b5..f8af7fc 100644 --- a/scripts/build/libc/glibc.sh +++ b/scripts/build/libc/glibc.sh @@ -197,7 +197,7 @@ do_libc_backend_once() { esac # In the order of increasing precedence. Flags common to compiler and linker. - glibc_cflags+=" ${CT_TARGET_CFLAGS}" + glibc_cflags+=" ${CT_ALL_TARGET_CFLAGS}" glibc_cflags+=" ${CT_GLIBC_EXTRA_CFLAGS}" glibc_cflags+=" ${multi_flags}" diff --git a/scripts/build/libc/newlib.sh b/scripts/build/libc/newlib.sh index 5c4a356..ca2f74b 100644 --- a/scripts/build/libc/newlib.sh +++ b/scripts/build/libc/newlib.sh @@ -94,7 +94,7 @@ ENABLE_TARGET_OPTSPACE:target-optspace [ "${CT_LIBC_NEWLIB_LTO}" = "y" ] && \ CT_LIBC_NEWLIB_TARGET_CFLAGS="${CT_LIBC_NEWLIB_TARGET_CFLAGS} -flto" - cflags_for_target="${CT_TARGET_CFLAGS} ${CT_LIBC_NEWLIB_TARGET_CFLAGS}" + cflags_for_target="${CT_ALL_TARGET_CFLAGS} ${CT_LIBC_NEWLIB_TARGET_CFLAGS}" # Note: newlib handles the build/host/target a little bit differently # than one would expect: diff --git a/scripts/crosstool-NG.sh b/scripts/crosstool-NG.sh index 19b9519..486f733 100644 --- a/scripts/crosstool-NG.sh +++ b/scripts/crosstool-NG.sh @@ -166,8 +166,8 @@ CT_PREFIX_DIR="$( ${sed} -r -e 's:/+:/:g; s:/*$::;' <<<"${CT_PREFIX_DIR}" )" # Second kludge: merge user-supplied target CFLAGS with architecture-provided # target CFLAGS. Do the same for LDFLAGS in case it happens in the future. # Put user-supplied flags at the end, so that they take precedence. -CT_TARGET_CFLAGS="${CT_ARCH_TARGET_CFLAGS} ${CT_TARGET_CFLAGS}" -CT_TARGET_LDFLAGS="${CT_ARCH_TARGET_LDFLAGS} ${CT_TARGET_LDFLAGS}" +CT_ALL_TARGET_CFLAGS="${CT_ARCH_TARGET_CFLAGS} ${CT_TARGET_CFLAGS}" +CT_ALL_TARGET_LDFLAGS="${CT_ARCH_TARGET_LDFLAGS} ${CT_TARGET_LDFLAGS}" # FIXME move to gcc.sh CT_CC_GCC_CORE_EXTRA_CONFIG_ARRAY=( ${CT_ARCH_CC_CORE_EXTRA_CONFIG} "${CT_CC_GCC_CORE_EXTRA_CONFIG_ARRAY[@]}" ) -- cgit v0.10.2-6-g49f6 From cc2fe3dbdef84fd325cc8401bcf90a0a8630e93f Mon Sep 17 00:00:00 2001 From: Alexey Neyman Date: Sun, 27 May 2018 10:42:14 -0700 Subject: Backport a gcc8 fix from upstream Signed-off-by: Alexey Neyman diff --git a/packages/mingw-w64/v5.0.3/0001-xgetbv.patch b/packages/mingw-w64/v5.0.3/0001-xgetbv.patch new file mode 100644 index 0000000..2884609 --- /dev/null +++ b/packages/mingw-w64/v5.0.3/0001-xgetbv.patch @@ -0,0 +1,32 @@ +commit 3ce3e27f044935f19e93e80c43ca695262d484e1 +Author: Mateusz +Date: Mon Jan 22 20:58:48 2018 +0100 + + intrin-impl.h: do not define _xgetbv for GCC 8 + + GCC 8 from r248028 has defined function _xgetbv and we should + avoid double definition of this function. + + Signed-off-by: Mateusz Brzostek + Signed-off-by: Martin Storsjö + +diff --git a/mingw-w64-headers/include/psdk_inc/intrin-impl.h b/mingw-w64-headers/include/psdk_inc/intrin-impl.h +index ff9e6aff..88af804c 100644 +--- a/mingw-w64-headers/include/psdk_inc/intrin-impl.h ++++ b/mingw-w64-headers/include/psdk_inc/intrin-impl.h +@@ -1775,6 +1775,7 @@ __buildmov(__movsd, unsigned __LONG32, "d") + #define __INTRINSIC_DEFINED___movsd + #endif /* __INTRINSIC_PROLOG */ + ++#if !defined(__GNUC__) || __GNUC__ < 8 /* GCC 8 has already defined _xgetbv */ + /* NOTE: This should be in immintrin.h */ + #if __INTRINSIC_PROLOG(_xgetbv) + unsigned __int64 _xgetbv(unsigned int); +@@ -1798,6 +1799,7 @@ unsigned __int64 _xgetbv(unsigned int index) + #endif + #define __INTRINSIC_DEFINED__xgetbv + #endif /* __INTRINSIC_PROLOG */ ++#endif /* __GNUC__ < 8 */ + + #endif /* defined(__x86_64__) || defined(_AMD64_) || defined(__i386__) || defined(_X86_) */ + -- cgit v0.10.2-6-g49f6 From 4137c422c66ea678b60360108b4135657fcb2e87 Mon Sep 17 00:00:00 2001 From: Alexey Neyman Date: Sun, 27 May 2018 13:31:21 -0700 Subject: Detect errors from gas Signed-off-by: Alexey Neyman diff --git a/scripts/functions b/scripts/functions index 0b8fba5..81f96d9 100644 --- a/scripts/functions +++ b/scripts/functions @@ -287,6 +287,7 @@ CT_DoLog() { y,*"warning:"*) cur_L=WARN; cur_l=${CT_LOG_LEVEL_WARN};; y,*"WARNING:"*) cur_L=WARN; cur_l=${CT_LOG_LEVEL_WARN};; *"error:"*) cur_L=ERROR; cur_l=${CT_LOG_LEVEL_ERROR};; + *"Error:"*) cur_L=ERROR; cur_l=${CT_LOG_LEVEL_ERROR};; *"make["*"]: ***"*) cur_L=ERROR; cur_l=${CT_LOG_LEVEL_ERROR};; *) cur_L="${LEVEL}"; cur_l="${level}";; esac -- cgit v0.10.2-6-g49f6 From 0ce942862e80e373a172ffb40f2d29c38cd6bae4 Mon Sep 17 00:00:00 2001 From: Alexey Neyman Date: Wed, 30 May 2018 13:40:56 -0700 Subject: Add --enable-obsolete for powerpc-*-spe Signed-off-by: Alexey Neyman diff --git a/scripts/build/arch/powerpc.sh b/scripts/build/arch/powerpc.sh index 52f3f8b..7dd5ac5 100644 --- a/scripts/build/arch/powerpc.sh +++ b/scripts/build/arch/powerpc.sh @@ -19,11 +19,11 @@ CT_DoArchTupleValues () { ;; esac - # Add extra flags for SPE if needed + # Add extra flags for SPE if needed. SPE is obsolete in GCC8. if [ "${CT_ARCH_powerpc_ABI_SPE}" = "y" ]; then CT_ARCH_TARGET_CFLAGS="-mabi=spe -mspe" - CT_ARCH_CC_CORE_EXTRA_CONFIG="--enable-e500_double" - CT_ARCH_CC_EXTRA_CONFIG="--enable-e500_double" + CT_ARCH_CC_CORE_EXTRA_CONFIG="--enable-e500_double --enable-obsolete" + CT_ARCH_CC_EXTRA_CONFIG="--enable-e500_double --enable-obsolete" fi } -- cgit v0.10.2-6-g49f6 From b24431f477474033e9adb7d8e158e0a512ba630d Mon Sep 17 00:00:00 2001 From: Alexey Neyman Date: Tue, 5 Jun 2018 00:15:50 -0700 Subject: Add upstream patch fixing XScale build Signed-off-by: Alexey Neyman diff --git a/packages/gcc/8.1.0/0018-xscale.patch b/packages/gcc/8.1.0/0018-xscale.patch new file mode 100644 index 0000000..62654c2 --- /dev/null +++ b/packages/gcc/8.1.0/0018-xscale.patch @@ -0,0 +1,52 @@ +commit f18d79595db4ae88dbd40d73bb2d1ea191a756a1 +Author: rearnsha +Date: Mon Jun 4 08:41:45 2018 +0000 + + [arm] PR target/86003 build failures with --with-cpu=xscale + + The XScale cpu configuration in GCC has always been somewhat + non-conforming. Although XScale isn't an architecture (it's simply an + implementation of ARMv5te), we do by tradition emit a specific + pre-define for it. We achieve this effect by adding an additional + feature bit to the xscale CPU definition that isn't part of the base + architecture. + + When I restructured the options last year I overlooked this oddity and + the result, of course, is that this configuration now fails to build + as intended. + + What happens is that the driver (correctly) constructs an architecture + for the xscale cpu name (as armv5te) and passes it in addition to the + CPU name. The backend code, on finding both a cpu and an architecture + specifies attempts to correlate the two and finds a difference due to + the additional feature bit and reports an inconsistency (fatally if + -werror is specified). + + I think the best fix to this is to treat the xscale feature bit using + the same mechanism that we use for other 'quirks' in CPU + implementations and simply filter it out before comparing the + capabilities. It has the additional benefit that it's also the + simplest fix. + + PR target/86003 + * config/arm/arm-cpus.in (ALL_QUIRKS): Add xscale feature to the list + of bits to ignore when comparing architectures. + + + git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@261140 138bc75d-0d04-0410-961f-82ee72b054a4 + +diff --git a/gcc/config/arm/arm-cpus.in b/gcc/config/arm/arm-cpus.in +index aec73b5cae0..661bf1a573c 100644 +--- a/gcc/config/arm/arm-cpus.in ++++ b/gcc/config/arm/arm-cpus.in +@@ -254,7 +254,9 @@ define fgroup DOTPROD NEON dotprod + + # List of all quirk bits to strip out when comparing CPU features with + # architectures. +-define fgroup ALL_QUIRKS quirk_no_volatile_ce quirk_armv6kz quirk_cm3_ldrd ++# xscale isn't really a 'quirk', but it isn't an architecture either and we ++# need to ignore it for matching purposes. ++define fgroup ALL_QUIRKS quirk_no_volatile_ce quirk_armv6kz quirk_cm3_ldrd xscale + + # Architecture entries + # format: -- cgit v0.10.2-6-g49f6 From 57679b5e610e488cc6c25b259331cb25d412c771 Mon Sep 17 00:00:00 2001 From: Alexey Neyman Date: Tue, 5 Jun 2018 16:38:30 -0700 Subject: Disable context functions for Thumb They're written in ARM dialect, and `ldmia r14, {r14, pc}` is not accepted in T2 encoding. GCC8 changed the list of multilibs for arm-*, which now includes a variant with CPU that supports T2 but not A1 encoding. Signed-off-by: Alexey Neyman diff --git a/scripts/build/arch/arm.sh b/scripts/build/arch/arm.sh index 7433c92..4873df1 100644 --- a/scripts/build/arch/arm.sh +++ b/scripts/build/arch/arm.sh @@ -96,6 +96,7 @@ CT_DoArchUClibcCflags() { case "${f}" in -mthumb) CT_KconfigEnableOption "COMPILE_IN_THUMB_MODE" "${cfg}" + CT_KconfigDisableOption "UCLIBC_HAS_CONTEXT_FUNCS" "${cfg}" ;; -marm) CT_KconfigDisableOption "COMPILE_IN_THUMB_MODE" "${cfg}" -- cgit v0.10.2-6-g49f6