预装各类工具
~/openwrt/lede $ sudo apt-get install gcc g++ build-essential asciidoc binutils bzip2 gawk gettext git libncurses5-dev libz-dev patch flex bison make autoconf texinfo unzip sharutils subversion ncurses-term zlib1g-dev ccache upx lib32gcc-s1 libc6-dev-i386 uglifyjs git-core gcc-multilib p7zip p7zip-full msmtp libssl-dev libglib2.0-dev xmlto qemu-utils automake libtool -y
更新订阅源
./scripts/feeds update -a
./scripts/feeds install -a
- 注, feeds用法
~/openwrt/lede/mtk-openwrt-lede-4.2.1.0 $ ./scripts/feeds -h
Usage: ./scripts/feeds <command> [options]
Commands:
list [options]: List feeds, their content and revisions (if installed)
Options:
-n : List of feed names.
-s : List of feed names and their URL.
-r <feedname>: List packages of specified feed.
-d <delimiter>: Use specified delimiter to distinguish rows (default: spaces)
-f : List feeds in feeds.conf compatible format (when using -s).
install [options] <package>: Install a package
Options:
-a : Install all packages from all feeds or from the specified feed using the -p option.
-p <feedname>: Prefer this feed when installing packages.
-d <y|m|n>: Set default for newly installed packages.
-f : Install will be forced even if the package exists in core OpenWrt (override)
search [options] <substring>: Search for a package
Options:
-r <feedname>: Only search in this feed
uninstall -a|<package>: Uninstall a package
Options:
-a : Uninstalls all packages.
update -a|<feedname(s)>: Update packages and lists of feeds in feeds.conf .
Options:
-a : Update all feeds listed within feeds.conf. Otherwise the specified feeds will be updated.
-i : Recreate the index only. No feed update from repository is performed.
-f : Force updating feeds even if there are changed, uncommitted files.
clean: Remove downloaded/generated files.
/* 可以测试的指令 */
./scripts/feeds list -s /* 列出所有订阅源信息 */
./scripts/feeds list -r packages /* 列出指定订阅源保护的全部package */
- 查看更新的订阅源信息,index file
feeds/packages.index
~/openwrt/lede/mtk-openwrt-lede-4.2.1.0 $ ./scripts/feeds update -a
Updating feed 'packages' from 'https://git.lede-project.org/feed/packages.git;lede-17.01' ...
warning: redirecting to https://git.openwrt.org/feed/packages.git/
Already up to date.
Create index file './feeds/packages.index'
Updating feed 'luci' from 'https://git.lede-project.org/project/luci.git;lede-17.01' ...
warning: redirecting to https://git.openwrt.org/project/luci.git/
Already up to date.
Create index file './feeds/luci.index'
Updating feed 'routing' from 'https://git.lede-project.org/feed/routing.git;lede-17.01' ...
warning: redirecting to https://git.openwrt.org/feed/routing.git/
Already up to date.
Create index file './feeds/routing.index'
Updating feed 'telephony' from 'https://git.lede-project.org/feed/telephony.git;lede-17.01' ...
warning: redirecting to https://git.openwrt.org/feed/telephony.git/
Already up to date.
Create index file './feeds/telephony.index'
~/openwrt/lede/mtk-openwrt-lede-4.2.1.0 $
/* vim ./feeds/packages.index 第一行内容如下 */
Source-Makefile: feeds/packages/admin/debootstrap/Makefile
Package: debootstrap
Version: 1.0.87-1
Depends: +libc +SSP_SUPPORT:libssp +USE_GLIBC:librt +USE_GLIBC:libpthread +coreutils +coreutils-chroot +coreutils-sha1sum +ar +xz
Conflicts:
Menu-Depends:
Provides:
Section: admin
Category: Administration
Repository: base
Title: Bootstrap a basic Debian system
Maintainer: Daniel Golle <daniel@makrotopia.org>
Source: debootstrap-udeb_1.0.87_all.udeb
License: Unique
LicenseFiles: debian/copyright
Type: ipkg
Description: debootstrap is used to create a Debian base system from scratch, without
requiring the availability of dpkg or apt. It does this by downloading .deb
files from a mirror site, and carefully unpacking them into a directory which
can eventually be chrooted into.
http://wiki.debian.org/Debootstrap
Daniel Golle <daniel@makrotopia.org>
@@
预先下载dl库
make -j8 download V=s
下载 dl 库,编译固件
-j 后面是线程数,第一次编译推荐用单线程,$(nproc)可以获取机器的CPU线程数
# make download -j$(nproc)
make download -j8
make V=s -j1
====================================
文章作者: EamonZzz
文章来源: EamonZzz
文章链接: https://eamonzhang.com/archives/225
版权声明: 内容遵循 CC 4.0 BY-SA 版权协议,转载请附上原文出处链接及本声明。
编译报错
【问题1】m4 编译错误
mv wctype.h-t wctype.h
make all-am
make[7]: Entering directory '/home/snow/openwrt/lede/mtk-openwrt-lede-4.2.1.0/build_dir/host/m4-1.4.17/lib'
depbase=`echo gl_avltree_oset.o | sed 's|[^/]*$|.deps/&|;s|\.o$||'`;\
gcc -I. -I/home/snow/openwrt/lede/mtk-openwrt-lede-4.2.1.0/staging_dir/host/include -I/home/snow/openwrt/lede/mtk-openwrt-lede-4.2.1.0/staging_dir/host/usr/include -O2 -I/home/snow/openwrt/lede/mtk-openwrt-lede-4.2.1.0/staging_dir/host/include -I/home/snow/openwrt/lede/mtk-openwrt-lede-4.2.1.0/staging_dir/host/usr/include -MT gl_avltree_oset.o -MD -MP -MF $depbase.Tpo -c -o gl_avltree_oset.o gl_avltree_oset.c &&\
mv -f $depbase.Tpo $depbase.Po
depbase=`echo binary-io.o | sed 's|[^/]*$|.deps/&|;s|\.o$||'`;\
gcc -I. -I/home/snow/openwrt/lede/mtk-openwrt-lede-4.2.1.0/staging_dir/host/include -I/home/snow/openwrt/lede/mtk-openwrt-lede-4.2.1.0/staging_dir/host/usr/include -O2 -I/home/snow/openwrt/lede/mtk-openwrt-lede-4.2.1.0/staging_dir/host/include -I/home/snow/openwrt/lede/mtk-openwrt-lede-4.2.1.0/staging_dir/host/usr/include -MT binary-io.o -MD -MP -MF $depbase.Tpo -c -o binary-io.o binary-io.c &&\
mv -f $depbase.Tpo $depbase.Po
depbase=`echo c-ctype.o | sed 's|[^/]*$|.deps/&|;s|\.o$||'`;\
gcc -I. -I/home/snow/openwrt/lede/mtk-openwrt-lede-4.2.1.0/staging_dir/host/include -I/home/snow/openwrt/lede/mtk-openwrt-lede-4.2.1.0/staging_dir/host/usr/include -O2 -I/home/snow/openwrt/lede/mtk-openwrt-lede-4.2.1.0/staging_dir/host/include -I/home/snow/openwrt/lede/mtk-openwrt-lede-4.2.1.0/staging_dir/host/usr/include -MT c-ctype.o -MD -MP -MF $depbase.Tpo -c -o c-ctype.o c-ctype.c &&\
mv -f $depbase.Tpo $depbase.Po
depbase=`echo c-stack.o | sed 's|[^/]*$|.deps/&|;s|\.o$||'`;\
gcc -I. -I/home/snow/openwrt/lede/mtk-openwrt-lede-4.2.1.0/staging_dir/host/include -I/home/snow/openwrt/lede/mtk-openwrt-lede-4.2.1.0/staging_dir/host/usr/include -O2 -I/home/snow/openwrt/lede/mtk-openwrt-lede-4.2.1.0/staging_dir/host/include -I/home/snow/openwrt/lede/mtk-openwrt-lede-4.2.1.0/staging_dir/host/usr/include -MT c-stack.o -MD -MP -MF $depbase.Tpo -c -o c-stack.o c-stack.c &&\
mv -f $depbase.Tpo $depbase.Po
In file included from /usr/include/signal.h:328,
from ./signal.h:52,
from c-stack.c:49:
c-stack.c:55:26: error: missing binary operator before token "("
55 | #elif HAVE_LIBSIGSEGV && SIGSTKSZ < 16384
| ^~~~~~~~
make[7]: *** [Makefile:1837: c-stack.o] Error 1
make[7]: Leaving directory '/home/snow/openwrt/lede/mtk-openwrt-lede-4.2.1.0/build_dir/host/m4-1.4.17/lib'
make[6]: *** [Makefile:1602: all] Error 2
make[6]: Leaving directory '/home/snow/openwrt/lede/mtk-openwrt-lede-4.2.1.0/build_dir/host/m4-1.4.17/lib'
make[5]: *** [Makefile:1506: all-recursive] Error 1
make[5]: Leaving directory '/home/snow/openwrt/lede/mtk-openwrt-lede-4.2.1.0/build_dir/host/m4-1.4.17'
make[4]: *** [Makefile:1461: all] Error 2
make[4]: Leaving directory '/home/snow/openwrt/lede/mtk-openwrt-lede-4.2.1.0/build_dir/host/m4-1.4.17'
make[3]: *** [Makefile:29: /home/snow/openwrt/lede/mtk-openwrt-lede-4.2.1.0/build_dir/host/m4-1.4.17/.built] Error 2
make[3]: Leaving directory '/home/snow/openwrt/lede/mtk-openwrt-lede-4.2.1.0/tools/m4'
make[2]: *** [tools/Makefile:153: tools/m4/compile] Error 2
make[2]: Leaving directory '/home/snow/openwrt/lede/mtk-openwrt-lede-4.2.1.0'
make[1]: *** [tools/Makefile:150: /home/snow/openwrt/lede/mtk-openwrt-lede-4.2.1.0/staging_dir/target-mipsel_24kc_musl-1.1.16/stamp/.tools_install_yyynyyyyyynyyyyynyynnyyyyyyynyyyyyyyyyyyyyyyynyynynnyyynnny] Error 2
make[1]: Leaving directory '/home/snow/openwrt/lede/mtk-openwrt-lede-4.2.1.0'
make: *** [/home/snow/openwrt/lede/mtk-openwrt-lede-4.2.1.0/include/toplevel.mk:199: world] Error 2
解决,参考博文
cd tools/m4/patches
wget https://raw.githubusercontent.com/keyfour/openwrt/2722d51c5cf6a296b8ecf7ae09e46690403a6c3d/tools/m4/patches/011-fix-sigstksz.patch
snow@snow:~/openwrt/lede/mtk-openwrt-lede-4.2.1.0/tools/m4/patches$ ls
100-fix-gets-removal.patch
snow@snow:~/openwrt/lede/mtk-openwrt-lede-4.2.1.0/tools/m4/patches$ wget https://raw.githubusercontent.com/keyfour/openwrt/2722d51c5cf6a296b8ecf7ae09e46690403a6c3d/tools/m4/patches/011-fix-sigstksz.patch
--2023-06-29 17:05:49-- https://raw.githubusercontent.com/keyfour/openwrt/2722d51c5cf6a296b8ecf7ae09e46690403a6c3d/tools/m4/patches/011-fix-sigstksz.patch
Resolving raw.githubusercontent.com (raw.githubusercontent.com)... 185.199.111.133, 185.199.110.133, 185.199.109.133, ...
Connecting to raw.githubusercontent.com (raw.githubusercontent.com)|185.199.111.133|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 3257 (3.2K) [text/plain]
Saving to: ‘011-fix-sigstksz.patch’
011-fix-sigstksz.patch 100%[============================================================================================================================>] 3.18K --.-KB/s in 0s
2023-06-29 17:05:50 (25.1 MB/s) - ‘011-fix-sigstksz.patch’ saved [3257/3257]
snow@snow:~/openwrt/lede/mtk-openwrt-lede-4.2.1.0/tools/m4/patches$ ls
011-fix-sigstksz.patch 100-fix-gets-removal.patch
snow@snow:~/openwrt/lede/mtk-openwrt-lede-4.2.1.0/tools/m4/patches$
【问题2】 freadahead 异常
gcc -I. -I/home/snow/openwrt/lede/mtk-openwrt-lede-4.2.1.0/staging_dir/host/include -I/home/snow/openwrt/lede/mtk-openwrt-lede-4.2.1.0/staging_dir/host/usr/include -O2 -I/home/snow/openwrt/lede/mtk-openwrt-lede-4.2.1.0/staging_dir/host/include -I/home/snow/openwrt/lede/mtk-openwrt-lede-4.2.1.0/staging_dir/host/usr/include -MT freadahead.o -MD -MP -MF $depbase.Tpo -c -o freadahead.o freadahead.c &&\
mv -f $depbase.Tpo $depbase.Po
freadahead.c: In function 'freadahead':
freadahead.c:91:3: error: #error "Please port gnulib freadahead.c to your platform! Look at the definition of fflush, fread, ungetc on your system, then report this to bug-gnulib."
91 | #error "Please port gnulib freadahead.c to your platform! Look at the definition of fflush, fread, ungetc on your system, then report this to bug-gnulib."
| ^~~~~
make[7]: *** [Makefile:1837: freadahead.o] Error 1
make[7]: Leaving directory '/home/snow/openwrt/lede/mtk-openwrt-lede-4.2.1.0/build_dir/host/m4-1.4.17/lib'
make[6]: *** [Makefile:1602: all] Error 2
make[6]: Leaving directory '/home/snow/openwrt/lede/mtk-openwrt-lede-4.2.1.0/build_dir/host/m4-1.4.17/lib'
make[5]: *** [Makefile:1506: all-recursive] Error 1
make[5]: Leaving directory '/home/snow/openwrt/lede/mtk-openwrt-lede-4.2.1.0/build_dir/host/m4-1.4.17'
make[4]: *** [Makefile:1461: all] Error 2
make[4]: Leaving directory '/home/snow/openwrt/lede/mtk-openwrt-lede-4.2.1.0/build_dir/host/m4-1.4.17'
make[3]: *** [Makefile:29: /home/snow/openwrt/lede/mtk-openwrt-lede-4.2.1.0/build_dir/host/m4-1.4.17/.built] Error 2
make[3]: Leaving directory '/home/snow/openwrt/lede/mtk-openwrt-lede-4.2.1.0/tools/m4'
make[2]: *** [tools/Makefile:153: tools/m4/compile] Error 2
make[2]: Leaving directory '/home/snow/openwrt/lede/mtk-openwrt-lede-4.2.1.0'
make[1]: *** [tools/Makefile:150: /home/snow/openwrt/lede/mtk-openwrt-lede-4.2.1.0/staging_dir/target-mipsel_24kc_musl-1.1.16/stamp/.tools_install_yyynyyyyyynyyyyynyynnyyyyyyynyyyyyyyyyyyyyyyynyynynnyyynnny] Error 2
make[1]: Leaving directory '/home/snow/openwrt/lede/mtk-openwrt-lede-4.2.1.0'
make: *** [/home/snow/openwrt/lede/mtk-openwrt-lede-4.2.1.0/include/toplevel.mk:199: world] Error 2
snow@snow:~/openwrt/lede/mtk-openwrt-lede-4.2.1.0$
解决,参考博文
snow@snow:~/openwrt/lede/mtk-openwrt-lede-4.2.1.0$ cd build_dir/host/m4-1.4.17/
snow@snow:~/openwrt/lede/mtk-openwrt-lede-4.2.1.0/build_dir/host/m4-1.4.17$
snow@snow:~/openwrt/lede/mtk-openwrt-lede-4.2.1.0/build_dir/host/m4-1.4.17$ ls
acinclude.m4 AUTHORS bootstrap c-boxes.el ChangeLog config.guess config.status configure COPYING examples INSTALL m4 Makefile Makefile.in README stamp-h THANKS
aclocal.m4 BACKLOG build-aux cfg.mk checks config.log config.sub configure.ac doc GNUmakefile lib maint.mk Makefile.am NEWS src tests TODO
snow@snow:~/openwrt/lede/mtk-openwrt-lede-4.2.1.0/build_dir/host/m4-1.4.17$
snow@snow:~/openwrt/lede/mtk-openwrt-lede-4.2.1.0/build_dir/host/m4-1.4.17$ sed -i 's/IO_ftrylockfile/IO_EOF_SEEN/' lib/*.c
snow@snow:~/openwrt/lede/mtk-openwrt-lede-4.2.1.0/build_dir/host/m4-1.4.17$ echo "#define _IO_IN_BACKUP 0x100" >> lib/stdio-impl.h
-
注意
: 参考博文中的_IO_IN_BAXKUP
应该为_IO_IN_BACKUP
,否则会导致下述报错,此文为正确写法
mv -f $depbase.Tpo $depbase.Po
fflush.c: In function 'clear_ungetc_buffer_preserving_position':
fflush.c:42:20: error: '_IO_IN_BACKUP' undeclared (first use in this function)
42 | if (fp->_flags & _IO_IN_BACKUP)
| ^~~~~~~~~~~~~
fflush.c:42:20: note: each undeclared identifier is reported only once for each function it appears in
make[7]: *** [Makefile:1837: fflush.o] Error 1
make[7]: Leaving directory '/home/snow/openwrt/lede/mtk-openwrt-lede-4.2.1.0/build_dir/host/m4-1.4.17/lib'
make[6]: *** [Makefile:1602: all] Error 2
make[6]: Leaving directory '/home/snow/openwrt/lede/mtk-openwrt-lede-4.2.1.0/build_dir/host/m4-1.4.17/lib'
make[5]: *** [Makefile:1506: all-recursive] Error 1
make[5]: Leaving directory '/home/snow/openwrt/lede/mtk-openwrt-lede-4.2.1.0/build_dir/host/m4-1.4.17'
make[4]: *** [Makefile:1461: all] Error 2
make[4]: Leaving directory '/home/snow/openwrt/lede/mtk-openwrt-lede-4.2.1.0/build_dir/host/m4-1.4.17'
make[3]: *** [Makefile:29: /home/snow/openwrt/lede/mtk-openwrt-lede-4.2.1.0/build_dir/host/m4-1.4.17/.built] Error 2
make[3]: Leaving directory '/home/snow/openwrt/lede/mtk-openwrt-lede-4.2.1.0/tools/m4'
make[2]: *** [tools/Makefile:153: tools/m4/compile] Error 2
make[2]: Leaving directory '/home/snow/openwrt/lede/mtk-openwrt-lede-4.2.1.0'
make[1]: *** [tools/Makefile:150: /home/snow/openwrt/lede/mtk-openwrt-lede-4.2.1.0/staging_dir/target-mipsel_24kc_musl-1.1.16/stamp/.tools_install_yyynyyyyyynyyyyynyynnyyyyyyynyyyyyyyyyyyyyyyynyynynnyyynnny] Error 2
make[1]: Leaving directory '/home/snow/openwrt/lede/mtk-openwrt-lede-4.2.1.0'
make: *** [/home/snow/openwrt/lede/mtk-openwrt-lede-4.2.1.0/include/toplevel.mk:199: world] Error 2
snow@snow:~/openwrt/lede/mtk-openwrt-lede-4.2.1.0$
snow@snow:~/openwrt/lede/mtk-openwrt-lede-4.2.1.0
snow@snow:~/openwrt/lede/mtk-openwrt-lede-4.2.1.0/build_dir/host$
snow@snow:~/openwrt/lede/mtk-openwrt-lede-4.2.1.0/build_dir/host$ rm -rf m4-1.4.17/
snow@snow:~/openwrt/lede/mtk-openwrt-lede-4.2.1.0/build_dir/host$
【问题3】 bison-3.0.4 相关错误
gcc -I. -I./lib -I. -I./lib -I/home/snow/openwrt/lede/mtk-openwrt-lede-4.2.1.0/staging_dir/host/include -I/home/snow/openwrt/lede/mtk-openwrt-lede-4.2.1.0/staging_dir/host/usr/include -O2 -I/home/snow/openwrt/lede/mtk-openwrt-lede-4.2.1.0/staging_dir/host/include -I/home/snow/openwrt/lede/mtk-openwrt-lede-4.2.1.0/staging_dir/host/usr/include -MT lib/fseterr.o -MD -MP -MF $depbase.Tpo -c -o lib/fseterr.o lib/fseterr.c &&\
mv -f $depbase.Tpo $depbase.Po
lib/fseterr.c: In function 'fseterr':
lib/fseterr.c:77:3: error: #error "Please port gnulib fseterr.c to your platform! Look at the definitions of ferror and clearerr on your system, then report this to bug-gnulib."
77 | #error "Please port gnulib fseterr.c to your platform! Look at the definitions of ferror and clearerr on your system, then report this to bug-gnulib."
| ^~~~~
make[6]: *** [Makefile:3461: lib/fseterr.o] Error 1
make[6]: Leaving directory '/home/snow/openwrt/lede/mtk-openwrt-lede-4.2.1.0/build_dir/host/bison-3.0.4'
make[5]: *** [Makefile:4522: all-recursive] Error 1
make[5]: Leaving directory '/home/snow/openwrt/lede/mtk-openwrt-lede-4.2.1.0/build_dir/host/bison-3.0.4'
make[4]: *** [Makefile:2625: all] Error 2
make[4]: Leaving directory '/home/snow/openwrt/lede/mtk-openwrt-lede-4.2.1.0/build_dir/host/bison-3.0.4'
make[3]: *** [Makefile:31: /home/snow/openwrt/lede/mtk-openwrt-lede-4.2.1.0/build_dir/host/bison-3.0.4/.built] Error 2
make[3]: Leaving directory '/home/snow/openwrt/lede/mtk-openwrt-lede-4.2.1.0/tools/bison'
make[2]: *** [tools/Makefile:153: tools/bison/compile] Error 2
make[2]: Leaving directory '/home/snow/openwrt/lede/mtk-openwrt-lede-4.2.1.0'
make[1]: *** [tools/Makefile:150: /home/snow/openwrt/lede/mtk-openwrt-lede-4.2.1.0/staging_dir/target-mipsel_24kc_musl-1.1.16/stamp/.tools_install_yyynyyyyyynyyyyynyynnyyyyyyynyyyyyyyyyyyyyyyynyynynnyyynnny] Error 2
make[1]: Leaving directory '/home/snow/openwrt/lede/mtk-openwrt-lede-4.2.1.0'
make: *** [/home/snow/openwrt/lede/mtk-openwrt-lede-4.2.1.0/include/toplevel.mk:199: world] Error 2
snow@snow:~/openwrt/lede/mtk-openwrt-lede-4.2.1.0$
解决,参考博文
snow@snow:~/openwrt/lede/mtk-openwrt-lede-4.2.1.0$
snow@snow:~/openwrt/lede/mtk-openwrt-lede-4.2.1.0$
snow@snow:~/openwrt/lede/mtk-openwrt-lede-4.2.1.0$
snow@snow:~/openwrt/lede/mtk-openwrt-lede-4.2.1.0$
snow@snow:~/openwrt/lede/mtk-openwrt-lede-4.2.1.0$ cd build_dir/host/bison-3.0.4
snow@snow:~/openwrt/lede/mtk-openwrt-lede-4.2.1.0/build_dir/host/bison-3.0.4$
snow@snow:~/openwrt/lede/mtk-openwrt-lede-4.2.1.0/build_dir/host/bison-3.0.4$ sed -i 's/IO_ftrylockfile/IO_EOF_SEEN/' lib/*.c
snow@snow:~/openwrt/lede/mtk-openwrt-lede-4.2.1.0/build_dir/host/bison-3.0.4$ echo "#define _IO_IN_BACKUP 0x100" >> lib/stdio-impl.h
snow@snow:~/openwrt/lede/mtk-openwrt-lede-4.2.1.0/build_dir/host/bison-3.0.4$
- 提示C++17不支持动态异常规格
error: ISO C++17 does not allow dynamic exception specifications
make[6]: Entering directory '/home/snow/openwrt/lede/mtk-openwrt-lede-4.2.1.0/build_dir/host/mklibs-0.1.35/src'
Making all in mklibs-readelf
make[7]: Entering directory '/home/snow/openwrt/lede/mtk-openwrt-lede-4.2.1.0/build_dir/host/mklibs-0.1.35/src/mklibs-readelf'
x86_64-linux-gnu-g++ -DHAVE_CONFIG_H -I. -I../.. -I/home/snow/openwrt/lede/mtk-openwrt-lede-4.2.1.0/staging_dir/host/include -I/home/snow/openwrt/lede/mtk-openwrt-lede-4.2.1.0/staging_dir/host/usr/include -g -O2 -MT elf.o -MD -MP -MF .deps/elf.Tpo -c -o elf.o elf.cpp
In file included from elf_data.hpp:24,
from elf.cpp:21:
elf.hpp:52:56: error: ISO C++17 does not allow dynamic exception specifications
52 | const section &get_section(unsigned int i) const throw (std::out_of_range) { return *sections.at(i); };
| ^~~~~
elf.hpp:62:47: error: ISO C++17 does not allow dynamic exception specifications
62 | static file *open(const char *filename) throw (std::bad_alloc, std::runtime_error);
| ^~~~~
elf.hpp:65:38: error: ISO C++17 does not allow dynamic exception specifications
65 | file(uint8_t *mem, size_t len) throw (std::bad_alloc) : mem(mem), len(len) { }
| ^~~~~
elf.hpp:68:52: error: ISO C++17 does not allow dynamic exception specifications
68 | static file *open_class(uint8_t *, size_t) throw (std::bad_alloc, std::runtime_error);
| ^~~~~
elf.hpp:131:55: error: ISO C++17 does not allow dynamic exception specifications
131 | std::string get_string(uint32_t offset) const throw (std::bad_alloc)
| ^~~~~
elf.hpp:266:39: error: ISO C++17 does not allow dynamic exception specifications
266 | std::string get_version() const throw (std::bad_alloc);
| ^~~~~
elf.hpp:267:44: error: ISO C++17 does not allow dynamic exception specifications
267 | std::string get_version_file() const throw (std::bad_alloc);
| ^~~~~
elf.hpp:269:44: error: ISO C++17 does not allow dynamic exception specifications
269 | std::string get_name_version() const throw (std::bad_alloc);
| ^~~~~
elf.hpp:308:29: error: ISO C++17 does not allow dynamic exception specifications
308 | version_requirement() throw (std::bad_alloc);
| ^~~~~
In file included from elf.cpp:21:
elf_data.hpp:97:42: error: ISO C++17 does not allow dynamic exception specifications
97 | file_data(uint8_t *, size_t len) throw (std::bad_alloc, std::runtime_error);
| ^~~~~
elf_data.hpp:112:43: error: ISO C++17 does not allow dynamic exception specifications
112 | virtual void update(const file &) throw (std::bad_alloc);
| ^~~~~
elf_data.hpp:136:41: error: ISO C++17 does not allow dynamic exception specifications
136 | section_real(Shdr *, uint8_t *) throw (std::bad_alloc);
| ^~~~~
elf_data.hpp:138:35: error: ISO C++17 does not allow dynamic exception specifications
138 | void update(const file &) throw (std::bad_alloc);
| ^~~~~
elf_data.hpp:150:41: error: ISO C++17 does not allow dynamic exception specifications
150 | section_real(Shdr *, uint8_t *) throw (std::bad_alloc);
| ^~~~~
elf_data.hpp:152:35: error: ISO C++17 does not allow dynamic exception specifications
152 | void update(const file &) throw (std::bad_alloc);
| ^~~~~
elf_data.hpp:164:41: error: ISO C++17 does not allow dynamic exception specifications
164 | section_real(Shdr *, uint8_t *) throw (std::bad_alloc);
| ^~~~~
elf_data.hpp:166:35: error: ISO C++17 does not allow dynamic exception specifications
166 | void update(const file &) throw (std::bad_alloc);
| ^~~~~
elf_data.hpp:178:41: error: ISO C++17 does not allow dynamic exception specifications
178 | section_real(Shdr *, uint8_t *) throw (std::bad_alloc);
| ^~~~~
elf_data.hpp:180:35: error: ISO C++17 does not allow dynamic exception specifications
180 | void update(const file &) throw (std::bad_alloc);
| ^~~~~
elf_data.hpp:192:41: error: ISO C++17 does not allow dynamic exception specifications
192 | section_real(Shdr *, uint8_t *) throw (std::bad_alloc);
| ^~~~~
elf_data.hpp:223:42: error: ISO C++17 does not allow dynamic exception specifications
223 | segment_real (Phdr *, uint8_t *) throw (std::bad_alloc);
| ^~~~~
elf_data.hpp:235:71: error: ISO C++17 does not allow dynamic exception specifications
235 | void update_string(const section_type<section_type_STRTAB> &) throw (std::bad_alloc);
| ^~~~~
elf_data.hpp:247:71: error: ISO C++17 does not allow dynamic exception specifications
247 | void update_string(const section_type<section_type_STRTAB> &) throw (std::bad_alloc);
| ^~~~~
elf_data.hpp:248:62: error: ISO C++17 does not allow dynamic exception specifications
248 | virtual void update_version (const file &, uint16_t) throw (std::bad_alloc);
| ^~~~~
elf_data.hpp:260:71: error: ISO C++17 does not allow dynamic exception specifications
260 | void update_string(const section_type<section_type_STRTAB> &) throw (std::bad_alloc);
| ^~~~~
elf_data.hpp:272:71: error: ISO C++17 does not allow dynamic exception specifications
272 | void update_string(const section_type<section_type_STRTAB> &) throw (std::bad_alloc);
| ^~~~~
elf_data.hpp:283:71: error: ISO C++17 does not allow dynamic exception specifications
283 | void update_string(const section_type<section_type_STRTAB> &) throw (std::bad_alloc);
| ^~~~~
elf.cpp:39:41: error: ISO C++17 does not allow dynamic exception specifications
39 | file *file::open (const char *filename) throw (std::bad_alloc, std::runtime_error)
| ^~~~~
elf.cpp:75:50: error: ISO C++17 does not allow dynamic exception specifications
75 | file *file::open_class(uint8_t *mem, size_t len) throw (std::bad_alloc, std::runtime_error)
| ^~~~~
elf.cpp:89:63: error: ISO C++17 does not allow dynamic exception specifications
89 | file_data<_class, _data>::file_data(uint8_t *mem, size_t len) throw (std::bad_alloc, std::runtime_error)
| ^~~~~
elf.cpp:191:60: error: ISO C++17 does not allow dynamic exception specifications
191 | void section_data<_class, _data>::update(const file &file) throw (std::bad_alloc)
| ^~~~~
elf.cpp:205:93: error: ISO C++17 does not allow dynamic exception specifications
205 | section_real<_class, _data, section_type_DYNAMIC>::section_real(Shdr *header, uint8_t *mem) throw (std::bad_alloc)
| ^~~~~
elf.cpp:222:82: error: ISO C++17 does not allow dynamic exception specifications
222 | void section_real<_class, _data, section_type_DYNAMIC>::update(const file &file) throw (std::bad_alloc)
| ^~~~~
elf.cpp:244:92: error: ISO C++17 does not allow dynamic exception specifications
244 | section_real<_class, _data, section_type_DYNSYM>::section_real(Shdr *header, uint8_t *mem) throw (std::bad_alloc)
| ^~~~~
elf.cpp:261:81: error: ISO C++17 does not allow dynamic exception specifications
261 | void section_real<_class, _data, section_type_DYNSYM>::update(const file &file) throw (std::bad_alloc)
| ^~~~~
elf.cpp:286:96: error: ISO C++17 does not allow dynamic exception specifications
286 | section_real<_class, _data, section_type_GNU_VERDEF>::section_real(Shdr *header, uint8_t *mem) throw (std::bad_alloc)
| ^~~~~
elf.cpp:308:85: error: ISO C++17 does not allow dynamic exception specifications
308 | void section_real<_class, _data, section_type_GNU_VERDEF>::update(const file &file) throw (std::bad_alloc)
| ^~~~~
elf.cpp:334:42: error: ISO C++17 does not allow dynamic exception specifications
334 | section_real(Shdr *header, uint8_t *mem) throw (std::bad_alloc)
| ^~~~~
elf.cpp:356:86: error: ISO C++17 does not allow dynamic exception specifications
356 | void section_real<_class, _data, section_type_GNU_VERNEED>::update(const file &file) throw (std::bad_alloc)
| ^~~~~
elf.cpp:373:43: error: ISO C++17 does not allow dynamic exception specifications
373 | section_real (Shdr *header, uint8_t *mem) throw (std::bad_alloc)
| ^~~~~
elf.cpp:400:93: error: ISO C++17 does not allow dynamic exception specifications
400 | segment_real<_class, _data, segment_type_INTERP>::segment_real (Phdr *header, uint8_t *mem) throw (std::bad_alloc)
| ^~~~~
elf.cpp:429:99: error: ISO C++17 does not allow dynamic exception specifications
429 | void dynamic_data<_class, _data>::update_string(const section_type<section_type_STRTAB> §ion) throw (std::bad_alloc)
| ^~~~~
elf.cpp:435:42: error: ISO C++17 does not allow dynamic exception specifications
435 | std::string symbol::get_version () const throw (std::bad_alloc)
| ^~~~~
elf.cpp:445:47: error: ISO C++17 does not allow dynamic exception specifications
445 | std::string symbol::get_version_file () const throw (std::bad_alloc)
| ^~~~~
elf.cpp:453:47: error: ISO C++17 does not allow dynamic exception specifications
453 | std::string symbol::get_name_version () const throw (std::bad_alloc)
| ^~~~~
elf.cpp:478:98: error: ISO C++17 does not allow dynamic exception specifications
478 | void symbol_data<_class, _data>::update_string(const section_type<section_type_STRTAB> §ion) throw (std::bad_alloc)
| ^~~~~
elf.cpp:484:83: error: ISO C++17 does not allow dynamic exception specifications
484 | void symbol_data<_class, _data>::update_version(const file &file, uint16_t index) throw (std::bad_alloc)
| ^~~~~
elf.cpp:531:110: error: ISO C++17 does not allow dynamic exception specifications
531 | void version_definition_data<_class, _data>::update_string(const section_type<section_type_STRTAB> §ion) throw (std::bad_alloc)
| ^~~~~
elf.cpp:537:44: error: ISO C++17 does not allow dynamic exception specifications
537 | version_requirement::version_requirement() throw (std::bad_alloc)
| ^~~~~
elf.cpp:561:65: error: ISO C++17 does not allow dynamic exception specifications
561 | update_string(const section_type<section_type_STRTAB> §ion) throw (std::bad_alloc)
| ^~~~~
elf.cpp:596:65: error: ISO C++17 does not allow dynamic exception specifications
596 | update_string(const section_type<section_type_STRTAB> §ion) throw (std::bad_alloc)
| ^~~~~
make[7]: *** [Makefile:387: elf.o] Error 1
make[7]: Leaving directory '/home/snow/openwrt/lede/mtk-openwrt-lede-4.2.1.0/build_dir/host/mklibs-0.1.35/src/mklibs-readelf'
make[6]: *** [Makefile:440: all-recursive] Error 1
make[6]: Leaving directory '/home/snow/openwrt/lede/mtk-openwrt-lede-4.2.1.0/build_dir/host/mklibs-0.1.35/src'
make[5]: *** [Makefile:364: all-recursive] Error 1
make[5]: Leaving directory '/home/snow/openwrt/lede/mtk-openwrt-lede-4.2.1.0/build_dir/host/mklibs-0.1.35'
make[4]: *** [Makefile:305: all] Error 2
make[4]: Leaving directory '/home/snow/openwrt/lede/mtk-openwrt-lede-4.2.1.0/build_dir/host/mklibs-0.1.35'
make[3]: *** [Makefile:35: /home/snow/openwrt/lede/mtk-openwrt-lede-4.2.1.0/build_dir/host/mklibs-0.1.35/.built] Error 2
make[3]: Leaving directory '/home/snow/openwrt/lede/mtk-openwrt-lede-4.2.1.0/tools/mklibs'
make[2]: *** [tools/Makefile:153: tools/mklibs/compile] Error 2
make[2]: Leaving directory '/home/snow/openwrt/lede/mtk-openwrt-lede-4.2.1.0'
make[1]: *** [tools/Makefile:150: /home/snow/openwrt/lede/mtk-openwrt-lede-4.2.1.0/staging_dir/target-mipsel_24kc_musl-1.1.16/stamp/.tools_install_yyynyyyyyynyyyyynyynnyyyyyyynyyyyyyyyyyyyyyyynyynynnyyynnny] Error 2
make[1]: Leaving directory '/home/snow/openwrt/lede/mtk-openwrt-lede-4.2.1.0'
make: *** [/home/snow/openwrt/lede/mtk-openwrt-lede-4.2.1.0/include/toplevel.mk:199: world] Error 2
snow@snow:~/openwrt/lede/mtk-openwrt-lede-4.2.1.0$
原因:gcc版本过高,当前Ubuntu22.04安装的gcc版本如下
snow@snow:~/openwrt/lede/mtk-openwrt-lede-4.2.1.0$ gcc -v
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-linux-gnu/11/lto-wrapper
OFFLOAD_TARGET_NAMES=nvptx-none:amdgcn-amdhsa
OFFLOAD_TARGET_DEFAULT=1
Target: x86_64-linux-gnu
Configured with: ../src/configure -v --with-pkgversion='Ubuntu 11.3.0-1ubuntu1~22.04.1' --with-bugurl=file:///usr/share/doc/gcc-11/README.Bugs --enable-languages=c,ada,c++,go,brig,d,fortran,objc,obj-c++,m2 --prefix=/usr --with-gcc-major-version-only --program-suffix=-11 --program-prefix=x86_64-linux-gnu- --enable-shared --enable-linker-build-id --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --libdir=/usr/lib --enable-nls --enable-bootstrap --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --with-default-libstdcxx-abi=new --enable-gnu-unique-object --disable-vtable-verify --enable-plugin --enable-default-pie --with-system-zlib --enable-libphobos-checking=release --with-target-system-zlib=auto --enable-objc-gc=auto --enable-multiarch --disable-werror --enable-cet --with-arch-32=i686 --with-abi=m64 --with-multilib-list=m32,m64,mx32 --enable-multilib --with-tune=generic --enable-offload-targets=nvptx-none=/build/gcc-11-aYxV0E/gcc-11-11.3.0/debian/tmp-nvptx/usr,amdgcn-amdhsa=/build/gcc-11-aYxV0E/gcc-11-11.3.0/debian/tmp-gcn/usr --without-cuda-driver --enable-checking=release --build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=x86_64-linux-gnu --with-build-config=bootstrap-lto-lean --enable-link-serialization=2
Thread model: posix
Supported LTO compression algorithms: zlib zstd
gcc version 11.3.0 (Ubuntu 11.3.0-1ubuntu1~22.04.1)
snow@snow:~/openwrt/lede/mtk-openwrt-lede-4.2.1.0$
**未解决**
,参考博文, 降低gcc、g++版本,参考博文,注意
博文中使用update-alternatives添加g++的语句有误
snow@snow:~$ sudo apt-get install gcc-9
snow@snow:~$ sudo apt-get install g++-9
snow@snow:~$ sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-9 90
update-alternatives: using /usr/bin/gcc-9 to provide /usr/bin/gcc (gcc) in auto mode
snow@snow:~$
snow@snow:~$ sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-9 90
update-alternatives: using /usr/bin/g++-9 to provide /usr/bin/g++ (g++) in auto mode
snow@snow:~$
snow@snow:~$ gcc -v
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-linux-gnu/9/lto-wrapper
OFFLOAD_TARGET_NAMES=nvptx-none:hsa
OFFLOAD_TARGET_DEFAULT=1
Target: x86_64-linux-gnu
Configured with: ../src/configure -v --with-pkgversion='Ubuntu 9.5.0-1ubuntu1~22.04' --with-bugurl=file:///usr/share/doc/gcc-9/README.Bugs --enable-languages=c,ada,c++,go,brig,d,fortran,objc,obj-c++,gm2 --prefix=/usr --with-gcc-major-version-only --program-suffix=-9 --program-prefix=x86_64-linux-gnu- --enable-shared --enable-linker-build-id --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --libdir=/usr/lib --enable-nls --enable-bootstrap --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --with-default-libstdcxx-abi=new --enable-gnu-unique-object --disable-vtable-verify --enable-plugin --enable-default-pie --with-system-zlib --with-target-system-zlib=auto --enable-objc-gc=auto --enable-multiarch --disable-werror --with-arch-32=i686 --with-abi=m64 --with-multilib-list=m32,m64,mx32 --enable-multilib --with-tune=generic --enable-offload-targets=nvptx-none=/build/gcc-9-5Q4PKF/gcc-9-9.5.0/debian/tmp-nvptx/usr,hsa --without-cuda-driver --enable-checking=release --build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=x86_64-linux-gnu --with-build-config=bootstrap-lto-lean --enable-link-mutex
Thread model: posix
gcc version 9.5.0 (Ubuntu 9.5.0-1ubuntu1~22.04)
snow@snow:~$
snow@snow:~$ g++ -v
Using built-in specs.
COLLECT_GCC=g++
COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-linux-gnu/9/lto-wrapper
OFFLOAD_TARGET_NAMES=nvptx-none:hsa
OFFLOAD_TARGET_DEFAULT=1
Target: x86_64-linux-gnu
Configured with: ../src/configure -v --with-pkgversion='Ubuntu 9.5.0-1ubuntu1~22.04' --with-bugurl=file:///usr/share/doc/gcc-9/README.Bugs --enable-languages=c,ada,c++,go,brig,d,fortran,objc,obj-c++,gm2 --prefix=/usr --with-gcc-major-version-only --program-suffix=-9 --program-prefix=x86_64-linux-gnu- --enable-shared --enable-linker-build-id --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --libdir=/usr/lib --enable-nls --enable-bootstrap --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --with-default-libstdcxx-abi=new --enable-gnu-unique-object --disable-vtable-verify --enable-plugin --enable-default-pie --with-system-zlib --with-target-system-zlib=auto --enable-objc-gc=auto --enable-multiarch --disable-werror --with-arch-32=i686 --with-abi=m64 --with-multilib-list=m32,m64,mx32 --enable-multilib --with-tune=generic --enable-offload-targets=nvptx-none=/build/gcc-9-5Q4PKF/gcc-9-9.5.0/debian/tmp-nvptx/usr,hsa --without-cuda-driver --enable-checking=release --build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=x86_64-linux-gnu --with-build-config=bootstrap-lto-lean --enable-link-mutex
Thread model: posix
gcc version 9.5.0 (Ubuntu 9.5.0-1ubuntu1~22.04)
snow@snow:~$
备注:Ubuntu22.04 默认源无gcc5/g++5,需要手动添加源
sudo vim /etc/apt/sources.list
增加源
deb http://dk.archive.ubuntu.com/ubuntu/ xenial main
deb http://dk.archive.ubuntu.com/ubuntu/ xenial universe
更新源
sudo apt-get update
安装gcc5,g++5
sudo apt-get install g++-5 gcc-5
安装gcc4,g++4
sudo apt-get install g++-4.8 gcc-4.8
apt-get update时报错
~ $ sudo apt-get update
Hit:1 http://cn.archive.ubuntu.com/ubuntu jammy InRelease
Get:2 http://security.ubuntu.com/ubuntu jammy-security InRelease [110 kB]
Get:3 http://cn.archive.ubuntu.com/ubuntu jammy-updates InRelease [119 kB]
Get:4 http://cn.archive.ubuntu.com/ubuntu jammy-backports InRelease [108 kB]
Get:5 http://cn.archive.ubuntu.com/ubuntu jammy-updates/main amd64 Packages [763 kB]
Get:6 http://security.ubuntu.com/ubuntu jammy-security/main amd64 DEP-11 Metadata [41.6 kB]
Get:7 http://cn.archive.ubuntu.com/ubuntu jammy-updates/main i386 Packages [437 kB]
Get:8 http://cn.archive.ubuntu.com/ubuntu jammy-updates/main amd64 DEP-11 Metadata [99.5 kB]
Get:9 http://cn.archive.ubuntu.com/ubuntu jammy-updates/universe amd64 Packages [937 kB]
Get:10 http://cn.archive.ubuntu.com/ubuntu jammy-updates/universe i386 Packages [628 kB]
Get:11 http://cn.archive.ubuntu.com/ubuntu jammy-updates/universe amd64 DEP-11 Metadata [274 kB]
Get:12 http://cn.archive.ubuntu.com/ubuntu jammy-updates/multiverse amd64 DEP-11 Metadata [940 B]
Get:13 http://cn.archive.ubuntu.com/ubuntu jammy-backports/main amd64 DEP-11 Metadata [7,976 B]
Get:14 http://security.ubuntu.com/ubuntu jammy-security/universe amd64 DEP-11 Metadata [22.0 kB]
Get:15 http://cn.archive.ubuntu.com/ubuntu jammy-backports/universe amd64 DEP-11 Metadata [15.4 kB]
Get:16 http://dk.archive.ubuntu.com/ubuntu xenial InRelease [247 kB]
Err:16 http://dk.archive.ubuntu.com/ubuntu xenial InRelease
The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 40976EAF437D05B5 NO_PUBKEY 3B4FE6ACC0B21F32
Reading package lists... Done
W: GPG error: http://dk.archive.ubuntu.com/ubuntu xenial InRelease: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 40976EAF437D05B5 NO_PUBKEY 3B4FE6ACC0B21F32
E: The repository 'http://dk.archive.ubuntu.com/ubuntu xenial InRelease' is not signed.
N: Updating from such a repository can't be done securely, and is therefore disabled by default.
N: See apt-secure(8) manpage for repository creation and user configuration details.
~ $
~ $
修复update报错,参考博文
~ $ sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 40976EAF437D05B5
Warning: apt-key is deprecated. Manage keyring files in trusted.gpg.d instead (see apt-key(8)).
Executing: /tmp/apt-key-gpghome.3mdTTn36QK/gpg.1.sh --keyserver keyserver.ubuntu.com --recv-keys 40976EAF437D05B5
gpg: key 40976EAF437D05B5: public key "Ubuntu Archive Automatic Signing Key <ftpmaster@ubuntu.com>" imported
gpg: Total number processed: 1
gpg: imported: 1
~ $
~ $
~ $ sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 3B4FE6ACC0B21F32
Warning: apt-key is deprecated. Manage keyring files in trusted.gpg.d instead (see apt-key(8)).
Executing: /tmp/apt-key-gpghome.pOLBIzcmLU/gpg.1.sh --keyserver keyserver.ubuntu.com --recv-keys 3B4FE6ACC0B21F32
gpg: key 3B4FE6ACC0B21F32: public key "Ubuntu Archive Automatic Signing Key (2012) <ftpmaster@ubuntu.com>" imported
gpg: Total number processed: 1
gpg: imported: 1
~ $
~ $
~ $
~ $ sudo apt-get update
Hit:1 http://security.ubuntu.com/ubuntu jammy-security InRelease
Hit:2 http://cn.archive.ubuntu.com/ubuntu jammy InRelease
Hit:3 http://cn.archive.ubuntu.com/ubuntu jammy-updates InRelease
Hit:4 http://cn.archive.ubuntu.com/ubuntu jammy-backports InRelease
Get:5 http://dk.archive.ubuntu.com/ubuntu xenial InRelease [247 kB]
Get:6 http://dk.archive.ubuntu.com/ubuntu xenial/main amd64 Packages [1,201 kB]
Get:7 http://dk.archive.ubuntu.com/ubuntu xenial/main i386 Packages [1,196 kB]
Get:8 http://dk.archive.ubuntu.com/ubuntu xenial/main Translation-en [568 kB]
Get:9 http://dk.archive.ubuntu.com/ubuntu xenial/main amd64 DEP-11 Metadata [733 kB]
Get:10 http://dk.archive.ubuntu.com/ubuntu xenial/main DEP-11 64x64 Icons [409 kB]
Get:11 http://dk.archive.ubuntu.com/ubuntu xenial/universe amd64 Packages [7,532 kB]
Get:12 http://dk.archive.ubuntu.com/ubuntu xenial/universe i386 Packages [7,512 kB]
Get:13 http://dk.archive.ubuntu.com/ubuntu xenial/universe Translation-en [4,354 kB]
Get:14 http://dk.archive.ubuntu.com/ubuntu xenial/universe amd64 DEP-11 Metadata [3,410 kB]
Get:15 http://dk.archive.ubuntu.com/ubuntu xenial/universe DEP-11 64x64 Icons [7,448 kB]
Fetched 34.4 MB in 28s (1,240 kB/s)
Reading package lists... 3%
Reading package lists... Done
W: http://dk.archive.ubuntu.com/ubuntu/dists/xenial/InRelease: Key is stored in legacy trusted.gpg keyring (/etc/apt/trusted.gpg), see the DEPRECATION section in apt-key(8) for details.
~ $
~ $
~ $ sudo apt-get install g++-5 gcc-5 /* 即可安装成功 */
使用gcc version 5.3.1继续编译项目
snow@snow:~/openwrt/lede/mtk-openwrt-lede-4.2.1.0$ gcc -v
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-linux-gnu/5/lto-wrapper
Target: x86_64-linux-gnu
Configured with: ../src/configure -v --with-pkgversion='Ubuntu 5.3.1-14ubuntu2' --with-bugurl=file:///usr/share/doc/gcc-5/README.Bugs --enable-languages=c,ada,c++,java,go,d,fortran,objc,obj-c++ --prefix=/usr --program-suffix=-5 --enable-shared --enable-linker-build-id --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --libdir=/usr/lib --enable-nls --with-sysroot=/ --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --with-default-libstdcxx-abi=new --enable-gnu-unique-object --disable-vtable-verify --enable-libmpx --enable-plugin --with-system-zlib --disable-browser-plugin --enable-java-awt=gtk --enable-gtk-cairo --with-java-home=/usr/lib/jvm/java-1.5.0-gcj-5-amd64/jre --enable-java-home --with-jvm-root-dir=/usr/lib/jvm/java-1.5.0-gcj-5-amd64 --with-jvm-jar-dir=/usr/lib/jvm-exports/java-1.5.0-gcj-5-amd64 --with-arch-directory=amd64 --with-ecj-jar=/usr/share/java/eclipse-ecj.jar --enable-objc-gc --enable-multiarch --disable-werror --with-arch-32=i686 --with-abi=m64 --with-multilib-list=m32,m64,mx32 --enable-multilib --with-tune=generic --enable-checking=release --build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=x86_64-linux-gnu
Thread model: posix
gcc version 5.3.1 20160413 (Ubuntu 5.3.1-14ubuntu2)
降低gcc/g++ 版本后,上述问题依旧存在,最后使用下述方法修复,参考博文1,参考博文2
解决,修改tools/mklibs/Makefile
snow@snow:~/openwrt/lede/mtk-openwrt-lede-4.2.1.0$ vim tools/mklibs/Makefile
/* Makefile的第21行添加如下内容 */
HOST_CPPFLAGS += -std=gnu++98
snow@snow:~/openwrt/lede/mtk-openwrt-lede-4.2.1.0$ make -j1 V=s
【问题4】 mkfs.jffs2 相关问题
In function 'memset',
inlined from 'invert_mat' at lib/libfec.c:421:5,
inlined from 'build_decode_matrix' at lib/libfec.c:817:9,
inlined from 'fec_decode' at lib/libfec.c:848:13:
/usr/include/x86_64-linux-gnu/bits/string_fortified.h:59:10: warning: '__builtin_memset' specified size between 18446744071562067968 and 18446744073709551615 exceeds maximum object size 9223372036854775807 [-Wstringop-overflow=]
59 | return __builtin___memset_chk (__dest, __ch, __len,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
60 | __glibc_objsize0 (__dest));
| ~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/x86_64-linux-gnu/bits/string_fortified.h:59:10: warning: '__builtin_memset' specified size between 18446744071562067968 and 18446744073709551615 exceeds maximum object size 9223372036854775807 [-Wstringop-overflow=]
AR lib/libmtd.a
LD mkfs.jffs2
/usr/bin/ld: /home/snow/openwrt/lede/mtk-openwrt-lede-4.2.1.0/build_dir/host/mtd-utils-1.5.2/mkfs.jffs2.o: in function `write_special_file':
/home/snow/openwrt/lede/mtk-openwrt-lede-4.2.1.0/build_dir/host/mtd-utils-1.5.2/mkfs.jffs2.c:944: undefined reference to `major'
/usr/bin/ld: /home/snow/openwrt/lede/mtk-openwrt-lede-4.2.1.0/build_dir/host/mtd-utils-1.5.2/mkfs.jffs2.c:944: undefined reference to `minor'
/usr/bin/ld: /home/snow/openwrt/lede/mtk-openwrt-lede-4.2.1.0/build_dir/host/mtd-utils-1.5.2/mkfs.jffs2.o: in function `recursive_populate_directory':
/home/snow/openwrt/lede/mtk-openwrt-lede-4.2.1.0/build_dir/host/mtd-utils-1.5.2/mkfs.jffs2.c:1273: undefined reference to `minor'
/usr/bin/ld: /home/snow/openwrt/lede/mtk-openwrt-lede-4.2.1.0/build_dir/host/mtd-utils-1.5.2/mkfs.jffs2.c:1273: undefined reference to `major'
/usr/bin/ld: /home/snow/openwrt/lede/mtk-openwrt-lede-4.2.1.0/build_dir/host/mtd-utils-1.5.2/mkfs.jffs2.c:1263: undefined reference to `minor'
/usr/bin/ld: /home/snow/openwrt/lede/mtk-openwrt-lede-4.2.1.0/build_dir/host/mtd-utils-1.5.2/mkfs.jffs2.c:1263: undefined reference to `major'
/usr/bin/ld: /home/snow/openwrt/lede/mtk-openwrt-lede-4.2.1.0/build_dir/host/mtd-utils-1.5.2/mkfs.jffs2.o: in function `interpret_table_entry':
/home/snow/openwrt/lede/mtk-openwrt-lede-4.2.1.0/build_dir/host/mtd-utils-1.5.2/mkfs.jffs2.c:467: undefined reference to `makedev'
/usr/bin/ld: /home/snow/openwrt/lede/mtk-openwrt-lede-4.2.1.0/build_dir/host/mtd-utils-1.5.2/mkfs.jffs2.c:503: undefined reference to `makedev'
/usr/bin/ld: /home/snow/openwrt/lede/mtk-openwrt-lede-4.2.1.0/build_dir/host/mtd-utils-1.5.2/mkfs.jffs2.c:510: undefined reference to `makedev'
collect2: error: ld returned 1 exit status
make[4]: *** [common.mk:81: /home/snow/openwrt/lede/mtk-openwrt-lede-4.2.1.0/build_dir/host/mtd-utils-1.5.2/mkfs.jffs2] Error 1
make[4]: Leaving directory '/home/snow/openwrt/lede/mtk-openwrt-lede-4.2.1.0/build_dir/host/mtd-utils-1.5.2'
make[3]: *** [Makefile:56: /home/snow/openwrt/lede/mtk-openwrt-lede-4.2.1.0/build_dir/host/mtd-utils-1.5.2/.built] Error 2
make[3]: Leaving directory '/home/snow/openwrt/lede/mtk-openwrt-lede-4.2.1.0/tools/mtd-utils'
make[2]: *** [tools/Makefile:153: tools/mtd-utils/compile] Error 2
make[2]: Leaving directory '/home/snow/openwrt/lede/mtk-openwrt-lede-4.2.1.0'
make[1]: *** [tools/Makefile:150: /home/snow/openwrt/lede/mtk-openwrt-lede-4.2.1.0/staging_dir/target-mipsel_24kc_musl-1.1.16/stamp/.tools_install_yyynyyyyyynyyyyynyynnyyyyyyynyyyyyyyyyyyyyyyynyynynnyyynnny] Error 2
make[1]: Leaving directory '/home/snow/openwrt/lede/mtk-openwrt-lede-4.2.1.0'
make: *** [/home/snow/openwrt/lede/mtk-openwrt-lede-4.2.1.0/include/toplevel.mk:199: world] Error 2
snow@snow:~/openwrt/lede/mtk-openwrt-lede-4.2.1.0$
解决,在下述四个文件中添加#include <sys/sysmacros.h>
,参考博文
snow@snow:~/openwrt/lede/mtk-openwrt-lede-4.2.1.0$ vim build_dir/host/mtd-utils-1.5.2/mkfs.jffs2.c
snow@snow:~/openwrt/lede/mtk-openwrt-lede-4.2.1.0$ vim build_dir/host/mtd-utils-1.5.2/ubi-utils/libubi.c
snow@snow:~/openwrt/lede/mtk-openwrt-lede-4.2.1.0$ vim build_dir/host/mtd-utils-1.5.2/mkfs.ubifs/devtable.c
snow@snow:~/openwrt/lede/mtk-openwrt-lede-4.2.1.0$ vim build_dir/host/mtd-utils-1.5.2/mkfs.ubifs/mkfs.ubifs.c
【问题5】 findutils-4.6.0 相关问题
mv -f $depbase.Tpo $depbase.Po
freadahead.c: In function 'freadahead':
freadahead.c:92:3: error: #error "Please port gnulib freadahead.c to your platform! Look at the definition of fflush, fread, ungetc on your system, then report this to bug-gnulib."
92 | #error "Please port gnulib freadahead.c to your platform! Look at the definition of fflush, fread, ungetc on your system, then report this to bug-gnulib."
| ^~~~~
make[9]: *** [Makefile:2225: freadahead.o] Error 1
make[9]: Leaving directory '/home/snow/openwrt/lede/mtk-openwrt-lede-4.2.1.0/build_dir/host/findutils-4.6.0/gl/lib'
make[8]: *** [Makefile:2250: all-recursive] Error 1
make[8]: Leaving directory '/home/snow/openwrt/lede/mtk-openwrt-lede-4.2.1.0/build_dir/host/findutils-4.6.0/gl/lib'
make[7]: *** [Makefile:1931: all] Error 2
make[7]: Leaving directory '/home/snow/openwrt/lede/mtk-openwrt-lede-4.2.1.0/build_dir/host/findutils-4.6.0/gl/lib'
make[6]: *** [Makefile:1657: all-recursive] Error 1
make[6]: Leaving directory '/home/snow/openwrt/lede/mtk-openwrt-lede-4.2.1.0/build_dir/host/findutils-4.6.0/gl'
make[5]: *** [Makefile:1706: all-recursive] Error 1
make[5]: Leaving directory '/home/snow/openwrt/lede/mtk-openwrt-lede-4.2.1.0/build_dir/host/findutils-4.6.0'
make[4]: *** [Makefile:1646: all] Error 2
make[4]: Leaving directory '/home/snow/openwrt/lede/mtk-openwrt-lede-4.2.1.0/build_dir/host/findutils-4.6.0'
make[3]: *** [Makefile:21: /home/snow/openwrt/lede/mtk-openwrt-lede-4.2.1.0/build_dir/host/findutils-4.6.0/.built] Error 2
make[3]: Leaving directory '/home/snow/openwrt/lede/mtk-openwrt-lede-4.2.1.0/tools/findutils'
make[2]: *** [tools/Makefile:153: tools/findutils/compile] Error 2
make[2]: Leaving directory '/home/snow/openwrt/lede/mtk-openwrt-lede-4.2.1.0'
make[1]: *** [tools/Makefile:150: /home/snow/openwrt/lede/mtk-openwrt-lede-4.2.1.0/staging_dir/target-mipsel_24kc_musl-1.1.16/stamp/.tools_install_yyynyyyyyynyyyyynyynnyyyyyyynyyyyyyyyyyyyyyyynyynynnyyynnny] Error 2
make[1]: Leaving directory '/home/snow/openwrt/lede/mtk-openwrt-lede-4.2.1.0'
make: *** [/home/snow/openwrt/lede/mtk-openwrt-lede-4.2.1.0/include/toplevel.mk:199: world] Error 2
snow@snow:~/openwrt/lede/mtk-openwrt-lede-4.2.1.0$
解决,参考博文
snow@snow:~/openwrt/lede/mtk-openwrt-lede-4.2.1.0$ cd build_dir/host/findutils-4.6.0
snow@snow:~/openwrt/lede/mtk-openwrt-lede-4.2.1.0/build_dir/host/findutils-4.6.0$
snow@snow:~/openwrt/lede/mtk-openwrt-lede-4.2.1.0/build_dir/host/findutils-4.6.0$ sed -i 's/IO_ftrylockfile/IO_EOF_SEEN/' lib/*.c
snow@snow:~/openwrt/lede/mtk-openwrt-lede-4.2.1.0/build_dir/host/findutils-4.6.0$ echo "#define _IO_IN_BACKUP 0x100" >> lib/stdio-impl.h
snow@snow:~/openwrt/lede/mtk-openwrt-lede-4.2.1.0/build_dir/host/findutils-4.6.0$ sed -i 's/IO_ftrylockfile/IO_EOF_SEEN/' gl/lib/*.c
snow@snow:~/openwrt/lede/mtk-openwrt-lede-4.2.1.0/build_dir/host/findutils-4.6.0$ echo "#define _IO_IN_BACKUP 0x100" >> gl/lib/stdio-impl.h
snow@snow:~/openwrt/lede/mtk-openwrt-lede-4.2.1.0/build_dir/host/findutils-4.6.0$ sed -i '/unistd/a #include <sys/sysmacros.h>' gl/lib/mountlist.c
snow@snow:~/openwrt/lede/mtk-openwrt-lede-4.2.1.0/build_dir/host/findutils-4.6.0$
【问题6】 squashfs4.2 相关问题
Applying ./patches/200-add-fixed-timestamp-option.patch using plaintext:
patching file squashfs-tools/mksquashfs.c
touch /home/snow/openwrt/lede/mtk-openwrt-lede-4.2.1.0/build_dir/host/squashfs4.2/.prepared08e88402b54b78c37ad607f89189542b
(cd /home/snow/openwrt/lede/mtk-openwrt-lede-4.2.1.0/build_dir/host/squashfs4.2/; if [ -x configure ]; then cp -fpR /home/snow/openwrt/lede/mtk-openwrt-lede-4.2.1.0/scripts/config.{guess,sub} /home/snow/openwrt/lede/mtk-openwrt-lede-4.2.1.0/build_dir/host/squashfs4.2// && CC="gcc" CFLAGS="-O2 -I/home/snow/openwrt/lede/mtk-openwrt-lede-4.2.1.0/staging_dir/host/include -I/home/snow/openwrt/lede/mtk-openwrt-lede-4.2.1.0/staging_dir/host/usr/include " CPPFLAGS="-I/home/snow/openwrt/lede/mtk-openwrt-lede-4.2.1.0/staging_dir/host/include -I/home/snow/openwrt/lede/mtk-openwrt-lede-4.2.1.0/staging_dir/host/usr/include " LDFLAGS="-L/home/snow/openwrt/lede/mtk-openwrt-lede-4.2.1.0/staging_dir/host/lib -L/home/snow/openwrt/lede/mtk-openwrt-lede-4.2.1.0/staging_dir/host/usr/lib " CONFIG_SHELL="/usr/bin/env bash" bash ./configure --target=x86_64-linux-gnu --host=x86_64-linux-gnu --build=x86_64-linux-gnu --program-prefix="" --program-suffix="" --prefix=/home/snow/openwrt/lede/mtk-openwrt-lede-4.2.1.0/staging_dir/host --exec-prefix=/home/snow/openwrt/lede/mtk-openwrt-lede-4.2.1.0/staging_dir/host --sysconfdir=/home/snow/openwrt/lede/mtk-openwrt-lede-4.2.1.0/staging_dir/host/etc --localstatedir=/home/snow/openwrt/lede/mtk-openwrt-lede-4.2.1.0/staging_dir/host/var --sbindir=/home/snow/openwrt/lede/mtk-openwrt-lede-4.2.1.0/staging_dir/host/bin ; fi )
touch /home/snow/openwrt/lede/mtk-openwrt-lede-4.2.1.0/build_dir/host/squashfs4.2/.configured
make -C /home/snow/openwrt/lede/mtk-openwrt-lede-4.2.1.0/build_dir/host/squashfs4.2/squashfs-tools CC="gcc" XZ_SUPPORT=1 LZMA_XZ_SUPPORT=1 XATTR_SUPPORT= LZMA_LIB="/home/snow/openwrt/lede/mtk-openwrt-lede-4.2.1.0/staging_dir/host/lib/liblzma.a" EXTRA_CFLAGS="-I/home/snow/openwrt/lede/mtk-openwrt-lede-4.2.1.0/staging_dir/host/include" mksquashfs unsquashfs
make[4]: Entering directory '/home/snow/openwrt/lede/mtk-openwrt-lede-4.2.1.0/build_dir/host/squashfs4.2/squashfs-tools'
gcc -I/home/snow/openwrt/lede/mtk-openwrt-lede-4.2.1.0/staging_dir/host/include -I. -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_GNU_SOURCE -DCOMP_DEFAULT=\"gzip\" -Wall -DGZIP_SUPPORT -DLZMA_SUPPORT -DXZ_SUPPORT -c -o mksquashfs.o mksquashfs.c
mksquashfs.c: In function 'create_inode':
mksquashfs.c:1375:24: error: called object 'major' is not a function or function pointer
1375 | unsigned int major = major(buf->st_rdev);
| ^~~~~
mksquashfs.c:1375:16: note: declared here
1375 | unsigned int major = major(buf->st_rdev);
| ^~~~~
mksquashfs.c:1376:24: error: called object 'minor' is not a function or function pointer
1376 | unsigned int minor = minor(buf->st_rdev);
| ^~~~~
mksquashfs.c:1376:16: note: declared here
1376 | unsigned int minor = minor(buf->st_rdev);
| ^~~~~
mksquashfs.c:1399:24: error: called object 'major' is not a function or function pointer
1399 | unsigned int major = major(buf->st_rdev);
| ^~~~~
mksquashfs.c:1399:16: note: declared here
1399 | unsigned int major = major(buf->st_rdev);
| ^~~~~
mksquashfs.c:1400:24: error: called object 'minor' is not a function or function pointer
1400 | unsigned int minor = minor(buf->st_rdev);
| ^~~~~
mksquashfs.c:1400:16: note: declared here
1400 | unsigned int minor = minor(buf->st_rdev);
| ^~~~~
mksquashfs.c: In function 'dir_scan2':
mksquashfs.c:3805:17: warning: implicit declaration of function 'makedev' [-Wimplicit-function-declaration]
3805 | buf.st_rdev = makedev(pseudo_ent->dev->major,
| ^~~~~~~
make[4]: *** [<builtin>: mksquashfs.o] Error 1
make[4]: Leaving directory '/home/snow/openwrt/lede/mtk-openwrt-lede-4.2.1.0/build_dir/host/squashfs4.2/squashfs-tools'
make[3]: *** [Makefile:43: /home/snow/openwrt/lede/mtk-openwrt-lede-4.2.1.0/build_dir/host/squashfs4.2/.built] Error 2
make[3]: Leaving directory '/home/snow/openwrt/lede/mtk-openwrt-lede-4.2.1.0/tools/squashfs4'
make[2]: *** [tools/Makefile:153: tools/squashfs4/compile] Error 2
make[2]: Leaving directory '/home/snow/openwrt/lede/mtk-openwrt-lede-4.2.1.0'
make[1]: *** [tools/Makefile:150: /home/snow/openwrt/lede/mtk-openwrt-lede-4.2.1.0/staging_dir/target-mipsel_24kc_musl-1.1.16/stamp/.tools_install_yyynyyyyyynyyyyynyynnyyyyyyynyyyyyyyyyyyyyyyynyynynnyyynnny] Error 2
make[1]: Leaving directory '/home/snow/openwrt/lede/mtk-openwrt-lede-4.2.1.0'
make: *** [/home/snow/openwrt/lede/mtk-openwrt-lede-4.2.1.0/include/toplevel.mk:199: world] Error 2
snow@snow:~/openwrt/lede/mtk-openwrt-lede-4.2.1.0$
解决,下述两个文件添加#include <sys/sysmacros.h>
,参考博文
snow@snow:~/openwrt/lede/mtk-openwrt-lede-4.2.1.0$ vim build_dir/host/squashfs4.2/squashfs-tools/mksquashfs.c
snow@snow:~/openwrt/lede/mtk-openwrt-lede-4.2.1.0$ vim build_dir/host/squashfs4.2/squashfs-tools/unsquashfs.c
snow@snow:~/openwrt/lede/mtk-openwrt-lede-4.2.1.0$
【问题】 gcc-5.4.0 相关问题
use of an operand of type ‘bool’ in ‘operator++’ is forbidden in C++17
/home/snow/openwrt/lede/mtk-openwrt-lede-4.2.1.0/build_dir/toolchain-mipsel_24kc_gcc-5.4.0_musl-1.1.16/gcc-5.4.0/gcc/recog.h: In member function 'rtx_def* insn_gen_fn::operator()(rtx, rtx, rtx, rtx, rtx, rtx, rtx, rtx, rtx, rtx, rtx, rtx, rtx, rtx, rtx, rtx) const':
/home/snow/openwrt/lede/mtk-openwrt-lede-4.2.1.0/build_dir/toolchain-mipsel_24kc_gcc-5.4.0_musl-1.1.16/gcc-5.4.0/gcc/recog.h:317:170: warning: cast between incompatible function types from 'insn_gen_fn::stored_funcptr' {aka 'rtx_def* (*)()'} to 'insn_gen_fn::f16' {aka 'rtx_def* (*)(rtx_def*, rtx_def*, rtx_def*, rtx_def*, rtx_def*, rtx_def*, rtx_def*, rtx_def*, rtx_def*, rtx_def*, rtx_def*, rtx_def*, rtx_def*, rtx_def*, rtx_def*, rtx_def*)'} [-Wcast-function-type]
317 | rtx operator () (rtx a0, rtx a1, rtx a2, rtx a3, rtx a4, rtx a5, rtx a6, rtx a7, rtx a8, rtx a9, rtx a10, rtx a11, rtx a12, rtx a13, rtx a14, rtx a15) const { return ((f16)func) (a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15); }
| ^~~~~~~~~
/home/snow/openwrt/lede/mtk-openwrt-lede-4.2.1.0/build_dir/toolchain-mipsel_24kc_gcc-5.4.0_musl-1.1.16/gcc-5.4.0/gcc/reload1.c: In function 'void init_reload()':
/home/snow/openwrt/lede/mtk-openwrt-lede-4.2.1.0/build_dir/toolchain-mipsel_24kc_gcc-5.4.0_musl-1.1.16/gcc-5.4.0/gcc/reload1.c:115:24: error: use of an operand of type 'bool' in 'operator++' is forbidden in C++17
115 | (this_target_reload->x_spill_indirect_levels)
| ~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~
/home/snow/openwrt/lede/mtk-openwrt-lede-4.2.1.0/build_dir/toolchain-mipsel_24kc_gcc-5.4.0_musl-1.1.16/gcc-5.4.0/gcc/reload1.c:470:7: note: in expansion of macro 'spill_indirect_levels'
470 | spill_indirect_levels++;
| ^~~~~~~~~~~~~~~~~~~~~
/home/snow/openwrt/lede/mtk-openwrt-lede-4.2.1.0/build_dir/toolchain-mipsel_24kc_gcc-5.4.0_musl-1.1.16/gcc-5.4.0/gcc/reload1.c: In function 'void elimination_effects(rtx, machine_mode)':
/home/snow/openwrt/lede/mtk-openwrt-lede-4.2.1.0/build_dir/toolchain-mipsel_24kc_gcc-5.4.0_musl-1.1.16/gcc-5.4.0/gcc/reload1.c:3085:7: warning: this statement may fall through [-Wimplicit-fallthrough=]
3085 | if (code == POST_MODIFY || code == PRE_MODIFY)
| ^~
/home/snow/openwrt/lede/mtk-openwrt-lede-4.2.1.0/build_dir/toolchain-mipsel_24kc_gcc-5.4.0_musl-1.1.16/gcc-5.4.0/gcc/reload1.c:3089:5: note: here
3089 | case STRICT_LOW_PART:
| ^~~~
make[5]: *** [Makefile:1065: reload1.o] Error 1
make[5]: Leaving directory '/home/snow/openwrt/lede/mtk-openwrt-lede-4.2.1.0/build_dir/toolchain-mipsel_24kc_gcc-5.4.0_musl-1.1.16/gcc-5.4.0-initial/gcc'
make[4]: *** [Makefile:4101: all-gcc] Error 2
make[4]: Leaving directory '/home/snow/openwrt/lede/mtk-openwrt-lede-4.2.1.0/build_dir/toolchain-mipsel_24kc_gcc-5.4.0_musl-1.1.16/gcc-5.4.0-initial'
make[3]: *** [Makefile:37: /home/snow/openwrt/lede/mtk-openwrt-lede-4.2.1.0/build_dir/toolchain-mipsel_24kc_gcc-5.4.0_musl-1.1.16/gcc-5.4.0-initial/.built] Error 2
make[3]: Leaving directory '/home/snow/openwrt/lede/mtk-openwrt-lede-4.2.1.0/toolchain/gcc/initial'
make[2]: *** [toolchain/Makefile:92: toolchain/gcc/initial/compile] Error 2
make[2]: Leaving directory '/home/snow/openwrt/lede/mtk-openwrt-lede-4.2.1.0'
make[1]: *** [toolchain/Makefile:89: /home/snow/openwrt/lede/mtk-openwrt-lede-4.2.1.0/staging_dir/toolchain-mipsel_24kc_gcc-5.4.0_musl-1.1.16/stamp/.toolchain_install] Error 2
make[1]: Leaving directory '/home/snow/openwrt/lede/mtk-openwrt-lede-4.2.1.0'
make: *** [/home/snow/openwrt/lede/mtk-openwrt-lede-4.2.1.0/include/toplevel.mk:199: world] Error 2
snow@snow:~/openwrt/lede/mtk-openwrt-lede-4.2.1.0$
snow@snow:~/openwrt/lede/mtk-openwrt-lede-4.2.1.0$
未解决,降低gcc/g++版本
snow@snow:~/openwrt/lede/mtk-openwrt-lede-4.2.1.0$ rm -rf build_dir/toolchain-mipsel_24kc_gcc-5.4.0_musl-1.1.16/gcc-5.4.0
snow@snow:~/openwrt/lede/mtk-openwrt-lede-4.2.1.0$ rm -rf build_dir/toolchain-mipsel_24kc_gcc-5.4.0_musl-1.1.16/gcc-5.4.0-initial
snow@snow:~/openwrt/lede/mtk-openwrt-lede-4.2.1.0$
继续查找资料,本博文建议修改mk,在下述代码位置第320行,添加–std=c++03,继续编译,依旧报错
315 # compilers to use to create programs which must be run in the build
316 # environment.
317 AR_FOR_BUILD = $(AR)
318 AS_FOR_BUILD = $(AS)
319 CC_FOR_BUILD = $(CC)
320 CFLAGS_FOR_BUILD =
321 CXXFLAGS_FOR_BUILD = -g -O2
322 CXX_FOR_BUILD = $(CXX)
323 DLLTOOL_FOR_BUILD = $(DLLTOOL)
324 GCJ_FOR_BUILD = $(GCJ)
325 GFORTRAN_FOR_BUILD = $(GFORTRAN)
326 GOC_FOR_BUILD = $(GOC)
327 LDFLAGS_FOR_BUILD =
328 LD_FOR_BUILD = $(LD)
329 NM_FOR_BUILD = $(NM)
330 RANLIB_FOR_BUILD = $(RANLIB)
331 WINDMC_FOR_BUILD = $(WINDMC)
332 WINDRES_FOR_BUILD = $(WINDRES)
问题分析,完整出错信息如下
~/openwrt/lede/mtk-openwrt-lede-4.2.1.0 $ make -j1 V=s
make[1]: Entering directory '/home/snow/openwrt/lede/mtk-openwrt-lede-4.2.1.0'
make[2]: Entering directory '/home/snow/openwrt/lede/mtk-openwrt-lede-4.2.1.0'
+ mkdir -p /home/snow/openwrt/lede/mtk-openwrt-lede-4.2.1.0/staging_dir/target-mipsel_24kc_musl-1.1.16
+ cd /home/snow/openwrt/lede/mtk-openwrt-lede-4.2.1.0/staging_dir/target-mipsel_24kc_musl-1.1.16
+ mkdir -p bin lib include stamp
mkdir -p /home/snow/openwrt/lede/mtk-openwrt-lede-4.2.1.0/build_dir/target-mipsel_24kc_musl-1.1.16/stamp
touch /home/snow/openwrt/lede/mtk-openwrt-lede-4.2.1.0/staging_dir/target-mipsel_24kc_musl-1.1.16/.prepared
make[3]: Entering directory '/home/snow/openwrt/lede/mtk-openwrt-lede-4.2.1.0/toolchain/gdb'
make[3]: Nothing to be done for 'prepare'.
make[3]: Leaving directory '/home/snow/openwrt/lede/mtk-openwrt-lede-4.2.1.0/toolchain/gdb'
make[3]: Entering directory '/home/snow/openwrt/lede/mtk-openwrt-lede-4.2.1.0/toolchain/gdb'
make[3]: Nothing to be done for 'compile'.
make[3]: Leaving directory '/home/snow/openwrt/lede/mtk-openwrt-lede-4.2.1.0/toolchain/gdb'
make[3]: Entering directory '/home/snow/openwrt/lede/mtk-openwrt-lede-4.2.1.0/toolchain/gdb'
make[3]: Nothing to be done for 'install'.
make[3]: Leaving directory '/home/snow/openwrt/lede/mtk-openwrt-lede-4.2.1.0/toolchain/gdb'
make[3]: Entering directory '/home/snow/openwrt/lede/mtk-openwrt-lede-4.2.1.0/toolchain/binutils'
make[3]: Nothing to be done for 'prepare'.
make[3]: Leaving directory '/home/snow/openwrt/lede/mtk-openwrt-lede-4.2.1.0/toolchain/binutils'
make[3]: Entering directory '/home/snow/openwrt/lede/mtk-openwrt-lede-4.2.1.0/toolchain/binutils'
make[3]: Nothing to be done for 'compile'.
make[3]: Leaving directory '/home/snow/openwrt/lede/mtk-openwrt-lede-4.2.1.0/toolchain/binutils'
make[3]: Entering directory '/home/snow/openwrt/lede/mtk-openwrt-lede-4.2.1.0/toolchain/binutils'
make[3]: Nothing to be done for 'install'.
make[3]: Leaving directory '/home/snow/openwrt/lede/mtk-openwrt-lede-4.2.1.0/toolchain/binutils'
make[3]: Entering directory '/home/snow/openwrt/lede/mtk-openwrt-lede-4.2.1.0/toolchain/gcc/initial'
make[3]: Nothing to be done for 'prepare'.
make[3]: Leaving directory '/home/snow/openwrt/lede/mtk-openwrt-lede-4.2.1.0/toolchain/gcc/initial'
make[3]: Entering directory '/home/snow/openwrt/lede/mtk-openwrt-lede-4.2.1.0/toolchain/gcc/initial'
export SHELL="bash"; make CFLAGS="-O2 -I/home/snow/openwrt/lede/mtk-openwrt-lede-4.2.1.0/staging_dir/host/include -I/home/snow/openwrt/lede/mtk-openwrt-lede-4.2.1.0/staging_dir/host/usr/include " CFLAGS_FOR_TARGET="-Os -pipe -mno-branch-likely -mips32r2 -mtune=24kc -fno-caller-saves -fno-plt -fhonour-copts -Wno-error=unused-but-set-variable -Wno-error=unused-result -msoft-float" CXXFLAGS_FOR_TARGET="-Os -pipe -mno-branch-likely -mips32r2 -mtune=24kc -fno-caller-saves -fno-plt -fhonour-copts -Wno-error=unused-but-set-variable -Wno-error=unused-result -msoft-float" GOCFLAGS_FOR_TARGET="-Os -pipe -mno-branch-likely -mips32r2 -mtune=24kc -fno-caller-saves -fno-plt -fhonour-copts -Wno-error=unused-but-set-variable -Wno-error=unused-result -msoft-float" -C /home/snow/openwrt/lede/mtk-openwrt-lede-4.2.1.0/build_dir/toolchain-mipsel_24kc_gcc-5.4.0_musl-1.1.16/gcc-5.4.0-initial all-build-libiberty all-gcc all-target-libgcc
make[4]: Entering directory '/home/snow/openwrt/lede/mtk-openwrt-lede-4.2.1.0/build_dir/toolchain-mipsel_24kc_gcc-5.4.0_musl-1.1.16/gcc-5.4.0-initial'
make[5]: Entering directory '/home/snow/openwrt/lede/mtk-openwrt-lede-4.2.1.0/build_dir/toolchain-mipsel_24kc_gcc-5.4.0_musl-1.1.16/gcc-5.4.0-initial/build-x86_64-linux-gnu/libiberty'
make[6]: Entering directory '/home/snow/openwrt/lede/mtk-openwrt-lede-4.2.1.0/build_dir/toolchain-mipsel_24kc_gcc-5.4.0_musl-1.1.16/gcc-5.4.0-initial/build-x86_64-linux-gnu/libiberty/testsuite'
make[6]: Nothing to be done for 'all'.
make[6]: Leaving directory '/home/snow/openwrt/lede/mtk-openwrt-lede-4.2.1.0/build_dir/toolchain-mipsel_24kc_gcc-5.4.0_musl-1.1.16/gcc-5.4.0-initial/build-x86_64-linux-gnu/libiberty/testsuite'
make[5]: Leaving directory '/home/snow/openwrt/lede/mtk-openwrt-lede-4.2.1.0/build_dir/toolchain-mipsel_24kc_gcc-5.4.0_musl-1.1.16/gcc-5.4.0-initial/build-x86_64-linux-gnu/libiberty'
make[5]: Entering directory '/home/snow/openwrt/lede/mtk-openwrt-lede-4.2.1.0/build_dir/toolchain-mipsel_24kc_gcc-5.4.0_musl-1.1.16/gcc-5.4.0-initial/libiberty'
make[6]: Entering directory '/home/snow/openwrt/lede/mtk-openwrt-lede-4.2.1.0/build_dir/toolchain-mipsel_24kc_gcc-5.4.0_musl-1.1.16/gcc-5.4.0-initial/libiberty/testsuite'
make[6]: Nothing to be done for 'all'.
make[6]: Leaving directory '/home/snow/openwrt/lede/mtk-openwrt-lede-4.2.1.0/build_dir/toolchain-mipsel_24kc_gcc-5.4.0_musl-1.1.16/gcc-5.4.0-initial/libiberty/testsuite'
make[5]: Leaving directory '/home/snow/openwrt/lede/mtk-openwrt-lede-4.2.1.0/build_dir/toolchain-mipsel_24kc_gcc-5.4.0_musl-1.1.16/gcc-5.4.0-initial/libiberty'
make[5]: Entering directory '/home/snow/openwrt/lede/mtk-openwrt-lede-4.2.1.0/build_dir/toolchain-mipsel_24kc_gcc-5.4.0_musl-1.1.16/gcc-5.4.0-initial/lto-plugin'
make all-am
make[6]: Entering directory '/home/snow/openwrt/lede/mtk-openwrt-lede-4.2.1.0/build_dir/toolchain-mipsel_24kc_gcc-5.4.0_musl-1.1.16/gcc-5.4.0-initial/lto-plugin'
make[6]: Leaving directory '/home/snow/openwrt/lede/mtk-openwrt-lede-4.2.1.0/build_dir/toolchain-mipsel_24kc_gcc-5.4.0_musl-1.1.16/gcc-5.4.0-initial/lto-plugin'
make[5]: Leaving directory '/home/snow/openwrt/lede/mtk-openwrt-lede-4.2.1.0/build_dir/toolchain-mipsel_24kc_gcc-5.4.0_musl-1.1.16/gcc-5.4.0-initial/lto-plugin'
make[5]: Entering directory '/home/snow/openwrt/lede/mtk-openwrt-lede-4.2.1.0/build_dir/toolchain-mipsel_24kc_gcc-5.4.0_musl-1.1.16/gcc-5.4.0-initial/intl'
make[5]: Nothing to be done for 'all'.
make[5]: Leaving directory '/home/snow/openwrt/lede/mtk-openwrt-lede-4.2.1.0/build_dir/toolchain-mipsel_24kc_gcc-5.4.0_musl-1.1.16/gcc-5.4.0-initial/intl'
make[5]: Entering directory '/home/snow/openwrt/lede/mtk-openwrt-lede-4.2.1.0/build_dir/toolchain-mipsel_24kc_gcc-5.4.0_musl-1.1.16/gcc-5.4.0-initial/build-x86_64-linux-gnu/fixincludes'
make[5]: Nothing to be done for 'all'.
make[5]: Leaving directory '/home/snow/openwrt/lede/mtk-openwrt-lede-4.2.1.0/build_dir/toolchain-mipsel_24kc_gcc-5.4.0_musl-1.1.16/gcc-5.4.0-initial/build-x86_64-linux-gnu/fixincludes'
make[5]: Entering directory '/home/snow/openwrt/lede/mtk-openwrt-lede-4.2.1.0/build_dir/toolchain-mipsel_24kc_gcc-5.4.0_musl-1.1.16/gcc-5.4.0-initial/build-x86_64-linux-gnu/libcpp'
test -f config.h || (rm -f stamp-h1 && make stamp-h1)
make[5]: Leaving directory '/home/snow/openwrt/lede/mtk-openwrt-lede-4.2.1.0/build_dir/toolchain-mipsel_24kc_gcc-5.4.0_musl-1.1.16/gcc-5.4.0-initial/build-x86_64-linux-gnu/libcpp'
make[5]: Entering directory '/home/snow/openwrt/lede/mtk-openwrt-lede-4.2.1.0/build_dir/toolchain-mipsel_24kc_gcc-5.4.0_musl-1.1.16/gcc-5.4.0-initial/zlib'
true "AR_FLAGS=rc" "CC_FOR_BUILD=x86_64-linux-gnu-gcc" "CFLAGS=-O2 -I/home/snow/openwrt/lede/mtk-openwrt-lede-4.2.1.0/staging_dir/host/include -I/home/snow/openwrt/lede/mtk-openwrt-lede-4.2.1.0/staging_dir/host/usr/include " "CXXFLAGS=-g -O2" "CFLAGS_FOR_BUILD=--std=c++03" "CFLAGS_FOR_TARGET=-Os -pipe -mno-branch-likely -mips32r2 -mtune=24kc -fno-caller-saves -fno-plt -fhonour-copts -Wno-error=unused-but-set-variable -Wno-error=unused-result -msoft-float" "INSTALL=/usr/bin/install -c" "INSTALL_DATA=/usr/bin/install -c -m 644" "INSTALL_PROGRAM=/usr/bin/install -c" "INSTALL_SCRIPT=/usr/bin/install -c" "LDFLAGS=" "LIBCFLAGS=-O2 -I/home/snow/openwrt/lede/mtk-openwrt-lede-4.2.1.0/staging_dir/host/include -I/home/snow/openwrt/lede/mtk-openwrt-lede-4.2.1.0/staging_dir/host/usr/include " "LIBCFLAGS_FOR_TARGET=-Os -pipe -mno-branch-likely -mips32r2 -mtune=24kc -fno-caller-saves -fno-plt -fhonour-copts -Wno-error=unused-but-set-variable -Wno-error=unused-result -msoft-float" "MAKE=make" "MAKEINFO=/home/snow/openwrt/lede/mtk-openwrt-lede-4.2.1.0/build_dir/toolchain-mipsel_24kc_gcc-5.4.0_musl-1.1.16/gcc-5.4.0/missing makeinfo --split-size=5000000 " "PICFLAG=" "PICFLAG_FOR_TARGET=" "SHELL=/bin/bash" "EXPECT=expect" "RUNTEST=runtest" "RUNTESTFLAGS=" "exec_prefix=/home/snow/openwrt/lede/mtk-openwrt-lede-4.2.1.0/staging_dir/toolchain-mipsel_24kc_gcc-5.4.0_musl-1.1.16" "infodir=/home/snow/openwrt/lede/mtk-openwrt-lede-4.2.1.0/staging_dir/toolchain-mipsel_24kc_gcc-5.4.0_musl-1.1.16/share/info" "libdir=/home/snow/openwrt/lede/mtk-openwrt-lede-4.2.1.0/staging_dir/toolchain-mipsel_24kc_gcc-5.4.0_musl-1.1.16/lib" "prefix=/home/snow/openwrt/lede/mtk-openwrt-lede-4.2.1.0/staging_dir/toolchain-mipsel_24kc_gcc-5.4.0_musl-1.1.16" "tooldir=/home/snow/openwrt/lede/mtk-openwrt-lede-4.2.1.0/staging_dir/toolchain-mipsel_24kc_gcc-5.4.0_musl-1.1.16/mipsel-openwrt-linux-musl" "AR=x86_64-linux-gnu-ar" "AS=x86_64-linux-gnu-as" "CC=x86_64-linux-gnu-gcc" "CXX=x86_64-linux-gnu-g++" "LD=x86_64-linux-gnu-ld" "LIBCFLAGS=-O2 -I/home/snow/openwrt/lede/mtk-openwrt-lede-4.2.1.0/staging_dir/host/include -I/home/snow/openwrt/lede/mtk-openwrt-lede-4.2.1.0/staging_dir/host/usr/include " "NM=x86_64-linux-gnu-nm" "PICFLAG=" "RANLIB=x86_64-linux-gnu-ranlib" "DESTDIR=" DO=all multi-do # make
make[5]: Leaving directory '/home/snow/openwrt/lede/mtk-openwrt-lede-4.2.1.0/build_dir/toolchain-mipsel_24kc_gcc-5.4.0_musl-1.1.16/gcc-5.4.0-initial/zlib'
make[5]: Entering directory '/home/snow/openwrt/lede/mtk-openwrt-lede-4.2.1.0/build_dir/toolchain-mipsel_24kc_gcc-5.4.0_musl-1.1.16/gcc-5.4.0-initial/libbacktrace'
make all-am
make[6]: Entering directory '/home/snow/openwrt/lede/mtk-openwrt-lede-4.2.1.0/build_dir/toolchain-mipsel_24kc_gcc-5.4.0_musl-1.1.16/gcc-5.4.0-initial/libbacktrace'
true DO=all multi-do # make
make[6]: Leaving directory '/home/snow/openwrt/lede/mtk-openwrt-lede-4.2.1.0/build_dir/toolchain-mipsel_24kc_gcc-5.4.0_musl-1.1.16/gcc-5.4.0-initial/libbacktrace'
make[5]: Leaving directory '/home/snow/openwrt/lede/mtk-openwrt-lede-4.2.1.0/build_dir/toolchain-mipsel_24kc_gcc-5.4.0_musl-1.1.16/gcc-5.4.0-initial/libbacktrace'
make[5]: Entering directory '/home/snow/openwrt/lede/mtk-openwrt-lede-4.2.1.0/build_dir/toolchain-mipsel_24kc_gcc-5.4.0_musl-1.1.16/gcc-5.4.0-initial/libcpp'
test -f config.h || (rm -f stamp-h1 && make stamp-h1)
make[5]: Leaving directory '/home/snow/openwrt/lede/mtk-openwrt-lede-4.2.1.0/build_dir/toolchain-mipsel_24kc_gcc-5.4.0_musl-1.1.16/gcc-5.4.0-initial/libcpp'
make[5]: Entering directory '/home/snow/openwrt/lede/mtk-openwrt-lede-4.2.1.0/build_dir/toolchain-mipsel_24kc_gcc-5.4.0_musl-1.1.16/gcc-5.4.0-initial/libdecnumber'
make[5]: Nothing to be done for 'all'.
make[5]: Leaving directory '/home/snow/openwrt/lede/mtk-openwrt-lede-4.2.1.0/build_dir/toolchain-mipsel_24kc_gcc-5.4.0_musl-1.1.16/gcc-5.4.0-initial/libdecnumber'
make[5]: Entering directory '/home/snow/openwrt/lede/mtk-openwrt-lede-4.2.1.0/build_dir/toolchain-mipsel_24kc_gcc-5.4.0_musl-1.1.16/gcc-5.4.0-initial/fixincludes'
make[5]: Nothing to be done for 'all'.
make[5]: Leaving directory '/home/snow/openwrt/lede/mtk-openwrt-lede-4.2.1.0/build_dir/toolchain-mipsel_24kc_gcc-5.4.0_musl-1.1.16/gcc-5.4.0-initial/fixincludes'
make[5]: Entering directory '/home/snow/openwrt/lede/mtk-openwrt-lede-4.2.1.0/build_dir/toolchain-mipsel_24kc_gcc-5.4.0_musl-1.1.16/gcc-5.4.0-initial/gcc'
x86_64-linux-gnu-g++ -c -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 -I. -I. -I/home/snow/openwrt/lede/mtk-openwrt-lede-4.2.1.0/build_dir/toolchain-mipsel_24kc_gcc-5.4.0_musl-1.1.16/gcc-5.4.0/gcc -I/home/snow/openwrt/lede/mtk-openwrt-lede-4.2.1.0/build_dir/toolchain-mipsel_24kc_gcc-5.4.0_musl-1.1.16/gcc-5.4.0/gcc/. -I/home/snow/openwrt/lede/mtk-openwrt-lede-4.2.1.0/build_dir/toolchain-mipsel_24kc_gcc-5.4.0_musl-1.1.16/gcc-5.4.0/gcc/../include -I/home/snow/openwrt/lede/mtk-openwrt-lede-4.2.1.0/build_dir/toolchain-mipsel_24kc_gcc-5.4.0_musl-1.1.16/gcc-5.4.0/gcc/../libcpp/include -I/home/snow/openwrt/lede/mtk-openwrt-lede-4.2.1.0/staging_dir/host/include -I/home/snow/openwrt/lede/mtk-openwrt-lede-4.2.1.0/staging_dir/host/include -I/home/snow/openwrt/lede/mtk-openwrt-lede-4.2.1.0/staging_dir/host/include -I/home/snow/openwrt/lede/mtk-openwrt-lede-4.2.1.0/build_dir/toolchain-mipsel_24kc_gcc-5.4.0_musl-1.1.16/gcc-5.4.0/gcc/../libdecnumber -I/home/snow/openwrt/lede/mtk-openwrt-lede-4.2.1.0/build_dir/toolchain-mipsel_24kc_gcc-5.4.0_musl-1.1.16/gcc-5.4.0/gcc/../libdecnumber/dpd -I../libdecnumber -I/home/snow/openwrt/lede/mtk-openwrt-lede-4.2.1.0/build_dir/toolchain-mipsel_24kc_gcc-5.4.0_musl-1.1.16/gcc-5.4.0/gcc/../libbacktrace -o reload1.o -MT reload1.o -MMD -MP -MF ./.deps/reload1.TPo /home/snow/openwrt/lede/mtk-openwrt-lede-4.2.1.0/build_dir/toolchain-mipsel_24kc_gcc-5.4.0_musl-1.1.16/gcc-5.4.0/gcc/reload1.c
In file included from ./tm.h:29,
from /home/snow/openwrt/lede/mtk-openwrt-lede-4.2.1.0/build_dir/toolchain-mipsel_24kc_gcc-5.4.0_musl-1.1.16/gcc-5.4.0/gcc/reload1.c:23:
/home/snow/openwrt/lede/mtk-openwrt-lede-4.2.1.0/build_dir/toolchain-mipsel_24kc_gcc-5.4.0_musl-1.1.16/gcc-5.4.0/gcc/config/elfos.h:102:21: warning: invalid suffix on literal; C++11 requires a space between literal and string macro [-Wliteral-suffix]
102 | fprintf ((FILE), "%s"HOST_WIDE_INT_PRINT_UNSIGNED"\n",\
| ^
/home/snow/openwrt/lede/mtk-openwrt-lede-4.2.1.0/build_dir/toolchain-mipsel_24kc_gcc-5.4.0_musl-1.1.16/gcc-5.4.0/gcc/config/elfos.h:170:24: warning: invalid suffix on literal; C++11 requires a space between literal and string macro [-Wliteral-suffix]
170 | fprintf ((FILE), ","HOST_WIDE_INT_PRINT_UNSIGNED",%u\n", \
| ^
In file included from ./tm.h:35,
from /home/snow/openwrt/lede/mtk-openwrt-lede-4.2.1.0/build_dir/toolchain-mipsel_24kc_gcc-5.4.0_musl-1.1.16/gcc-5.4.0/gcc/reload1.c:23:
/home/snow/openwrt/lede/mtk-openwrt-lede-4.2.1.0/build_dir/toolchain-mipsel_24kc_gcc-5.4.0_musl-1.1.16/gcc-5.4.0/gcc/config/mips/mips.h:2913:20: warning: invalid suffix on literal; C++11 requires a space between literal and string macro [-Wliteral-suffix]
2913 | fprintf (STREAM, "\t.space\t"HOST_WIDE_INT_PRINT_UNSIGNED"\n", (SIZE))
| ^
In file included from ./tm.h:50,
from /home/snow/openwrt/lede/mtk-openwrt-lede-4.2.1.0/build_dir/toolchain-mipsel_24kc_gcc-5.4.0_musl-1.1.16/gcc-5.4.0/gcc/reload1.c:23:
/home/snow/openwrt/lede/mtk-openwrt-lede-4.2.1.0/build_dir/toolchain-mipsel_24kc_gcc-5.4.0_musl-1.1.16/gcc-5.4.0/gcc/defaults.h:126:24: warning: invalid suffix on literal; C++11 requires a space between literal and string macro [-Wliteral-suffix]
126 | fprintf ((FILE), ","HOST_WIDE_INT_PRINT_UNSIGNED",%u\n", \
| ^
In file included from /home/snow/openwrt/lede/mtk-openwrt-lede-4.2.1.0/build_dir/toolchain-mipsel_24kc_gcc-5.4.0_musl-1.1.16/gcc-5.4.0/gcc/reload1.c:68:
/home/snow/openwrt/lede/mtk-openwrt-lede-4.2.1.0/build_dir/toolchain-mipsel_24kc_gcc-5.4.0_musl-1.1.16/gcc-5.4.0/gcc/recog.h:357:5: warning: this use of "defined" may not be portable [-Wexpansion-to-defined]
357 | #if HAVE_DESIGNATED_UNION_INITIALIZERS
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /home/snow/openwrt/lede/mtk-openwrt-lede-4.2.1.0/build_dir/toolchain-mipsel_24kc_gcc-5.4.0_musl-1.1.16/gcc-5.4.0/gcc/reload1.c:68:
/home/snow/openwrt/lede/mtk-openwrt-lede-4.2.1.0/build_dir/toolchain-mipsel_24kc_gcc-5.4.0_musl-1.1.16/gcc-5.4.0/gcc/recog.h: In member function 'rtx_def* insn_gen_fn::operator()(rtx) const':
/home/snow/openwrt/lede/mtk-openwrt-lede-4.2.1.0/build_dir/toolchain-mipsel_24kc_gcc-5.4.0_musl-1.1.16/gcc-5.4.0/gcc/recog.h:302:44: warning: cast between incompatible function types from 'insn_gen_fn::stored_funcptr' {aka 'rtx_def* (*)()'} to 'insn_gen_fn::f1' {aka 'rtx_def* (*)(rtx_def*)'} [-Wcast-function-type]
302 | rtx operator () (rtx a0) const { return ((f1)func) (a0); }
| ^~~~~~~~
/home/snow/openwrt/lede/mtk-openwrt-lede-4.2.1.0/build_dir/toolchain-mipsel_24kc_gcc-5.4.0_musl-1.1.16/gcc-5.4.0/gcc/recog.h: In member function 'rtx_def* insn_gen_fn::operator()(rtx, rtx) const':
/home/snow/openwrt/lede/mtk-openwrt-lede-4.2.1.0/build_dir/toolchain-mipsel_24kc_gcc-5.4.0_musl-1.1.16/gcc-5.4.0/gcc/recog.h:303:52: warning: cast between incompatible function types from 'insn_gen_fn::stored_funcptr' {aka 'rtx_def* (*)()'} to 'insn_gen_fn::f2' {aka 'rtx_def* (*)(rtx_def*, rtx_def*)'} [-Wcast-function-type]
303 | rtx operator () (rtx a0, rtx a1) const { return ((f2)func) (a0, a1); }
| ^~~~~~~~
/home/snow/openwrt/lede/mtk-openwrt-lede-4.2.1.0/build_dir/toolchain-mipsel_24kc_gcc-5.4.0_musl-1.1.16/gcc-5.4.0/gcc/recog.h: In member function 'rtx_def* insn_gen_fn::operator()(rtx, rtx, rtx) const':
/home/snow/openwrt/lede/mtk-openwrt-lede-4.2.1.0/build_dir/toolchain-mipsel_24kc_gcc-5.4.0_musl-1.1.16/gcc-5.4.0/gcc/recog.h:304:60: warning: cast between incompatible function types from 'insn_gen_fn::stored_funcptr' {aka 'rtx_def* (*)()'} to 'insn_gen_fn::f3' {aka 'rtx_def* (*)(rtx_def*, rtx_def*, rtx_def*)'} [-Wcast-function-type]
304 | rtx operator () (rtx a0, rtx a1, rtx a2) const { return ((f3)func) (a0, a1, a2); }
| ^~~~~~~~
/home/snow/openwrt/lede/mtk-openwrt-lede-4.2.1.0/build_dir/toolchain-mipsel_24kc_gcc-5.4.0_musl-1.1.16/gcc-5.4.0/gcc/recog.h: In member function 'rtx_def* insn_gen_fn::operator()(rtx, rtx, rtx, rtx) const':
/home/snow/openwrt/lede/mtk-openwrt-lede-4.2.1.0/build_dir/toolchain-mipsel_24kc_gcc-5.4.0_musl-1.1.16/gcc-5.4.0/gcc/recog.h:305:68: warning: cast between incompatible function types from 'insn_gen_fn::stored_funcptr' {aka 'rtx_def* (*)()'} to 'insn_gen_fn::f4' {aka 'rtx_def* (*)(rtx_def*, rtx_def*, rtx_def*, rtx_def*)'} [-Wcast-function-type]
305 | rtx operator () (rtx a0, rtx a1, rtx a2, rtx a3) const { return ((f4)func) (a0, a1, a2, a3); }
| ^~~~~~~~
/home/snow/openwrt/lede/mtk-openwrt-lede-4.2.1.0/build_dir/toolchain-mipsel_24kc_gcc-5.4.0_musl-1.1.16/gcc-5.4.0/gcc/recog.h: In member function 'rtx_def* insn_gen_fn::operator()(rtx, rtx, rtx, rtx, rtx) const':
/home/snow/openwrt/lede/mtk-openwrt-lede-4.2.1.0/build_dir/toolchain-mipsel_24kc_gcc-5.4.0_musl-1.1.16/gcc-5.4.0/gcc/recog.h:306:76: warning: cast between incompatible function types from 'insn_gen_fn::stored_funcptr' {aka 'rtx_def* (*)()'} to 'insn_gen_fn::f5' {aka 'rtx_def* (*)(rtx_def*, rtx_def*, rtx_def*, rtx_def*, rtx_def*)'} [-Wcast-function-type]
306 | rtx operator () (rtx a0, rtx a1, rtx a2, rtx a3, rtx a4) const { return ((f5)func) (a0, a1, a2, a3, a4); }
| ^~~~~~~~
/home/snow/openwrt/lede/mtk-openwrt-lede-4.2.1.0/build_dir/toolchain-mipsel_24kc_gcc-5.4.0_musl-1.1.16/gcc-5.4.0/gcc/recog.h: In member function 'rtx_def* insn_gen_fn::operator()(rtx, rtx, rtx, rtx, rtx, rtx) const':
/home/snow/openwrt/lede/mtk-openwrt-lede-4.2.1.0/build_dir/toolchain-mipsel_24kc_gcc-5.4.0_musl-1.1.16/gcc-5.4.0/gcc/recog.h:307:84: warning: cast between incompatible function types from 'insn_gen_fn::stored_funcptr' {aka 'rtx_def* (*)()'} to 'insn_gen_fn::f6' {aka 'rtx_def* (*)(rtx_def*, rtx_def*, rtx_def*, rtx_def*, rtx_def*, rtx_def*)'} [-Wcast-function-type]
307 | rtx operator () (rtx a0, rtx a1, rtx a2, rtx a3, rtx a4, rtx a5) const { return ((f6)func) (a0, a1, a2, a3, a4, a5); }
| ^~~~~~~~
/home/snow/openwrt/lede/mtk-openwrt-lede-4.2.1.0/build_dir/toolchain-mipsel_24kc_gcc-5.4.0_musl-1.1.16/gcc-5.4.0/gcc/recog.h: In member function 'rtx_def* insn_gen_fn::operator()(rtx, rtx, rtx, rtx, rtx, rtx, rtx) const':
/home/snow/openwrt/lede/mtk-openwrt-lede-4.2.1.0/build_dir/toolchain-mipsel_24kc_gcc-5.4.0_musl-1.1.16/gcc-5.4.0/gcc/recog.h:308:92: warning: cast between incompatible function types from 'insn_gen_fn::stored_funcptr' {aka 'rtx_def* (*)()'} to 'insn_gen_fn::f7' {aka 'rtx_def* (*)(rtx_def*, rtx_def*, rtx_def*, rtx_def*, rtx_def*, rtx_def*, rtx_def*)'} [-Wcast-function-type]
308 | rtx operator () (rtx a0, rtx a1, rtx a2, rtx a3, rtx a4, rtx a5, rtx a6) const { return ((f7)func) (a0, a1, a2, a3, a4, a5, a6); }
| ^~~~~~~~
In file included from /home/snow/openwrt/lede/mtk-openwrt-lede-4.2.1.0/build_dir/toolchain-mipsel_24kc_gcc-5.4.0_musl-1.1.16/gcc-5.4.0/gcc/reload1.c:68:
/home/snow/openwrt/lede/mtk-openwrt-lede-4.2.1.0/build_dir/toolchain-mipsel_24kc_gcc-5.4.0_musl-1.1.16/gcc-5.4.0/gcc/recog.h: In member function 'rtx_def* insn_gen_fn::operator()(rtx, rtx, rtx, rtx, rtx, rtx, rtx, rtx) const':
/home/snow/openwrt/lede/mtk-openwrt-lede-4.2.1.0/build_dir/toolchain-mipsel_24kc_gcc-5.4.0_musl-1.1.16/gcc-5.4.0/gcc/recog.h:309:100: warning: cast between incompatible function types from 'insn_gen_fn::stored_funcptr' {aka 'rtx_def* (*)()'} to 'insn_gen_fn::f8' {aka 'rtx_def* (*)(rtx_def*, rtx_def*, rtx_def*, rtx_def*, rtx_def*, rtx_def*, rtx_def*, rtx_def*)'} [-Wcast-function-type]
309 | rtx operator () (rtx a0, rtx a1, rtx a2, rtx a3, rtx a4, rtx a5, rtx a6, rtx a7) const { return ((f8)func) (a0, a1, a2, a3, a4, a5, a6, a7); }
| ^~~~~~~~
/home/snow/openwrt/lede/mtk-openwrt-lede-4.2.1.0/build_dir/toolchain-mipsel_24kc_gcc-5.4.0_musl-1.1.16/gcc-5.4.0/gcc/recog.h: In member function 'rtx_def* insn_gen_fn::operator()(rtx, rtx, rtx, rtx, rtx, rtx, rtx, rtx, rtx) const':
/home/snow/openwrt/lede/mtk-openwrt-lede-4.2.1.0/build_dir/toolchain-mipsel_24kc_gcc-5.4.0_musl-1.1.16/gcc-5.4.0/gcc/recog.h:310:108: warning: cast between incompatible function types from 'insn_gen_fn::stored_funcptr' {aka 'rtx_def* (*)()'} to 'insn_gen_fn::f9' {aka 'rtx_def* (*)(rtx_def*, rtx_def*, rtx_def*, rtx_def*, rtx_def*, rtx_def*, rtx_def*, rtx_def*, rtx_def*)'} [-Wcast-function-type]
310 | rtx operator () (rtx a0, rtx a1, rtx a2, rtx a3, rtx a4, rtx a5, rtx a6, rtx a7, rtx a8) const { return ((f9)func) (a0, a1, a2, a3, a4, a5, a6, a7, a8); }
| ^~~~~~~~
/home/snow/openwrt/lede/mtk-openwrt-lede-4.2.1.0/build_dir/toolchain-mipsel_24kc_gcc-5.4.0_musl-1.1.16/gcc-5.4.0/gcc/recog.h: In member function 'rtx_def* insn_gen_fn::operator()(rtx, rtx, rtx, rtx, rtx, rtx, rtx, rtx, rtx, rtx) const':
/home/snow/openwrt/lede/mtk-openwrt-lede-4.2.1.0/build_dir/toolchain-mipsel_24kc_gcc-5.4.0_musl-1.1.16/gcc-5.4.0/gcc/recog.h:311:116: warning: cast between incompatible function types from 'insn_gen_fn::stored_funcptr' {aka 'rtx_def* (*)()'} to 'insn_gen_fn::f10' {aka 'rtx_def* (*)(rtx_def*, rtx_def*, rtx_def*, rtx_def*, rtx_def*, rtx_def*, rtx_def*, rtx_def*, rtx_def*, rtx_def*)'} [-Wcast-function-type]
311 | rtx operator () (rtx a0, rtx a1, rtx a2, rtx a3, rtx a4, rtx a5, rtx a6, rtx a7, rtx a8, rtx a9) const { return ((f10)func) (a0, a1, a2, a3, a4, a5, a6, a7, a8, a9); }
| ^~~~~~~~~
/home/snow/openwrt/lede/mtk-openwrt-lede-4.2.1.0/build_dir/toolchain-mipsel_24kc_gcc-5.4.0_musl-1.1.16/gcc-5.4.0/gcc/recog.h: In member function 'rtx_def* insn_gen_fn::operator()(rtx, rtx, rtx, rtx, rtx, rtx, rtx, rtx, rtx, rtx, rtx) const':
/home/snow/openwrt/lede/mtk-openwrt-lede-4.2.1.0/build_dir/toolchain-mipsel_24kc_gcc-5.4.0_musl-1.1.16/gcc-5.4.0/gcc/recog.h:312:125: warning: cast between incompatible function types from 'insn_gen_fn::stored_funcptr' {aka 'rtx_def* (*)()'} to 'insn_gen_fn::f11' {aka 'rtx_def* (*)(rtx_def*, rtx_def*, rtx_def*, rtx_def*, rtx_def*, rtx_def*, rtx_def*, rtx_def*, rtx_def*, rtx_def*, rtx_def*)'} [-Wcast-function-type]
312 | rtx operator () (rtx a0, rtx a1, rtx a2, rtx a3, rtx a4, rtx a5, rtx a6, rtx a7, rtx a8, rtx a9, rtx a10) const { return ((f11)func) (a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10); }
| ^~~~~~~~~
/home/snow/openwrt/lede/mtk-openwrt-lede-4.2.1.0/build_dir/toolchain-mipsel_24kc_gcc-5.4.0_musl-1.1.16/gcc-5.4.0/gcc/recog.h: In member function 'rtx_def* insn_gen_fn::operator()(rtx, rtx, rtx, rtx, rtx, rtx, rtx, rtx, rtx, rtx, rtx, rtx) const':
/home/snow/openwrt/lede/mtk-openwrt-lede-4.2.1.0/build_dir/toolchain-mipsel_24kc_gcc-5.4.0_musl-1.1.16/gcc-5.4.0/gcc/recog.h:313:134: warning: cast between incompatible function types from 'insn_gen_fn::stored_funcptr' {aka 'rtx_def* (*)()'} to 'insn_gen_fn::f12' {aka 'rtx_def* (*)(rtx_def*, rtx_def*, rtx_def*, rtx_def*, rtx_def*, rtx_def*, rtx_def*, rtx_def*, rtx_def*, rtx_def*, rtx_def*, rtx_def*)'} [-Wcast-function-type]
313 | rtx operator () (rtx a0, rtx a1, rtx a2, rtx a3, rtx a4, rtx a5, rtx a6, rtx a7, rtx a8, rtx a9, rtx a10, rtx a11) const { return ((f12)func) (a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11); }
| ^~~~~~~~~
/home/snow/openwrt/lede/mtk-openwrt-lede-4.2.1.0/build_dir/toolchain-mipsel_24kc_gcc-5.4.0_musl-1.1.16/gcc-5.4.0/gcc/recog.h: In member function 'rtx_def* insn_gen_fn::operator()(rtx, rtx, rtx, rtx, rtx, rtx, rtx, rtx, rtx, rtx, rtx, rtx, rtx) const':
/home/snow/openwrt/lede/mtk-openwrt-lede-4.2.1.0/build_dir/toolchain-mipsel_24kc_gcc-5.4.0_musl-1.1.16/gcc-5.4.0/gcc/recog.h:314:143: warning: cast between incompatible function types from 'insn_gen_fn::stored_funcptr' {aka 'rtx_def* (*)()'} to 'insn_gen_fn::f13' {aka 'rtx_def* (*)(rtx_def*, rtx_def*, rtx_def*, rtx_def*, rtx_def*, rtx_def*, rtx_def*, rtx_def*, rtx_def*, rtx_def*, rtx_def*, rtx_def*, rtx_def*)'} [-Wcast-function-type]
314 | rtx operator () (rtx a0, rtx a1, rtx a2, rtx a3, rtx a4, rtx a5, rtx a6, rtx a7, rtx a8, rtx a9, rtx a10, rtx a11, rtx a12) const { return ((f13)func) (a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12); }
| ^~~~~~~~~
/home/snow/openwrt/lede/mtk-openwrt-lede-4.2.1.0/build_dir/toolchain-mipsel_24kc_gcc-5.4.0_musl-1.1.16/gcc-5.4.0/gcc/recog.h: In member function 'rtx_def* insn_gen_fn::operator()(rtx, rtx, rtx, rtx, rtx, rtx, rtx, rtx, rtx, rtx, rtx, rtx, rtx, rtx) const':
/home/snow/openwrt/lede/mtk-openwrt-lede-4.2.1.0/build_dir/toolchain-mipsel_24kc_gcc-5.4.0_musl-1.1.16/gcc-5.4.0/gcc/recog.h:315:152: warning: cast between incompatible function types from 'insn_gen_fn::stored_funcptr' {aka 'rtx_def* (*)()'} to 'insn_gen_fn::f14' {aka 'rtx_def* (*)(rtx_def*, rtx_def*, rtx_def*, rtx_def*, rtx_def*, rtx_def*, rtx_def*, rtx_def*, rtx_def*, rtx_def*, rtx_def*, rtx_def*, rtx_def*, rtx_def*)'} [-Wcast-function-type]
315 | rtx operator () (rtx a0, rtx a1, rtx a2, rtx a3, rtx a4, rtx a5, rtx a6, rtx a7, rtx a8, rtx a9, rtx a10, rtx a11, rtx a12, rtx a13) const { return ((f14)func) (a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13); }
| ^~~~~~~~~
/home/snow/openwrt/lede/mtk-openwrt-lede-4.2.1.0/build_dir/toolchain-mipsel_24kc_gcc-5.4.0_musl-1.1.16/gcc-5.4.0/gcc/recog.h: In member function 'rtx_def* insn_gen_fn::operator()(rtx, rtx, rtx, rtx, rtx, rtx, rtx, rtx, rtx, rtx, rtx, rtx, rtx, rtx, rtx) const':
/home/snow/openwrt/lede/mtk-openwrt-lede-4.2.1.0/build_dir/toolchain-mipsel_24kc_gcc-5.4.0_musl-1.1.16/gcc-5.4.0/gcc/recog.h:316:161: warning: cast between incompatible function types from 'insn_gen_fn::stored_funcptr' {aka 'rtx_def* (*)()'} to 'insn_gen_fn::f15' {aka 'rtx_def* (*)(rtx_def*, rtx_def*, rtx_def*, rtx_def*, rtx_def*, rtx_def*, rtx_def*, rtx_def*, rtx_def*, rtx_def*, rtx_def*, rtx_def*, rtx_def*, rtx_def*, rtx_def*)'} [-Wcast-function-type]
316 | rtx operator () (rtx a0, rtx a1, rtx a2, rtx a3, rtx a4, rtx a5, rtx a6, rtx a7, rtx a8, rtx a9, rtx a10, rtx a11, rtx a12, rtx a13, rtx a14) const { return ((f15)func) (a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14); }
| ^~~~~~~~~
/home/snow/openwrt/lede/mtk-openwrt-lede-4.2.1.0/build_dir/toolchain-mipsel_24kc_gcc-5.4.0_musl-1.1.16/gcc-5.4.0/gcc/recog.h: In member function 'rtx_def* insn_gen_fn::operator()(rtx, rtx, rtx, rtx, rtx, rtx, rtx, rtx, rtx, rtx, rtx, rtx, rtx, rtx, rtx, rtx) const':
/home/snow/openwrt/lede/mtk-openwrt-lede-4.2.1.0/build_dir/toolchain-mipsel_24kc_gcc-5.4.0_musl-1.1.16/gcc-5.4.0/gcc/recog.h:317:170: warning: cast between incompatible function types from 'insn_gen_fn::stored_funcptr' {aka 'rtx_def* (*)()'} to 'insn_gen_fn::f16' {aka 'rtx_def* (*)(rtx_def*, rtx_def*, rtx_def*, rtx_def*, rtx_def*, rtx_def*, rtx_def*, rtx_def*, rtx_def*, rtx_def*, rtx_def*, rtx_def*, rtx_def*, rtx_def*, rtx_def*, rtx_def*)'} [-Wcast-function-type]
317 | rtx operator () (rtx a0, rtx a1, rtx a2, rtx a3, rtx a4, rtx a5, rtx a6, rtx a7, rtx a8, rtx a9, rtx a10, rtx a11, rtx a12, rtx a13, rtx a14, rtx a15) const { return ((f16)func) (a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15); }
| ^~~~~~~~~
/home/snow/openwrt/lede/mtk-openwrt-lede-4.2.1.0/build_dir/toolchain-mipsel_24kc_gcc-5.4.0_musl-1.1.16/gcc-5.4.0/gcc/reload1.c: In function 'void init_reload()':
/home/snow/openwrt/lede/mtk-openwrt-lede-4.2.1.0/build_dir/toolchain-mipsel_24kc_gcc-5.4.0_musl-1.1.16/gcc-5.4.0/gcc/reload1.c:115:24: error: use of an operand of type 'bool' in 'operator++' is forbidden in C++17
115 | (this_target_reload->x_spill_indirect_levels)
| ~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~
/home/snow/openwrt/lede/mtk-openwrt-lede-4.2.1.0/build_dir/toolchain-mipsel_24kc_gcc-5.4.0_musl-1.1.16/gcc-5.4.0/gcc/reload1.c:470:7: note: in expansion of macro 'spill_indirect_levels'
470 | spill_indirect_levels++;
| ^~~~~~~~~~~~~~~~~~~~~
/home/snow/openwrt/lede/mtk-openwrt-lede-4.2.1.0/build_dir/toolchain-mipsel_24kc_gcc-5.4.0_musl-1.1.16/gcc-5.4.0/gcc/reload1.c: In function 'void elimination_effects(rtx, machine_mode)':
/home/snow/openwrt/lede/mtk-openwrt-lede-4.2.1.0/build_dir/toolchain-mipsel_24kc_gcc-5.4.0_musl-1.1.16/gcc-5.4.0/gcc/reload1.c:3085:7: warning: this statement may fall through [-Wimplicit-fallthrough=]
3085 | if (code == POST_MODIFY || code == PRE_MODIFY)
| ^~
/home/snow/openwrt/lede/mtk-openwrt-lede-4.2.1.0/build_dir/toolchain-mipsel_24kc_gcc-5.4.0_musl-1.1.16/gcc-5.4.0/gcc/reload1.c:3089:5: note: here
3089 | case STRICT_LOW_PART:
| ^~~~
make[5]: *** [Makefile:1065: reload1.o] Error 1
make[5]: Leaving directory '/home/snow/openwrt/lede/mtk-openwrt-lede-4.2.1.0/build_dir/toolchain-mipsel_24kc_gcc-5.4.0_musl-1.1.16/gcc-5.4.0-initial/gcc'
make[4]: *** [Makefile:4101: all-gcc] Error 2
make[4]: Leaving directory '/home/snow/openwrt/lede/mtk-openwrt-lede-4.2.1.0/build_dir/toolchain-mipsel_24kc_gcc-5.4.0_musl-1.1.16/gcc-5.4.0-initial'
make[3]: *** [Makefile:37: /home/snow/openwrt/lede/mtk-openwrt-lede-4.2.1.0/build_dir/toolchain-mipsel_24kc_gcc-5.4.0_musl-1.1.16/gcc-5.4.0-initial/.built] Error 2
make[3]: Leaving directory '/home/snow/openwrt/lede/mtk-openwrt-lede-4.2.1.0/toolchain/gcc/initial'
make[2]: *** [toolchain/Makefile:92: toolchain/gcc/initial/compile] Error 2
make[2]: Leaving directory '/home/snow/openwrt/lede/mtk-openwrt-lede-4.2.1.0'
make[1]: *** [toolchain/Makefile:89: /home/snow/openwrt/lede/mtk-openwrt-lede-4.2.1.0/staging_dir/toolchain-mipsel_24kc_gcc-5.4.0_musl-1.1.16/stamp/.toolchain_install] Error 2
make[1]: Leaving directory '/home/snow/openwrt/lede/mtk-openwrt-lede-4.2.1.0'
make: *** [/home/snow/openwrt/lede/mtk-openwrt-lede-4.2.1.0/include/toplevel.mk:199: world] Error 2
~/openwrt/lede/mtk-openwrt-lede-4.2.1.0 $
~/openwrt/lede/mtk-openwrt-lede-4.2.1.0 $
根据博文建议,应该降低gcc版本,但是将gcc/g++版本降为5.3.1后依旧出错
The gcc of you host is to new to build the old gcc for the toolchain
use an old linux with old gcc
or use precompiled toolchains
or change a .mk file somewhere in toolchains/ and set the gcc compatibility mode, like 94403ec
Are you using the latest version of freetz? I think it should work. Check the commands above the log part how it is compiled
降低版本后:
~/openwrt/lede/mtk-openwrt-lede-4.2.1.0 $ gcc -v
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-linux-gnu/5/lto-wrapper
Target: x86_64-linux-gnu
Configured with: ../src/configure -v --with-pkgversion='Ubuntu 5.3.1-14ubuntu2' --with-bugurl=file:///usr/share/doc/gcc-5/README.Bugs --enable-languages=c,ada,c++,java,go,d,fortran,objc,obj-c++ --prefix=/usr --program-suffix=-5 --enable-shared --enable-linker-build-id --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --libdir=/usr/lib --enable-nls --with-sysroot=/ --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --with-default-libstdcxx-abi=new --enable-gnu-unique-object --disable-vtable-verify --enable-libmpx --enable-plugin --with-system-zlib --disable-browser-plugin --enable-java-awt=gtk --enable-gtk-cairo --with-java-home=/usr/lib/jvm/java-1.5.0-gcj-5-amd64/jre --enable-java-home --with-jvm-root-dir=/usr/lib/jvm/java-1.5.0-gcj-5-amd64 --with-jvm-jar-dir=/usr/lib/jvm-exports/java-1.5.0-gcj-5-amd64 --with-arch-directory=amd64 --with-ecj-jar=/usr/share/java/eclipse-ecj.jar --enable-objc-gc --enable-multiarch --disable-werror --with-arch-32=i686 --with-abi=m64 --with-multilib-list=m32,m64,mx32 --enable-multilib --with-tune=generic --enable-checking=release --build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=x86_64-linux-gnu
Thread model: posix
gcc version 5.3.1 20160413 (Ubuntu 5.3.1-14ubuntu2)
~/openwrt/lede/mtk-openwrt-lede-4.2.1.0 $
~/openwrt/lede/mtk-openwrt-lede-4.2.1.0 $ g++ -v
Using built-in specs.
COLLECT_GCC=g++
COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-linux-gnu/5/lto-wrapper
Target: x86_64-linux-gnu
Configured with: ../src/configure -v --with-pkgversion='Ubuntu 5.3.1-14ubuntu2' --with-bugurl=file:///usr/share/doc/gcc-5/README.Bugs --enable-languages=c,ada,c++,java,go,d,fortran,objc,obj-c++ --prefix=/usr --program-suffix=-5 --enable-shared --enable-linker-build-id --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --libdir=/usr/lib --enable-nls --with-sysroot=/ --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --with-default-libstdcxx-abi=new --enable-gnu-unique-object --disable-vtable-verify --enable-libmpx --enable-plugin --with-system-zlib --disable-browser-plugin --enable-java-awt=gtk --enable-gtk-cairo --with-java-home=/usr/lib/jvm/java-1.5.0-gcj-5-amd64/jre --enable-java-home --with-jvm-root-dir=/usr/lib/jvm/java-1.5.0-gcj-5-amd64 --with-jvm-jar-dir=/usr/lib/jvm-exports/java-1.5.0-gcj-5-amd64 --with-arch-directory=amd64 --with-ecj-jar=/usr/share/java/eclipse-ecj.jar --enable-objc-gc --enable-multiarch --disable-werror --with-arch-32=i686 --with-abi=m64 --with-multilib-list=m32,m64,mx32 --enable-multilib --with-tune=generic --enable-checking=release --build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=x86_64-linux-gnu
Thread model: posix
gcc version 5.3.1 20160413 (Ubuntu 5.3.1-14ubuntu2)
~/openwrt/lede/mtk-openwrt-lede-4.2.1.0 $
仔细读出错信息有一行关键编译信息:
x86_64-linux-gnu-g++ -c -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 -I. -I. -I/home/snow/openwrt/lede/mtk-openwrt-lede-4.2.1.0/build_dir/toolchain-mipsel_24kc_gcc-5.4.0_musl-1.1.16/gcc-5.4.0/gcc -I/home/snow/openwrt/lede/mtk-openwrt-lede-4.2.1.0/build_dir/toolchain-mipsel_24kc_gcc-5.4.0_musl-1.1.16/gcc-5.4.0/gcc/. -I/home/snow/openwrt/lede/mtk-openwrt-lede-4.2.1.0/build_dir/toolchain-mipsel_24kc_gcc-5.4.0_musl-1.1.16/gcc-5.4.0/gcc/../include -I/home/snow/openwrt/lede/mtk-openwrt-lede-4.2.1.0/build_dir/toolchain-mipsel_24kc_gcc-5.4.0_musl-1.1.16/gcc-5.4.0/gcc/../libcpp/include -I/home/snow/openwrt/lede/mtk-openwrt-lede-4.2.1.0/staging_dir/host/include -I/home/snow/openwrt/lede/mtk-openwrt-lede-4.2.1.0/staging_dir/host/include -I/home/snow/openwrt/lede/mtk-openwrt-lede-4.2.1.0/staging_dir/host/include -I/home/snow/openwrt/lede/mtk-openwrt-lede-4.2.1.0/build_dir/toolchain-mipsel_24kc_gcc-5.4.0_musl-1.1.16/gcc-5.4.0/gcc/../libdecnumber -I/home/snow/openwrt/lede/mtk-openwrt-lede-4.2.1.0/build_dir/toolchain-mipsel_24kc_gcc-5.4.0_musl-1.1.16/gcc-5.4.0/gcc/../libdecnumber/dpd -I../libdecnumber -I/home/snow/openwrt/lede/mtk-openwrt-lede-4.2.1.0/build_dir/toolchain-mipsel_24kc_gcc-5.4.0_musl-1.1.16/gcc-5.4.0/gcc/../libbacktrace -o reload1.o -MT reload1.o -MMD -MP -MF ./.deps/reload1.TPo /home/snow/openwrt/lede/mtk-openwrt-lede-4.2.1.0/build_dir/toolchain-mipsel_24kc_gcc-5.4.0_musl-1.1.16/gcc-5.4.0/gcc/reload1.c
In file included from ./tm.h:29,
from /home/snow/openwrt/lede/mtk-openwrt-lede-4.2.1.0/build_dir/toolchain-mipsel_24kc_gcc-5.4.0_musl-1.1.16/gcc-5.4.0/gcc/reload1.c:23:
/home/snow/openwrt/lede/mtk-openwrt-lede-4.2.1.0/build_dir/toolchain-mipsel_24kc_gcc-5.4.0_musl-1.1.16/gcc-5.4.0/gcc/config/elfos.h:102:21: warning: invalid suffix on literal; C++11 requires a space between literal and string macro [-Wliteral-suffix]
102 | fprintf ((FILE), "%s"HOST_WIDE_INT_PRINT_UNSIGNED"\n",\
~/openwrt/lede/mtk-openwrt-lede-4.2.1.0 $ x86_64-linux-gnu-g++ -v
Using built-in specs.
COLLECT_GCC=x86_64-linux-gnu-g++
COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-linux-gnu/11/lto-wrapper
OFFLOAD_TARGET_NAMES=nvptx-none:amdgcn-amdhsa
OFFLOAD_TARGET_DEFAULT=1
Target: x86_64-linux-gnu
Configured with: ../src/configure -v --with-pkgversion='Ubuntu 11.3.0-1ubuntu1~22.04.1' --with-bugurl=file:///usr/share/doc/gcc-11/README.Bugs --enable-languages=c,ada,c++,go,brig,d,fortran,objc,obj-c++,m2 --prefix=/usr --with-gcc-major-version-only --program-suffix=-11 --program-prefix=x86_64-linux-gnu- --enable-shared --enable-linker-build-id --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --libdir=/usr/lib --enable-nls --enable-bootstrap --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --with-default-libstdcxx-abi=new --enable-gnu-unique-object --disable-vtable-verify --enable-plugin --enable-default-pie --with-system-zlib --enable-libphobos-checking=release --with-target-system-zlib=auto --enable-objc-gc=auto --enable-multiarch --disable-werror --enable-cet --with-arch-32=i686 --with-abi=m64 --with-multilib-list=m32,m64,mx32 --enable-multilib --with-tune=generic --enable-offload-targets=nvptx-none=/build/gcc-11-aYxV0E/gcc-11-11.3.0/debian/tmp-nvptx/usr,amdgcn-amdhsa=/build/gcc-11-aYxV0E/gcc-11-11.3.0/debian/tmp-gcn/usr --without-cuda-driver --enable-checking=release --build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=x86_64-linux-gnu --with-build-config=bootstrap-lto-lean --enable-link-serialization=2
Thread model: posix
Supported LTO compression algorithms: zlib zstd
gcc version 11.3.0 (Ubuntu 11.3.0-1ubuntu1~22.04.1)
~/openwrt/lede/mtk-openwrt-lede-4.2.1.0 $
~/openwrt/lede/mtk-openwrt-lede-4.2.1.0 $
~/openwrt/lede/mtk-openwrt-lede-4.2.1.0 $
~/openwrt/lede/mtk-openwrt-lede-4.2.1.0 $ which x86_64-linux-gnu-g++
/usr/bin/x86_64-linux-gnu-g++
~/openwrt/lede/mtk-openwrt-lede-4.2.1.0 $
~/openwrt/lede/mtk-openwrt-lede-4.2.1.0 $ ls -alh /usr/bin/x86_64-linux-gnu-g++
lrwxrwxrwx 1 root root 6 8月 5 2021 /usr/bin/x86_64-linux-gnu-g++ -> g++-11
~/openwrt/lede/mtk-openwrt-lede-4.2.1.0 $
解决,修复过程,将x86_64-linux-gnu-g++软连接到低版本g++
~/openwrt/lede/mtk-openwrt-lede-4.2.1.0/dl $ x86_64-linux-gnu-g++ -v
Using built-in specs.
COLLECT_GCC=x86_64-linux-gnu-g++
COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-linux-gnu/9/lto-wrapper
OFFLOAD_TARGET_NAMES=nvptx-none:hsa
OFFLOAD_TARGET_DEFAULT=1
Target: x86_64-linux-gnu
Configured with: ../src/configure -v --with-pkgversion='Ubuntu 9.5.0-1ubuntu1~22.04' --with-bugurl=file:///usr/share/doc/gcc-9/README.Bugs --enable-languages=c,ada,c++,go,brig,d,fortran,objc,obj-c++,gm2 --prefix=/usr --with-gcc-major-version-only --program-suffix=-9 --program-prefix=x86_64-linux-gnu- --enable-shared --enable-linker-build-id --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --libdir=/usr/lib --enable-nls --enable-bootstrap --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --with-default-libstdcxx-abi=new --enable-gnu-unique-object --disable-vtable-verify --enable-plugin --enable-default-pie --with-system-zlib --with-target-system-zlib=auto --enable-objc-gc=auto --enable-multiarch --disable-werror --with-arch-32=i686 --with-abi=m64 --with-multilib-list=m32,m64,mx32 --enable-multilib --with-tune=generic --enable-offload-targets=nvptx-none=/build/gcc-9-5Q4PKF/gcc-9-9.5.0/debian/tmp-nvptx/usr,hsa --without-cuda-driver --enable-checking=release --build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=x86_64-linux-gnu --with-build-config=bootstrap-lto-lean --enable-link-mutex
Thread model: posix
gcc version 9.5.0 (Ubuntu 9.5.0-1ubuntu1~22.04)
~/openwrt/lede/mtk-openwrt-lede-4.2.1.0/dl $
问题修复后,编译通过文章来源:https://www.toymoban.com/news/detail-522406.html
make[5]: Entering directory '/home/snow/openwrt/lede/mtk-openwrt-lede-4.2.1.0/build_dir/toolchain-mipsel_24kc_gcc-5.4.0_musl-1.1.16/gcc-5.4.0-initial/gcc'
x86_64-linux-gnu-g++ -c -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 -I. -I. -I/home/snow/openwrt/lede/mtk-openwrt-lede-4.2.1.0/build_dir/toolchain-mipsel_24kc_gcc-5.4.0_musl-1.1.16/gcc-5.4.0/gcc -I/home/snow/openwrt/lede/mtk-openwrt-lede-4.2.1.0/build_dir/toolchain-mipsel_24kc_gcc-5.4.0_musl-1.1.16/gcc-5.4.0/gcc/. -I/home/snow/openwrt/lede/mtk-openwrt-lede-4.2.1.0/build_dir/toolchain-mipsel_24kc_gcc-5.4.0_musl-1.1.16/gcc-5.4.0/gcc/../include -I/home/snow/openwrt/lede/mtk-openwrt-lede-4.2.1.0/build_dir/toolchain-mipsel_24kc_gcc-5.4.0_musl-1.1.16/gcc-5.4.0/gcc/../libcpp/include -I/home/snow/openwrt/lede/mtk-openwrt-lede-4.2.1.0/staging_dir/host/include -I/home/snow/openwrt/lede/mtk-openwrt-lede-4.2.1.0/staging_dir/host/include -I/home/snow/openwrt/lede/mtk-openwrt-lede-4.2.1.0/staging_dir/host/include -I/home/snow/openwrt/lede/mtk-openwrt-lede-4.2.1.0/build_dir/toolchain-mipsel_24kc_gcc-5.4.0_musl-1.1.16/gcc-5.4.0/gcc/../libdecnumber -I/home/snow/openwrt/lede/mtk-openwrt-lede-4.2.1.0/build_dir/toolchain-mipsel_24kc_gcc-5.4.0_musl-1.1.16/gcc-5.4.0/gcc/../libdecnumber/dpd -I../libdecnumber -I/home/snow/openwrt/lede/mtk-openwrt-lede-4.2.1.0/build_dir/toolchain-mipsel_24kc_gcc-5.4.0_musl-1.1.16/gcc-5.4.0/gcc/../libbacktrace -o reload1.o -MT reload1.o -MMD -MP -MF ./.deps/reload1.TPo /home/snow/openwrt/lede/mtk-openwrt-lede-4.2.1.0/build_dir/toolchain-mipsel_24kc_gcc-5.4.0_musl-1.1.16/gcc-5.4.0/gcc/reload1.c
In file included from ./tm.h:29,
from /home/snow/openwrt/lede/mtk-openwrt-lede-4.2.1.0/build_dir/toolchain-mipsel_24kc_gcc-5.4.0_musl-1.1.16/gcc-5.4.0/gcc/reload1.c:23:
/home/snow/openwrt/lede/mtk-openwrt-lede-4.2.1.0/build_dir/toolchain-mipsel_24kc_gcc-5.4.0_musl-1.1.16/gcc-5.4.0/gcc/config/elfos.h:102:21: warning: invalid suffix on literal; C++11 requires a space between literal and string macro [-Wliteral-suffix]
102 | fprintf ((FILE), "%s"HOST_WIDE_INT_PRINT_UNSIGNED"\n",\
| ^
/home/snow/openwrt/lede/mtk-openwrt-lede-4.2.1.0/build_dir/toolchain-mipsel_24kc_gcc-5.4.0_musl-1.1.16/gcc-5.4.0/gcc/config/elfos.h:170:24: warning: invalid suffix on literal; C++11 requires a space between literal and string macro [-Wliteral-suffix]
170 | fprintf ((FILE), ","HOST_WIDE_INT_PRINT_UNSIGNED",%u\n", \
| ^
In file included from ./tm.h:35,
from /home/snow/openwrt/lede/mtk-openwrt-lede-4.2.1.0/build_dir/toolchain-mipsel_24kc_gcc-5.4.0_musl-1.1.16/gcc-5.4.0/gcc/reload1.c:23:
/home/snow/openwrt/lede/mtk-openwrt-lede-4.2.1.0/build_dir/toolchain-mipsel_24kc_gcc-5.4.0_musl-1.1.16/gcc-5.4.0/gcc/config/mips/mips.h:2913:20: warning: invalid suffix on literal; C++11 requires a space between literal and string macro [-Wliteral-suffix]
2913 | fprintf (STREAM, "\t.space\t"HOST_WIDE_INT_PRINT_UNSIGNED"\n", (SIZE))
| ^
In file included from ./tm.h:50,
from /home/snow/openwrt/lede/mtk-openwrt-lede-4.2.1.0/build_dir/toolchain-mipsel_24kc_gcc-5.4.0_musl-1.1.16/gcc-5.4.0/gcc/reload1.c:23:
/home/snow/openwrt/lede/mtk-openwrt-lede-4.2.1.0/build_dir/toolchain-mipsel_24kc_gcc-5.4.0_musl-1.1.16/gcc-5.4.0/gcc/defaults.h:126:24: warning: invalid suffix on literal; C++11 requires a space between literal and string macro [-Wliteral-suffix]
126 | fprintf ((FILE), ","HOST_WIDE_INT_PRINT_UNSIGNED",%u\n", \
| ^
In file included from /home/snow/openwrt/lede/mtk-openwrt-lede-4.2.1.0/build_dir/toolchain-mipsel_24kc_gcc-5.4.0_musl-1.1.16/gcc-5.4.0/gcc/reload1.c:68:
/home/snow/openwrt/lede/mtk-openwrt-lede-4.2.1.0/build_dir/toolchain-mipsel_24kc_gcc-5.4.0_musl-1.1.16/gcc-5.4.0/gcc/recog.h:357:5: warning: this use of "defined" may not be portable [-Wexpansion-to-defined]
357 | #if HAVE_DESIGNATED_UNION_INITIALIZERS
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /home/snow/openwrt/lede/mtk-openwrt-lede-4.2.1.0/build_dir/toolchain-mipsel_24kc_gcc-5.4.0_musl-1.1.16/gcc-5.4.0/gcc/reload1.c:68:
/home/snow/openwrt/lede/mtk-openwrt-lede-4.2.1.0/build_dir/toolchain-mipsel_24kc_gcc-5.4.0_musl-1.1.16/gcc-5.4.0/gcc/recog.h: In member function 'rtx_def* insn_gen_fn::operator()(rtx) const':
/home/snow/openwrt/lede/mtk-openwrt-lede-4.2.1.0/build_dir/toolchain-mipsel_24kc_gcc-5.4.0_musl-1.1.16/gcc-5.4.0/gcc/recog.h:302:48: warning: cast between incompatible function types from 'insn_gen_fn::stored_funcptr' {aka 'rtx_def* (*)()'} to 'insn_gen_fn::f1' {aka 'rtx_def* (*)(rtx_def*)'} [-Wcast-function-type]
302 | rtx operator () (rtx a0) const { return ((f1)func) (a0); }
| ^~~~
/home/snow/openwrt/lede/mtk-openwrt-lede-4.2.1.0/build_dir/toolchain-mipsel_24kc_gcc-5.4.0_musl-1.1.16/gcc-5.4.0/gcc/recog.h: In member function 'rtx_def* insn_gen_fn::operator()(rtx, rtx) const':
/home/snow/openwrt/lede/mtk-openwrt-lede-4.2.1.0/build_dir/toolchain-mipsel_24kc_gcc-5.4.0_musl-1.1.16/gcc-5.4.0/gcc/recog.h:303:56: warning: cast between incompatible function types from 'insn_gen_fn::stored_funcptr' {aka 'rtx_def* (*)()'} to 'insn_gen_fn::f2' {aka 'rtx_def* (*)(rtx_def*, rtx_def*)'} [-Wcast-function-type]
303 | rtx operator () (rtx a0, rtx a1) const { return ((f2)func) (a0, a1); }
| ^~~~
/home/snow/openwrt/lede/mtk-openwrt-lede-4.2.1.0/build_dir/toolchain-mipsel_24kc_gcc-5.4.0_musl-1.1.16/gcc-5.4.0/gcc/recog.h: In member function 'rtx_def* insn_gen_fn::operator()(rtx, rtx, rtx) const':
/home/snow/openwrt/lede/mtk-openwrt-lede-4.2.1.0/build_dir/toolchain-mipsel_24kc_gcc-5.4.0_musl-1.1.16/gcc-5.4.0/gcc/recog.h:304:64: warning: cast between incompatible function types from 'insn_gen_fn::stored_funcptr' {aka 'rtx_def* (*)()'} to 'insn_gen_fn::f3' {aka 'rtx_def* (*)(rtx_def*, rtx_def*, rtx_def*)'} [-Wcast-function-type]
304 | rtx operator () (rtx a0, rtx a1, rtx a2) const { return ((f3)func) (a0, a1, a2); }
| ^~~~
/home/snow/openwrt/lede/mtk-openwrt-lede-4.2.1.0/build_dir/toolchain-mipsel_24kc_gcc-5.4.0_musl-1.1.16/gcc-5.4.0/gcc/recog.h: In member function 'rtx_def* insn_gen_fn::operator()(rtx, rtx, rtx, rtx) const':
/home/snow/openwrt/lede/mtk-openwrt-lede-4.2.1.0/build_dir/toolchain-mipsel_24kc_gcc-5.4.0_musl-1.1.16/gcc-5.4.0/gcc/recog.h:305:72: warning: cast between incompatible function types from 'insn_gen_fn::stored_funcptr' {aka 'rtx_def* (*)()'} to 'insn_gen_fn::f4' {aka 'rtx_def* (*)(rtx_def*, rtx_def*, rtx_def*, rtx_def*)'} [-Wcast-function-type]
305 | rtx operator () (rtx a0, rtx a1, rtx a2, rtx a3) const { return ((f4)func) (a0, a1, a2, a3); }
| ^~~~
/home/snow/openwrt/lede/mtk-openwrt-lede-4.2.1.0/build_dir/toolchain-mipsel_24kc_gcc-5.4.0_musl-1.1.16/gcc-5.4.0/gcc/recog.h: In member function 'rtx_def* insn_gen_fn::operator()(rtx, rtx, rtx, rtx, rtx) const':
/home/snow/openwrt/lede/mtk-openwrt-lede-4.2.1.0/build_dir/toolchain-mipsel_24kc_gcc-5.4.0_musl-1.1.16/gcc-5.4.0/gcc/recog.h:306:80: warning: cast between incompatible function types from 'insn_gen_fn::stored_funcptr' {aka 'rtx_def* (*)()'} to 'insn_gen_fn::f5' {aka 'rtx_def* (*)(rtx_def*, rtx_def*, rtx_def*, rtx_def*, rtx_def*)'} [-Wcast-function-type]
306 | rtx operator () (rtx a0, rtx a1, rtx a2, rtx a3, rtx a4) const { return ((f5)func) (a0, a1, a2, a3, a4); }
| ^~~~
/home/snow/openwrt/lede/mtk-openwrt-lede-4.2.1.0/build_dir/toolchain-mipsel_24kc_gcc-5.4.0_musl-1.1.16/gcc-5.4.0/gcc/recog.h: In member function 'rtx_def* insn_gen_fn::operator()(rtx, rtx, rtx, rtx, rtx, rtx) const':
/home/snow/openwrt/lede/mtk-openwrt-lede-4.2.1.0/build_dir/toolchain-mipsel_24kc_gcc-5.4.0_musl-1.1.16/gcc-5.4.0/gcc/recog.h:307:88: warning: cast between incompatible function types from 'insn_gen_fn::stored_funcptr' {aka 'rtx_def* (*)()'} to 'insn_gen_fn::f6' {aka 'rtx_def* (*)(rtx_def*, rtx_def*, rtx_def*, rtx_def*, rtx_def*, rtx_def*)'} [-Wcast-function-type]
307 | rtx operator () (rtx a0, rtx a1, rtx a2, rtx a3, rtx a4, rtx a5) const { return ((f6)func) (a0, a1, a2, a3, a4, a5); }
| ^~~~
/home/snow/openwrt/lede/mtk-openwrt-lede-4.2.1.0/build_dir/toolchain-mipsel_24kc_gcc-5.4.0_musl-1.1.16/gcc-5.4.0/gcc/recog.h: In member function 'rtx_def* insn_gen_fn::operator()(rtx, rtx, rtx, rtx, rtx, rtx, rtx) const':
/home/snow/openwrt/lede/mtk-openwrt-lede-4.2.1.0/build_dir/toolchain-mipsel_24kc_gcc-5.4.0_musl-1.1.16/gcc-5.4.0/gcc/recog.h:308:96: warning: cast between incompatible function types from 'insn_gen_fn::stored_funcptr' {aka 'rtx_def* (*)()'} to 'insn_gen_fn::f7' {aka 'rtx_def* (*)(rtx_def*, rtx_def*, rtx_def*, rtx_def*, rtx_def*, rtx_def*, rtx_def*)'} [-Wcast-function-type]
308 | rtx operator () (rtx a0, rtx a1, rtx a2, rtx a3, rtx a4, rtx a5, rtx a6) const { return ((f7)func) (a0, a1, a2, a3, a4, a5, a6); }
| ^~~~
In file included from /home/snow/openwrt/lede/mtk-openwrt-lede-4.2.1.0/build_dir/toolchain-mipsel_24kc_gcc-5.4.0_musl-1.1.16/gcc-5.4.0/gcc/reload1.c:68:
/home/snow/openwrt/lede/mtk-openwrt-lede-4.2.1.0/build_dir/toolchain-mipsel_24kc_gcc-5.4.0_musl-1.1.16/gcc-5.4.0/gcc/recog.h: In member function 'rtx_def* insn_gen_fn::operator()(rtx, rtx, rtx, rtx, rtx, rtx, rtx, rtx) const':
/home/snow/openwrt/lede/mtk-openwrt-lede-4.2.1.0/build_dir/toolchain-mipsel_24kc_gcc-5.4.0_musl-1.1.16/gcc-5.4.0/gcc/recog.h:309:104: warning: cast between incompatible function types from 'insn_gen_fn::stored_funcptr' {aka 'rtx_def* (*)()'} to 'insn_gen_fn::f8' {aka 'rtx_def* (*)(rtx_def*, rtx_def*, rtx_def*, rtx_def*, rtx_def*, rtx_def*, rtx_def*, rtx_def*)'} [-Wcast-function-type]
309 | rtx operator () (rtx a0, rtx a1, rtx a2, rtx a3, rtx a4, rtx a5, rtx a6, rtx a7) const { return ((f8)func) (a0, a1, a2, a3, a4, a5, a6, a7); }
| ^~~~
/home/snow/openwrt/lede/mtk-openwrt-lede-4.2.1.0/build_dir/toolchain-mipsel_24kc_gcc-5.4.0_musl-1.1.16/gcc-5.4.0/gcc/recog.h: In member function 'rtx_def* insn_gen_fn::operator()(rtx, rtx, rtx, rtx, rtx, rtx, rtx, rtx, rtx) const':
/home/snow/openwrt/lede/mtk-openwrt-lede-4.2.1.0/build_dir/toolchain-mipsel_24kc_gcc-5.4.0_musl-1.1.16/gcc-5.4.0/gcc/recog.h:310:112: warning: cast between incompatible function types from 'insn_gen_fn::stored_funcptr' {aka 'rtx_def* (*)()'} to 'insn_gen_fn::f9' {aka 'rtx_def* (*)(rtx_def*, rtx_def*, rtx_def*, rtx_def*, rtx_def*, rtx_def*, rtx_def*, rtx_def*, rtx_def*)'} [-Wcast-function-type]
310 | rtx operator () (rtx a0, rtx a1, rtx a2, rtx a3, rtx a4, rtx a5, rtx a6, rtx a7, rtx a8) const { return ((f9)func) (a0, a1, a2, a3, a4, a5, a6, a7, a8); }
| ^~~~
/home/snow/openwrt/lede/mtk-openwrt-lede-4.2.1.0/build_dir/toolchain-mipsel_24kc_gcc-5.4.0_musl-1.1.16/gcc-5.4.0/gcc/recog.h: In member function 'rtx_def* insn_gen_fn::operator()(rtx, rtx, rtx, rtx, rtx, rtx, rtx, rtx, rtx, rtx) const':
/home/snow/openwrt/lede/mtk-openwrt-lede-4.2.1.0/build_dir/toolchain-mipsel_24kc_gcc-5.4.0_musl-1.1.16/gcc-5.4.0/gcc/recog.h:311:121: warning: cast between incompatible function types from 'insn_gen_fn::stored_funcptr' {aka 'rtx_def* (*)()'} to 'insn_gen_fn::f10' {aka 'rtx_def* (*)(rtx_def*, rtx_def*, rtx_def*, rtx_def*, rtx_def*, rtx_def*, rtx_def*, rtx_def*, rtx_def*, rtx_def*)'} [-Wcast-function-type]
311 | rtx operator () (rtx a0, rtx a1, rtx a2, rtx a3, rtx a4, rtx a5, rtx a6, rtx a7, rtx a8, rtx a9) const { return ((f10)func) (a0, a1, a2, a3, a4, a5, a6, a7, a8, a9); }
| ^~~~
/home/snow/openwrt/lede/mtk-openwrt-lede-4.2.1.0/build_dir/toolchain-mipsel_24kc_gcc-5.4.0_musl-1.1.16/gcc-5.4.0/gcc/recog.h: In member function 'rtx_def* insn_gen_fn::operator()(rtx, rtx, rtx, rtx, rtx, rtx, rtx, rtx, rtx, rtx, rtx) const':
/home/snow/openwrt/lede/mtk-openwrt-lede-4.2.1.0/build_dir/toolchain-mipsel_24kc_gcc-5.4.0_musl-1.1.16/gcc-5.4.0/gcc/recog.h:312:130: warning: cast between incompatible function types from 'insn_gen_fn::stored_funcptr' {aka 'rtx_def* (*)()'} to 'insn_gen_fn::f11' {aka 'rtx_def* (*)(rtx_def*, rtx_def*, rtx_def*, rtx_def*, rtx_def*, rtx_def*, rtx_def*, rtx_def*, rtx_def*, rtx_def*, rtx_def*)'} [-Wcast-function-type]
312 | rtx operator () (rtx a0, rtx a1, rtx a2, rtx a3, rtx a4, rtx a5, rtx a6, rtx a7, rtx a8, rtx a9, rtx a10) const { return ((f11)func) (a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10); }
| ^~~~
/home/snow/openwrt/lede/mtk-openwrt-lede-4.2.1.0/build_dir/toolchain-mipsel_24kc_gcc-5.4.0_musl-1.1.16/gcc-5.4.0/gcc/recog.h: In member function 'rtx_def* insn_gen_fn::operator()(rtx, rtx, rtx, rtx, rtx, rtx, rtx, rtx, rtx, rtx, rtx, rtx) const':
/home/snow/openwrt/lede/mtk-openwrt-lede-4.2.1.0/build_dir/toolchain-mipsel_24kc_gcc-5.4.0_musl-1.1.16/gcc-5.4.0/gcc/recog.h:313:139: warning: cast between incompatible function types from 'insn_gen_fn::stored_funcptr' {aka 'rtx_def* (*)()'} to 'insn_gen_fn::f12' {aka 'rtx_def* (*)(rtx_def*, rtx_def*, rtx_def*, rtx_def*, rtx_def*, rtx_def*, rtx_def*, rtx_def*, rtx_def*, rtx_def*, rtx_def*, rtx_def*)'} [-Wcast-function-type]
313 | rtx operator () (rtx a0, rtx a1, rtx a2, rtx a3, rtx a4, rtx a5, rtx a6, rtx a7, rtx a8, rtx a9, rtx a10, rtx a11) const { return ((f12)func) (a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11); }
| ^~~~
/home/snow/openwrt/lede/mtk-openwrt-lede-4.2.1.0/build_dir/toolchain-mipsel_24kc_gcc-5.4.0_musl-1.1.16/gcc-5.4.0/gcc/recog.h: In member function 'rtx_def* insn_gen_fn::operator()(rtx, rtx, rtx, rtx, rtx, rtx, rtx, rtx, rtx, rtx, rtx, rtx, rtx) const':
/home/snow/openwrt/lede/mtk-openwrt-lede-4.2.1.0/build_dir/toolchain-mipsel_24kc_gcc-5.4.0_musl-1.1.16/gcc-5.4.0/gcc/recog.h:314:148: warning: cast between incompatible function types from 'insn_gen_fn::stored_funcptr' {aka 'rtx_def* (*)()'} to 'insn_gen_fn::f13' {aka 'rtx_def* (*)(rtx_def*, rtx_def*, rtx_def*, rtx_def*, rtx_def*, rtx_def*, rtx_def*, rtx_def*, rtx_def*, rtx_def*, rtx_def*, rtx_def*, rtx_def*)'} [-Wcast-function-type]
314 | rtx operator () (rtx a0, rtx a1, rtx a2, rtx a3, rtx a4, rtx a5, rtx a6, rtx a7, rtx a8, rtx a9, rtx a10, rtx a11, rtx a12) const { return ((f13)func) (a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12); }
| ^~~~
/home/snow/openwrt/lede/mtk-openwrt-lede-4.2.1.0/build_dir/toolchain-mipsel_24kc_gcc-5.4.0_musl-1.1.16/gcc-5.4.0/gcc/recog.h: In member function 'rtx_def* insn_gen_fn::operator()(rtx, rtx, rtx, rtx, rtx, rtx, rtx, rtx, rtx, rtx, rtx, rtx, rtx, rtx) const':
/home/snow/openwrt/lede/mtk-openwrt-lede-4.2.1.0/build_dir/toolchain-mipsel_24kc_gcc-5.4.0_musl-1.1.16/gcc-5.4.0/gcc/recog.h:315:157: warning: cast between incompatible function types from 'insn_gen_fn::stored_funcptr' {aka 'rtx_def* (*)()'} to 'insn_gen_fn::f14' {aka 'rtx_def* (*)(rtx_def*, rtx_def*, rtx_def*, rtx_def*, rtx_def*, rtx_def*, rtx_def*, rtx_def*, rtx_def*, rtx_def*, rtx_def*, rtx_def*, rtx_def*, rtx_def*)'} [-Wcast-function-type]
315 | rtx operator () (rtx a0, rtx a1, rtx a2, rtx a3, rtx a4, rtx a5, rtx a6, rtx a7, rtx a8, rtx a9, rtx a10, rtx a11, rtx a12, rtx a13) const { return ((f14)func) (a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13); }
| ^~~~
/home/snow/openwrt/lede/mtk-openwrt-lede-4.2.1.0/build_dir/toolchain-mipsel_24kc_gcc-5.4.0_musl-1.1.16/gcc-5.4.0/gcc/recog.h: In member function 'rtx_def* insn_gen_fn::operator()(rtx, rtx, rtx, rtx, rtx, rtx, rtx, rtx, rtx, rtx, rtx, rtx, rtx, rtx, rtx) const':
/home/snow/openwrt/lede/mtk-openwrt-lede-4.2.1.0/build_dir/toolchain-mipsel_24kc_gcc-5.4.0_musl-1.1.16/gcc-5.4.0/gcc/recog.h:316:166: warning: cast between incompatible function types from 'insn_gen_fn::stored_funcptr' {aka 'rtx_def* (*)()'} to 'insn_gen_fn::f15' {aka 'rtx_def* (*)(rtx_def*, rtx_def*, rtx_def*, rtx_def*, rtx_def*, rtx_def*, rtx_def*, rtx_def*, rtx_def*, rtx_def*, rtx_def*, rtx_def*, rtx_def*, rtx_def*, rtx_def*)'} [-Wcast-function-type]
316 | rtx operator () (rtx a0, rtx a1, rtx a2, rtx a3, rtx a4, rtx a5, rtx a6, rtx a7, rtx a8, rtx a9, rtx a10, rtx a11, rtx a12, rtx a13, rtx a14) const { return ((f15)func) (a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14); }
| ^~~~
/home/snow/openwrt/lede/mtk-openwrt-lede-4.2.1.0/build_dir/toolchain-mipsel_24kc_gcc-5.4.0_musl-1.1.16/gcc-5.4.0/gcc/recog.h: In member function 'rtx_def* insn_gen_fn::operator()(rtx, rtx, rtx, rtx, rtx, rtx, rtx, rtx, rtx, rtx, rtx, rtx, rtx, rtx, rtx, rtx) const':
/home/snow/openwrt/lede/mtk-openwrt-lede-4.2.1.0/build_dir/toolchain-mipsel_24kc_gcc-5.4.0_musl-1.1.16/gcc-5.4.0/gcc/recog.h:317:175: warning: cast between incompatible function types from 'insn_gen_fn::stored_funcptr' {aka 'rtx_def* (*)()'} to 'insn_gen_fn::f16' {aka 'rtx_def* (*)(rtx_def*, rtx_def*, rtx_def*, rtx_def*, rtx_def*, rtx_def*, rtx_def*, rtx_def*, rtx_def*, rtx_def*, rtx_def*, rtx_def*, rtx_def*, rtx_def*, rtx_def*, rtx_def*)'} [-Wcast-function-type]
317 | operator () (rtx a0, rtx a1, rtx a2, rtx a3, rtx a4, rtx a5, rtx a6, rtx a7, rtx a8, rtx a9, rtx a10, rtx a11, rtx a12, rtx a13, rtx a14, rtx a15) const { return ((f16)func) (a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15); }
| ^~~~
/home/snow/openwrt/lede/mtk-openwrt-lede-4.2.1.0/build_dir/toolchain-mipsel_24kc_gcc-5.4.0_musl-1.1.16/gcc-5.4.0/gcc/reload1.c: In function 'void init_reload()':
/home/snow/openwrt/lede/mtk-openwrt-lede-4.2.1.0/build_dir/toolchain-mipsel_24kc_gcc-5.4.0_musl-1.1.16/gcc-5.4.0/gcc/reload1.c:470:28: warning: use of an operand of type 'bool' in 'operator++' is deprecated [-Wdeprecated]
470 | spill_indirect_levels++;
| ^~
/home/snow/openwrt/lede/mtk-openwrt-lede-4.2.1.0/build_dir/toolchain-mipsel_24kc_gcc-5.4.0_musl-1.1.16/gcc-5.4.0/gcc/reload1.c: In function 'void elimination_effects(rtx, machine_mode)':
/home/snow/openwrt/lede/mtk-openwrt-lede-4.2.1.0/build_dir/toolchain-mipsel_24kc_gcc-5.4.0_musl-1.1.16/gcc-5.4.0/gcc/reload1.c:3085:7: warning: this statement may fall through [-Wimplicit-fallthrough=]
3085 | if (code == POST_MODIFY || code == PRE_MODIFY)
| ^~
/home/snow/openwrt/lede/mtk-openwrt-lede-4.2.1.0/build_dir/toolchain-mipsel_24kc_gcc-5.4.0_musl-1.1.16/gcc-5.4.0/gcc/reload1.c:3089:5: note: here
3089 | case STRICT_LOW_PART:
| ^~~~
x86_64-linux-gnu-g++ -c -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 -I. -I. -I/home/snow/openwrt/lede/mtk-openwrt-lede-4.2.1.0/build_dir/toolchain-mipsel_24kc_gcc-5.4.0_musl-1.1.16/gcc-5.4.0/gcc -I/home/snow/openwrt/lede/mtk-openwrt-lede-4.2.1.0/build_dir/toolchain-mipsel_24kc_gcc-5.4.0_musl-1.1.16/gcc-5.4.0/gcc/. -I/home/snow/openwrt/lede/mtk-openwrt-lede-4.2.1.0/build_dir/toolchain-mipsel_24kc_gcc-5.4.0_musl-1.1.16/gcc-5.4.0/gcc/../include -I/home/snow/openwrt/lede/mtk-openwrt-lede-4.2.1.0/build_dir/toolchain-mipsel_24kc_gcc-5.4.0_musl-1.1.16/gcc-5.4.0/gcc/../libcpp/include -I/home/snow/openwrt/lede/mtk-openwrt-lede-4.2.1.0/staging_dir/host/include -I/home/snow/openwrt/lede/mtk-openwrt-lede-4.2.1.0/staging_dir/host/include -I/home/snow/openwrt/lede/mtk-openwrt-lede-4.2.1.0/staging_dir/host/include -I/home/snow/openwrt/lede/mtk-openwrt-lede-4.2.1.0/build_dir/toolchain-mipsel_24kc_gcc-5.4.0_musl-1.1.16/gcc-5.4.0/gcc/../libdecnumber -I/home/snow/openwrt/lede/mtk-openwrt-lede-4.2.1.0/build_dir/toolchain-mipsel_24kc_gcc-5.4.0_musl-1.1.16/gcc-5.4.0/gcc/../libdecnumber/dpd -I../libdecnumber -I/home/snow/openwrt/lede/mtk-openwrt-lede-4.2.1.0/build_dir/toolchain-mipsel_24kc_gcc-5.4.0_musl-1.1.16/gcc-5.4.0/gcc/../libbacktrace -o reorg.o -MT reorg.o -MMD -MP -MF ./.deps/reorg.TPo /home/snow/openwrt/lede/mtk-openwrt-lede-4.2.1.0/build_dir/toolchain-mipsel_24kc_gcc-5.4.0_musl-1.1.16/gcc-5.4.0/gcc/reorg.c
In file included from ./tm.h:29,
from /home/snow/openwrt/lede/mtk-openwrt-lede-4.2.1.0/build_dir/toolchain-mipsel_24kc_gcc-5.4.0_musl-1.1.16/gcc-5.4.0/gcc/reorg.c:106:
/home/snow/openwrt/lede/mtk-openwrt-lede-4.2.1.0/build_dir/toolchain-mipsel_24kc_gcc-5.4.0_musl-1.1.16/gcc-5.4.0/gcc/config/elfos.h:102:21: warning: invalid suffix on literal; C++11 requires a space between literal and string macro [-Wliteral-suffix]
102 | fprintf ((FILE), "%s"HOST_WIDE_INT_PRINT_UNSIGNED"\n",\
| ^
/home/snow/openwrt/lede/mtk-openwrt-lede-4.2.1.0/build_dir/toolchain-mipsel_24kc_gcc-5.4.0_musl-1.1.16/gcc-5.4.0/gcc/config/elfos.h:170:24: warning: invalid suffix on literal; C++11 requires a space between literal and string macro [-Wliteral-suffix]
170 | fprintf ((FILE), ","HOST_WIDE_INT_PRINT_UNSIGNED",%u\n", \
| ^
In file included from ./tm.h:35,
from /home/snow/openwrt/lede/mtk-openwrt-lede-4.2.1.0/build_dir/toolchain-mipsel_24kc_gcc-5.4.0_musl-1.1.16/gcc-5.4.0/gcc/reorg.c:106:
/home/snow/openwrt/lede/mtk-openwrt-lede-4.2.1.0/build_dir/toolchain-mipsel_24kc_gcc-5.4.0_musl-1.1.16/gcc-5.4.0/gcc/config/mips/mips.h:2913:20: warning: invalid suffix on literal; C++11 requires a space between literal and string macro [-Wliteral-suffix]
2913 | fprintf (STREAM, "\t.space\t"HOST_WIDE_INT_PRINT_UNSIGNED"\n", (SIZE))
| ^
In file included from ./tm.h:50,
from /home/snow/openwrt/lede/mtk-openwrt-lede-4.2.1.0/build_dir/toolchain-mipsel_24kc_gcc-5.4.0_musl-1.1.16/gcc-5.4.0/gcc/reorg.c:106:
/home/snow/openwrt/lede/mtk-openwrt-lede-4.2.1.0/build_dir/toolchain-mipsel_24kc_gcc-5.4.0_musl-1.1.16/gcc-5.4.0/gcc/defaults.h:126:24: warning: invalid suffix on literal; C++11 requires a space between literal and string macro [-Wliteral-suffix]
126 | fprintf ((FILE), ","HOST_WIDE_INT_PRINT_UNSIGNED",%u\n", \
| ^
In file included from /home/snow/openwrt/lede/mtk-openwrt-lede-4.2.1.0/build_dir/toolchain-mipsel_24kc_gcc-5.4.0_musl-1.1.16/gcc-5.4.0/gcc/reorg.c:142:
/home/snow/openwrt/lede/mtk-openwrt-lede-4.2.1.0/build_dir/toolchain-mipsel_24kc_gcc-5.4.0_musl-1.1.16/gcc-5.4.0/gcc/recog.h:357:5: warning: this use of "defined" may not be portable [-Wexpansion-to-defined]
357 | #if HAVE_DESIGNATED_UNION_INITIALIZERS
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /home/snow/openwrt/lede/mtk-openwrt-lede-4.2.1.0/build_dir/toolchain-mipsel_24kc_gcc-5.4.0_musl-1.1.16/gcc-5.4.0/gcc/reorg.c:142:
/home/snow/openwrt/lede/mtk-openwrt-lede-4.2.1.0/build_dir/toolchain-mipsel_24kc_gcc-5.4.0_musl-1.1.16/gcc-5.4.0/gcc/recog.h: In member function 'rtx_def* insn_gen_fn::operator()(rtx) const':
/home/snow/openwrt/lede/mtk-openwrt-lede-4.2.1.0/build_dir/toolchain-mipsel_24kc_gcc-5.4.0_musl-1.1.16/gcc-5.4.0/gcc/recog.h:302:48: warning: cast between incompatible function types from 'insn_gen_fn::stored_funcptr' {aka 'rtx_def* (*)()'} to 'insn_gen_fn::f1' {aka 'rtx_def* (*)(rtx_def*)'} [-Wcast-function-type]
302 | rtx operator () (rtx a0) const { return ((f1)func) (a0); }
| ^~~~
/home/snow/openwrt/lede/mtk-openwrt-lede-4.2.1.0/build_dir/toolchain-mipsel_24kc_gcc-5.4.0_musl-1.1.16/gcc-5.4.0/gcc/recog.h: In member function 'rtx_def* insn_gen_fn::operator()(rtx, rtx) const':
/home/snow/openwrt/lede/mtk-openwrt-lede-4.2.1.0/build_dir/toolchain-mipsel_24kc_gcc-5.4.0_musl-1.1.16/gcc-5.4.0/gcc/recog.h:303:56: warning: cast between incompatible function types from 'insn_gen_fn::stored_funcptr' {aka 'rtx_def* (*)()'} to 'insn_gen_fn::f2' {aka 'rtx_def* (*)(rtx_def*, rtx_def*)'} [-Wcast-function-type]
303 | rtx operator () (rtx a0, rtx a1) const { return ((f2)func) (a0, a1); }
| ^~~~
/home/snow/openwrt/lede/mtk-openwrt-lede-4.2.1.0/build_dir/toolchain-mipsel_24kc_gcc-5.4.0_musl-1.1.16/gcc-5.4.0/gcc/recog.h: In member function 'rtx_def* insn_gen_fn::operator()(rtx, rtx, rtx) const':
/home/snow/openwrt/lede/mtk-openwrt-lede-4.2.1.0/build_dir/toolchain-mipsel_24kc_gcc-5.4.0_musl-1.1.16/gcc-5.4.0/gcc/recog.h:304:64: warning: cast between incompatible function types from 'insn_gen_fn::stored_funcptr' {aka 'rtx_def* (*)()'} to 'insn_gen_fn::f3' {aka 'rtx_def* (*)(rtx_def*, rtx_def*, rtx_def*)'} [-Wcast-function-type]
304 | rtx operator () (rtx a0, rtx a1, rtx a2) const { return ((f3)func) (a0, a1, a2); }
| ^~~~
/home/snow/openwrt/lede/mtk-openwrt-lede-4.2.1.0/build_dir/toolchain-mipsel_24kc_gcc-5.4.0_musl-1.1.16/gcc-5.4.0/gcc/recog.h: In member function 'rtx_def* insn_gen_fn::operator()(rtx, rtx, rtx, rtx) const':
/home/snow/openwrt/lede/mtk-openwrt-lede-4.2.1.0/build_dir/toolchain-mipsel_24kc_gcc-5.4.0_musl-1.1.16/gcc-5.4.0/gcc/recog.h:305:72: warning: cast between incompatible function types from 'insn_gen_fn::stored_funcptr' {aka 'rtx_def* (*)()'} to 'insn_gen_fn::f4' {aka 'rtx_def* (*)(rtx_def*, rtx_def*, rtx_def*, rtx_def*)'} [-Wcast-function-type]
305 | rtx operator () (rtx a0, rtx a1, rtx a2, rtx a3) const { return ((f4)func) (a0, a1, a2, a3); }
| ^~~~
/home/snow/openwrt/lede/mtk-openwrt-lede-4.2.1.0/build_dir/toolchain-mipsel_24kc_gcc-5.4.0_musl-1.1.16/gcc-5.4.0/gcc/recog.h: In member function 'rtx_def* insn_gen_fn::operator()(rtx, rtx, rtx, rtx, rtx) const':
/home/snow/openwrt/lede/mtk-openwrt-lede-4.2.1.0/build_dir/toolchain-mipsel_24kc_gcc-5.4.0_musl-1.1.16/gcc-5.4.0/gcc/recog.h:306:80: warning: cast between incompatible function types from 'insn_gen_fn::stored_funcptr' {aka 'rtx_def* (*)()'} to 'insn_gen_fn::f5' {aka 'rtx_def* (*)(rtx_def*, rtx_def*, rtx_def*, rtx_def*, rtx_def*)'} [-Wcast-function-type]
306 | rtx operator () (rtx a0, rtx a1, rtx a2, rtx a3, rtx a4) const { return ((f5)func) (a0, a1, a2, a3, a4); }
| ^~~~
/home/snow/openwrt/lede/mtk-openwrt-lede-4.2.1.0/build_dir/toolchain-mipsel_24kc_gcc-5.4.0_musl-1.1.16/gcc-5.4.0/gcc/recog.h: In member function 'rtx_def* insn_gen_fn::operator()(rtx, rtx, rtx, rtx, rtx, rtx) const':
/home/snow/openwrt/lede/mtk-openwrt-lede-4.2.1.0/build_dir/toolchain-mipsel_24kc_gcc-5.4.0_musl-1.1.16/gcc-5.4.0/gcc/recog.h:307:88: warning: cast between incompatible function types from 'insn_gen_fn::stored_funcptr' {aka 'rtx_def* (*)()'} to 'insn_gen_fn::f6' {aka 'rtx_def* (*)(rtx_def*, rtx_def*, rtx_def*, rtx_def*, rtx_def*, rtx_def*)'} [-Wcast-function-type]
307 | rtx operator () (rtx a0, rtx a1, rtx a2, rtx a3, rtx a4, rtx a5) const { return ((f6)func) (a0, a1, a2, a3, a4, a5); }
| ^~~~
/home/snow/openwrt/lede/mtk-openwrt-lede-4.2.1.0/build_dir/toolchain-mipsel_24kc_gcc-5.4.0_musl-1.1.16/gcc-5.4.0/gcc/recog.h: In member function 'rtx_def* insn_gen_fn::operator()(rtx, rtx, rtx, rtx, rtx, rtx, rtx) const':
/home/snow/openwrt/lede/mtk-openwrt-lede-4.2.1.0/build_dir/toolchain-mipsel_24kc_gcc-5.4.0_musl-1.1.16/gcc-5.4.0/gcc/recog.h:308:96: warning: cast between incompatible function types from 'insn_gen_fn::stored_funcptr' {aka 'rtx_def* (*)()'} to 'insn_gen_fn::f7' {aka 'rtx_def* (*)(rtx_def*, rtx_def*, rtx_def*, rtx_def*, rtx_def*, rtx_def*, rtx_def*)'} [-Wcast-function-type]
308 | rtx operator () (rtx a0, rtx a1, rtx a2, rtx a3, rtx a4, rtx a5, rtx a6) const { return ((f7)func) (a0, a1, a2, a3, a4, a5, a6); }
| ^~~~
In file included from /home/snow/openwrt/lede/mtk-openwrt-lede-4.2.1.0/build_dir/toolchain-mipsel_24kc_gcc-5.4.0_musl-1.1.16/gcc-5.4.0/gcc/reorg.c:142:
/home/snow/openwrt/lede/mtk-openwrt-lede-4.2.1.0/build_dir/toolchain-mipsel_24kc_gcc-5.4.0_musl-1.1.16/gcc-5.4.0/gcc/recog.h: In member function 'rtx_def* insn_gen_fn::operator()(rtx, rtx, rtx, rtx, rtx, rtx, rtx, rtx) const':
/home/snow/openwrt/lede/mtk-openwrt-lede-4.2.1.0/build_dir/toolchain-mipsel_24kc_gcc-5.4.0_musl-1.1.16/gcc-5.4.0/gcc/recog.h:309:104: warning: cast between incompatible function types from 'insn_gen_fn::stored_funcptr' {aka 'rtx_def* (*)()'} to 'insn_gen_fn::f8' {aka 'rtx_def* (*)(rtx_def*, rtx_def*, rtx_def*, rtx_def*, rtx_def*, rtx_def*, rtx_def*, rtx_def*)'} [-Wcast-function-type]
309 | rtx operator () (rtx a0, rtx a1, rtx a2, rtx a3, rtx a4, rtx a5, rtx a6, rtx a7) const { return ((f8)func) (a0, a1, a2, a3, a4, a5, a6, a7); }
| ^~~~
/home/snow/openwrt/lede/mtk-openwrt-lede-4.2.1.0/build_dir/toolchain-mipsel_24kc_gcc-5.4.0_musl-1.1.16/gcc-5.4.0/gcc/recog.h: In member function 'rtx_def* insn_gen_fn::operator()(rtx, rtx, rtx, rtx, rtx, rtx, rtx, rtx, rtx) const':
/home/snow/openwrt/lede/mtk-openwrt-lede-4.2.1.0/build_dir/toolchain-mipsel_24kc_gcc-5.4.0_musl-1.1.16/gcc-5.4.0/gcc/recog.h:310:112: warning: cast between incompatible function types from 'insn_gen_fn::stored_funcptr' {aka 'rtx_def* (*)()'} to 'insn_gen_fn::f9' {aka 'rtx_def* (*)(rtx_def*, rtx_def*, rtx_def*, rtx_def*, rtx_def*, rtx_def*, rtx_def*, rtx_def*, rtx_def*)'} [-Wcast-function-type]
310 | rtx operator () (rtx a0, rtx a1, rtx a2, rtx a3, rtx a4, rtx a5, rtx a6, rtx a7, rtx a8) const { return ((f9)func) (a0, a1, a2, a3, a4, a5, a6, a7, a8); }
| ^~~~
/home/snow/openwrt/lede/mtk-openwrt-lede-4.2.1.0/build_dir/toolchain-mipsel_24kc_gcc-5.4.0_musl-1.1.16/gcc-5.4.0/gcc/recog.h: In member function 'rtx_def* insn_gen_fn::operator()(rtx, rtx, rtx, rtx, rtx, rtx, rtx, rtx, rtx, rtx) const':
/home/snow/openwrt/lede/mtk-openwrt-lede-4.2.1.0/build_dir/toolchain-mipsel_24kc_gcc-5.4.0_musl-1.1.16/gcc-5.4.0/gcc/recog.h:311:121: warning: cast between incompatible function types from 'insn_gen_fn::stored_funcptr' {aka 'rtx_def* (*)()'} to 'insn_gen_fn::f10' {aka 'rtx_def* (*)(rtx_def*, rtx_def*, rtx_def*, rtx_def*, rtx_def*, rtx_def*, rtx_def*, rtx_def*, rtx_def*, rtx_def*)'} [-Wcast-function-type]
311 | rtx operator () (rtx a0, rtx a1, rtx a2, rtx a3, rtx a4, rtx a5, rtx a6, rtx a7, rtx a8, rtx a9) const { return ((f10)func) (a0, a1, a2, a3, a4, a5, a6, a7, a8, a9); }
| ^~~~
/home/snow/openwrt/lede/mtk-openwrt-lede-4.2.1.0/build_dir/toolchain-mipsel_24kc_gcc-5.4.0_musl-1.1.16/gcc-5.4.0/gcc/recog.h: In member function 'rtx_def* insn_gen_fn::operator()(rtx, rtx, rtx, rtx, rtx, rtx, rtx, rtx, rtx, rtx, rtx) const':
/home/snow/openwrt/lede/mtk-openwrt-lede-4.2.1.0/build_dir/toolchain-mipsel_24kc_gcc-5.4.0_musl-1.1.16/gcc-5.4.0/gcc/recog.h:312:130: warning: cast between incompatible function types from 'insn_gen_fn::stored_funcptr' {aka 'rtx_def* (*)()'} to 'insn_gen_fn::f11' {aka 'rtx_def* (*)(rtx_def*, rtx_def*, rtx_def*, rtx_def*, rtx_def*, rtx_def*, rtx_def*, rtx_def*, rtx_def*, rtx_def*, rtx_def*)'} [-Wcast-function-type]
312 | rtx operator () (rtx a0, rtx a1, rtx a2, rtx a3, rtx a4, rtx a5, rtx a6, rtx a7, rtx a8, rtx a9, rtx a10) const { return ((f11)func) (a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10); }
| ^~~~
/home/snow/openwrt/lede/mtk-openwrt-lede-4.2.1.0/build_dir/toolchain-mipsel_24kc_gcc-5.4.0_musl-1.1.16/gcc-5.4.0/gcc/recog.h: In member function 'rtx_def* insn_gen_fn::operator()(rtx, rtx, rtx, rtx, rtx, rtx, rtx, rtx, rtx, rtx, rtx, rtx) const':
/home/snow/openwrt/lede/mtk-openwrt-lede-4.2.1.0/build_dir/toolchain-mipsel_24kc_gcc-5.4.0_musl-1.1.16/gcc-5.4.0/gcc/recog.h:313:139: warning: cast between incompatible function types from 'insn_gen_fn::stored_funcptr' {aka 'rtx_def* (*)()'} to 'insn_gen_fn::f12' {aka 'rtx_def* (*)(rtx_def*, rtx_def*, rtx_def*, rtx_def*, rtx_def*, rtx_def*, rtx_def*, rtx_def*, rtx_def*, rtx_def*, rtx_def*, rtx_def*)'} [-Wcast-function-type]
313 | rtx operator () (rtx a0, rtx a1, rtx a2, rtx a3, rtx a4, rtx a5, rtx a6, rtx a7, rtx a8, rtx a9, rtx a10, rtx a11) const { return ((f12)func) (a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11); }
| ^~~~
/home/snow/openwrt/lede/mtk-openwrt-lede-4.2.1.0/build_dir/toolchain-mipsel_24kc_gcc-5.4.0_musl-1.1.16/gcc-5.4.0/gcc/recog.h: In member function 'rtx_def* insn_gen_fn::operator()(rtx, rtx, rtx, rtx, rtx, rtx, rtx, rtx, rtx, rtx, rtx, rtx, rtx) const':
/home/snow/openwrt/lede/mtk-openwrt-lede-4.2.1.0/build_dir/toolchain-mipsel_24kc_gcc-5.4.0_musl-1.1.16/gcc-5.4.0/gcc/recog.h:314:148: warning: cast between incompatible function types from 'insn_gen_fn::stored_funcptr' {aka 'rtx_def* (*)()'} to 'insn_gen_fn::f13' {aka 'rtx_def* (*)(rtx_def*, rtx_def*, rtx_def*, rtx_def*, rtx_def*, rtx_def*, rtx_def*, rtx_def*, rtx_def*, rtx_def*, rtx_def*, rtx_def*, rtx_def*)'} [-Wcast-function-type]
314 | rtx operator () (rtx a0, rtx a1, rtx a2, rtx a3, rtx a4, rtx a5, rtx a6, rtx a7, rtx a8, rtx a9, rtx a10, rtx a11, rtx a12) const { return ((f13)func) (a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12); }
| ^~~~
/home/snow/openwrt/lede/mtk-openwrt-lede-4.2.1.0/build_dir/toolchain-mipsel_24kc_gcc-5.4.0_musl-1.1.16/gcc-5.4.0/gcc/recog.h: In member function 'rtx_def* insn_gen_fn::operator()(rtx, rtx, rtx, rtx, rtx, rtx, rtx, rtx, rtx, rtx, rtx, rtx, rtx, rtx) const':
/home/snow/openwrt/lede/mtk-openwrt-lede-4.2.1.0/build_dir/toolchain-mipsel_24kc_gcc-5.4.0_musl-1.1.16/gcc-5.4.0/gcc/recog.h:315:157: warning: cast between incompatible function types from 'insn_gen_fn::stored_funcptr' {aka 'rtx_def* (*)()'} to 'insn_gen_fn::f14' {aka 'rtx_def* (*)(rtx_def*, rtx_def*, rtx_def*, rtx_def*, rtx_def*, rtx_def*, rtx_def*, rtx_def*, rtx_def*, rtx_def*, rtx_def*, rtx_def*, rtx_def*, rtx_def*)'} [-Wcast-function-type]
315 | rtx operator () (rtx a0, rtx a1, rtx a2, rtx a3, rtx a4, rtx a5, rtx a6, rtx a7, rtx a8, rtx a9, rtx a10, rtx a11, rtx a12, rtx a13) const { return ((f14)func) (a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13); }
| ^~~~
/home/snow/openwrt/lede/mtk-openwrt-lede-4.2.1.0/build_dir/toolchain-mipsel_24kc_gcc-5.4.0_musl-1.1.16/gcc-5.4.0/gcc/recog.h: In member function 'rtx_def* insn_gen_fn::operator()(rtx, rtx, rtx, rtx, rtx, rtx, rtx, rtx, rtx, rtx, rtx, rtx, rtx, rtx, rtx) const':
/home/snow/openwrt/lede/mtk-openwrt-lede-4.2.1.0/build_dir/toolchain-mipsel_24kc_gcc-5.4.0_musl-1.1.16/gcc-5.4.0/gcc/recog.h:316:166: warning: cast between incompatible function types from 'insn_gen_fn::stored_funcptr' {aka 'rtx_def* (*)()'} to 'insn_gen_fn::f15' {aka 'rtx_def* (*)(rtx_def*, rtx_def*, rtx_def*, rtx_def*, rtx_def*, rtx_def*, rtx_def*, rtx_def*, rtx_def*, rtx_def*, rtx_def*, rtx_def*, rtx_def*, rtx_def*, rtx_def*)'} [-Wcast-function-type]
316 | rtx operator () (rtx a0, rtx a1, rtx a2, rtx a3, rtx a4, rtx a5, rtx a6, rtx a7, rtx a8, rtx a9, rtx a10, rtx a11, rtx a12, rtx a13, rtx a14) const { return ((f15)func) (a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14); }
| ^~~~
/home/snow/openwrt/lede/mtk-openwrt-lede-4.2.1.0/build_dir/toolchain-mipsel_24kc_gcc-5.4.0_musl-1.1.16/gcc-5.4.0/gcc/recog.h: In member function 'rtx_def* insn_gen_fn::operator()(rtx, rtx, rtx, rtx, rtx, rtx, rtx, rtx, rtx, rtx, rtx, rtx, rtx, rtx, rtx, rtx) const':
/home/snow/openwrt/lede/mtk-openwrt-lede-4.2.1.0/build_dir/toolchain-mipsel_24kc_gcc-5.4.0_musl-1.1.16/gcc-5.4.0/gcc/recog.h:317:175: warning: cast between incompatible function types from 'insn_gen_fn::stored_funcptr' {aka 'rtx_def* (*)()'} to 'insn_gen_fn::f16' {aka 'rtx_def* (*)(rtx_def*, rtx_def*, rtx_def*, rtx_def*, rtx_def*, rtx_def*, rtx_def*, rtx_def*, rtx_def*, rtx_def*, rtx_def*, rtx_def*, rtx_def*, rtx_def*, rtx_def*, rtx_def*)'} [-Wcast-function-type]
317 | operator () (rtx a0, rtx a1, rtx a2, rtx a3, rtx a4, rtx a5, rtx a6, rtx a7, rtx a8, rtx a9, rtx a10, rtx a11, rtx a12, rtx a13, rtx a14, rtx a15) const { return ((f16)func) (a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15); }
| ^~~~
x86_64-linux-gnu-g++ -c -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 -I. -I. -I/home/snow/openwrt/lede/mtk-openwrt-lede-4.2.1.0/build_dir/toolchain-mipsel_24kc_gcc-5.4.0_musl-1.1.16/gcc-5.4.0/gcc -I/home/snow/openwrt/lede/mtk-openwrt-lede-4.2.1.0/build_dir/toolchain-mipsel_24kc_gcc-5.4.0_musl-1.1.16/gcc-5.4.0/gcc/. -I/home/snow/openwrt/lede/mtk-openwrt-lede-4.2.1.0/build_dir/toolchain-mipsel_24kc_gcc-5.4.0_musl-1.1.16/gcc-5.4.0/gcc/../include -I/home/snow/openwrt/lede/mtk-openwrt-lede-4.2.1.0/build_dir/toolchain-mipsel_24kc_gcc-5.4.0_musl-1.1.16/gcc-5.4.0/gcc/../libcpp/include -I/home/snow/openwrt/lede/mtk-openwrt-lede-4.2.1.0/staging_dir/host/include -I/home/snow/openwrt/lede/mtk-openwrt-lede-4.2.1.0/staging_dir/host/include -I/home/snow/openwrt/lede/mtk-openwrt-lede-4.2.1.0/staging_dir/host/include -I/home/snow/openwrt/lede/mtk-openwrt-lede-4.2.1.0/build_dir/toolchain-mipsel_24kc_gcc-5.4.0_musl-1.1.16/gcc-5.4.0/gcc/../libdecnumber -I/home/snow/openwrt/lede/mtk-openwrt-lede-4.2.1.0/build_dir/toolchain-mipsel_24kc_gcc-5.4.0_musl-1.1.16/gcc-5.4.0/gcc/../libdecnumber/dpd -I../libdecnumber -I/home/snow/openwrt/lede/mtk-openwrt-lede-4.2.1.0/build_dir/toolchain-mipsel_24kc_gcc-5.4.0_musl-1.1.16/gcc-5.4.0/gcc/../libbacktrace -o resource.o -MT resource.o -MMD -MP -MF ./.deps/resource.TPo /home/snow/openwrt/lede/mtk-openwrt-lede-4.2.1.0/build_dir/toolchain-mipsel_24kc_gcc-5.4.0_musl-1.1.16/gcc-5.4.0/gcc/resource.c
编译成功
- 由于博客篇幅限制,编译结果输出记录在此文
故障排除
使用make选项" make V=s" 获取有关该问题的更多详细信息,如 make download V=s
文章来源地址https://www.toymoban.com/news/detail-522406.html
使用技巧
/* 扫描AP */
iwpriv ra0 set SiteSurvey=1
iwpriv ra0 get_site_survey
- 相关博文
Openwrt flash分区、文件系统
OpenWrt-flash分区结构
Openwrt双固件升级
到了这里,关于OpenWRT LEDE在Ubuntu22.04 编译全过程记录的文章就介绍完了。如果您还想了解更多内容,请在右上角搜索TOY模板网以前的文章或继续浏览下面的相关文章,希望大家以后多多支持TOY模板网!