I have a mips host which uses distcc to distribute builds to localhost and remote x86_64 machine. Building dev-util/strace-4.10 fails: >>> Compiling source in /var/tmp/portage/dev-util/strace-4.10/work/strace-4.10 ... make -j2 cat linux/mips/ioctls_inc0.h linux/mips/ioctls_arch0.h > ioctls_all0.h gcc -DHAVE_CONFIG_H -I. -I./linux/mips -I./linux/mips -I./linux -I./linux -Wall -Wwrite-strings -Wsign-compare -g -O2 -DIOCTLSORT_INC=\"ioctls_all0.h\" -c -o ioctlsort0.o ./ioctlsort.c ./ioctlsort.c: In function ‘compare_name_info’: ./ioctlsort.c:66:174: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast] [...] ./ioctlsort.c:112:1762: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast] gcc -Wall -Wwrite-strings -Wsign-compare -g -O2 ioctlsort0.o -o ioctlsort0 /usr/lib/gcc/mips64el-unknown-linux-gnu/4.9.2/../../../../mips64el-unknown-linux-gnu/bin/ld: ioctlsort0.o: Relocations in generic ELF (EM: 62) [...] ioctlsort0.o: error adding symbols: File in wrong format collect2: error: ld returned 1 exit status distcc[10309] ERROR: compile (null) on localhost failed This is config.log: $ ./configure --prefix=/usr --build=mips64el-unknown-linux-gnu --host=mips64el-unknown-linux-gnu --mandir=/usr/share/man --infodir=/usr/share/info --datadir=/usr/share --sysconfdir=/etc --localstatedir=/var/lib --disable-dependency-tracking --libdir=/usr/lib32 [...] CC='mips64el-unknown-linux-gnu-gcc' CCDEPMODE='depmode=none' CC_FOR_BUILD='gcc' And the use in the Makefile.am: ioctlsort_CC = $(CC_FOR_BUILD) ioctlsort_DEFS = $(DEFS) ioctlsort_INCLUDES = $(DEFAULT_INCLUDES) $(INCLUDES) ioctlsort_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_FOR_BUILD) ioctlsort_CFLAGS = $(AM_CFLAGS) $(CFLAGS_FOR_BUILD) ioctlsort_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_FOR_BUILD) ioctls_inc_h = $(wildcard $(srcdir)/$(OS)/$(ARCH)/ioctls_inc*.h) ioctlent_h = $(patsubst $(srcdir)/$(OS)/$(ARCH)/ioctls_inc%,ioctlent%,$(ioctls_inc_h)) BUILT_SOURCES += $(ioctlent_h) CLEANFILES = $(ioctlent_h) ioctlent%.h: ioctlsort% ./$< > $@ ioctlsort%$(BUILD_EXEEXT): ioctlsort%.o $(ioctlsort_CC) $(ioctlsort_CFLAGS) $(ioctlsort_LDFLAGS) $< -o $@ ioctlsort%.o: ioctls_all%.h $(srcdir)/ioctlsort.c $(ioctlsort_CC) $(ioctlsort_DEFS) $(ioctlsort_INCLUDES) $(ioctlsort_CPPFLAGS) $(ioctlsort_CFLAGS) -DIOCTLSORT_INC=\"$<\" -c -o $@ $(srcdir)/ioctlsort.c Obviously, the ioctlsort is intended for running only on the host system at build time. But because configure script does not propagate --host option value to the CC_FOR_BUILD properly, it uses "gcc" instead of "mips64el-unknown-linux-gnu-gcc".
Please incluse your emerge --info and relevant distcc config's
i don't see a bug here. ioctlsort is a build-time tool that is compiled with the build-time compiler and executed at build-time. it isn't compiled or installed for the target. if your distcc is wrapping `gcc`, then that's broken.