You receive this bug because this package does not respect my system's CC (x86_64-pc-linux-gnu-gcc) and calls directly /usr/bin/gcc The possible solutions to fix this issue are: 1)Fix the buildsystem, if you can; 2)inherit toolchain-funcs and use tc-export CC 3)inherit toolchain-funcs and use emake CC="$(tc-getCC)" From the build log: gcc -c -DNOTMUCH_VERSION=0.17 -O2 -pipe -Wall -Wextra -Wwrite-strings -Wmissing-declarations -I./compat -I./lib -fPIC -I./parse-time-string -I./util -I. -DHAVE_GETLINE=1 -D_LARGEFILE64_SOURCE -pthread -I/usr/include/gmime-2.6 -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -DHAVE_VALGRIND=0 -DHAVE_STRCASESTR=1 -DHAVE_STRSEP=1 -DSTD_GETPWUID=1 -DSTD_ASCTIME=1 -DHAVE_XAPIAN_COMPACT=1 -DUTIL_BYTE_ORDER=1234 command-line-arguments.c -o command-line-arguments.o -MD -MP -MF .deps/command-line-arguments.d
I've chosen second approach. Later I'll try to fix that upstream. + 15 Feb 2014; Amadeusz Żołnowski <aidecoe@gentoo.org> notmuch-0.17.ebuild: + Don't call gcc directly, honor CC and CXX. Fixes bug #500864. +