On Wed, Aug 10, 2011 at 5:15 AM, Jonathan Nieder <jrnie...@gmail.com> wrote: > Hi, > > Sedat Dilek wrote: > >> Do I need additional patches to gcc trunk (I am using the weekly >> gcc-4.7 snapshot tarballs)? > > No need for patches. My build of gcc trunk finally finished: > > $ ./configure --prefix=$HOME/opt/gcc \ > CFLAGS_FOR_TARGET="-g -O2 -B/usr/lib/x86_64-linux-gnu" \ > CXXFLAGS_FOR_TARGET="-g -O2 -B/usr/lib/x86_64-linux-gnu" > $ make FLAGS_FOR_TARGET='-B$(build_tooldir)/bin/ '\ > '-B$(build_tooldir)/lib/ -isystem $(build_tooldir)/include '\ > '-isystem $(build_tooldir)/sys-include '\ > '-B/usr/lib/x86_64-linux-gnu' \ > BOOT_CFLAGS="-g -O2 -B/usr/lib/x86_64-linux-gnu" > $ make FLAGS_FOR_TARGET='-B$(build_tooldir)/bin/ '\ > '-B$(build_tooldir)/lib/ -isystem $(build_tooldir)/include '\ > '-isystem $(build_tooldir)/sys-include '\ > '-B/usr/lib/x86_64-linux-gnu' \ > BOOT_CFLAGS="-g -O2 -B/usr/lib/x86_64-linux-gnu" \ > install > > The resulting compiler even seems to work, as long as you pass > -B/usr/lib/x86_64-linux-gnu to it. > > Yes, it ought to be easier. Maybe FLAGS_FOR_TARGET does everything we > need. I'd be happy to review a patch that teaches configure.ac to > handle something like > > $ ./configure --prefix=$HOME/opt/gcc \ > --extra-flags-for-target=-B/usr/lib/x86_64-linux-gnu \ > BOOT_FLAGS='-g -O2 -B/usr/lib/x86_64-linux-gnu' > $ make > $ make install > > [...] >> I heard of a gcc multiarch patchset sent to upstream from debian-gcc >> team - you have an URL? > > I'd be interested in the answer to this if there is one, too. > > Thanks, Sedat. > Jonathan >
First of all, thanks for jumping into the issue and sharing your thoughts and results/testing. For i386 I needed to expicitly set -I option with -B option (see [1]), otherwise I had several breakages with gnu/stubs-32.h when playing with *_FOR_TARGET options. ### List of *_FOR_TARGET options: 1. CFLAGS_FOR_TARGET 2. CXXFLAGS_FOR_TARGET 3. LDFLAGS_FOR_TARGET 4. FLAGS_FOR_TARGET ### Like you I have explicitly set, but with -I option (always combined with below options): $ export CFLAGS_FOR_TARGET='-g -O2 -B/usr/lib/i386-linux-gnu -I/usr/include/i386-linux-gnu' $ export CXXFLAGS_FOR_TARGET='-g -O2 -B/usr/lib/i386-linux-gnu -I/usr/include/i386-linux-gnu' ### Playing with LDFLAGS_FOR_TARGET: 1st-Try: export LDFLAGS_FOR_TARGET="-L/usr/lib/${HOST_SYSTEM_MULTIARCH_TYPE} -Wl,-rpath-link=/usr/lib/${HOST_SYSTEM_MULTIARCH_TYPE}:/lib/${HOST_SYSTEM_MULTIARCH_TYPE}:/usr/lib" 2nd-Try: export LDFLAGS_FOR_TARGET="-B/usr/lib/${HOST_SYSTEM_MULTIARCH_TYPE} -I/usr/include/${HOST_SYSTEM_MULTIARCH_TYPE}" 3rd-Try: export LDFLAGS_FOR_TARGET="-L/usr/lib/${HOST_SYSTEM_MULTIARCH_TYPE} -Wl,-rpath-link=/usr/lib/${HOST_SYSTEM_MULTIARCH_TYPE}" NOPE: All try-outs are passed-by but did not work as expected, I got crt*.o was not found. But, isn't LDFLAGS searching for so-libs? ### Playing with FLAGS_FOR_TARGET: $ make FLAGS_FOR_TARGET="${FLAGS_FOR_TARGET} -B/usr/lib/${HOST_SYSTEM_MULTIARCH_TYPE} -I/usr/include/${HOST_SYSTEM_MULTIARCH_TYPE}" OK: This leads to a successful build, did not test the compiler yet (flags by-passed to xgcc). ANYWAY, these workarounds should not be necessary, it should work OOTB. Not sure, what's wrong. What do the experts say? - Sedat - [1] http://anonscm.debian.org/viewvc/pkg-glibc?view=revision&revision=4863 -- To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org