This is the mail archive of the gcc-help@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: building gcc for mipsel


On Mon, Aug 22 2016, Kai Ruottu wrote:

> Are you this same "Peter" who targets to OpenWRT?

Hi Kai,

Yes.


> Then maybe the discussion here helps :
>
> https://forum.openwrt.org/viewtopic.php?id=22968

Thanks. I've built an OpenWRT-SDK but I still get "opcode not supported"...


> "everything from absolute scratch" propaganda stating that "only
> sources are allowed" when the question is about crosstoolchains.

Before asking my question here, I've really tried hard to build with the
OpenWRT toolchain, often it failed after about 30 minutes of
compilation. It's not obvious then for me, who is to blame (gcc, the
provided patches, the toolchain or me...) and where to ask questions.


On Mon, Aug 22 2016, Kai Ruottu wrote:

>> That's why I try to build it from scratch, only by using the gcc source code.
>>
> Ok, here are the normal steps for a crosstoolchain :

Thanks you very much for your howto, I'll try it soon.


On Mon, Aug 22 2016, Kai Ruottu wrote:

>> The use of stuff for 'mips16' could come from the '-elf' choice,
>> Linux not using these 16-bit opcodes at all...
>
> Seemingly I was wrong... I checked from my 'mips64el-linux-gnu'
> targeted crosstoolchain (gcc-4.8.3) and its libgcc had these objects
> being produced. But of course produced with the just built GCC, not
> with some earlier made GCC (your ' mipsel-openwrt-linux-musl-gcc').
> 
> [...]
> 
> Also in my gcc-5.1.0 based toolchain these things were in the same way, the
> glibc
> from Debian was only changed to glibc-2.13...
>
> [root@localhost 5.1.0]# mips64el-linux-gnu-gcc-5.1 -v

This is the output of the OpenWRT cross-gcc:
./mipsel-openwrt-linux-gcc -v
Reading specs from /home/peter/soft/wl-500gp/no-backup/staging_dir/toolchain-mipsel_mips32_gcc-5.3.0_glibc-2.22/bin/../lib64/gcc/mipsel-openwrt-linux-gnu/5.3.0/specs
COLLECT_GCC=./mipsel-openwrt-linux-gcc
COLLECT_LTO_WRAPPER=/home/peter/soft/wl-500gp/no-backup/staging_dir/toolchain-mipsel_mips32_gcc-5.3.0_glibc-2.22/bin/../lib/gcc/mipsel-openwrt-linux-gnu/5.3.0/lto-wrapper
Target: mipsel-openwrt-linux-gnu
Configured with:
/home/peter/soft/wl-500gp/build_dir/toolchain-mipsel_mips32_gcc-5.3.0_glibc-2.22/gcc-5.3.0/configure
--with-bugurl=https://dev.openwrt.org/ --with-pkgversion='OpenWrt GCC
5.3.0 49906'
--prefix=/home/peter/soft/wl-500gp/staging_dir/toolchain-mipsel_mips32_gcc-5.3.0_glibc-2.22
--build=x86_64-suse-linux --host=x86_64-suse-linux
--target=mipsel-openwrt-linux-gnu --with-gnu-ld --enable-target-optspace
--disable-libgomp --disable-libmudflap --disable-multilib --disable-nls
--without-isl --without-cloog --with-host-libstdcxx=-lstdc++
--with-float=soft --with-gmp=/home/peter/soft/wl-500gp/staging_dir/host
--with-mpfr=/home/peter/soft/wl-500gp/staging_dir/host
--with-mpc=/home/peter/soft/wl-500gp/staging_dir/host
--disable-decimal-float --with-mips-plt
--with-diagnostics-color=auto-if-env --enable-libssp
--enable-__cxa_atexit
--with-headers=/home/peter/soft/wl-500gp/staging_dir/toolchain-mipsel_mips32_gcc-5.3.0_glibc-2.22/include
--disable-libsanitizer --enable-languages=c,c++ --enable-shared
--enable-threads
--with-slibdir=/home/peter/soft/wl-500gp/staging_dir/toolchain-mipsel_mips32_gcc-5.3.0_glibc-2.22/lib
--enable-lto --with-libelf=/home/peter/soft/wl-500gp/staging_dir/host
Thread model: posix
gcc version 5.3.0 (OpenWrt GCC 5.3.0 49906) 

What do you think: is this a problem of the toolchain or of the
gcc-package? If this could be fixed, then it would be much easier to
build gcc for mipsel, than compiling everything from source.

Thanks for your efforts,
-- 
           Peter


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]