On 9 May 2010 18:58, Gilles Espinasse <[email protected]> wrote: > Just tested on AMD Athlon(tm) 64 Processor 3500+, 32bits distrib, with only > ./configure --build=i486-linux > > this result in > ... > checking for egrep... /bin/grep -E > using ABI="32" > CC="gcc -std=gnu99" > > > CFLAGS="-m32 -O2 -pedantic -fomit-frame-pointer -mtune=i486 -march=i486" > CPPFLAGS="" > MPN_PATH=" x86/i486 x86 generic" > > So adding ABI=32 is not strictly needed when the build cpu is 32 bits only. > > That's hard to search for host_cpu on configure script as 90 lines match > that word. I would advice to search near i486*. > > For the first part of the explanation, there is different way to force > 32bits compilation (linux32, CFLAGS). ABI=32 could be indicated before or > after configure. > I would write : > On 64-bits capable CPU using a 32-bits distrib, you need to add ABI=32 on > the ./configure line or select a 32-bits CPU using --build=[CPU]-linux. If > you want to be able to run the compiled code on a less capable CPU than the > building machine. Use for example --build=i486-linux allow to run on any > i486 or more capable machine. Search near i486* on configure script for the > list of available CPU options. > > Gilles >
For x86_64-capable CPUs (pedantically, I don't think this is an issue on other 64-bit-capable architectures) I see no benefit in specifying '--build'.. ABI=32 is more appropriate. Thanks for confirming the second issue is indeed a "build on one machine, run on another" problem. New version now up, saying (after the ABI=32 stuff) The configure script will optimise gmp for the processor on which it is compiled. If you intend to run the binaries on a different i?86 processor you may need to 'detune' the build. For example, to build for i486 use ./configure ... --build=i486-linux - you can search the configure script for 'i486*)' to find a suitable value from the available i?86 host_cpu variants. [ I'm now trying to guide people explicitly to the code - ' i486*' had a first match on a discussion of m32 etc for old versions of gcc. ] Is this the only place in the current book where following the instructions and building on recent i686 produces binaries that do not run on i486 ? ĸen -- After tragedy, and farce, "OMG poneys!" -- http://linuxfromscratch.org/mailman/listinfo/lfs-dev FAQ: http://www.linuxfromscratch.org/faq/ Unsubscribe: See the above information page
