You'll need at least gcc-9/gdc-9 to build gcc-13.

Version problem was fixed by building `gcc-12.3.0` with `gdc` enabled on local host, and using it for the whole build in place of system-provided `gcc` toolchain.

```Makefile
# version
GCC_VER      = 12.3.0
```
```Makefile
# tool
GDCH = /usr/local/bin/gdc-12
CCH  = /usr/local/bin/gcc-12
CXXH = /usr/local/bin/g++-12
```
```Makefile
GCC_HOST    = GDC=$(GDCH) CC=$(CCH) CXX=$(CXXH)
```
```Makefile
CFG_GCCH = --prefix=/usr/local $(WITH_GCCLIBS) --enable-languages="c,c++,d" \ --program-suffix="-12" $(OPT_HOST) \
                   $(GCC_DISABLE) $(GCC_ENABLE)
```
```Makefile
CFG_GCC1 = $(CFG_BINUTILS1) $(WITH_GCCLIBS) --enable-languages="c,c++,d" \ --with-headers=$(ROOT)/usr/include $(GCC_HOST) \
           $(GCC_DISABLE) $(GCC_ENABLE)
```

Reply via email to