BobBuildTool/basement

add cross-compilation support for git

Closed this issue · 1 comments

buildTools: [target-toolchain, curl]
buildVars: [AUTOCONF_HOST, PKG_VERSION]
buildScript: |
mkdir -p install
tar -xf $1/git-${PKG_VERSION}.tar.xz
pushd git-${PKG_VERSION}
./configure --host=${AUTOCONF_HOST} \
--prefix=/usr \
--with-curl=${BOB_DEP_PATHS[net::curl-dev]}/usr \
--without-python \
--without-expat
makeParallel LIB_4_CRYPTO="$(pkg-config --libs libssl libcrypto)"
make DESTDIR=${PWD}/../install install
popd

currently it is not possible to cross-compile git, because of missing --build argument, we should add this.

As discussed with @jkloetzke in #136 (comment) it's not as easy as adding the --build parameter. Git has some configure checks which run actual test programs (which of course fails when cross-compiling). You'd have to set the respective ac_ variables in advance in order to keep the configure script from trying to do this. The actual hard part is to get the correct settings for those variables, though, as they depend on - for example - the target libc.