Your opkg manager is downloading packages from OpenWRT 19, that using GCC 7 or higher.
I fixed it by installing GCC with flags: force and without dependence, than all the dependence was installed manual. The list of depends you can found in the OpenWRT repository.
Now I'm using GCC 7 on the Onion OS (based OpenWRT 18), with no problems includes GDB debugger.
There seems to be a conflict between the standard Omega opkg sources and the lede-based sources that the Onion guys said to add to distfeeds.conf. lede sources want to install a later version of gcc and gdb, and dependencies get out of whack.