Index: build ================================================================== --- build +++ build @@ -183,23 +183,30 @@ function postconfigure() { : } -function configure() { +function configure_gcc() { glibcdir="/opt/appfs/core.appfs.rkeene.org/glibc/platform/latest" + glibcdir="$(readlink -f "${glibcdir}")" + dynlinker="$(ls "${glibcdir}"/lib/ld-linux*.so.* | tail -n 1)" if [ ! -f "${dynlinker}" ]; then die 'glibc directory is not available (appfs running/working?)' fi CC="${CC:-gcc} -nostdinc -I${glibcdir}/include" + BUILD_CC="${CC}" + HOST_CC="${CC}" LDFLAGS="${LDFLAGS} -Wl,--rpath,${glibcdir}/lib -Wl,--dynamic-linker,${dynlinker}" PKG_CONFIG_LIBDIR="${glibcdir}/lib/pkgconfig" - export LDFLAGS PKG_CONFIG_LIBDIR + export CC BUILD_CC HOST_CC LDFLAGS PKG_CONFIG_LIBDIR +} +function configure() { + configure_gcc ./configure --prefix="${prefix}" --sysconfdir="${prefix}/etc" --libdir="${prefix}/lib" --localstatedir=/var "${configure_extra[@]}" } function prebuild() { : @@ -240,12 +247,10 @@ if [ -n "${message}" ]; then echo "error: ${message}" >&2 fi - cleanup - exit 1 } scriptdir="$(cd "$(dirname "$(which "$0")")" && pwd)" if [ -z "${scriptdir}" ]; then