id	summary	reporter	owner	description	type	status	priority	milestone	component	version	resolution	keywords	cc	os	architecture	failure	difficulty	testcase	blockedby	blocking	related
3637	./configure doesn't understand Gentoo's build/host/target	kolmodin	igloo	"Apparently there are several styles in how to write your build/host/target variables.

In Gentoo they look like this for my amd64 {{{x86_64-pc-linux-gnu}}} which doesn't play well with the current build system.

Default {{{./configure}}} execution in Gentoo ebuilds will pass the following flags:
{{{
./configure --prefix=/usr --host=x86_64-pc-linux-gnu --mandir=/usr/share/man \
    --infodir=/usr/share/info --datadir=/usr/share --sysconfdir=/etc \
    --localstatedir=/var/lib --libdir=/usr/lib64 --build=x86_64-pc-linux-gnu
}}}

Which results in:

{{{
checking for gfind... no
checking for find... /usr/bin/find
checking for sort... /usr/bin/sort
checking for GHC version date... given 6.12.0.20091010
checking for ghc... /usr/bin/ghc
checking version of ghc... 6.10.4
Target platform inferred as: x86_64-unknown-linux
Unknown vendor linux
}}}

So we sed it like this:
{{{
build=`echo ""$build"" | sed -e 's/linux-gnu/linux/' -e 's/-pc-/-unknown-/'`
host=`echo ""$host"" | sed -e 's/linux-gnu/linux/' -e 's/-pc-/-unknown-/'`
target=`echo ""$target"" | sed -e 's/linux-gnu/linux/' -e 's/-pc-/-unknown-/'`
}}}
but of course we would prefer not to have to handle this specially.

That is, the {{{vendor}}} is {{{pc}}} and the {{{OS}}} is {{{linux-gnu}}}."	merge	closed	high	6.12.2	Build System	6.12.1 RC1	fixed	regression	slyfox@… asuffield@…	Unknown/Multiple	Unknown/Multiple	Building GHC failed	Unknown				
