On Fri, 17 Jun 2022 at 06:34, Gary Oblock via Gcc-help <gcc-help@xxxxxxxxxxx> wrote: > > Stefan, > > I'm not at all clear which of those many config parameters are meaningfull. > > I borrowed your --target and tried to build with this: > > ../sources/configure --prefix=$BASE/install --disable-bootstrap --enable-language=c --disable-multilib --target=arm-linux-gnueabihf > > That failed like this: > > echo | /home/gary/gcc_build_cross/objdir/./gcc/xgcc -B/home/gary/gcc_build_cross/objdir/./gcc/ -E -dM - | \ > sed -n -e 's/^#define \([^_][a-zA-Z0-9_]*\).*/\1/p' \ > -e 's/^#define \(_[^_A-Z][a-zA-Z0-9_]*\).*/\1/p' | \ > sort -u > tmp-macro_list > cc1: error: no include path in which to search for stdc-predef.h Do you have a sysroot for the target? > There was another error after this: > > checking for arm-linux-gnueabihf-gcc... /home/gary/gcc_build_cross/objdir/./gcc/xgcc -B/home/gary/gcc_build_cross/objdir/./gcc/ -B/home/gary/gcc_build_cross/install/arm-linux-gnueabihf/bin/ -B/home/gary/gcc_build_cross/install/arm-linux-gnueabihf/lib/ -isystem /home/gary/gcc_build_cross/install/arm-linux-gnueabihf/include -isystem /home/gary/gcc_build_cross/install/arm-linux-gnueabihf/sys-include > checking for suffix of object files... configure: error: in `/home/gary/gcc_build_cross/objdir/arm-linux-gnueabihf/libgcc': > configure: error: cannot compute suffix of object files: cannot compile > See `config.log' for more details > make[1]: *** [Makefile:15371: configure-target-libgcc] Error 1 > > Any idea what went wrong? Note I looked at the config.log and there were lots of > errors there too (not that they were helpful to me.) You need to look in arm-linux-gnueabihf/libgcc/config.log not the top-level config.log, and look for the "cannot compute suffix" error. > > Many years ago I set up a simple GCC cross compiler for mips > as the starting point for the person creating a new target for a new chip. > It didn't seems so crazy hard as this is proving to be. It's not crazy hard, you just have to do the right steps in the right order. It's not obvious, and not very well documented, but it's not actually difficult. Just a few commands in the right order.