Here is fix to replace configure.in attempt to exec host pcre-config by a pkg-config method. "Previous" method was not really adapted if you try to cross-compile grep. If host have pcre-config, it contain host cflags and ldflags which make linker not happy : i586-geode-linux-uclibc-gcc -Os -pipe -march=k6-2 -fomit-frame-pointer -I/usr/i586-geode-linux-uclibc/usr/include/ -I/usr/i586-geode-linux-uclibc/include/ -o grep grep.o dfa.o kwset.o search.o grepmat.o ../lib/libgreputils.a -L/usr/lib64 -Wl,-Bstatic -lpcre -Wl,-Bdynamic /usr/libexec/gcc/i586-geode-linux-uclibc/ld: skipping incompatible /usr/lib64/libpcre.a when searching for -lpcre /usr/libexec/gcc/i586-geode-linux-uclibc/ld: cannot find -lpcre collect2: ld returned 1 exit status make[2]: *** [grep] Error 1 The attached patch are for grep 2.5.1a and 2.5.4. Reproducible: Always Steps to Reproduce: 1. crossdev -t i586-geode-linux-uclibc 2. emerge-wrapper --init 3. USE=pcre i586-geode-linux-uclibc -vat grep Report have been reported upstream: http://thread.gmane.org/gmane.comp.gnu.grep.bugs/1990
Created attachment 191185 [details, diff] 2.5.1a: replace pcre-config with pkg-config
Created attachment 191186 [details, diff] sys-apps/grep-2.5.1a.ebuild.diff
Created attachment 191188 [details, diff] 2.5.4: replace pcre-config with pkg-config
Created attachment 191190 [details, diff] sys-apps/grep-2.5.4-r1.ebuild.diff
grep-2.6 uses pkg-config now to find pcre