On Tue, Oct 11, 2011 at 9:53 PM, Jonathan Nieder <jrnieder@gmail.com> wrote: > reassign 644986 general > severity 644986 critical > merge 637232 644986 > quit > > Sedat Dilek wrote: > >> I played again with CFLAGS_FOR_TARGET and CXXFLAGS_FOR_TARGET by exporting them. > [...] >> -B/usr/lib/${HOST_SYSTEM_MULTIARCH_TYPE} ... >> ...does NOT catch the problem with crt*.o files. > > Last time we went through this, didn't we discover that one has to set > > FLAGS_FOR_TARGET (instead of CFLAGS_FOR_TARGET or CXXFLAGS_FOR_TARGET) > > and > > on the "make" command line (instead of through the environment or as > a ./configure argument) > > ? Yes, I know it is clunky. > > Reassigning to "general" because the underlying problem (Debian as a > whole is moving to multiarch paths, and we don't provide enough help > with building upstream toolchains that don't know about that) is not > at all specific to libc6-dev. Progress in the form of code or > documentation, in Debian or upstream, would be welcome as always. > > Cheers, > Jonathan > I re-reflected on experiences from #637218 and #629819. Attached is v7 of my build-script. I had success with: HOST_SYSTEM_MULTIARCH_TYPE=$(dpkg-architecture -qDEB_HOST_MULTIARCH) MULTIARCH_FLAGS="-B/usr/lib/${HOST_SYSTEM_MULTIARCH_TYPE} -I/usr/include/${HOST_SYSTEM_MULTIARCH_TYPE}" export CFLAGS="-g -O2" export CXXFLAGS="${CFLAGS}" export CFLAGS_FOR_TARGET="${CFLAGS} ${MULTIARCH_FLAGS}" export CXXFLAGS_FOR_TARGET="${CXXFLAGS} ${MULTIARCH_FLAGS}" ...and... make FLAGS_FOR_TARGET="${FLAGS_FOR_TARGET} ${MULTIARCH_FLAGS}" -j${MAKE_JOBS} 2>&1 | tee ${BUILD_LOG_FILE} ...and... # cat /usr/bin/gcc-4.7 #!/bin/sh exec /opt/gcc-4.7/bin/gcc-4.7 -B/usr/lib/i386-linux-gnu -I/usr/include/i386-linux-gnu "$@" ...and... # cat /usr/bin/g++-4.7 #!/bin/sh exec /opt/gcc-4.7/bin/g++-4.7 -B/usr/lib/i386-linux-gnu -I/usr/include/i386-linux-gnu "$@" Building mesa-from-git was fine. - Sedat - P.S.: build-script (v7) and make-log (v7) attached $ egrep 'CFLAGS|CXXFLAGS|FLAGS_FOR_TARGET' gcc-build/config.log ac_cv_env_CFLAGS_set=set ac_cv_env_CFLAGS_value='-g -O2' ac_cv_env_CXXFLAGS_set=set ac_cv_env_CXXFLAGS_value='-g -O2' CFLAGS='-g -O2' CFLAGS_FOR_BUILD='-g -O2' CFLAGS_FOR_TARGET='-g -O2 -B/usr/lib/i386-linux-gnu -I/usr/include/i386-linux-gnu' CXXFLAGS='-g -O2' CXXFLAGS_FOR_BUILD='-g -O2' CXXFLAGS_FOR_TARGET='-g -O2 -B/usr/lib/i386-linux-gnu -I/usr/include/i386-linux-gnu' DEBUG_PREFIX_CFLAGS_FOR_TARGET='' FLAGS_FOR_TARGET=' -B$(build_tooldir)/bin/ -B$(build_tooldir)/lib/ -isystem $(build_tooldir)/include -isystem $(build_tooldir)/sys-include' LDFLAGS_FOR_TARGET='' SYSROOT_CFLAGS_FOR_TARGET=''
Attachment:
build_gcc-snapshot_v7.sh
Description: Bourne shell script
Attachment:
make_v7.log.xz
Description: Binary data