[Gc] Fwd: unable to compile GC using Apple's llvm-gcc (from XCode 4)

Asst. Prof. Dmitrii (Dima) Pasechnik dima at ntu.edu.sg
Sat Apr 9 10:53:06 PDT 2011

Hi Ivan,

On 9 April 2011 16:53, Ivan Maidanski <ivmai at mail.ru> wrote:
>> Hi there,
>> I am trying to build the GC using Apple's llvm-gcc (which is the
>> default C compiler on the latest XCode 4).
>> (on a 64-bit MacOSX 10.6.7)
>> Nether the stable version, nor the latest CVS version compile.
> I'd tried the CVS version with llvm-gcc-2.7 and got the same problem with GAS on x86, so I've added a workaround.
> I haven't tested with x64.
>> One place that is easy to fix is in
>> libatomic_ops/src/atomic_ops/sysdeps/gcc/x86_64.h
>> Namely, the workaround for LLVM 2.7 GAS is still needed (see lines
>> around line 111 in the CVS version),
>> but it needs a modification to the conditional statement
>> # ifdef AO_XCHGB_RET_WORD
>> (this one does not work).
>> After I get past this problem, I  get
>> ...
>> libtool: compile:  cc -DHAVE_CONFIG_H -I./include -I./include
>> -I./libatomic_ops/src -I./libatomic_ops/src -fexceptions -g -O2 -MT
>> os_dep.lo -MD -MP -MF .deps/os_dep.Tpo -c os_dep.c  -fno-common -DPIC
>> -o .libs/os_dep.o
>> /var/folders/qW/qWY+4Ku1GF0WXrOsV+IDvk+++TM/-Tmp-//ccTVEUmt.s:427:Incorrect
>> register `%eax' used with `b' suffix
>> /var/folders/qW/qWY+4Ku1GF0WXrOsV+IDvk+++TM/-Tmp-//ccTVEUmt.s:767:Incorrect
>> register `%eax' used with `b' suffix
>> make[1]: *** [os_dep.lo] Error 1
>> which I cannot figure out at all.
> I think using "unsigned long long" instead of "unsigned" could work. Could you try this workaround?

It doesn't work: the only difference is a slightly different assembly
error message:

libtool: compile:  gcc -DHAVE_CONFIG_H -I./include -I./include
-I./libatomic_ops/src -I./libatomic_ops/src -fexceptions -g -O2 -MT
os_dep.lo -MD -MP -MF .deps/os_dep.Tpo -c os_dep.c  -fno-common -DPIC
-o .libs/os_dep.o
register `%rax' used with `b' suffix
register `%rax' used with `b' suffix

(same happens if I try "unsigned long")



CONFIDENTIALITY: This email is intended solely for the person(s) named and may be confidential and/or privileged. If you are not the intended recipient, please delete it, notify us and do not copy, use, or disclose its content. Thank you.

Towards A Sustainable Earth: Print Only When Necessary

More information about the Gc mailing list