On Wed, Aug 13, 2014 at 5:56 PM, Emil Velikov <emil.l.veli...@gmail.com> wrote: > On 13/08/14 22:22, Ilia Mirkin wrote: >> On Wed, Aug 13, 2014 at 5:16 PM, Emil Velikov <emil.l.veli...@gmail.com> >> wrote: >>> Signed-off-by: Emil Velikov <emil.l.veli...@gmail.com> >>> --- >>> >>> Unless someone object I would like to squash this patch with the >>> previous one. >>> >>> -Emil >>> >>> docs/autoconf.html | 16 ++++++++++++++-- >>> 1 file changed, 14 insertions(+), 2 deletions(-) >>> >>> diff --git a/docs/autoconf.html b/docs/autoconf.html >>> index f27838f..c225659 100644 >>> --- a/docs/autoconf.html >>> +++ b/docs/autoconf.html >>> @@ -141,14 +141,26 @@ assembly will not be used.</p> >>> <dt><code>--host=</code></dt> >>> <dd><p>By default, the build will compile code for the architecture that >>> it's running on. In order to build Mesa on a x64-86 machine that is to run >> >> While you're fixing stuff, x86-64 >> > Ack, will do. > >>> -on a i686, one would need to set the options to: >>> +on a i686, one would need to set the options to:</p> >>> >>> <p><code>--build=i686-pc-linux-gnu --host=i686-pc-linux-gnu</code></p> >>> >>> Note that these can vary from distribution to distribution. For more >>> information check with the >>> <a >>> href="https://www.gnu.org/savannah-checkouts/gnu/autoconf/manual/autoconf-2.69/html_node/Specifying-Target-Triplets.html"> >>> -autoconf manual</a>.</p> >>> +autoconf manual</a>. >>> + >>> + >>> +<p>In some cases a single compiler is capable of handling both >>> architectures >>> +in that case one would need to set the <code>CC,CXX</code> variables >>> +appending the correct machine options. Seek your compiler documentation for >>> +further information - >>> +<a href="https://gcc.gnu.org/onlinedocs/gcc/Submodel-Options.html"> gcc >>> +machine dependent options</a></p> >>> + >>> +<p>The following is the complete setup needed to compile on my Archlinux >>> setup</p> >> >> There's nothing about the below that's specific to Arch, or any >> distro, really -- I'd avoid the explicit distro reference. > Haven't touched any other distro but Arch in years. Yet it makes sense to drop > the distro reference but keep the example.
Right, I was suggesting s/Archlinux// :) > >> Do you >> actually need the --build and --host things? I thought that was if you >> were going to use a cross-compiler. I only have >> x86_64-pc-linux-gnu-gcc, no i686-...-gnu-gcc. >> > --build/host (at lest) used to be required by mesa, as some bits were built > differently when doing cross-compilation. Not sure what the case is now - I > care not look in src/{glsl,mesa} which is where all of that chaos was. But that's my point -- it's not a cross-compilation. It's using the same system compiler. The way cross-compilation works (afaik) is that you just look for $host-gcc, $host-ld, $host-as etc (and use $build-gcc, etc for the binaries that need to be run as part of the build). But i686-...-gcc is not a binary available on my system. So the cross-compilation will fail... Perhaps I'm just misunderstanding how things work though. > > >> In the past I've just done CFLAGS=-m32 CXXFLAGS=-m32 and it has worked >> like a charm. But perhaps there's a downside to doing that... >> > I cannot think of any side effects to be honest (barring any bugs in mesa). > Yet I would love if people avoid touching any *FLAGS :) > > Thanks > -Emil > >>> + >>> +<code>./configure CC="gcc -m32" CXX="g++ -m32" >>> --build=i686-unknown-linux-gnu --host=i686-unknown-linux-gnu ...</code> >>> </dd> >>> </dl> >>> >>> -- >>> 2.0.2 >>> >>> _______________________________________________ >>> mesa-dev mailing list >>> mesa-dev@lists.freedesktop.org >>> http://lists.freedesktop.org/mailman/listinfo/mesa-dev > _______________________________________________ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev