#babeltrace2: ELF binary /usr/lib/babeltrace2/plugins/babeltrace-plugin-text.so has relocations in .text [textrel]
TOOLCHAIN_pn-babeltrace2 = "gcc"
TOOLCHAIN_pn-u-boot = "gcc"
TOOLCHAIN_pn-cpufrequtils = "gcc"
# crash embeds version of gdb which is not buildable with clang
TOOLCHAIN_pn-crash = "gcc"
TOOLCHAIN_pn-elfutils = "gcc"
# /mnt/a/yoe/build/tmp/work/cortexa7t2hf-neon-vfpv4-yoe-linux-gnueabi/firefox/60.1.0esr-r0/recipe-sysroot-native/usr/lib/clang/7.0.1/include/arm_neon.h:433:1: error: unknown type name 'inline'
# __ai uint8x16_t vabdq_u8(uint8x16_t __p0, uint8x16_t __p1) {
TOOLCHAIN_pn-firefox = "gcc"
TOOLCHAIN_pn-gcc = "gcc"
TOOLCHAIN_pn-gcc-runtime = "gcc"
TOOLCHAIN_pn-gcc-sanitizers = "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-glibc-testsuite = "gcc"
TOOLCHAIN_pn-grub = "gcc"
TOOLCHAIN_pn-grub-efi = "gcc"

#| prelink-rtld: error while loading shared libraries: ld.so.1
#| /lib64/ld.so.1: No such file or directory
TOOLCHAIN_pn-gobject-intospection_mips64 = "gcc"
TOOLCHAIN_pn-avahi_mips64 = "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"

# error: return address can be determined only for current frame
TOOLCHAIN_pn-libexecinfo_mipsarch = "gcc"
TOOLCHAIN_pn-libgcc = "gcc"
TOOLCHAIN_pn-libgcc-initial = "gcc"
TOOLCHAIN_pn-libgfortran = "gcc"
TOOLCHAIN_pn-libssp-nonshared = "gcc"
#| cargo:warning=/mnt/a/yoe/build/tmp/work/cortexa7t2hf-neon-vfpv4-yoe-linux-gnueabi/libstd-rs/1.27.1-r0/re
#cipe-sysroot/usr/include/bits/stdlib.h:90:3: error: "Assumed value of MB_LEN_MAX wrong"
#| cargo:warning=# error "Assumed value of MB_LEN_MAX wrong"
#| cargo:warning=  ^
TOOLCHAIN_pn-libstd-rs = "gcc"
TOOLCHAIN_pn-m4_powerpc = "gcc"
# clang does not have 64bit atomics on mips32
#TOOLCHAIN_pn-mesa_mips = "gcc"
#TOOLCHAIN_pn-mesa_mipsel = "gcc"
TOOLCHAIN_pn-mesa_riscv64 = "gcc"
TOOLCHAIN_pn-mesa_powerpc = "gcc"
# multiple definition of 'mongo::error_details::isNamedCode<0>'
TOOLCHAIN_pn-mongodb = "gcc"
# variant-impl.hpp:309:36: error: 'is_variant' does not name a template but is followed by template arguments
TOOLCHAIN_pn-omxplayer = "gcc"
# error: return address can be determined only for current frame
TOOLCHAIN_pn-openflow_mipsarch = "gcc"
TOOLCHAIN_pn-opensbi = "gcc"
TOOLCHAIN_pn-openjdk-8 = "gcc"
TOOLCHAIN_pn-openjre-8 = "gcc"
TOOLCHAIN_pn-piglit = "gcc"
TOOLCHAIN_pn-prelink = "gcc"
# Qemu cant run profile tests run during build
# | *** stack smashing detected ***: terminated
# | ./pgo-wrapper: line 3: 3372346 Aborted
TOOLCHAIN_pn-python3 = "gcc"
# has dpkg source which does not compile
TOOLCHAIN_pn-start-stop-daemon = "gcc"
TOOLCHAIN_pn-syslinux = "gcc"
TOOLCHAIN_pn-systemtap = "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"
#| ../../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"

#| ../../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"

#recipe-sysroot/usr/include/mozjs-60/mozilla/Span.h:634:5: error: statement not allowed in constexpr function
#|     MOZ_RELEASE_ASSERT(aStart <= len && (aLength == dynamic_extent ||
#|     ^
TOOLCHAIN_pn-polkit = "gcc"

#| ./ports/linux/pseudo_wrappers.c:80:14: error: use of unknown builtin '__builtin_apply' [-Wimplicit-function-declaration]
#|         void *res = __builtin_apply((void (*)()) real_syscall, __builtin_apply_args(), sizeof(long) * 7);
#|                     ^
#| ./ports/linux/pseudo_wrappers.c:80:57: error: use of unknown builtin '__builtin_apply_args' [-Wimplicit-function-declaration]
#|         void *res = __builtin_apply((void (*)()) real_syscall, __builtin_apply_args(), sizeof(long) * 7);

TOOLCHAIN_pn-pseudo = "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"
# 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"

# clang++ hangs see https://bugs.llvm.org/show_bug.cgi?id=45134
DEBUG_FLAGS_remove_pn-sqlite-orm_toolchain-clang = "-g"

#| /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"

#| ./dsp/v4f_IIR2.h:554:12: error: no matching function for call to 'v4f_map'
#|                                 a[5] = v4f_map<__builtin_cosf> (f);
#|                                        ^~~~~~~~~~~~~~~~~~~~~~~
TOOLCHAIN_pn-caps = "gcc"

TOOLCHAIN_pn-lttng-ust_riscv64 = "gcc"

#| ../libffi-3.3-rc0/src/arm/sysv.S: Assembler messages:
#| ../libffi-3.3-rc0/src/arm/sysv.S:131: Error: selected processor does not support `vldrle d0,[sp]' in ARM mode
#| ../libffi-3.3-rc0/src/arm/sysv.S:132: Error: selected processor does not support `vldmgt sp,{d0-d7}' in ARM mode
TOOLCHAIN_pn-libffi_armeb = "gcc"

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

#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"

#../libffi-3.2.1/src/arm/sysv.S:363:2: error: invalid instruction, did you mean: fldmiax?
# fldmiadgt ip, {d0-d7}
CFLAGS_append_pn-libffi_arm_toolchain-clang = " -no-integrated-as"
CFLAGS_append_pn-libffi_mips64_toolchain-clang = " -no-integrated-as"

# ../db-5.3.28/src/mutex/mut_tas.c:150:34: error: unknown directive
#<inline asm>:9:2: note: instantiated into assembly here
# .force_thumb
#        ^
#CFLAGS_append_pn-db_toolchain-clang = " -no-integrated-as"
#
#| ../../../DirectFB-1.7.7/lib/direct/armasm_memcpy.S:63:2: error: invalid instruction
#|  ldmgeia r1!, {r3, r4, r12, lr}
#|  ^
CFLAGS_append_pn-directfb_toolchain-clang_arm = " -no-integrated-as"

# Disable internal assembler for armv7 since it uses gnu assmebly syntax
# which should be preprocessed via gcc/compiler
#
CFLAGS_append_pn-openssl_toolchain-clang_armv7ve = " -no-integrated-as"
CFLAGS_append_pn-openssl_toolchain-clang_armv7a = " -no-integrated-as"

#| crypto/bn/bn-mips.S:671:2: error: unknown instruction, did you mean: bgeu, sgtu, tgeu?
#|  sgeu $1,$4,$6
#|  ^
CC_append_pn-openssl_toolchain-clang_mipsarch = " -no-integrated-as"

CFLAGS_append_pn-userland_toolchain-clang = " -no-integrated-as"

# libjpeg-turbo-2.0.2/simd/mips/jsimd_dspr2.S
# <instantiation>:13:5: error: invalid token in expression
# .if $17 != 0
# ^
CFLAGS_append_pn-libjpeg-turbo_toolchain-clang_mipsarch = " -no-integrated-as"

# arm-yoe-linux-gnueabi-ld: /usr/src/debug/libvorbis/1.3.6-r0/build/lib/../../libvorbis-1.3.6/lib/sharedbook.c:165: undefined reference to `__pow_finite'
CFLAGS_append_pn-libvorbis_toolchain-clang_armv7ve = " -fno-fast-math"
CFLAGS_append_pn-mpg123_toolchain-clang_armv7ve = " -fno-fast-math"

#../kexec-tools-2.0.18/purgatory/arch/i386/entry32-16.S:23:2: error: unknown directive
# .arch i386
# ^
CC_append_pn-kexec-tools_toolchain-clang_x86-64 = " -no-integrated-as"
CC_append_pn-kexec-tools_toolchain-clang_x86 = " -no-integrated-as"
CC_append_pn-kexec-tools-klibc_toolchain-clang_x86-64 = " -no-integrated-as"
CC_append_pn-kexec-tools-klibc_toolchain-clang_x86 = " -no-integrated-as"

#| /tmp/x86-sse2-cdb148.s:207:9: error: ambiguous operand size for instruction 'sub'
#|     sub SIZE, 64
#|         ^~~~
CFLAGS_append_pn-tinymembench_toolchain-clang_x86-64 = " -no-integrated-as"
CFLAGS_append_pn-tinymembench_toolchain-clang_x86 = " -no-integrated-as"
CFLAGS_append_pn-tinymembench_toolchain-clang_mipsarch = " -no-integrated-as"

CFLAGS_append_pn-ne10_toolchain-clang_arm = " -no-integrated-as"
CFLAGS_append_pn-libde265_toolchain-clang_arm = " -no-integrated-as"

# :5 :    error:    unknown directive 
#^
#    .endfunc
#    ^
CFLAGS_append_pn-libsdl2_toolchain-clang_arm = " -no-integrated-as"

# regtest.cc:374:39: error: invalid suffix on literal; C++11 requires a
# space between literal and identifier [-Wreserved-user-defined-literal]
#|   snprintf_func (buf, sizeof(buf), "%"Q"u", x);
#|                                       ^

CXXFLAGS_append_pn-xdelta3_toolchain-clang = " -Wno-error=reserved-user-defined-literal"
# -fno-tree-vrp is gcc specific
CXXFLAGS_remove_pn-mozjs_toolchain-clang = "-fno-tree-vrp"
CFLAGS_remove_pn-mozjs_toolchain-clang = "-fno-tree-vrp"

#memcached.c:6280:2: error: embedding a directive within macro arguments has undefined behavior [-Werror,-Wembedded-directive]
CPPFLAGS_append_pn-memcached_toolchain-clang = " -Wno-error=embedded-directive"

#| /tmp/mcp2515-578c41.s: Assembler messages:
#| /tmp/mcp2515-578c41.s:1525: Error: r13 not allowed here -- `sub.w sp,r1,#8'
#| /tmp/mcp2515-578c41.s:1821: Error: r13 not allowed here -- `sub.w sp,r6,#8'
#| clang-7: error: assembler command failed with exit code 1 (use -v to see invocation)
TUNE_CCARGS_remove_pn-upm_toolchain-clang = "-no-integrated-as"
TUNE_CCARGS_remove_pn-omxplayer_toolchain-clang = "-no-integrated-as"
TUNE_CCARGS_remove_pn-nfs-utils_toolchain-clang = "-Qunused-arguments"

# We want to error out when -msse option is used otherwise it enables sse on non-x86 arches
TUNE_CCARGS_remove_pn-pipewire_toolchain-clang = "-Qunused-arguments"

#| /usr/src/debug/ruby/2.5.1-r0/build/../ruby-2.5.1/process.c:7073: undefined reference to `__mulodi4'
#| clang-7: error: linker command failed with exit code 1 (use -v to see invocation)
COMPILER_RT_pn-ruby_toolchain-clang = "--rtlib=compiler-rt ${UNWINDLIB}"
COMPILER_RT_pn-python3_toolchain-clang = "--rtlib=compiler-rt ${UNWINDLIB}"
COMPILER_RT_pn-m4_toolchain-clang = "--rtlib=compiler-rt ${UNWINDLIB}"
COMPILER_RT_pn-cpio_toolchain-clang = "--rtlib=compiler-rt ${UNWINDLIB}"
COMPILER_RT_pn-webkitgtk_toolchain-clang = "--rtlib=compiler-rt ${UNWINDLIB}"
COMPILER_RT_pn-wpewebkit_toolchain-clang = "--rtlib=compiler-rt ${UNWINDLIB}"
COMPILER_RT_remove_pn-m4_powerpc = "--rtlib=compiler-rt"
COMPILER_RT_remove_pn-ruby_powerpc = "--rtlib=compiler-rt"
COMPILER_RT_remove_pn-webkitgtk_powerpc = "--rtlib=compiler-rt"
COMPILER_RT_remove_pn-m4_armeb = "--rtlib=compiler-rt"
COMPILER_RT_remove_pn-ruby_armeb = "--rtlib=compiler-rt"
COMPILER_RT_remove_pn-webkitgtk_armeb = "--rtlib=compiler-rt"

LDFLAGS_append_pn-gnutls_toolchain-clang_riscv64 = " -latomic"
LDFLAGS_append_pn-harfbuzz_toolchain-clang_riscv64 = " -latomic"
LDFLAGS_append_pn-qtwebengine_toolchain-clang_runtime-gnu_x86 = " -latomic"

# glibc is built with gcc and hence encodes some libgcc specific builtins which are not found
# when doing static linking with clang using compiler-rt, so use libgcc
# undefined reference to `__unordtf2'
COMPILER_RT_pn-libc-bench_libc-glibc_toolchain-clang_x86 = "--rtlib=libgcc"
COMPILER_RT_pn-aufs-util_libc-glibc_toolchain-clang_x86 = "--rtlib=libgcc"
COMPILER_RT_pn-libhugetlbfs_libc-glibc_toolchain-clang_x86 = "--rtlib=libgcc"
COMPILER_RT_pn-tsocks_libc-glibc_toolchain-clang_x86 = "--rtlib=libgcc"
COMPILER_RT_pn-libc-bench_libc-glibc_toolchain-clang_x86-64 = "--rtlib=libgcc"
COMPILER_RT_pn-aufs-util_libc-glibc_toolchain-clang_x86-64 = "--rtlib=libgcc"
COMPILER_RT_pn-libhugetlbfs_libc-glibc_toolchain-clang_x86-64 = "--rtlib=libgcc"
COMPILER_RT_pn-tsocks_libc-glibc_toolchain-clang_x86-64 = "--rtlib=libgcc"

#(unwind.o): in function `__pthread_unwind':
#/usr/src/debug/glibc/2.29-r0/git/nptl/unwind.c:121: undefined reference to `_Unwind_ForcedUnwind'
#clang-8: error: linker command failed with exit code 1 (use -v to see invocation)
COMPILER_RT_pn-libc-bench_libc-glibc_toolchain-clang_arm = "--rtlib=libgcc"
COMPILER_RT_pn-aufs-util_libc-glibc_toolchain-clang_arm = "--rtlib=libgcc"
COMPILER_RT_pn-libhugetlbfs_libc-glibc_toolchain-clang_arm = "--rtlib=libgcc"

# Uses gcc for native tools, e.g. nsinstall and passes clang options which fails so
# let same compiler ( gcc or clang) be native/cross compiler
# | gcc: error: unrecognized command line option ‘-Qunused-arguments’
BUILD_CC_pn-nss_toolchain-clang = "clang"

# libnoprofile.c:19:5: error: expected parameter declarator
# int printf(const char *format, ...) {
#    ^
# error: non-constant-expression cannot be narrowed from type 'std::chrono::duration<
#long long, std::ratio<1, 1> >::rep' (aka 'long long') to '__time_t' (aka 'long') in initializer list
# [-Wc++11-narrowing]
CXXFLAGS_append_pn-apt_toolchain-clang = " -Wno-c++11-narrowing"
lcl_maybe_fortify_pn-apt_toolchain-clang = ""

