[Solved]Help needed on troubleshooting: libc.so traps in x86 builds by gcc 7.30

I am building LEDE x86 r6328 on Ubutu 17.10 X64.
All would be fine except lack of retopline support with toolchain options Binutils 2.29.1 and GCC 6.3.0, however, with toolchain options Binutils 2.29.1 and GCC 7.3.0, I am getting a few follow traps in kernel log:

[    3.617564] traps: lock[946] general protection ip:b7f79dd8 sp:bf817064 error:0 in libc.so[b7f33000+65000]
[    4.963556] traps: mount[969] general protection ip:b7f9ddd8 sp:bfb49254 error:0 in libc.so[b7f57000+65000]
[    8.550569] traps: date[1721] general protection ip:b7f5794f sp:bf8c5184 error:0 in libc.so[b7f28000+65000]
[    9.081346] traps: awk[2070] general protection ip:b7f01e73 sp:bfafb108 error:0 in libc.so[b7ee7000+65000]
[   54.539984] traps: basename[3359] general protection ip:b7f8e94f sp:bf8dfd8c error:0 in libc.so[b7f5f000+65000] 

The build seems to be working though I don't know if something background is broken.
There are a few related coredumps in /var.
I am trying to figure out if it's a libc or busybox issue, but don't know where to look at for troubleshooting.
Suggestions appreciated. Thanks.

it's a GCC issue

there's this discussion:

maybe checkout which GCC version works now for which x86 sub-target

Thanks for the head up. I will try to change the busybox build option in make menuconfig to see if something will make a difference.

not sure if you have any findings.
I compiled lede r6395-6c19407 on ubuntu 32bit 16.04.4 LTS Linux U32 4.14.0-041400-generic, target is x86.
then the image was running on my x86 machine, but tried to run ifconfig, it gave me errror in libc.so:

root@OpenWrt: ifconfig
[ 582.302960] traps: ifconfig[3031] general protection ip:b7fc7dd8 sp:bff405e8 error:0 in libc.so[b7f81000+65000]
Segmentation fault

Fixed in https://github.com/openwrt/openwrt/commit/b8d9a064f08614ac6f6b0ec26eab1450cf8b7544

Thank you. just had a try on latest (r6503-5faa955). it's running good.