Hi all, I've been trying to cross-compile various versions of gcc using the Synology DSM6 and DSM7 toolchains and kernel for various archs (armv5-7-8, ppc, i686, x64). Over the years I've been actively working on the SynoCommunity project that provides a framework to help integrate free software and generate linux packages that can be installed on Synology NAS (ref: https://github.com/SynoCommunity/spksrc) Pertaining to gcc, my first attempt has been to try to build the same compiler as the one used on various versions of DSM6 (gcc-4.9) and DSM7 (gcc-7.5). In order to do so I use the Synology provided toolchain and prepare the associated kernel with proper platform configuration in order to provide its headers. In extra I look forward into applying crosstool-ng patches. As a relatively "simple" example, I've been working on cross-compiling for a x86_64 host/target using DSM6 with gcc-4.9.4. So far I was only able to build the gcc C compiler (beginner's luck?). Enabling any other languages fails so has trying newer versions of gcc on that particular platform. >From my reading I've associated my sysroot with the proper toolchain and added linux headers as extra includes. I believe I'm close but probably missing something obvious (which is why I'm now asking for a bit of extra help :) Build options are as follows (partially based on linux from scratch gcc 4.9.2), makefile variables naming being parsed by the framework: CONFIGURE_ARGS = --disable-bootstrap #CONFIGURE_ARGS += --enable-languages=c CONFIGURE_ARGS += --enable-languages=c,c++ #CONFIGURE_ARGS += --enable-languages=c,c++,fortran,go,objc,obj-c++ CONFIGURE_ARGS += --enable-shared CONFIGURE_ARGS += --enable-threads=posix CONFIGURE_ARGS += --enable-__cxa_atexit CONFIGURE_ARGS += --enable-clocale=gnu CONFIGURE_ARGS += --disable-plugins CONFIGURE_ARGS += --disable-multilib CONFIGURE_ARGS += --with-system-zlib CONFIGURE_ARGS += --with-build-sysroot=$(TC_SYSROOT) #CONFIGURE_ARGS += --with-sysroot=$(TC_SYSROOT) # Otherwise fails ADDITIONAL_CFLAGS += -Wno-error # kernel headers ADDITIONAL_CFLAGS += -I$(WORK_DIR)/linux-$(ARCH)-$(TCVERSION)/arch/$(ARCH)/include ADDITIONAL_CPPFLAGS += -I$(WORK_DIR)/linux-$(ARCH)-$(TCVERSION)/arch/$(ARCH)/include Considering that by default the framework provides: --host=$(TC_TARGET) --build=i686-pc-linux Guidance would be much welcomed :) - vin (@th0ma7)