[M3devel] cm3 on snow leopard?
Tony Hosking
hosking at cs.purdue.edu
Sun Dec 12 21:20:20 CET 2010
PS My "as" shows version:
Apple Inc version cctools-782~37, GNU assembler version 1.38
Antony Hosking | Associate Professor | Computer Science | Purdue University
305 N. University Street | West Lafayette | IN 47907 | USA
Office +1 765 494 6001 | Mobile +1 765 427 5484
On Dec 12, 2010, at 4:35 AM, Mika Nystrom wrote:
> Thanks, Jay.
>
> I wasn't able to use your Darwin.config (remember, I'm installing
> from the release .deb)---there seem to have been too many changes to
> these files for me to be able to sort it all out. However, I figured
> out how to do a "quick and dirty" from your email.
>
> This fixed it for me:
>
> if not defined("SYSTEM_ASM")
> SYSTEM_ASM="/usr/libexec/gcc/darwin/i386/as"
> end
>
> Now to check on all the other problems.
>
> Mika
>
> Jay K writes:
>> --_1377ed26-bb42-4722-b430-c9bf3b1b287d_
>> Content-Type: text/plain; charset="Windows-1252"
>> Content-Transfer-Encoding: quoted-printable
>>
>>
>> I'm more sympathetic to using the already installed C compiler
>> to drive the assembler=2C than to build the current gcc driver.
>>
>>
>> You can see on Darwin we already probe around fairly aggressively
>> for a C compiler that can be told the target:
>>
>> Darwin.common:
>>
>>
>> proc configure_c_compiler() is
>>
>> if defined("SYSTEM_CC")
>> return
>> end
>>
>> %
>> % older compiler doesn't like -m32 or -arch
>> %
>> % gcc -c -m32 -x c /dev/null
>> % cc1: error: invalid option =91m32=92
>> %
>> % fPIC is not usually needed here.
>> % It is the default for Apple gcc and left
>> % here in case user is using a self-built FSF gcc.
>> %
>>
>> SYSTEM_CC =3D "gcc -gstabs+ -fPIC"
>> local m =3D " -m" & {"32BITS":"32"=2C"64BITS":"64"}{WORD_SIZE}
>> local arch =3D " -arch " & DarwinArch
>> if not equal(try_exec("@" & SYSTEM_CC & m & " -c -x c /dev/null -o /dev/n=
>> ull 2>&1 | fgrep \"cc1: error: invalid option \\\`32'\" >/dev/null")=2C 0)
>> SYSTEM_CC =3D SYSTEM_CC & m
>> end
>> if not equal(try_exec("@" & SYSTEM_CC & arch & " -c -x c /dev/null -o /de=
>> v/null 2>&1 | fgrep \"cc1: error: unrecognized command line option \\\\\"-a=
>> rch\\\\\"\" >/dev/null")=2C 0)
>> SYSTEM_CC =3D SYSTEM_CC & arch
>> end
>> %write("SYSTEM_CC is " & SYSTEM_CC)
>> end
>>
> ...
More information about the M3devel
mailing list