Building gmp 32-bit and 64-bit intel binary on Mac OS X 10.6.4

Elvis Dowson elvis.dowson at mac.com
Mon Sep 13 19:23:01 CEST 2010


Hi,
        I would like to build a gmp combined 32-bit and 64-bit intel binary for Mac OS X 10.6.4. Would someone be able to share the procedure for doing this please?

I'm getting some compilation errors. I know I should probably be specifying ABI=32 and ABI=64, but I don't know how to get it to build the combined library in one shot.

$ ./configure CC='/usr/bin/gcc-4.0' CPP='/usr/bin/cpp-4.0' CXX='/usr/bin/g++-4.0' CXXCPP='/usr/bin/cpp-4.0' CFLAGS='-arch i386 -arch x86_64' CPPFLAGS='-arch i386 -arch x86_64' CXXFLAGS='-arch i386 -arch x86_64' LDFLAGS='-arch i386 -arch x86_64'

$ make

libtool: compile:  ../mpn/m4-ccas --m4=m4 /usr/bin/gcc-4.0 -std=gnu99 -c -DHAVE_CONFIG_H -I. -I.. -D__GMP_WITHIN_GMP -I.. -DOPERATION_add_n -arch i386 -arch x86_64 -arch i386 -arch x86_64 add_n.asm  -fno-common -DPIC -o .libs/add_n.o
m4  -DHAVE_CONFIG_H -D__GMP_WITHIN_GMP -DOPERATION_add_n -DPIC add_n.asm >tmp-add_n.s
 /usr/bin/gcc-4.0 -std=gnu99 -c -DHAVE_CONFIG_H -I. -I.. -D__GMP_WITHIN_GMP -I.. -DOPERATION_add_n -arch i386 -arch x86_64 -arch i386 -arch x86_64 tmp-add_n.s -fno-common -DPIC -o .libs/add_n.o
tmp-add_n.s:83:bad register name `%r8'
tmp-add_n.s:85:bad register name `%rsi)'
tmp-add_n.s:86:bad register name `%rdx)'
tmp-add_n.s:88:bad register name `%rsi,%rcx,8)'
tmp-add_n.s:89:bad register name `%rdx,%rcx,8)'
tmp-add_n.s:90:bad register name `%rdi,%rcx,8)'
tmp-add_n.s:92:bad register name `%rcx'
tmp-add_n.s:95:bad register name `%rax'
tmp-add_n.s:100:bad register name `%r8'
tmp-add_n.s:103:bad register name `%r8'
tmp-add_n.s:104:bad register name `%r10'
tmp-add_n.s:105:bad register name `%r11'
tmp-add_n.s:106:bad register name `%rcx)'
tmp-add_n.s:109:bad register name `%r8'
tmp-add_n.s:112:bad register name `%r8'
tmp-add_n.s:113:bad register name `%r10'
tmp-add_n.s:114:bad register name `%r11'
tmp-add_n.s:117:bad register name `%r11'
tmp-add_n.s:118:bad register name `%r10'
tmp-add_n.s:125:bad register name `%rsi,%rcx,8)'
tmp-add_n.s:126:bad register name `%rdx,%rcx,8)'
tmp-add_n.s:127:bad register name `%r11'
tmp-add_n.s:128:bad register name `%r10'
tmp-add_n.s:130:bad register name `%rsi,%rcx,8)'
tmp-add_n.s:131:bad register name `%rdx,%rcx,8)'
tmp-add_n.s:132:bad register name `%r9'
tmp-add_n.s:133:bad register name `%r8'
tmp-add_n.s:135:bad register name `%rsi,%rcx,8)'
tmp-add_n.s:136:bad register name `%rdx,%rcx,8)'
tmp-add_n.s:137:bad register name `%r11'
tmp-add_n.s:138:bad register name `%r10'
tmp-add_n.s:140:bad register name `%rsi,%rcx,8)'
tmp-add_n.s:141:bad register name `%rdx,%rcx,8)'
tmp-add_n.s:142:bad register name `%r9'
tmp-add_n.s:143:bad register name `%r8'
tmp-add_n.s:145:`jrcxz' is only supported in 64-bit mode
tmp-add_n.s:146:bad register name `%rcx)'
lipo: can't open input file: /var/folders/qD/qDNi6T6GHPmRgBxkKLnxM++++TI/-Tmp-//ccPAco5y.out (No such file or directory)
make[2]: *** [add_n.lo] Error 1
make[1]: *** [all-recursive] Error 1
make: *** [all] Error 2

Best regards,

Elvis Dowson



More information about the gmp-discuss mailing list