[MacPorts] #24577: i386-elf-gcc configure error with build_arch i386

MacPorts noreply at macports.org
Thu May 13 14:51:34 PDT 2010


#24577: i386-elf-gcc configure error with build_arch i386
-------------------------------------+--------------------------------------
 Reporter:  orphen.leiliu@…          |       Owner:  stepan@…             
     Type:  defect                   |      Status:  new                  
 Priority:  Normal                   |   Milestone:                       
Component:  ports                    |     Version:  1.8.2                
 Keywords:                           |        Port:  i386-elf-gcc         
-------------------------------------+--------------------------------------

Comment(by stepan@…):

 When compiling GMP you need to add "ABI=32" to its configure run.

 In a custom gcc build script I did this:
 {{{
         if [ `uname` = "Darwin" ]; then
                 # generally the OS X compiler can create x64 binaries.
                 # Per default it generated i386 binaries in 10.5 and x64
                 # binaries in 10.6 (even if the kernel is 32bit)
                 # For some weird reason, 10.5 autodetects an ABI=64 though
                 # so we're setting the ABI explicitly here.
                 OPTIONS="ABI=32"
                 touch .architecture_check.c
                 gcc .architecture_check.c -c -o .architecture_check.o
                 ARCH=`file .architecture_check.o |cut -f5 -d\ `
                 test  "$ARCH" = "x86_64" && OPTIONS="ABI=64"
                 rm .architecture_check.c .architecture_check.o
         fi

         ../${GMP_DIR}/configure --disable-shared --prefix=$TARGETDIR
 $OPTIONS \
                 || touch .failed
 }}}

 Then, MPFR needs to be compiled with GMP's CFLAGS:

 {{{
 # Now set CFLAGS to match GMP CFLAGS.
 HOSTCFLAGS=`grep __GMP_CFLAGS $DESTDIR$TARGETDIR/include/gmp.h |cut -d\"
 -f2`
 [..]
 ../${MPFR_DIR}/configure --disable-shared --prefix=$TARGETDIR \
         --infodir=$TARGETDIR/info \
         --with-gmp=$DESTDIR$TARGETDIR CFLAGS="$HOSTCFLAGS" || touch
 .failed
 }}}

-- 
Ticket URL: <http://trac.macports.org/ticket/24577#comment:4>
MacPorts <http://www.macports.org/>
Ports system for Mac OS


More information about the macports-tickets mailing list