Gcc-5.5.0 build errors

I'm new to LEDE and tried to build the project but I get some errors. Here is what i've done:

  • Download source
  • ./scripts/feeds update -a;./scripts/feeds install -a
  • make menuconfig
  • selected Target System (MediaTek Ralink MIPS)
  • selected Subtarget (MT76x8 based boards)
  • make

make[5]: Entering directory '/home/build/lede/build_dir/toolchain-mipsel_24kc_gcc-5.5.0_musl/gcc-5.5.0-initial/gcc'
gcc -g -O2 -DIN_GCC -DCROSS_DIRECTORY_STRUCTURE -fno-exceptions -fno-rtti -fasynchronous-unwind-tables -W -Wall -Wno-narrowing -Wwrite-strings -Wcast-qual -Wmissing-format-attribute -Woverloaded-virtual -pedantic -Wno-long-long -Wno-variadic-macros -Wno-overlength-strings -DHAVE_CONFIG_H -o cc1 c/c-lang.o c-family/stub-objc.o attribs.o c/c-errors.o c/c-decl.o c/c-typeck.o c/c-convert.o c/c-aux-info.o c/c-objc-common.o c/c-parser.o c/c-array-notation.o c-family/c-common.o c-family/c-cppbuiltin.o c-family/c-dump.o c-family/c-format.o c-family/c-gimplify.o c-family/c-lex.o c-family/c-omp.o c-family/c-opts.o c-family/c-pch.o c-family/c-ppoutput.o c-family/c-pragma.o c-family/c-pretty-print.o c-family/c-semantics.o c-family/c-ada-spec.o c-family/c-cilkplus.o c-family/array-notation-common.o c-family/cilk.o c-family/c-ubsan.o glibc-c.o
cc1-checksum.o libbackend.a main.o libcommon-target.a libcommon.a ../libcpp/libcpp.a ../libdecnumber/libdecnumber.a libcommon.a ../libcpp/libcpp.a ../libbacktrace/.libs/libbacktrace.a ../libiberty/libiberty.a ../libdecnumber/libdecnumber.a -lstdc++ -L/home/build/lede/staging_dir/host/lib -L/home/build/lede/staging_dir/host/lib -L/home/build/lede/staging_dir/host/lib -lmpc -lmpfr -lgmp -rdynamic -ldl -lstdc++ -L../zlib -lz
libbackend.a(cgraphunit.o): In function cgraph_node::expand_thunk(bool, bool)': /home/build/lede/build_dir/toolchain-mipsel_24kc_gcc-5.5.0_musl/gcc-5.5.0/gcc/cgraphunit.c:1634: undefined reference togimple_fold_indirect_ref(tree_node*)'
libbackend.a(fold-const.o): In function fold_ternary_loc(unsigned int, tree_code, tree_node*, tree_node*, tree_node*, tree_node*)': /home/build/lede/build_dir/toolchain-mipsel_24kc_gcc-5.5.0_musl/gcc-5.5.0/gcc/fold-const.c:13400: undefined reference togeneric_simplify(unsigned int, tree_code, tree_node*, tree_node*, tree_node*, tree_node*)'
libbackend.a(fold-const.o): In function fold_binary_loc(unsigned int, tree_code, tree_node*, tree_node*, tree_node*)': /home/build/lede/build_dir/toolchain-mipsel_24kc_gcc-5.5.0_musl/gcc-5.5.0/gcc/fold-const.c:9979: undefined reference togeneric_simplify(unsigned int, tree_code, tree_node*, tree_node*, tree_node*)'
libbackend.a(fold-const.o): In function fold_unary_loc(unsigned int, tree_code, tree_node*, tree_node*)': /home/build/lede/build_dir/toolchain-mipsel_24kc_gcc-5.5.0_musl/gcc-5.5.0/gcc/fold-const.c:7911: undefined reference togeneric_simplify(unsigned int, tree_code, tree_node*, tree_node*)'
libbackend.a(ipa-devirt.o): In function record_target_from_binfo(vec<cgraph_node*, va_heap, vl_ptr>&, vec<tree_node*, va_heap, vl_ptr>*, tree_node*, tree_node*, vec<tree_node*, va_heap, vl_ptr>&, long long, tree_node*, long long, hash_set<tree_node*, default_hashset_traits>*, hash_set<tree_node*, default_hashset_traits>*, bool, bool*)': /home/build/lede/build_dir/toolchain-mipsel_24kc_gcc-5.5.0_musl/gcc-5.5.0/gcc/ipa-devirt.c:2412: undefined reference togimple_get_virt_method_for_binfo(long long, tree_node*, bool*)'
/home/build/lede/build_dir/toolchain-mipsel_24kc_gcc-5.5.0_musl/gcc-5.5.0/gcc/ipa-devirt.c:2412: undefined reference to gimple_get_virt_method_for_binfo(long long, tree_node*, bool*)' libbackend.a(ipa-devirt.o): In functionpossible_polymorphic_call_targets(tree_node*, long long, ipa_polymorphic_call_context, bool*, void**, bool)':
/home/build/lede/build_dir/toolchain-mipsel_24kc_gcc-5.5.0_musl/gcc-5.5.0/gcc/ipa-devirt.c:2981: undefined reference to gimple_get_virt_method_for_binfo(long long, tree_node*, bool*)' /home/build/lede/build_dir/toolchain-mipsel_24kc_gcc-5.5.0_musl/gcc-5.5.0/gcc/ipa-devirt.c:3016: undefined reference togimple_get_virt_method_for_binfo(long long, tree_node*, bool*)'
libbackend.a(ipa-devirt.o): In function record_targets_from_bases': /home/build/lede/build_dir/toolchain-mipsel_24kc_gcc-5.5.0_musl/gcc-5.5.0/gcc/ipa-devirt.c:2757: undefined reference togimple_get_virt_method_for_binfo(long long, tree_node*, bool*)'
libbackend.a(ipa-prop.o): In function ipa_make_edge_direct_to_target(cgraph_edge*, tree_node*, bool)': /home/build/lede/build_dir/toolchain-mipsel_24kc_gcc-5.5.0_musl/gcc-5.5.0/gcc/ipa-prop.c:2627: undefined reference tocanonicalize_constructor_val(tree_node*, tree_node*)'
/home/build/lede/build_dir/toolchain-mipsel_24kc_gcc-5.5.0_musl/gcc-5.5.0/gcc/ipa-prop.c:2572: undefined reference to canonicalize_constructor_val(tree_node*, tree_node*)' libbackend.a(ipa-prop.o): In functiontry_make_edge_direct_virtual_call':
/home/build/lede/build_dir/toolchain-mipsel_24kc_gcc-5.5.0_musl/gcc-5.5.0/gcc/ipa-prop.c:2935: undefined reference to gimple_get_virt_method_for_vtable(long long, tree_node*, unsigned long long, bool*)' libbackend.a(passes.o): In functiongcc::pass_manager::pass_manager(gcc::context*)':
/home/build/lede/build_dir/toolchain-mipsel_24kc_gcc-5.5.0_musl/gcc-5.5.0-initial/gcc/./pass-instances.def:40: undefined reference to make_pass_lower_cf(gcc::context*)' libbackend.a(tree-eh.o): In functionfrob_into_branch_around(gtry*, eh_region_d*, tree_node*)':
/home/build/lede/build_dir/toolchain-mipsel_24kc_gcc-5.5.0_musl/gcc-5.5.0/gcc/tree-eh.c:912: undefined reference to gimple_seq_may_fallthru(gimple_statement_base*)' libbackend.a(tree-eh.o): In functionlower_eh_constructs_2':
/home/build/lede/build_dir/toolchain-mipsel_24kc_gcc-5.5.0_musl/gcc-5.5.0/gcc/tree-eh.c:2069: undefined reference to gimple_stmt_may_fallthru(gimple_statement_base*)' libbackend.a(tree-eh.o): In functionlower_try_finally':
/home/build/lede/build_dir/toolchain-mipsel_24kc_gcc-5.5.0_musl/gcc-5.5.0/gcc/tree-eh.c:1714: undefined reference to gimple_seq_may_fallthru(gimple_statement_base*)' libbackend.a(tree-eh.o): In functionlower_cleanup':
/home/build/lede/build_dir/toolchain-mipsel_24kc_gcc-5.5.0_musl/gcc-5.5.0/gcc/tree-eh.c:1973: undefined reference to gimple_seq_may_fallthru(gimple_statement_base*)' libbackend.a(tree-eh.o): In functionlower_try_finally':
/home/build/lede/build_dir/toolchain-mipsel_24kc_gcc-5.5.0_musl/gcc-5.5.0/gcc/tree-eh.c:1740: undefined reference to gimple_seq_may_fallthru(gimple_statement_base*)' libbackend.a(tree-eh.o): In functionlower_catch':
/home/build/lede/build_dir/toolchain-mipsel_24kc_gcc-5.5.0_musl/gcc-5.5.0/gcc/tree-eh.c:1844: undefined reference to gimple_seq_may_fallthru(gimple_statement_base*)' libbackend.a(tree-eh.o): In function(anonymous namespace)::pass_lower_eh::execute(function*)':
/home/build/lede/build_dir/toolchain-mipsel_24kc_gcc-5.5.0_musl/gcc-5.5.0/gcc/tree-eh.c:2216: undefined reference to gimple_seq_may_fallthru(gimple_statement_base*)' libbackend.a(tree-eh.o):/home/build/lede/build_dir/toolchain-mipsel_24kc_gcc-5.5.0_musl/gcc-5.5.0/gcc/tree-eh.c:1053: more undefined references togimple_seq_may_fallthru(gimple_statement_base*)' follow
libbackend.a(tree-ssa-dom.o): In function `propagate_rhs_into_lhs':

The list with errors is much longer than this and ends with this:

/home/build/lede/build_dir/toolchain-mipsel_24kc_gcc-5.5.0_musl/gcc-5.5.0/gcc/c/Make-lang.in:71: recipe for target 'cc1' failed
make[5]: *** [cc1] Error 1

Why this errors and how do I fix it?

Got it working by starting all over again.