[LFS Trac] #2648: GMP instructions (dev version) say to add ABI=32 to CFLAGS; should be separate variable

LFS Trac trac at linuxfromscratch.org
Sun May 2 22:16:16 PDT 2010

#2648: GMP instructions (dev version) say to add ABI=32 to CFLAGS; should be
separate variable
 Reporter:  drjones  |       Owner:  ken@…                   
     Type:  defect   |      Status:  new                     
 Priority:  normal   |   Milestone:  6.7                     
Component:  Book     |     Version:  SVN                     
 Severity:  normal   |    Keywords:  GMP                     

Comment(by gespinasse):

 My mystake, the added instruction is --build=i486-linux

 The diff of configure with and without build show at the start

 -cd /usr/src/gmp-5.0.1 && ./configure --prefix=/usr --disable-static
 ABI=32 #--build=i486-linux
 -checking build system type... athlon-pc-linux-gnu
 -checking host system type... athlon-pc-linux-gnu
 +cd /usr/src/gmp-5.0.1 && ./configure --prefix=/usr --disable-static
 ABI=32 --build=i486-linux
 +checking build system type... i486-pc-linux-gnu
 +checking host system type... i486-pc-linux-gnu
  checking for a BSD-compatible install... /usr/bin/install -c
  checking whether build environment is sane... yes
  checking for a thread-safe mkdir -p... /bin/mkdir -p
 @@ -34,12 +34,11 @@
  checking for build system compiler math library... -lm
  checking for grep that handles long lines and -e... /bin/grep
  checking for egrep... /bin/grep -E
 -checking if the assembler knows about MMX instructions... yes
  using ABI="32"
        CC="gcc -std=gnu99"
        CFLAGS="-Os -march=i486 -mtune=pentium -pipe -fomit-frame-pointer
 -D_FORTIFY_SOURCE=2 -fstack-protector-all -fPIE -Wl,-z,now"
 -      MPN_PATH=" x86/k7/mmx x86/k7 x86 generic"
 +      MPN_PATH=" x86/i486 x86 generic"
  checking for function prototypes... yes
  checking for ANSI C header files... yes
  checking for sys/types.h... yes
 @@ -325,40 +324,41 @@
  config.status: creating config.h
  config.status: linking mpn/generic/add.c to mpn/add.c
  config.status: linking mpn/generic/add_1.c to mpn/add_1.c
 -config.status: linking mpn/x86/k7/aors_n.asm to mpn/add_n.asm
 +config.status: linking mpn/x86/aors_n.asm to mpn/add_n.asm

 Our --build instruction is strange as there is no i486-pc-linux-gnu
 But looking in configure code, the reason why it is working is

     case $host_cpu in
       i386*)                path="x86" ;;
       i486*)                path="x86/i486 x86" ;;
       i586 | pentium)       path="x86/pentium x86" ;;
       pentiummmx)           path="x86/pentium/mmx x86/pentium x86" ;;
       i686 | pentiumpro)    path="x86/p6 x86" ;;
       pentium2)             path="x86/p6/mmx x86/p6 x86" ;;
       pentium3)             path="x86/p6/p3mmx x86/p6/mmx x86/p6 x86";;
       pentiumm | core2 | corei)
                             path="x86/p6/sse2 x86/p6/p3mmx x86/p6/mmx
 x86/p6 x86";;
       k6[23])             path="x86/k6/k62mmx x86/k6/mmx x86/k6 x86" ;;
       k6)                   path="x86/k6/mmx x86/k6 x86" ;;
       geode)                path="x86/k6/k62mmx x86/k6/mmx x86/k6 x86" ;;
       # we don't have any specific 32-bit code for athlon64/opteron, the
       # athlon code should be reasonable
       athlon | athlon64)    path="x86/k7/mmx x86/k7 x86" ;;
       i786 | pentium4)      path="x86/pentium4/sse2 x86/pentium4/mmx
 x86/pentium4 x86" ;;
       # VIA/Centaur processors, sold as CyrixIII and C3.
       viac32)               path="x86/p6/p3mmx x86/p6/mmx x86/p6 x86";;
       viac3*)               path="x86/pentium/mmx x86/pentium x86";;
       atom)                 path="x86/atom x86" ;;
       *)                    path="x86" ;;

Ticket URL: <http://wiki.linuxfromscratch.org/lfs/ticket/2648#comment:5>
LFS Trac <http://wiki.linuxfromscratch.org/lfs/>
Linux From Scratch: Your Distro, Your Rules.

More information about the lfs-book mailing list