TOOLCHAIN_pn-aspell = "gcc"
TOOLCHAIN_pn-binutils = "gcc"
TOOLCHAIN_pn-binutils-cross-${TARGET_ARCH} = "gcc"
TOOLCHAIN_pn-binutils-cross-canadian-${TARGET_ARCH} = "gcc"
TOOLCHAIN_pn-binutils-crosssdk-${SDK_ARCH} = "gcc"
TOOLCHAIN_pn-busybox = "gcc"
TOOLCHAIN_pn-clang_class-native = "gcc"
TOOLCHAIN_pn-clang-cross-${TARGET_ARCH} = "gcc"
TOOLCHAIN_pn-cross-localedef-native = "gcc"
TOOLCHAIN_pn-cpufrequtils = "gcc"
# crash embeds version of gdb which is not buildable with clang
TOOLCHAIN_pn-crash = "gcc"
TOOLCHAIN_pn-elfutils = "gcc"
# clang segfaults on firefox see https://bugs.llvm.org/show_bug.cgi?id=34170
TOOLCHAIN_pn-firefox = "gcc"
TOOLCHAIN_pn-gcc = "gcc"
TOOLCHAIN_pn-gcc-cross-${TARGET_ARCH} = "gcc"
TOOLCHAIN_pn-gcc-cross-canadian-${TARGET_ARCH} = "gcc"
TOOLCHAIN_pn-gcc-cross-initial-${TARGET_ARCH} = "gcc"
TOOLCHAIN_pn-gcc-crosssdk-${SDK_ARCH} = "gcc"
TOOLCHAIN_pn-gcc-crosssdk-initial-${SDK_ARCH} = "gcc"
TOOLCHAIN_pn-gcc-runtime = "gcc"
TOOLCHAIN_pn-gcc-sanitizers = "gcc"
TOOLCHAIN_pn-gcc-source-${TARGET_ARCH} = "gcc"
TOOLCHAIN_pn-gdb-cross-${TARGET_ARCH} = "gcc"
TOOLCHAIN_pn-glibc = "gcc"
TOOLCHAIN_pn-glibc-initial = "gcc"
TOOLCHAIN_pn-glibc-locale = "gcc"
TOOLCHAIN_pn-glibc-mtrace = "gcc"
TOOLCHAIN_pn-glibc-scripts = "gcc"
TOOLCHAIN_pn-gnu-efi = "gcc"
TOOLCHAIN_pn-grub = "gcc"
TOOLCHAIN_pn-grub-efi = "gcc"
TOOLCHAIN_pn-gummiboot = "gcc"
# clang++ 6.0 crashes during link phase of a shared library
TOOLCHAIN_pn-icu = "gcc"
TOOLCHAIN_pn-ldconfig-native = "gcc"
# VLAs
#| control.c:286:19: error: fields must have a constant size: 'variable length array in structure' extension will never be supported
#|             __u32 buffer[cam->max_response_quads];
#|                   ^
#| 1 error generated.
TOOLCHAIN_pn-libdc1394 = "gcc"
TOOLCHAIN_pn-libgcc = "gcc"
TOOLCHAIN_pn-libgcc-initial = "gcc"
TOOLCHAIN_pn-libgfortran = "gcc"

# clang does not have 64bit atomics on mips32
TOOLCHAIN_pn-mesa_mips = "gcc"
TOOLCHAIN_pn-mesa_mipsel = "gcc"
#mozjs17.0.0/js/src/jsinterp.cpp:3684:9: error: cannot jump from this indirect goto statement to one of its possible targets
#        DO_NEXT_OP(len);
TOOLCHAIN_pn-mozjs = "gcc"

TOOLCHAIN_pn-mtools = "gcc"
TOOLCHAIN_pn-openjdk-8 = "gcc"
TOOLCHAIN_pn-openjre-8 = "gcc"
TOOLCHAIN_pn-perf = "gcc"
TOOLCHAIN_pn-piglit = "gcc"
TOOLCHAIN_pn-prelink = "gcc"
# has dpkg source which does not compile
TOOLCHAIN_pn-start-stop-daemon = "gcc"
TOOLCHAIN_pn-syslinux = "gcc"
TOOLCHAIN_pn-systemtap = "gcc"
TOOLCHAIN_pn-tcp-wrappers = "gcc"
TOOLCHAIN_pn-uclibc = "gcc"
TOOLCHAIN_pn-uclibc-initial = "gcc"
# v4l-utils uses nested functions
TOOLCHAIN_pn-v4l-utils = "gcc"
TOOLCHAIN_pn-valgrind = "gcc"
# uses C++ which clang does not like
TOOLCHAIN_pn-wvstreams = "gcc"
TOOLCHAIN_pn-wvdial = "gcc"
# qemu-user does not execute the applications built with clang correctly on armv7
TOOLCHAIN_pn-gobject-introspection_armv7ve = "gcc"
TOOLCHAIN_pn-gobject-introspection_armv7a = "gcc"
# mix_neon.c:179:9: error: invalid operand in inline asm: 'vld1.s32 ${0:h}, [$2]
#      vld1.s32 ${1:h}, [$3] '
TOOLCHAIN_pn-pulseaudio_armv7ve = "gcc"
TOOLCHAIN_pn-pulseaudio_armv7a = "gcc"
#| ../../mpfr-3.1.4/src/mul.c:324:11: error: invalid output constraint '=h' in asm
#|           umul_ppmm (tmp[1], tmp[0], MPFR_MANT (b)[0], MPFR_MANT (c)[0]);
TOOLCHAIN_pn-mpfr_mips = "gcc"
TOOLCHAIN_pn-mpfr_mips64 = "gcc"
#
#../../lib/libicui18n.so: undefined reference to `__atomic_fetch_sub_4'
#../../lib/libicui18n.so: undefined reference to `__atomic_load_4'
#../../lib/libicui18n.so: undefined reference to `__atomic_store_4'
#../../lib/libicui18n.so: undefined reference to `__atomic_fetch_add_4'
#
TOOLCHAIN_pn-icu_armv4 = "gcc"
TOOLCHAIN_pn-icu_armv5 = "gcc"

#../../libgcrypt-1.6.5/mpi/mpih-div.c:98:3: error: invalid use of a cast in a inline asm context requiring an l-value: remove the cast or build with -fheinous-gnu-extensions
TOOLCHAIN_pn-libgcrypt_mips64 = "gcc"

#| ../deps/openssl/asm/arm-void-gas/modes/ghash-armv4.S: Assembler messages:
#| ../deps/openssl/asm/arm-void-gas/modes/ghash-armv4.S:81: Error: bad instruction `ldrbpl r12,[r2,r3]'
#| ../deps/openssl/asm/arm-void-gas/modes/ghash-armv4.S:91: Error: bad instruction `ldrbpl r8,[r0,r3]'
#| ../deps/openssl/asm/arm-void-gas/modes/ghash-armv4.S:137: Error: bad instruction `ldrbne r12,[r2,#15]'
#| ../deps/openssl/asm/arm-void-gas/modes/ghash-armv4.S:224: Error: bad instruction `ldrbpl r12,[r0,r3]'
#
TOOLCHAIN_pn-nodejs_armv7a = "gcc"
TOOLCHAIN_pn-nodejs_armv7ve = "gcc"

#| ../../pixman-0.34.0/test/utils-prng.c:131:29: error: cannot convert between vector type '__attribute__((__vector_size__(16 * sizeof(char)))) char' (vector of 16 'char' values) and vector type 'uint8x16' (vector of 16 'uint8_t' values) as implicit conversion would cause truncation
#|                 randdata.vb |= (t.vb >= const_C0#);
#|                             ^
# also see http://lists.llvm.org/pipermail/llvm-dev/2016-October/105997.html
TOOLCHAIN_pn-pixman = "gcc"

#| ../../pulseaudio-10.0/src/pulsecore/mix_neon.c../../pulseaudio-10.0/src/pulsecore/sconv_neon.c:49::27: error: unknown register name 'q0' in asm
#|         : "memory", "cc", "q0" /* clobber list */
#|                           ^
TOOLCHAIN_pn-pulseaudio_aarch64 = "gcc"

# clang++ 6.0 crashes during link phase of a shared library
TOOLCHAIN_pn-wpewebkit = "gcc"

# x264 causes a infinite loop when compiling 1 source file
#
TOOLCHAIN_pn-x264_x86 = "gcc"

#| /usr/src/debug/qemu/2.6.0-r1/qemu-2.6.0/util/bitmap.c:191: undefined reference to `__atomic_fetch_or_4'
#| /usr/src/debug/qemu/2.6.0-r1/qemu-2.6.0/util/bitmap.c:210: undefined reference to `__atomic_fetch_or_4'
#| libqemuutil.a(bitmap.o): In function `bitmap_test_and_clear_atomic':
#| /usr/src/debug/qemu/2.6.0-r1/qemu-2.6.0/util/bitmap.c:250: undefined reference to `__atomic_fetch_and_4'
#| /usr/src/debug/qemu/2.6.0-r1/qemu-2.6.0/util/bitmap.c:262: undefined reference to `__atomic_exchange_4'
#| /usr/src/debug/qemu/2.6.0-r1/qemu-2.6.0/util/bitmap.c:273: undefined reference to `__atomic_fetch_and_4'
# We need to link in with -latomic which comes from gcc-runtime anyway so just keep using gcc
# to compile qemu for target
TOOLCHAIN_pn-qemu_arm = "gcc"

CFLAGS_append_pn-liboil_toolchain-clang_x86-64 = " -fheinous-gnu-extensions "

#| ./.libs/libsqlite3.so: undefined reference to `__mulodi4'
#| clang-4.0: error: linker command failed with exit code 1 (use -v to see invocation)
#| make: *** [Makefile:509: sqlite3] Error 1
CFLAGS_append_pn-sqlite3_toolchain-clang = " -DSQLITE_DISABLE_INTRINSIC "

#| configure: error: something wrong with CFLAGS
# Due to -pie (ldflag) being passed to compiler clang warns
# ruby configure does not like that
SECURITY_CFLAGS_remove_pn-ruby_toolchain-clang = "-pie"
SECURITY_LDLAGS_append_pn-ruby_toolchain-clang = " -Wl,-pie"

#io_getevents.c:25:141: error: invalid use of a cast in a inline asm context requiring an l-value: remove the cast or build with -fheinous-gnu-extensions
#io_syscall5(int, __io_getevents_0_4, io_getevents, io_context_t, ctx, long, min_nr, long, nr, struct io_event *, events, struct timespec *, timeout)
CFLAGS_append_pn-libaio_toolchain-clang_mips = " -fheinous-gnu-extensions"

#| error: unknown warning option '-Wimplicit-fallthrough=0'; did you mean '-Wimplicit-fallthrough'? [-Werror,-Wunknown-warning-option]
CFLAGS_append_pn-mdadm_toolchain-clang = " -Wno-error=unknown-warning-option"
