This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: cross-compilation documentation
Peter Barada wrote:
glibc1: ${GLIBC_BUILDDIR1} glibc1-fix
export PATH=${INSTALL_DIR}/bin:${HOST_INSTALL_DIR}/bin:$$PATH; \
cd ${GLIBC_BUILDDIR1}; \
CC=${TARGET}-gcc AR=${TARGET}-ar RANLIB=${TARGET}-ranlib \
${GLIBC_SOURCE_PATH}/configure --host=${TARGET} \
--prefix=/usr --without-cvs --disable-sanity-checks \
--with-headers=${INSTALL_DIR}/${TARGET}/include ; \
make cross-compiling=yes install_root=${INSTALL_DIR}/${TARGET} prefix="" install-headers
glibc1-fix:
mkdir -p ${INSTALL_DIR}/${TARGET}/include/gnu ; \
touch ${INSTALL_DIR}/${TARGET}/include/gnu/stubs.h ; \
cp -f ${GLIBC_SOURCE_PATH}/include/features.h ${INSTALL_DIR}/include/features.h
But this fragment *requires* a cross-compiler to build it.
Hmm. That's odd. I do almost the same thing, but I don't require a cross-compiler.
Maybe the step you're missing is the following kludge:
make sysdeps/gnu/errlist.c
mkdir -p stdio-common
touch stdio-common/errlist-compat.c
That goes between the configure and the make of glibc, and keeps anything
real from being compiled by the install-headers.
... I'm hoping people see that there *is* a
problem making blanket statements that "its perfectly normal to insist
that the system headers be installed when building the bootstrap".
Indeed.
I don't know what the solution is, but I trying to figure out the
minimal set of changes necessary to make a(or most/if not
all -linux toolchains). That way hopefully with the next release of
gcc/glibc I won't have to go through this mess all over again...
I think the powers that be are suggesting that the fix for gcc-3.5
might be to separate out the building of libgcc from the building of
gcc. Hmm, and then separate out the building of anything in glibc
that requires libgcc into a separate target. Then we could do
make bootstrap gcc without libgcc
make whatever parts of glibc that don't depend on libgcc
make real gcc including libgcc
make whatever parts of glibc that depend on libgcc
- Dan
--
Dan Kegel
http://www.kegel.com
http://counter.li.org/cgi-bin/runscript/display-person.cgi?user=78045