我想要指向mipsel-openwrt-linux-gcc这条工具链,但是却有报错,不解

~$ mipsel-openwrt-linux-gcc -v
mipsel-openwrt-linux-uclibc-gcc: fatal error: no input files
compilation terminated.
~$ mipsel-openwrt-linux-uclibc-gcc -v
Reading specs from /home/chongchong/OpenWrt-SDK-ramips-mt7621_gcc-4.8-linaro_uClibc-0.9.33.2.Linux-x86_64/staging_dir/toolchain-mipsel_24kec+dsp_gcc-4.8-linaro_uClibc-0.9.33.2/bin/../lib/gcc/mipsel-openwrt-linux-uclibc/4.8.3/specs
COLLECT_GCC=mipsel-openwrt-linux-uclibc-gcc
Target: mipsel-openwrt-linux-uclibc
Configured with: /home/worker/gtk5010/openwrt-sdk/build_dir/toolchain-mipsel_24kec+dsp_gcc-4.8-linaro_uClibc-0.9.33.2/gcc-linaro-4.8-2014.04/configure --with-bugurl=https://dev.openwrt.org/ --with-pkgversion='OpenWrt/Linaro GCC 4.8-2014.04 unknown' --prefix=/home/worker/gtk5010/openwrt-sdk/staging_dir/toolchain-mipsel_24kec+dsp_gcc-4.8-linaro_uClibc-0.9.33.2 --build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=mipsel-openwrt-linux-uclibc --with-gnu-ld --enable-target-optspace --disable-libgomp --disable-libmudflap --disable-multilib --disable-nls --with-host-libstdcxx=-lstdc++ --with-float=soft --with-gmp=/home/worker/gtk5010/openwrt-sdk/staging_dir/host --with-mpfr=/home/worker/gtk5010/openwrt-sdk/staging_dir/host --with-mpc=/home/worker/gtk5010/openwrt-sdk/staging_dir/host --disable-decimal-float --with-mips-plt --disable-libssp --disable-__cxa_atexit --with-headers=/home/worker/gtk5010/openwrt-sdk/staging_dir/toolchain-mipsel_24kec+dsp_gcc-4.8-linaro_uClibc-0.9.33.2/include --disable-libsanitizer --enable-languages=c,c++ --enable-shared --enable-threads --with-slibdir=/home/worker/gtk5010/openwrt-sdk/staging_dir/toolchain-mipsel_24kec+dsp_gcc-4.8-linaro_uClibc-0.9.33.2/lib
Thread model: posix
gcc version 4.8.3 (OpenWrt/Linaro GCC 4.8-2014.04 unknown)

该回答引用ChatGPT

根据您提供的信息,mipsel-openwrt-linux-gcc提示没有输入文件,这通常意味着您需要提供一个或多个源文件或对象文件作为输入。请确保您在命令行中正确指定了要编译的源文件。

另一方面,mipsel-openwrt-linux-uclibc-gcc显示了GCC的版本和配置信息,表明工具链已正确安装并配置。您可以使用这个工具链来编译您的代码,例如:


mipsel-openwrt-linux-uclibc-gcc -o myprogram myprogram.c

这将编译myprogram.c文件并将可执行文件保存为myprogram。请注意,您需要将myprogram.c替换为您要编译的实际源文件的名称。