I'm wondering if there are any ways I can install GCC 8 on OpenWRT? At this point I'm getting GCC 7, and trying to install some Ruby gems. However, I'm getting
arm-openwrt-linux-muslgnueabi-gcc: error: unrecognized command line option '-ffile-prefix-map...
So ffile-prefix-map option is not supported on GCC 7.
I can cross-compile, but only simple C programs. I'm looking for ways to install GCC 8 on OpenWrt. I understand there is no package, but maybe there is some other package sources or direct links to ipks?
OpenWrt isn't self-hosting, there are no header- or development libraries packaged - the runtime installable gcc won't do more than compiling the most trivial hello_world.c sources without external dependencies.
I'm using just gem install ffi inside the OpenWrt, and I hope it will compile things with GCC 8.
With cross-compile I can compile, but can't figure out how to install/create the Ruby gem on host machine. There is no any instructions available, I spend like 20 hours or so on that. So it's easier for me just to compile inside the router.
The runtime installable gcc package is not going to help you with that, regardless of the version. Only the cross-compiler has those features, at build-time.
I never try to select/switch GCC versions. I noticed different openwrt version using different GCC, .config file has the info.
v21.02.0 uses GCC-8.4 and snapshot uses GCC-11.3, maybe it's devices dependent also.
If it's true, do you mind running opkg install gcc on that system and paste the link to GCC v8?
I see there is v7 package https://openwrt.org/packages/pkgdata/gcc - but there is no any v8. If I have a link I can install it just with opkg install https://downloads... - in other words, with URL.