On 04/30/11 04:27 PM, Dima Pasechnik wrote:
On Apr 30, 12:54 pm, William Stein<wst...@gmail.com>  wrote:

Even worse is behaviour with its clang compilers (they can't even
compile several parts of Sage)

Wow, that's incredible!

We should:

    (1) add a remark right in the prereq spkg that checks that xcode 4 (4.0.1, 
to be precise)
isn't being used (unless SAGE_PORT or something is set)

In fact, I don't know how to check this easily: it ships the same
build of gcc as XCode 3 (3.2.6, to be precise)
(gcc version 4.2.1 (Apple Inc. build 5666) (dot 3))
and there is no ready way to check the version of the whole setup.
The difference sits in libraries.
One notable difference is that cc is not gcc, but a gcc-llvm build.
(namely, gcc version 4.2.1 (Based on Apple Inc. build 5658) (LLVM
build 2335.6)))

So one can test that "cc -v" != "gcc -v", but this does nor seem to be
robust enough.

Probably one can use Applescript, but I have no clue about it.


Can you post the output of these two commands.

$ gcc -dM -E -xc /dev/null
$ cc -dM -E -xc /dev/null

It might help if you sorted them

to find the differences. i.e.

$ gcc -dM -E -xc /dev/null | sort > a
$ cc -dM -E -xc /dev/null | sort > b
$ diff a b



You might find there's something in there which can differentiate them. If there is, we can add a specific test to the scripts $SAGE_LOCAL/bin/testcc.sh and $SAGE_LOCAL/bin/testcxx.sh. Currently those scripts report one of

* GCC
* Sun_Studio
* HP_on_Tru64
* HP_on_HP-UX
* IBM_on_AIX
* HP_on_Alpha_Linux
* Unknown


Currently the scripts check if __GNUC__ is defined and if so its considered gcc or a gcc-like compiler (e.g. Intel's icc). But if there's a need to differentiate Clang, I'd be very surprised if there was not something we can use.

Dave

--
To post to this group, send an email to sage-devel@googlegroups.com
To unsubscribe from this group, send an email to 
sage-devel+unsubscr...@googlegroups.com
For more options, visit this group at http://groups.google.com/group/sage-devel
URL: http://www.sagemath.org

Reply via email to