With 'AR=/usr/bin/gcc-ar' line in my /etc/portage/make.conf, prepare phase of ebuild failed with message: "sed: -e expression #1, char 12: unknown option to `s'" The specific snippet of code: sed -i "/^AR/s/ar/$(tc-getAR)/" diff/Makefile.in lib/Makefile.in || die This is because sed command argument is expanded into /^AR/s/ar//usr/bin/gcc-ar/ which is wrong. It's necessary to replace '/' character in sed expression with another one, which is not present in AR command fullname, like ':' I'm afraid that this is problem for every ebuild in portage, which is using '/' as a field separator in sed expressions for $(tc-getSOMETHING) when this variable contain '/' character(s).
Created attachment 454046 [details, diff] Patch replacing '/' separator with ':'
[master 86302ebca66] dev-vcs/cvs: Use proper sed separators (#600478 by Jiří Moravec) 1 file changed, 1 insertion(+), 2 deletions(-)